Beginning Ethereum Smart Contracts Programming: With Examples in Python, Solidity, and Javascript, 2Nd Edition Wei-Meng Lee

Вам также может понравиться

Скачать как pdf или txt
Скачать как pdf или txt
Вы находитесь на странице: 1из 70

Beginning Ethereum Smart Contracts

Programming: With Examples in


Python, Solidity, and JavaScript, 2nd
Edition Wei-Meng Lee
Visit to download the full and correct content document:
https://ebookmass.com/product/beginning-ethereum-smart-contracts-programming-wi
th-examples-in-python-solidity-and-javascript-2nd-edition-wei-meng-lee/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Go Programming Language For Dummies 1st Edition Wei-


Meng Lee

https://ebookmass.com/product/go-programming-language-for-
dummies-1st-edition-wei-meng-lee/

Beginning Programming with Python For Dummies 3rd


Edition John Paul Mueller

https://ebookmass.com/product/beginning-programming-with-python-
for-dummies-3rd-edition-john-paul-mueller/

Learning Scientific Programming with Python 2nd Edition


Christian Hill

https://ebookmass.com/product/learning-scientific-programming-
with-python-2nd-edition-christian-hill-2/

Learning Scientific Programming With Python 2nd Edition


Christian Hill

https://ebookmass.com/product/learning-scientific-programming-
with-python-2nd-edition-christian-hill/
Beginning Programming. All-in-One 2nd Edition Wallace
Wang

https://ebookmass.com/product/beginning-programming-all-in-
one-2nd-edition-wallace-wang/

Python Programming and SQL: 10 Books in 1 - Supercharge


Your Career with Python Programming and SQL Andrew Reed

https://ebookmass.com/product/python-programming-and-
sql-10-books-in-1-supercharge-your-career-with-python-
programming-and-sql-andrew-reed/

Learning Scientific Programming with Python Hill

https://ebookmass.com/product/learning-scientific-programming-
with-python-hill/

Python & JavaScript Mastery: 2 Books In 1- Learn And


Master Two Powerful Programming Languages Alex Iversion

https://ebookmass.com/product/python-javascript-mastery-2-books-
in-1-learn-and-master-two-powerful-programming-languages-alex-
iversion/

Mastering Functional Programming with Python Brett


Neutreon

https://ebookmass.com/product/mastering-functional-programming-
with-python-brett-neutreon/
Beginning Ethereum
Smart Contracts
Programming
With Examples in Python, Solidity,
and JavaScript
Second Edition

Wei-Meng Lee
Beginning Ethereum Smart Contracts Programming: With Examples in Python,
Solidity, and JavaScript

Wei-Meng Lee
Ang Mo Kio, Singapore

ISBN-13 (pbk): 978-1-4842-9270-9 ISBN-13 (electronic): 978-1-4842-9271-6


https://doi.org/10.1007/978-1-4842-9271-6
Copyright © 2023 by Wei-Meng Lee
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Joan Murray
Development Editor: Laura Berendson
Editorial Assistant: Gryffin Winkler
Copy Editor: Mary Behr
Cover image designed by eStudioCalamar
Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza,
Suite 4600, New York, NY 10004-1562, USA. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@
springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole
member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc
is a Delaware corporation.
For information on translations, please e-mail booktranslations@springernature.com; for reprint,
paperback, or audio rights, please e-mail bookpermissions@springernature.com.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub (github.com/apress). For more detailed information, please visit www.apress.com/
source-code.
Printed on acid-free paper
Table of Contents
About the Author����������������������������������������������������������������������������������������������������� xi

About the Technical Reviewer������������������������������������������������������������������������������� xiii


Acknowledgments���������������������������������������������������������������������������������������������������xv

Introduction�����������������������������������������������������������������������������������������������������������xvii

Chapter 1: Understanding the Science Behind Blockchain: Cryptography��������������� 1


What Is Cryptography?������������������������������������������������������������������������������������������������������������������ 1
Types of Cryptography������������������������������������������������������������������������������������������������������������� 2
Hash Functions����������������������������������������������������������������������������������������������������������������������������� 3
Uses of Hashing����������������������������������������������������������������������������������������������������������������������� 5
Implementing Hashing in Python��������������������������������������������������������������������������������������������� 6
Symmetric Cryptography�������������������������������������������������������������������������������������������������������������� 7
Generating the Shared Key in Python�������������������������������������������������������������������������������������� 8
Performing Symmetric Encryption������������������������������������������������������������������������������������������ 9
Performing Symmetric Decryption������������������������������������������������������������������������������������������ 9
Asymmetric Cryptography���������������������������������������������������������������������������������������������������������� 10
Generating and Saving the Public/Private Key Pairs������������������������������������������������������������� 12
Encrypting Using the Public Key�������������������������������������������������������������������������������������������� 14
Decrypting Using the Private Key������������������������������������������������������������������������������������������ 14
Digital Signature: Signing Using Private Key������������������������������������������������������������������������� 15
Verifying the Digital Signature Using a Public Key���������������������������������������������������������������� 18
How Cryptography Is Used in Blockchain����������������������������������������������������������������������������������� 18
Hashing��������������������������������������������������������������������������������������������������������������������������������� 19
Symmetric and Asymmetric Cryptography���������������������������������������������������������������������������� 19
Digital Signature�������������������������������������������������������������������������������������������������������������������� 20
Summary������������������������������������������������������������������������������������������������������������������������������������ 21

iii
Table of Contents

Chapter 2: Understanding Blockchain�������������������������������������������������������������������� 23


Motivations Behind Blockchain��������������������������������������������������������������������������������������������������� 24
Placement of Trust����������������������������������������������������������������������������������������������������������������� 24
Trust Issues��������������������������������������������������������������������������������������������������������������������������� 25
Solving Trust Issues Using Decentralization�������������������������������������������������������������������������� 26
Example of Decentralization�������������������������������������������������������������������������������������������������� 26
Blockchain As a Distributed Ledger��������������������������������������������������������������������������������������� 29
How a Blockchain Works������������������������������������������������������������������������������������������������������������� 30
Chaining the Blocks��������������������������������������������������������������������������������������������������������������� 31
Immutability of Blockchains�������������������������������������������������������������������������������������������������� 34
Consensus Protocols������������������������������������������������������������������������������������������������������������� 35
Proof of Work������������������������������������������������������������������������������������������������������������������������� 37
Proof of Stake (PoS)�������������������������������������������������������������������������������������������������������������� 41
Blockchain in More Detail����������������������������������������������������������������������������������������������������������� 43
Types of Nodes���������������������������������������������������������������������������������������������������������������������� 44
Merkle Tree and Merkle Root������������������������������������������������������������������������������������������������� 47
Uses of Merkle Tree and the Merkle Root������������������������������������������������������������������������������ 48
Summary������������������������������������������������������������������������������������������������������������������������������������ 49

Chapter 3: Implementing Your Own Blockchain Using Python������������������������������� 51


Your Conceptual Blockchain Implementation����������������������������������������������������������������������������� 51
Obtaining the Nonce�������������������������������������������������������������������������������������������������������������� 53
Installing Flask���������������������������������������������������������������������������������������������������������������������� 55
Importing the Various Modules and Libraries������������������������������������������������������������������������ 56
Declaring the Class in Python������������������������������������������������������������������������������������������������ 56
Finding the Nonce����������������������������������������������������������������������������������������������������������������� 57
Appending the Block to the Blockchain��������������������������������������������������������������������������������� 58
Adding Transactions�������������������������������������������������������������������������������������������������������������� 59
Exposing the Blockchain Class as a REST API����������������������������������������������������������������������� 60
Obtaining the Full Blockchain������������������������������������������������������������������������������������������������ 60
Performing Mining����������������������������������������������������������������������������������������������������������������� 60
Adding Transactions�������������������������������������������������������������������������������������������������������������� 61

iv
Table of Contents

Testing Your Blockchain�������������������������������������������������������������������������������������������������������������� 62


Synchronizing Blockchains��������������������������������������������������������������������������������������������������������� 67
Testing the Blockchain with Multiple Nodes�������������������������������������������������������������������������� 72
Full Listing for the Python Blockchain Implementation��������������������������������������������������������������� 78
Summary������������������������������������������������������������������������������������������������������������������������������������ 85

Chapter 4: Creating Your Own Private Ethereum Test Network������������������������������ 87


Downloading and Installing Geth, the Ethereum Client��������������������������������������������������������������� 87
Installing Geth for macOS������������������������������������������������������������������������������������������������������ 88
Installing Geth for Windows��������������������������������������������������������������������������������������������������� 89
Installing Geth for Linux��������������������������������������������������������������������������������������������������������� 89
Creating the Private Ethereum Test Network������������������������������������������������������������������������������ 90
Creating the Genesis Block��������������������������������������������������������������������������������������������������� 91
Creating a Folder for Storing Node Data�������������������������������������������������������������������������������� 92
Initiating a Blockchain Node�������������������������������������������������������������������������������������������������� 93
Starting Up the Nodes����������������������������������������������������������������������������������������������������������� 94
Managing Accounts������������������������������������������������������������������������������������������������������������������� 107
Removing Accounts������������������������������������������������������������������������������������������������������������� 109
Setting the Coinbase����������������������������������������������������������������������������������������������������������� 109
Summary���������������������������������������������������������������������������������������������������������������������������������� 110

Chapter 5: Using the MetaMask Crypto-Wallet����������������������������������������������������� 111


What Is MetaMask?������������������������������������������������������������������������������������������������������������������ 111
How MetaMask Works Behind the Scenes�������������������������������������������������������������������������� 112
Installing MetaMask������������������������������������������������������������������������������������������������������������ 113
Setting Up the Accounts������������������������������������������������������������������������������������������������������ 115
Using the MetaMask Extension������������������������������������������������������������������������������������������� 119
Selecting Ethereum Networks�������������������������������������������������������������������������������������������������� 121
Getting Test Ethers�������������������������������������������������������������������������������������������������������������� 122
Creating Additional Accounts����������������������������������������������������������������������������������������������� 126
Transferring Ethers�������������������������������������������������������������������������������������������������������������� 129
Recovering Accounts����������������������������������������������������������������������������������������������������������� 135

v
Table of Contents

Importing and Exporting Accounts�������������������������������������������������������������������������������������������� 138


Exporting Accounts�������������������������������������������������������������������������������������������������������������� 138
Importing Accounts������������������������������������������������������������������������������������������������������������� 142
Summary���������������������������������������������������������������������������������������������������������������������������������� 144

Chapter 6: Getting Started with Smart Contracts������������������������������������������������� 145


What Is a Smart Contract?�������������������������������������������������������������������������������������������������������� 145
How Smart Contracts Are Executed������������������������������������������������������������������������������������� 146
Your First Smart Contract���������������������������������������������������������������������������������������������������������� 148
Using the Remix IDE������������������������������������������������������������������������������������������������������������ 148
Compiling the Contract�������������������������������������������������������������������������������������������������������� 152
Testing the Smart Contract Using the JavaScript VM���������������������������������������������������������� 154
Getting the ABI and Bytecode of the Contract��������������������������������������������������������������������� 158
Testing the Smart Contract Using the Goerli Testnet����������������������������������������������������������� 162
Summary���������������������������������������������������������������������������������������������������������������������������������� 166

Chapter 7: Storing Proofs Using Smart Contracts������������������������������������������������ 167


A Smart Contract as a Store of Proofs�������������������������������������������������������������������������������������� 167
Creating the Smart Contract������������������������������������������������������������������������������������������������ 168
Compiling the Contract�������������������������������������������������������������������������������������������������������� 174
Deploying the Contract�������������������������������������������������������������������������������������������������������� 176
Testing the Contract������������������������������������������������������������������������������������������������������������ 177
Making Further Changes to the Smart Contract����������������������������������������������������������������������� 180
Restricting Access to Functions������������������������������������������������������������������������������������������ 181
Accepting Payments in Smart Contracts����������������������������������������������������������������������������� 182
Events in Smart Contracts��������������������������������������������������������������������������������������������������� 188
Cashing Out������������������������������������������������������������������������������������������������������������������������� 191
Destroying a Contract���������������������������������������������������������������������������������������������������������� 193
Summary���������������������������������������������������������������������������������������������������������������������������������� 194

Chapter 8: Using the web3.js APIs����������������������������������������������������������������������� 195


What Is web3.js?����������������������������������������������������������������������������������������������������������������������� 195
Installing web3.js���������������������������������������������������������������������������������������������������������������� 196

vi
Table of Contents

Testing the web3.js Using MetaMask���������������������������������������������������������������������������������� 197


Interacting with a Contract Using web3.js�������������������������������������������������������������������������� 202
Summary���������������������������������������������������������������������������������������������������������������������������������� 214

Chapter 9: Developing Web3 dapps using Python������������������������������������������������ 215


Interacting with Ethereum Using Python���������������������������������������������������������������������������������� 216
Registering with Infura�������������������������������������������������������������������������������������������������������� 217
Connecting to Infura������������������������������������������������������������������������������������������������������������ 220
Fetching a Block������������������������������������������������������������������������������������������������������������������ 221
Setting Up the Accounts������������������������������������������������������������������������������������������������������ 223
Getting the Balance of an Account�������������������������������������������������������������������������������������� 225
Transferring Ethers Between Accounts������������������������������������������������������������������������������� 225
Creating a Dapp Using Python�������������������������������������������������������������������������������������������������� 227
Loading the Contract����������������������������������������������������������������������������������������������������������� 230
Base64 Encoding����������������������������������������������������������������������������������������������������������������� 231
Saving Credentials on the Blockchain��������������������������������������������������������������������������������� 231
Verifying the Result������������������������������������������������������������������������������������������������������������� 234
Summary���������������������������������������������������������������������������������������������������������������������������������� 239

Chapter 10: Project: Online Lottery���������������������������������������������������������������������� 241


How the Lottery Game Works���������������������������������������������������������������������������������������������������� 241
Defining the Smart Contract������������������������������������������������������������������������������������������������ 243
Betting a Number���������������������������������������������������������������������������������������������������������������� 246
Setting the Winning Number and Announcing the Winners������������������������������������������������� 249
Getting the Game Status and Winning Number������������������������������������������������������������������� 253
Cashing Out from the Contract�������������������������������������������������������������������������������������������� 253
Testing the Contract������������������������������������������������������������������������������������������������������������������ 254
Announcing the Winner������������������������������������������������������������������������������������������������������� 258
Saving the ABI of the Contract��������������������������������������������������������������������������������������������� 260
Deploying the Contract to the Testnet��������������������������������������������������������������������������������� 262
Creating the Web Front End������������������������������������������������������������������������������������������������������ 263
Announcing the Winning Number���������������������������������������������������������������������������������������� 269
Cashing Out������������������������������������������������������������������������������������������������������������������������� 271
vii
Table of Contents

The Complete Contract������������������������������������������������������������������������������������������������������������� 272


Summary���������������������������������������������������������������������������������������������������������������������������������� 277

Chapter 11: Creating Your Tokens������������������������������������������������������������������������ 279


What Are Tokens?���������������������������������������������������������������������������������������������������������������������� 279
How Tokens Are Implemented?������������������������������������������������������������������������������������������� 281
Minting New Tokens������������������������������������������������������������������������������������������������������������ 282
Burning Tokens�������������������������������������������������������������������������������������������������������������������� 282
Units Used Internally in Token Contracts����������������������������������������������������������������������������� 283
ERC-20 Token Standard������������������������������������������������������������������������������������������������������� 285
Creating Token Contracts���������������������������������������������������������������������������������������������������������� 287
Overriding the Number of Decimal Places of Precision������������������������������������������������������� 288
Deploying the Token Contract���������������������������������������������������������������������������������������������� 289
Adding the Token to MetaMask������������������������������������������������������������������������������������������� 291
What Can You Do with the Token?��������������������������������������������������������������������������������������� 291
Using Tokens for Smart Contract Payments������������������������������������������������������������������������ 292
Selling Tokens Programmatically���������������������������������������������������������������������������������������������� 300
Calculating the Amount of Tokens Bought��������������������������������������������������������������������������� 302
Deploying the Contract�������������������������������������������������������������������������������������������������������� 304
Summary���������������������������������������������������������������������������������������������������������������������������������� 310

Chapter 12: Creating Non-Fungible Tokens Using ERC-721���������������������������������� 311


What Is an NFT?������������������������������������������������������������������������������������������������������������������������ 311
Ownership vs. Copyright����������������������������������������������������������������������������������������������������� 313
Where Do You Buy or Sell NFTs?����������������������������������������������������������������������������������������� 313
Creating NFTs Using Token Contracts��������������������������������������������������������������������������������������� 314
Who Deploys the NFT Token Contract?�������������������������������������������������������������������������������� 315
Using ERC-721 for Creating NFTs���������������������������������������������������������������������������������������� 315
Deploying the NFT Token Contract��������������������������������������������������������������������������������������� 316
Testing the NFT Contract����������������������������������������������������������������������������������������������������� 318
Summary���������������������������������������������������������������������������������������������������������������������������������� 327

viii
Table of Contents

Chapter 13: Introduction to Decentralized Finance���������������������������������������������� 329


Limitations of Traditional Finance��������������������������������������������������������������������������������������������� 329
Decentralized Finance��������������������������������������������������������������������������������������������������������� 330
Components in DeFi������������������������������������������������������������������������������������������������������������ 331
Stablecoins������������������������������������������������������������������������������������������������������������������������������� 331
Fiat-Backed Stablecoins������������������������������������������������������������������������������������������������������ 333
Crypto-Backed Stablecoins������������������������������������������������������������������������������������������������� 334
Non-Collateralized Stablecoins������������������������������������������������������������������������������������������� 340
Crypto Exchanges��������������������������������������������������������������������������������������������������������������������� 340
Creating a Decentralized Exchange������������������������������������������������������������������������������������� 342
Creating the Token Contract������������������������������������������������������������������������������������������������ 343
Deploying the Token Contract���������������������������������������������������������������������������������������������� 343
Creating the DEX Contract��������������������������������������������������������������������������������������������������� 345
Funding the DEX������������������������������������������������������������������������������������������������������������������ 351
Swapping WML Tokens for LWM Tokens������������������������������������������������������������������������������ 354
Summary���������������������������������������������������������������������������������������������������������������������������������� 359

Index��������������������������������������������������������������������������������������������������������������������� 361

ix
About the Author
Wei-Meng Lee is the founder of Developer Learning
Solutions, a technology company specializing in hands-on
training of blockchain and other emerging technologies.
He has many years of training expertise and his courses
emphasize a learn-by-doing approach. He is a master at
making learning a new programming language or technology
less intimidating and more fun. He can be found speaking
at conferences worldwide such as NDC, and he regularly
contributes to online and print publications such as Medium
(https://weimenglee.medium.com) and CoDe Magazine.
He is active on social media, on his blog calendar.learn2develop.net, on Facebook
(www.facebook.com/DeveloperLearningSolutions), on Twitter as @weimenglee, and
on LinkedIn (linkedin.com/leeweimeng).

xi
About the Technical Reviewer
Prasanth Sahoo is a Blockchain Certified Professional,
Professional Scrum Master, and Microsoft Certified
Trainer who is passionate about helping others
learn how to use and gain benefits from the latest
technologies. He is a thought leader and practitioner
in blockchain, cloud, and Scrum. He also handles the
Agile methodology, cloud, and blockchain technology
community initiatives within TransUnion through
coaching, mentoring, and grooming techniques.
Prasanth is an adjunct professor and a technical speaker. He was selected as a speaker
at the China International Industry Big Data Expo 2018 by the Chinese government and
also to the International Blockchain Council by the governments of Telangana and Goa.
He also received accolades for his presentation at China International Industry Big Data
Expo 2018 by the Chinese government. Prasanth has published a patent titled "Digital
Educational Certificate Management System using IPFS Based Blockchain."
To date, Prasanth has reached over 50,000 students, mostly within the technical
domain. He is a working group member of the CryptoCurrency Certification
Consortium, Scrum Alliance, Scrum Organization, and International Institute of
Business Analysis.

xiii
Acknowledgments
Writing a book is immensely exciting, but along with it comes long hours of hard work
and responsibility, straining to get things done accurately and correctly. To make a book
possible, a lot of unsung heroes work tirelessly behind the scenes.
For this, I would like to take this opportunity to thank a number of special people
who made this book possible. First, I want to thank my acquisitions editor, Joan Murray,
for giving me this opportunity. Thanks for suggesting that I update this book with the
latest happenings in the crypto world!
Next, a huge thanks to Jill Balzano, my associate editor, who was always very patient
with me, even though I missed several of my deadlines for the revision of this book.
Thanks, Jill, for your guidance. I could not finish the book without your encouragement
and help!
Equally important is my project coordinator, Shobana Srinivasan. Shobana has been
very patient with me during the whole project while I struggle between work and writing.
Thanks, Shobana, for the assistance rendered during the project!
Last, but not least, I want to thank my parents and my wife, Sze Wa, for all
the support they have given me. They have selflessly adjusted their schedules to
accommodate my busy schedule when I was working on this book. I love you all!

xv
Introduction
Welcome to Beginning Ethereum Smart Contracts Programming, Second Edition!
This book is a quick guide to getting started with Ethereum smart contracts
programming. It starts off with a discussion of blockchain and the motivations behind it.
You will learn what a blockchain is, how blocks in a blockchain are chained together, and
how blocks get added to a blockchain. You will also understand how mining works and
discover the various types of nodes in a blockchain network. Since the publication of the
first edition of this book, a lot of things have changed. In particular, Ethereum has been
updated to use Proof of Stake (PoS) (instead of Proof of Work) as its consensus algorithm.
This book has been updated to include a discussion of how PoS works.
Once that is out of the way, you dive into the Ethereum blockchain. You will learn
how to use an Ethereum client (Geth) to create a private Ethereum blockchain and
perform simple transactions such as sending Ethers to another account.
The next part of this book discusses smart contract programming, a unique feature of
the Ethereum blockchain. You will jumpstart on smart contracts programming without
needing to wade through tons of documentation. The learn-by-doing approach of this
book makes you productive in the shortest amount of time. By the end of this book,
you should be able to write smart contracts, test them, deploy them, and create web
applications to interact with them. In this second edition, I have added more examples
to make it easy for you to explore more complex smart contracts.
The last part of this book touches on tokens and DeFi (decentralized finance),
something that has taken the cryptocurrency market by storm. You will be able to create
your own tokens, launch your own ICO, and write token contracts that allow buyers
to buy tokens using Ethers. As a bonus, I show you how to write a DEX (decentralized
exchange) smart contract to exchange two different tokens!
This book is designed for those who want to get started quickly with Ethereum smart
contracts programming. Basic programming knowledge and an understanding of Python
or JavaScript are recommended.
I hope you enjoy working on the sample projects as much as I enjoyed creating them!

xvii
CHAPTER 1

Understanding the
Science Behind
Blockchain: Cryptography
The reason you are reading this book is because you want to understand what a
blockchain is, how it works, and how you can write smart contracts on it to do cool
things. And while I perfectly understand that you are excited to get started in this first
chapter, we need to take a step back and look at one fundamental technology that makes
blockchain possible: cryptography.
In this chapter, I will explain what cryptography is, the different types of
cryptographic algorithms, how they work, and how they play a vital role in the world
of blockchain. I will also show you how to experiment with the various cryptographic
algorithms using the Python programming language. Even if you are familiar with
cryptography, I suggest scanning through this chapter so that you have a firm foundation
for the subsequent chapters.

What Is Cryptography?
Whether you are trying to build a web application to store users’ credentials or writing
a network application to securely transmit encrypted messages, or even trying to
understand how blockchain works, you need to understand one important topic:
cryptography.
So, what exactly is cryptography? Put simply, cryptography (or cryptology) is the
practice and study of hiding information. It is the science of keeping information secret
and safe.

1
© Wei-Meng Lee 2023
W.-M. Lee, Beginning Ethereum Smart Contracts Programming, https://doi.org/10.1007/978-1-4842-9271-6_1
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

One of the simplest and most widely known cryptographic algorithms is the Caesar
Cipher. It is a very simple algorithm in which each letter in the plaintext is replaced by a letter
a fixed number of positions down the alphabet. Consider the example shown in Figure 1-1.

Figure 1-1. Understanding how the Caesar Cipher works

As you can observe, each character in the alphabet is shifted down three positions.
A becomes D, B becomes E, and so on. If you want to send a sentence (known as the
plaintext), say ATTACK, to your recipient, you map each of the characters in the sentence
using the above algorithm and derive the encrypted sentence (known as the ciphertext):
DWWDFN. When the recipient receives the ciphertext, they reverse the process to obtain
the plaintext. While this algorithm may seem impressive (especially in the early days
of cryptography), it no longer works as intended as soon as someone knows how the
messages are encrypted. Nevertheless, this is a good illustration of the attempt by early
inventors of cryptography to hide information. Today, the cryptographic algorithms we
use are much more sophisticated and secure.
In the following sections, I will explain the main types of cryptographic functions
and how they are used.

Types of Cryptography
There are three main types of cryptography:

• Hash functions

• Symmetric cryptography

• Asymmetric cryptography

In the following sections, I will go through each of the above types in more detail.

2
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Hash Functions
Hashing is the process in which you convert a block of data of arbitrary size to a
fixed-size value. The function that performs this process is known as a hash function .
Figure 1-2 shows the hashing process.

Figure 1-2. A hash function converts a block of data of variable length to


a fixed-­length output

Tip A commonly-used hash function is SHA256. SHA stands for Secure Hash
Algorithms.

For example, the SHA256 hash function converts a block of text into a 256-bit
hash output. The resultant hash is usually written in hexadecimal, and since each
hexadecimal takes up 4 bits, a 256-bit hash will have 64 characters. To experience how
hashing works, go to https://emn178.github.io/online-tools/sha256.html, type in a
sentence, and observe the result (see Figure 1-3).

3
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Figure 1-3. Trying out the SHA256 hash function

Hashing has the following important properties:

• Preimage resistant: Based on the hash created, you cannot obtain


the original block of text.

• Deterministic: The same block of text will always produce the same
hash output.

• Collision resistant: It is hard to find two different blocks of text that


will produce the same hash.

Another important feature of hashing is that a single change in the original text will
cause a totally different hash to be generated. This is also known as the avalanche effect.
For example, a change in a single character in the input shown in Figure 1-4 will have a
totally different output.

4
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Figure 1-4. A single change in the input will cause a totally different output hash

Uses of Hashing
Hashing fulfils some very important roles in computing. For one, websites use hashing
to store your password, instead of storing it in plaintext. Storing your password as hashes
prevents hackers from reversing the hashes and obtaining your original password (which
may very likely be used on other websites as well).
Hashing also plays a very crucial role in blockchain, where each block is “chained”
to the previous block using the hash of the previous block. Any modifications to a block
will invalidate the hash stored in the next block, and the rest of the blocks will hence be
invalid.

Tip Some commonly used hashing algorithms are MD5, SHA256, SHA512, and
Keccak-256.

5
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Implementing Hashing in Python

Note To install Python on your computer, the easiest way is to download the
Anaconda package (www.anaconda.com/products/distribution). If you do
not want to install Python on your computer, you can use Google Colab
(https://colab.research.google.com).

In Python, you can use the hashlib module to perform hashing. The following code
snippet uses the sha256() function to perform hashing on a string:

import hashlib

result = hashlib.sha256(
    bytes("The quick brown fox jumps over the lazy dog",'utf-8'))

Note that the string to be hashed must be passed to the sha256() function as a
byte array. And so you use the bytes() function to convert the string into a byte array.
Alternatively, in Python, you can prefix the string with a b to denote a bytes string literal:

result = hashlib.sha256(
    b'The quick brown fox jumps over the lazy dog')

The sha256() function returns a sha256 hash object. To get the resultant hash in
hexadecimal, you can call the hexdigest() function of the sha256 hash object:

print(result.hexdigest())

The hash for the above string is as follows:

d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592

If you make a small change to the original string, the output is drastically different
from the previous hash:

result = hashlib.sha256(
    b'The quick brown fox jumps over the lazy dag')
print(result.hexdigest())
# output:
# 559cc2cb0e1998182b4b6343e38611b3757e8a6279d43e9914d74dfb7e7089e6

6
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Symmetric Cryptography
In symmetric cryptography, you use the same cryptographic key (commonly referred to
as the shared key) for both the encryption of plaintext and the decryption of ciphertext.
Figure 1-5 shows the use of the shared key for both encryption and decryption.

Figure 1-5. Using a shared key for encryption and decryption

Symmetric cryptography is fast and simple, but the main problem is how to ensure
that the key is kept secret. For example, if Tom wants to send a secret message to Susan,
Tom can encrypt the message using the shared key and Susan can decrypt the encrypted
message using the same shared key. The problem here is how can Tom securely send
Susan the shared key? Can Tom email Susan? Send it through SMS or WhatsApp? How
about through the traditional post office? All these methods are not absolutely safe and
are subject to eavesdropping. Moreover, there is this popular saying, “Three may keep a
secret if two of them are dead.” This means, if more than one person knows the secret, it
is no longer a secret.
Having said that, symmetric cryptography has its uses and applications. It is useful
when you want to protect your private data. For example, say you have some confidential
data on your computer that you want to prevent others from seeing. Using symmetric
cryptography, you can encrypt and decrypt the data using the same key, which is only
known to you and no one else.

7
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Tip Some examples of symmetric key algorithms are AES (Advanced Encryption


Standard, originally known as Rijndael), DES (Data Encryption Standard), and IDEA
(International Data Encryption Algorithm).

Generating the Shared Key in Python


In Python, you can use the cryptography module for symmetric and asymmetric
cryptography. To use the cryptography module, install it using pip:

$ pip install cryptography

Let’s generate a shared key in Python. To do so, use the Fernet class:

from cryptography.fernet import Fernet

# generate the shared key


shared_key = Fernet.generate_key()
print(shared_key)

# base64 encoded, binary format


# A new key is generated each time you run this block of code
# e.g. b'ixXEfrz2NTJlxy1OhxXlsCiFf0Ycg_GL0Cy0MlgTv4U='

Tip The Fernet class is an implementation of symmetric (also known as “secret


key”) authenticated cryptography. Fernet uses the AES algorithm in CBC mode with
a 128-bit key for encryption. For more details, refer to https://github.com/
fernet/spec/blob/master/Spec.md.

The generate_key() function returns a shared key in binary format and it is base64
encoded.

8
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Performing Symmetric Encryption


To encrypt your data using the shared key, you first create an instance of the Fernet class
using the shared key:

# create an instance of the Fernet class


fernet = Fernet(shared_key)

You can then use the encrypt() function to encrypt your data:

# encrypt the message with the shared key


ciphertext = fernet.encrypt(
    bytes("Secret message!",'utf-8'))
# remember to pass in a byte array

You can save the encrypted data into a file:

# write the encrypted message to file


with open('message.encrypted', 'wb') as f:
    f.write(ciphertext)

And you can save the shared key to file:

# write the shared key to file


with open('symmetric_key.crypt', 'wb') as f:
    f.write(shared_key)

Performing Symmetric Decryption


Decryption is similar to encryption. First, load the shared key from the file (which you
saved previously):

with open('symmetric_key.crypt', 'rb') as f:


    shared_key = f.read()
print(shared_key)

Then, create an instance of the Fernet class using the shared key and call the
decrypt() function to decode the ciphertext:

# create an instance of the Fernet class


fernet = Fernet(shared_key)

9
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

# decrypt the encrypted message read from file


with open('message.encrypted', 'rb') as f:
    print(fernet.decrypt(f.read()).decode("utf-8"))

Asymmetric Cryptography
Unlike symmetric cryptography, which uses a single shared key, asymmetric
cryptography uses a key-pair, one public and one private.

Tip Asymmetric cryptography is also known as public-key cryptography.

A public key algorithm generates two keys that are mathematically linked:

• One public and one private: The public key, as the name implies,
should be made public. The private key, on the other hand,
absolutely must be kept a secret.

• You can encrypt data with a public key and decrypt with the private
key. For example, if Tom wants to send a secret message to Susan,
Tom could encrypt the message using Susan’s public key and only
Susan can decrypt the secret message with her private key.

• You can encrypt data with a private key and decrypt with the public
key. At first, this sounds counterintuitive. If one could decrypt using
the public key (which is supposed to be public), what’s the point of
this? Actually, this is useful. Suppose Tom encrypts a message using
his own private key and sends it to Susan. When Susan receives
the message, she can try to decrypt it using Tom’s public key. If the
message can be decrypted, this means that the message has not been
tampered with and that it indeed comes from Tom. On the other
hand, if the message has been tampered with, Susan would not be
able to decrypt the message using Tom’s public key. This technique is
used in creating a digital signature.

Tip Some examples of public key algorithms are RSA (Rivest–Shamir–Adleman),


Elliptical Curve Cryptography (ECC), and TLS/SSL protocol.

10
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Figure 1-6 shows the first approach, that of encrypting the data using the public key
and then decrypting it using the private key.

Figure 1-6. Encrypting data using the public key and then decrypting the
ciphertext using the private key

Figure 1-7 shows the second approach of encrypting the data using the private key
and then decrypting it using the public key.

11
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Figure 1-7. Encrypting data using the private key and then decrypting the
ciphertext using the public key

Generating and Saving the Public/Private Key Pairs


Let’s generate the public/private key pair using the cryptography module with some
commonly used parameters:

from cryptography.hazmat.backends import default_backend


from cryptography.hazmat.primitives.asymmetric import rsa

# generate the private key


private_key = rsa.generate_private_key(
    public_exponent=65537,
    key_size=2048,
    backend=default_backend()
)

# derive the public key from the private key


public_key = private_key.public_key()

12
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

In this code snippet, you are using the RSA algorithm to first generate a private key.
Using the private key, you can then derive its corresponding public key. Once the keys
are generated, it’s useful to serialize (flatten) them to files:

from cryptography.hazmat.primitives import serialization

#---serialize the private key as bytes---


pem = private_key.private_bytes(
    encoding = serialization.Encoding.PEM,
    format = serialization.PrivateFormat.PKCS8,
    encryption_algorithm = serialization.NoEncryption()
)
with open('private_key.pem', 'wb') as f:
    f.write(pem)

#---serialize the public key as bytes---


pem = public_key.public_bytes(
    encoding = serialization.Encoding.PEM,
    format = serialization.PublicFormat.SubjectPublicKeyInfo
)
with open('public_key.pem', 'wb') as f:
    f.write(pem)

You also need to be able to load them back from files:

with open('private_key.pem', 'rb') as f:


    private_key = serialization.load_pem_private_key(
        f.read(),
        password = None,
        backend = default_backend()
    )

with open('public_key.pem', 'rb') as f:


    public_key = serialization.load_pem_public_key(
        f.read(),
        backend = default_backend()
    )

13
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Encrypting Using the Public Key


You are now ready to perform encryption using the public key:

from cryptography.hazmat.primitives import hashes


from cryptography.hazmat.primitives.asymmetric import padding

plaintext = bytes("This message is secret.",'utf-8')

# encrypt the message using the public key


ciphertext = public_key.encrypt(
    plaintext,
    padding.OAEP(
        mgf = padding.MGF1(algorithm = hashes.SHA256()),
        algorithm = hashes.SHA256(),
        label = None
    )
)

Note The encrypted ciphertext is a byte array.

Decrypting Using the Private Key


With the ciphertext created, you can decrypt it using the private key:

# decrypt using the private key


plaintext = private_key.decrypt(
    ciphertext,
    padding.OAEP(
        mgf = padding.MGF1(algorithm = hashes.SHA256()),
        algorithm = hashes.SHA256(),
        label = None
    )
)

14
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

# decode the plaintext as it is a byte array


print(plaintext.decode('utf-8'))
# This message is secret.

Note The decrypted plaintext is a byte array.

Digital Signature: Signing Using Private Key


Earlier I mentioned that in a digital signature you perform encryption using the private
key and then decrypt using the public key. How does this really work and how is it
useful? Let’s look at the flow of events shown in Figure 1-8.

Figure 1-8. Generating a digital signature using the private key

15
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

• First, the text to be sent is hashed using a hash function.

• The hash is then encrypted using the private key and turned into a
digital signature (this also includes the information on the hashing
algorithm used).

• The original text, together with the digital signature, are then sent to
the recipient. This is known as the signed message.

Figure 1-9 shows what happens when the signed message is received by the
recipient.

Figure 1-9. Verifying a digital signature using the public key

• When the signed message is received, the receiver uses the sender’s
public key to decrypt the hash from the digital signature.

• The receiver also hashes the received text and compares it with the
hash that was decrypted in the previous step.

• If the two hashes match, this means the text has not been
tampered with.

Note A digital signature is a mathematical technique used to validate the


authenticity and integrity of a message, software, or digital document.

16
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Let’s create a digital signature using the private key.


Technically, you can’t call the encrypt() function on the private key:

private_key.encrypt(...)    # ERROR
# AttributeError: '_RSAPrivateKey' object has no attribute 'encrypt'

Rather, you call the sign() function:

import base64

plaintext = bytes("This message is public.",'utf-8')

# sign the message using the private key


signed = private_key.sign(
    plaintext,
    padding.PSS(
        mgf = padding.MGF1(algorithm=hashes.SHA256()),
        salt_length = padding.PSS.MAX_LENGTH
    ),
    hashes.SHA256()
)

# print out the digital signature using base64 encoding


signed_base64 = base64.b64encode(signed).decode('utf-8')
print(signed_base64)

Here you use the private key to sign the message. The sign() function returns the
digital signature of the string. It returns the digital signature as a byte array, and in the
above code snippet you encode it using base64 encoding and then converted it to string.
The output looks like this:

aNUZixxLUiRRpDjm+nqkcaZo5URklvIA/hiSECR+DoLmS+oVb650Ic5/vg6ADmCvi91CSwiXRY
kknDBEr2qTWaK+Fe9UPqukDFx8WwyW7K2NacjS8TiKqAfPPSH4t2l9ohexwTqfih9oZXli57zf
Z4LKaY63iQxXlWKE9S5OZ0hWyGUfygEInY8OZerGKWFnmxuXHjWNCpDmzSngP04MYBBnfoPVps
Dg7vgKL0gpaz1dn2Qg+Ra2GFLmznqjYKq2qP43zLrdYSmzH3MmPAkO0AIh8XaRnHc+q0XYyUGhT
Bm9iIa7rS8eYaB7MD9G18j0HA7lWWVQjqujnFCQNm8Npg==

When you transmit the message (plaintext), you also send the digital signature
along with it.

17
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Verifying the Digital Signature Using a Public Key


When the recipient receives the message along with the digital signature, they can
simply verify that the message has not been tampered by calling the verify() function
on the public key:

from cryptography.exceptions import InvalidSignature

# decode the digital signature from base64


signed = base64.b64decode(signed_base64)

try:
    public_key.verify(
        signed,
        plaintext,    # from the previous section
        padding.PSS(
            mgf = padding.MGF1(hashes.SHA256()),
            salt_length = padding.PSS.MAX_LENGTH
        ),
        hashes.SHA256()
    )
    print('Signature is valid!')
except InvalidSignature:
    print('Signature is invalid!')

Note that you have to catch the exception raised by the verify() function. If there is
no exception, the signature is deemed to be correct; otherwise, it is invalid.

How Cryptography Is Used in Blockchain


If you have been following up to this point, you should now have a good idea of how
cryptography works. You might now be wondering how cryptography plays an important
role in blockchain.

18
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

The following sections discuss how the various cryptographic algorithms are used in
blockchain. If you are new to blockchain, feel free to skip the following sections and read
the next chapter. Come back to the next few sections after you have read the following
chapters:
• Chapter 2: Hashing is used to “chain” the blocks in a blockchain.

• Chapters 4 and 5: Asymmetric cryptography is used to generate your


accounts, and symmetric cryptography is used to secure the accounts
you have created in your crypto-wallets.
• Chapter 4 onwards: Asymmetric cryptography is used to create digital
signatures for all of your transactions on the blockchain.

H
 ashing
As mentioned briefly, hashing is used to “chain” the blocks in a blockchain. Each block
in a blockchain contains the hash of the previous block. Doing so allows you to ensure
that data recorded on the blockchain are immutable and thus prevent tampering.
Another good use case of hashing is when storing data on the blockchain. Since all
data on public blockchains are open to scrutiny, you should not store private data on the
public blockchain. If you need to store private data on a public blockchain for proofing
purposes, you should instead store the hash of the data, since it is not reversible.
Chapter 7 provides a good example of this.

Symmetric and Asymmetric Cryptography


Symmetric and asymmetric cryptography are used in generating and securing of
accounts in blockchain.
As shown in Figure 1-10, when you create an account in Ethereum, a private key
using asymmetric cryptography is first generated.

19
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Figure 1-10. Understanding how an account is generated and secured

Using this private key, a public key is generated using ECDSA (Elliptic Curve Digital
Signature Algorithm). This public key is then used to generate the account address using
the Keccak256 hashing algorithm. The last 20 bytes of this output is used as the address
of the account.
At the same time, remember that when you create an account you must supply
a password. This password is used to encrypt your private key using symmetric
cryptography.

D
 igital Signature
In blockchain, a digital signature is used when creating transactions. In Chapter 4, you
will learn how to create a simple transaction by sending some Ethers from one account
to another.
When you create a transaction, the transaction is signed using your account’s private
key to derive the digital signature. The digital signature, together with the details of the
transaction, are then broadcasted to the various miners/validators in the blockchain
network (see Figure 1-11).

20
Chapter 1 Understanding the Science Behind Blockchain: Cryptography

Figure 1-11. A digital signature is created for a transaction to prove the identity of
the creator

The miners/validators, upon receiving your transaction, verify the authenticity of


your transaction using the transaction’s digital signature. Once the transaction is verified
to be authentic, the miners/validators proceed to verify the content of the transaction.

S
 ummary
In this chapter, you learned about the main science behind blockchain: cryptography.
You learned about hashing, symmetric cryptography, and asymmetric cryptography. If
you are familiar with Python, I strongly suggest you try out the code samples so that you
get first-hand experience with the various cryptographic algorithms. With that, you are
now ready to dive into the world of blockchain. See you in Chapter 2!

21
CHAPTER 2

Understanding Blockchain
One of the hottest technologies of late is blockchain. But what exactly is a blockchain?
And how does it actually work? In this chapter, you will explore the concept of
blockchain, how the concept was conceived, and what problems it aims to solve. By the
end of this chapter, the idea and motivation behind blockchain will be crystal clear.

Tip For the clearly impatient, a blockchain is a digital transaction of records that
is arranged in chunks of data called blocks. These blocks link with each other
through a cryptographic validation known as a hashing function. Linked together,
these blocks form an unbroken chain, a blockchain. A blockchain is programmed
to record not only financial transactions but virtually everything of value. Another
common name for blockchain is distributed ledger.

Hold on tight, as I’m going to discuss a lot of concepts in this chapter. But if you
follow along closely, you’ll understand the concepts of blockchain and be on your way to
creating some really creative applications on the Ethereum blockchain in the upcoming
chapters!

Tip Ethereum is an open-source public blockchain that is similar to the Bitcoin


network. Besides offering a cryptocurrency known as Ether (which is similar to
Bitcoin), the main difference between it and Bitcoin is that it offers a programming
platform on top of the blockchain called Smart Contract. This book focuses on the
Ethereum blockchain and Smart Contract.

23
© Wei-Meng Lee 2023
W.-M. Lee, Beginning Ethereum Smart Contracts Programming, https://doi.org/10.1007/978-1-4842-9271-6_2
Chapter 2 Understanding Blockchain

Motivations Behind Blockchain


Most people have heard of cryptocurrencies, or at least, Bitcoin.

Note The technology behind cryptocurrencies is blockchain.

To understand why we need cryptocurrencies, you have to first start by


understanding a fundamental concept: trust. Today, any asset of value or transaction
is recorded by a third party, such as a bank, government, or company. We trust banks
to not steal our money, and they are regulated by the government. And even if the
banks fail, they are backed by the government. We also trust our credit card companies.
Sellers trust credit card companies to pay them the money, and buyers trust credit card
companies to settle any disputes with the sellers.

Placement of Trust
All of this boils down to one key concept: the placement of trust. And that is, we place
our trust in a central body. Think about it. In our everyday life, we place our trust in
banks and we place our trust in our governments.
Even for simple mundane day-to-day activities, we place our trust in central bodies.
For example, when you go to the library to borrow a book, you trust that the library will
maintain a proper record of the books you have borrowed and returned.
The key theme is that we trust institutions but don’t trust each other. We trust our
government, banks, even our library, but we just don’t trust each other. As an example,
consider the following scenario. Imagine you work at a cafe, and someone walks up to
you and offers you a $10 bill for two cups of coffee. Another person offers to pay you
for the two cups of coffee using a handwritten note saying he owes you $10. Which one
would you trust? The answer is pretty obvious, isn’t it? Naturally you would trust the
$10 bill as opposed to the handwritten note. This is because you understand that you
can use the $10 bill elsewhere for other goods or services and that it is backed by the US
government. In contrast, the handwritten note is not backed by anyone, except perhaps
the person who wrote it, and hence it has literally no value.
Now let’s take the discussion a bit further. Again, imagine you are trying to sell
something. Someone comes up to you and suggests paying for your goods using the
currencies shown in Figure 2-1.

24
Chapter 2 Understanding Blockchain

Figure 2-1. Currencies from two countries

Would you accept the currencies shown in the figure? Here, you have two different
currencies, one from Venezuela and one from Zimbabwe. In this case, the first thing you
consider is whether these currencies are widely accepted. Then you consider your trust
in these governments. You might have read in the news about the hyperinflation in these
two countries, and that these currencies might not retain their value over time. So, would
you accept these currencies as payment?

Trust Issues
Earlier, I mentioned that people trust institutions and don’t trust each other. But even
established economies can fail, such as in the case of the financial crisis of the United
States in 2007–2008. Investment bank Lehman Brothers collapsed in September 2008
because of the subprime mortgage market. So, if banks from established economies
can collapse, how can people in less-developed countries trust their banks and
governments? Even if the banks are trusted, your deposits may be monitored by the
government, and they could arrest you based on your transactions.
As you saw in the example in the previous section, there are times when people don’t
trust institutions, especially if the political situation in that country is not stable.

25
Chapter 2 Understanding Blockchain

This brings us to the next key issue: even though people trust institutions,
institutions can fail. And when people lose trust in institutions, people turn to
cryptocurrencies. In the next section, I will discuss how to solve the trust issues using
decentralization, a fundamental concept behind cryptocurrency.

Solving Trust Issues Using Decentralization


Now that you have seen the challenges of trust, who to trust and who not to trust,
it is time to consider a way to solve the trust issues. In particular, blockchain uses
decentralization to solve the trust issue.
In order to understand decentralization, let’s use a very simple example based on
our daily lives.

Example of Decentralization
To understand how decentralization solves the trust issue, let’s consider a real-life
example.
Imagine a situation where you have three persons with DVDs that they want to share
with one another (see Figure 2-2).

Figure 2-2. Sharing DVDs among a group of people

26
Chapter 2 Understanding Blockchain

The first thing they need to do is to have someone keep track of the whereabouts
of each DVD. Of course, the easiest is for each person to keep track of what they have
borrowed and what they have lent, but since people inherently do not trust each other,
this approach is not very popular among the three people.
To solve this issue, they decided to appoint one person, say B, to keep a ledger of the
whereabouts of each DVD (see Figure 2-3).

Figure 2-3. Appointing a particular person to keep the records

This way, there is a central body to keep track of the whereabouts of each DVD. But
wait, isn’t this the problem with centralization? What happens if B is not trustworthy?
Turns out that B has the habit of stealing DVDs, and he can easily modify the ledger to
erase the record of DVDs that he has borrowed. So, there must be a better way.
Then someone has an idea! Why not let everyone keep a copy of the ledger?
Whenever someone borrows or lends a DVD, the record is broadcast to everyone, and
everyone records the transaction. See Figure 2-4.

27
Chapter 2 Understanding Blockchain

Figure 2-4. Getting everyone to keep the records

So now the record keeping is decentralized. Three people now hold the same ledger.
But wait a minute. What if A and C conspire to change the ledger so that they can steal
the DVDs from B? Since majority wins, as long as there is more than 50% of the people
with the same records, the others would have to listen to the majority. And because there
are only three people in this scenario, it is extremely easy to get more than 50% of the
people to conspire.
The solution is to have a lot more people to hold the ledger, especially people who
are not related to the DVD-sharing business (see Figure 2-5).

28
Chapter 2 Understanding Blockchain

Figure 2-5. Getting a group of unrelated people to help keep the records

This way, it makes it more difficult for one party to alter the records in the ledger. In
order to alter a record, it would need to involve a number of people to do so all at the
same time, which is a time-consuming affair. And this is the key idea behind a distributed
ledger, commonly known as blockchain.

Blockchain As a Distributed Ledger


Now that you have a better idea of a distributed ledger, you can associate it with the term
blockchain. Using the DVD exchange example, each time a DVD is borrowed or returned,
a transaction is created. A number of transactions are then grouped into a block. As more
transactions are performed, the blocks are linked together cryptographically, forming
what we now call a blockchain (see Figure 2-6).

29
Chapter 2 Understanding Blockchain

Figure 2-6. Transactions form a block, and blocks are then chained

Here’s a summary of a few important points:

• Centralized databases and institutions work when there is trust in the


system of law, governments, regulatory bodies, and people.

• A decentralized database built on the blockchain removes the need


for the trust in a central body.

• A blockchain can be used for anything of value, not just currencies.

How a Blockchain Works


At a very high level, a blockchain consists of a number of blocks. Each block contains a
list of transactions and a timestamp (see Figure 2-7).

30
Chapter 2 Understanding Blockchain

Figure 2-7. Every blockchain has a beginning block known as the genesis block

The blocks are connected to each other cryptographically, the details of which
I will discuss in the sections ahead. The first block in a blockchain is known as the
genesis block.

Note Every blockchain has a genesis block.

So, the next important questions is, how do you chain the blocks together?

Chaining the Blocks


To understand how blocks in a blockchain are chained together, you must understand
one key concept: hashing.

Tip Chapter 1 discussed hashing in more detail. Be sure to read it first before
continuing with this section.

31
Chapter 2 Understanding Blockchain

Recall that a hash function is a function that maps data of arbitrary size to data of
fixed size. By altering a single character in the original string, the resultant hash value is
totally different from the previous one. Most importantly, observe that a single change
in the original message results in a completely different hash, making it difficult to know
that the two original messages are similar.
A hash function has the following characteristics:

• It is deterministic: The same message always results in the


same hash.

• It is a one-way process: When you hash a string, it is computationally


hard to reverse a hash to its original message.

• It is collision resistant: It is hard to find two different input messages


that hash to the same hash.

You are now ready to learn how blocks in a blockchain are chained together. To chain
the blocks together, the content of each block is hashed and then stored in the next block
(see Figure 2-8). This way, if any transaction in a block is altered, this will invalidate the
hash of the current block, which is stored in the next block, which in turn invalidates the
hash of the next block, and so on.

32
Another random document with
no related content on Scribd:
von Et. Geoffroy Georges Cuvier zuliebe dem Dunkel des
Uhrmacherberufs entrissen und an der Menagerie des Museums
angestellt, seinen alternden Gönner von der Mitleitung dieser seiner
eigenen Gründung verdrängte. Nach dem wenige Monate später
erfolgten Tode Fr. Cuviers wurde freilich Et. Geoffroy wieder in seine
Rechte eingesetzt.

5. Nachfolger Cuviers.
Im Anschluß an diese im Vordergrund stehenden Persönlichkeiten des
Pflanzengartens sind nun noch einige ihrer Mitarbeiter und Nachfolger zu nennen:
P. A . L a t r e i l l e (1762-1833, seit 1799 am Museum angestellt), der neben den
Würmern und Krebsen besonders die Insekten pflegte und zum eigentlichen
Begründer der modernen Entomologie geworden ist. Ferner seine Nachfolger J .
V. A u d o u i n (1797-1841) und E . B l a n c h a r d (1820-1889), die beide
wesentlich zur Kenntnis des Baues und der Physiologie der Insekten und Spinnen
beitrugen. D u c r o t a y de Blainville (1777-1850) begann seine
naturwissenschaftlichen Studien unter Cuvier, wurde 1812 Professor an der
Faculté des Sciences, erhielt 1830 Lamarcks und von 1832 an Cuviers Professur.
Trotz des Zerwürfnisses mit dem Meister ist er der echteste Schüler und
Nachfolger Cuviers gewesen. Er lehnt wieder mehr an Geoffroy an durch
Berücksichtigung der Physiologie. Bei der Klassifikation stellt er die Gesamtgestalt
des Bauplans mehr in den Vordergrund und führt den Begriff Typus für die
höheren, auf Baupläne begründeten Abteilungen ein. Sein verdienstvollstes Werk
ist die Osteographie der Wirbeltiere (1839). Lacepèdes Bearbeitung der Fische
wurde weit überholt durch das von Cuvier mit einer historischen und anatomischen
Einleitung ausgerüstete Werk von Va l e n c i e n n e s (1828-49) über die
Knochenfische. A . D u m é r i l s (1812-1870) Bearbeitung der Knorpelfische
erschien erst 1865. Der Vater D u m é r i l (geb. 1774, der erste Professor für die
drei unteren Wirbeltierklassen am Museum 1825, gest. 1860) und B i b r o n
bearbeiteten im Sinne Cuviers die Amphibien und Reptilien (Herpétologie générale
1835-50). Die Ornithologie war seit Buffons Zeiten in Frankreich heimisch und fand
hauptsächlich Vertreter in L e v a i l l a n t , Ve i l l o t und D e s M u r s , später
besonders im jüngeren A . M i l n e - E d w a r d s (geb. 1834, 1876 Nachfolger
seines Vaters, 1891 Direktor des Museums, starb 1900), der der fossilen Avifauna
Frankreichs und derjenigen Madagaskars und der Maskarenen besondere Werke
widmete. Unter den um die Anatomie der Wirbellosen verdienten französischen
Forschern sind besonders hervorzuheben: H . M i l n e - E d w a r d s , der mehrere
Gruppen der Wirbellosen, insbesondere die Krustazeen, aufs eingehendste
bearbeitete, ferner H . d e L a c a z e - D u t h i e r s und d e Q u a t r e f a g e s , F.
D u j a r d i n (Protozoen), S a v i g n y (Anneliden). Von großer Bedeutung sind die
Arbeiten der Reisenden von Anfang des 19. Jahrhunderts geworden (s. S. 148).
Durch sie wurden die reichen Materialien für die Arbeiten der Gelehrten am
Museum zusammengetragen. Im ganzen bewegte sich aber die französische
Biologie in gewiesenen Bahnen vorwärts, und nur wenige Namen bezeichnen
Forscher von hervorragender Bedeutung in der geschichtlichen Entwicklung
unserer Wissenschaft. Unter denen der letzten Dezennien seien genannt: E .
B l a n c h a r d , der die Typen der Würmer und Arthropoden, insbesondere auch in
anatomischer Richtung, untersuchte, aber sich auch um die landwirtschaftliche
Zoologie verdient machte. A . d e Q u a t r e f a g e s (1810-1892) unternahm
faunistische Studien an den französischen Küsten gemeinsam mit H . M i l n e -
E d w a r d s , wurde 1855 Professor der Anatomie und Ethnologie, und hat als
solcher gegen Darwins Abstammungslehre Stellung genommen. Praktisch förderte
er die Fischzucht in hohem Maße. H . d e L a c a z e - D u t h i e r s (1821-1901,
Schüler von H . M i l n e - E d w a r d s , von 1865 Professor am Museum und von
1868 an der Universität) wandte zuerst in ausgedehnterem Maße die verfeinerte
Experimentalphysiologie auf die niedere Tierwelt an. 1873 gründete er die
zoologische Station Roscoff, später die in Banyuls, und erwarb sich damit nicht nur
für Frankreich ein hervorragendes Verdienst. Ein Nachfolger Cuviers in mancherlei
Hinsicht ist L o u i s A g a s s i z . Geboren 1807 zu Motier in der Schweiz, studierte
er zuletzt in München und gab 1829 die Beschreibung der Ausbeute an Fischen
Brasiliens von Spix und Martius heraus. 1833-42 erschien sein Hauptwerk, „Die
fossilen Fische“, welches nach einer Seite, die Cuvier offen gelassen hatte, die
Paläontologie der Wirbeltiere erweiterte. 1833 Professor in Neuchâtel, siedelte
Agassiz 1846 nach Nordamerika über, wo er der eigentliche Popularisator der
Naturgeschichte wurde. Mit erstaunlichem Geschick pflanzte er dort die Tradition,
große Summen für naturgeschichtliche Zwecke flüssig zu machen. Er gründete
nach dem Muster des Pariser Museums das Museum of Comparative Zoology an
der Harvard-Universität, organisierte Unterricht und wissenschaftliche Arbeit.
Seine allgemeinen Ansichten legte er im Essay on Classification nieder, sowie in
zahlreichen populären Darstellungen. Er starb 1873. Im wesentlichen
unterscheidet er sich von Cuvier durch eine noch stärker theosophische Färbung
seiner Fassung der Konstanztheorie. Jede Art ist konstant und der Ausfluß einer
Idee des Schöpfers. Der Urzweck des Schöpfers bei Schöpfung der Tier- und
Pflanzenarten war die beharrliche Erhaltung seiner eigenen Gedanken. Mehr als
Cuvier nimmt Agassiz auf die Embryologie Rücksicht; er betont den Parallelismus
zwischen geologischer und embryologischer Reihenfolge der höheren Tiere, ohne
einen realen Zusammenhang beider Parallelen zuzugeben. Ein heftiger Gegner
des Darwinismus, trug er lange dazu bei, den Widerstand gegen die
Entwicklungslehre zu verstärken. Anderer Art ist das Bild von H e n r i
Milne-Edwards.
(Geboren 1800 zu Bruges, wurde er 1823 Doktor der Medizin, folgte Friedrich
Cuvier 1838 als Mitglied der Akademie, wurde 1841 Professor der Entomologie
am Museum, übernahm 1861 nach Et. Geoffroys Tode die höheren Wirbeltiere,
von 1843 an las er an der Faculté des Sciences vergleichende Anatomie und
Physiologie, starb 1886.) Anfänglich an Cuvier anlehnend, übertrug er
die Homologisierung der Mundteile, wie sie Savigny für die Insekten
gegeben hatte, auf die Krustazeen. Er entwickelte namentlich die
Ansicht von der Vervollkommnung der Organismen durch
Arbeitsteilung, wobei er den anatomisch erkennbaren Teilen eine
gewisse Selbständigkeit der Funktion zuerkannte. In höherem Alter
(1879) trennte er sich vollständig von den Anhängern der
Konstanztheorie. Das Hauptwerk von H . M i l n e - E d w a r d s bleiben die
Leçons de physiologie et d’anatomie comparée (1857-83), worin
nicht nur die Erfahrungen der gesamten Zootomie sorgfältig und
kritisch abgestuft vor uns treten, sondern auch die Verbindung mit
der während eines Jahrhunderts nicht minder blühenden Physiologie
Frankreichs und des Auslandes zu voller Entfaltung kommt. Unsere
Wissenschaft hat seither kein besseres in dieser Richtung liegendes
Werk erlebt. Ein Hauptverdienst von H. Milne-Edwards endlich
besteht darin, daß er ein ausgezeichnetes für die französischen
Schulen bestimmtes Lehrbuch verfaßt hat. In ähnlicher Richtung
verdient auch A c h . C o m t e einen Ehrenplatz neben ihm. Überhaupt
ist zu betonen, daß die französischen Zoologen allezeit sich in den
Dienst der Verbreitung des Wissens und der praktischen Anwendung
der Zoologie gestellt haben.

6. Nachfolger Et. Geoffroys.


An Et. Geoffroy und die französischen Physiologen schließt mit
einer eklektisch gehaltenen vergleichenden Physiologie 1839 A .
D u g è s (1797-1838, Professor in Montpellier) an. Hatte Et. Geoffroy
die Ansicht vertreten, die Gliedertiere entsprechen den Wirbeltieren
unter Umkehrung von Rücken und Bauch, so suchte Dugès im
Anschluß an die 1827 erschienene Monographie des Blutegels von
M o q u i n - Ta n d o n die Übereinstimmung des Baues vom gesamten
Bauplan in die Teilstücke des Körpers, die Zooniten (Somiten) zu
verlegen. Dadurch, daß er auch die Radiaten aus solchen Zooniten
bestehen läßt, wurden die Klüfte zwischen den vier Cuvierschen
Tierstämmen überbrückt und Dugès wird zum Metamerentheoretiker
für die Invertebraten. Zugleich aber wird durch ihn die Frage nach
der tierischen Individualität aufgerollt. Als vergleichender Anatom
reiht sich hier ein A . S e r r e s (1786-1868, von 1839 an Professor der
vergleichenden Anatomie am Museum), der um die vergleichende
Anatomie und Physiologie, insbesondere des Nervensystems,
hervorragende Verdienste hatte. Einen gewissen natürlichen
Abschluß der Geoffroyschen Schule bildet der Sohn Etiennes,
I s i d o r e G e o f f r o y S t . H i l a i r e (1805-61, seit 1841 Professor am Museum).
Aufgewachsen in der großen Tradition von Jugend an, ebensowohl
nach der empirischen wie der philosophischen Seite ausgebildet, ein
glänzender Stilist, hat er in seiner Histoire naturelle générale (1854
bis 1862) die vielleicht sorgfältigste Eingliederung der allgemeinen
Zoologie in den Kreis der Wissenschaften unternommen, leider nicht
ohne von Comtes Philosophie beeinflußt zu sein. Wie H . M i l n e -
Edwards’ vergleichende Physiologie für Cuviers Richtung
abschließende Bedeutung besitzt, so dieses Werk für die Richtung
Geoffroys. Aber noch mehr: beide ergänzen sich zu einer Einheit,
die nicht nur eine Basis für die nachfolgende französische Zoologie
geworden ist und ihr eine erneute Aufsplitterung erlaubte, sondern
die auch noch für die Zukunft den vollkommensten
wissenschaftlichen Querschnitt der Zoologie einer bestimmten
Periode gibt. Isidore Geoffroys Bemühungen galten im übrigen dem
Transformismus, insbesondere der Haustiere, und mit der von ihm
gegründeten Akklimatisationsgesellschaft wurde der bisher
ansehnlichste Vorstoß in der Richtung der Züchtungslehre
unternommen. So gehört denn auch Isidore Geoffroy nicht nur zu
den unmittelbaren Vorläufern Darwins, sondern er wurde von diesem
auch als solcher rückhaltlos anerkannt. Aber auch sonst ist kaum
eine Frage der Zoologie zu nennen, die nicht von ihm mit der
größten Erudition behandelt worden wäre. Ein biographisches
Meisterwerk hat er uns über seinen Vater hinterlassen (1847).

7. Italienische Zoologie dieses Zeitraumes.


In der Blütezeit der französischen Zoologie verhielt sich die italienische
vorwiegend rezeptiv. Die Ideen der Pariser Zoologen fanden begeisterte und
beredte Vertreter in Italien, wie F r. C e t t i (1726-78), der Buffon großes
Verständnis entgegenbrachte und die Eigentümlichkeiten der sardinischen Fauna
durch die insulare Abschließung zu erklären versuchte; namentlich war es
Lamarck, dessen Ansichten durch A . B o n e l l i (1784-1830, Professor in Turin)
und F r. B a l d a s s i n i , ferner durch O . G . C o s t a , der in schwierigen
Zeitläuften zu Neapel die alte zoologische Tradition aufrechthielt, vertreten
wurden. Der Naturphilosophie trat der durch viele zoologische Arbeiten verdiente
P o l i (1827) kritisch entgegen. C a v o l i n i , d e l l e C h i a j e B o n a p a r t e , später
besonders P a n c e r i (1833-77) förderten in der von Cuvier gebahnten Richtung
die Kenntnis der italienischen Land- und Meerfauna. In allem aber hielt sich die
italienische Zoologie innerhalb bereits vorgezeichneter Linien, wenn auch in
neuester Zeit erst wieder italienische Forscher in den Gang der Geschichte
entscheidend eingegriffen haben.
VII. Deutsche Zoologie von der Mitte
des 18. Jahrhunderts an.

Ungefähr um die Mitte des 18. Jahrhunderts löst sich die


d e u t s c h e Z o o l o g i e von der universellen ab und beginnt ihre
eigenen Gestalten anzunehmen. Auf eine einleitende Periode, die
etwa bis Ende des Jahrhunderts reicht, folgt die Periode der
Naturphilosophie, die man etwa bis 1830 ansetzen kann, dann
wiederum dreißig Jahre der Ernüchterung und empirischen
Vertiefung und von 1860 ab die Periode des deutschen
Darwinismus. Im Vergleich zur französischen Zoologie desselben
Zeitraumes ist die Entwicklung eine weniger stetige, das
Schwergewicht der Leistungen fällt nicht wie dort auf reich dotierte
praktische Schöpfungen, die sich auf eine größere Zentrale
konzentrieren; vielmehr ist es kühner Flug der Gedanken, der
intuitiv-konstruktiv wirkt; später Fleiß und Gründlichkeit, die
nachfolgen; beides gebunden an die bescheidensten Arbeitsmittel
der damaligen Kleinstaaten. Erst mit der Periode des Darwinismus
nimmt die deutsche Zoologie einen Aufschwung auf eine Höhe, die
zu beurteilen hier nicht der Ort und der Zukunft anheimzugeben ist.

1. Aufklärungsperiode.
An der Schwelle dieser Periode treffen wir A . v o n H a l l e r , der
seinem geistigen Gepräge nach weit eher ein Endglied der
vorangehenden genannt zu werden verdient, und dessen Verdienste
vorwiegend auf das Gebiet der menschlichen Physiologie fallen. Der
durch seine Autorität zur absoluten Herrschaft gelangten Lehre von
der Präformation trat C . F r. W o l f f (1735-1794) entgegen, ohne
indes von seiner Zeit gewürdigt zu werden. In seiner Theoria
generationis (1759) wahrt er die Rechte der Beobachtung gegenüber
der Spekulation, schildert kurz die Geschichte der
Entwicklungstheorien bis auf seine Zeit und stellt den Satz auf, daß
der lebende Organismus nicht im Keime vorgebildet ist, sondern erst
in der Embryonalentwicklung entsteht (Epigenesis). Seine Schrift ist
voll von reicher Einzelbeobachtung und geschickter
Verallgemeinerung, wie er denn z. B. die Bildung von Darm und
Nervenrohr bereits als Faltungsprozeß der Keimblätter auffaßt. Im
allgemeinen steht er auf dem Boden des von S t a h l begründeten
Vitalismus, der Lehre von der Eigenart der organischen
Erscheinungen. Außer C . F r. W o l f f war es besonders B l u m e n b a c h ,
der in Aristotelischem Sinne und mit viel Geist die
Präformationslehre bekämpfte. Neben diesem Kampf um die
Zeugungsphysiologie war es eine andere Linie, auf der sich die
deutsche Zoologie bewegte. Die Probleme der geographischen
Verbreitung, die Buffon aufgestellt hatte, fanden Widerhall in K a n t s
physischer Geographie, die für die Zoologie weniger bedeutete, als
seine scharfe Scheidung zwischen organischer und anorganischer
Natur und die deszendenz-theoretisch interessanten Gedanken in
seiner „Kritik der Urteilskraft“ (1790). Mehr noch in den Werken von
E. A. W. Zimmermann (Versuch einer Anwendung der
zoologischen Geographie auf die Geschichte der Erde 1783) und J .
G . H e r d e r (Ideen zur Philosophie der Geschichte der Menschheit
1784). Beide sind von höchster Poesie getragene Ausblicke auf den
Reichtum der Tierwelt zu Land und Meer, beide Versuche, die
Mannigfaltigkeit des Lebens als Teil im Gesamtwesen des Kosmos
zu erfassen und die zahlreichen Beziehungen der Kreatur unter sich
und auf dem Schauplatz der Erde darzustellen. Zimmermann legt
dabei den Hauptakzent auf die Tierwelt und wagt namentlich zum
ersten Male, ein Gesamtbild vom Leben der Meeresfauna zu
entwerfen. Bei ihm finden sich die schönsten Ansätze zur Lehre vom
Haushalt der Natur (Ökologie). Die Gedanken an Einfluß des Klimas,
Breite der Anpassung, Verbreitungsgeschichte finden hier schon
Verwendung. Zimmermann polemisiert gegen die naive Linnésche
Erklärung der Tierverbreitung und weist entgegen Buffons Theorie
von der äquatorial gerichteten Wanderung der Tiere infolge von
Abkühlung der Pole auf die Unterschiede der südlich-
hemisphärischen Landfauna von der nördlichen hin. Zimmermann ist
der erste kritisch arbeitende Geist in der Tiergeographie und
A l e x a n d e r v o n H u m b o l d t s direkter Vorgänger. Hatte Linné den
Menschen den Säugetieren eingeordnet, ohne sich darüber weiter
auszusprechen, so sucht H e r d e r ihn der Lebewelt auf Grund seiner
körperlichen Eigenschaften einzuordnen, ihn als das vollkommene,
zur Vernunfttätigkeit bestimmte Lebewesen zu schildern, und doch
die bedeutungsvollen Übereinstimmungen mit den anthropomorphen
Affen nicht zu unterdrücken. Wie mächtig die Anregungen Herders
wirkten, erhellt wohl mit am besten aus G o e t h e s Beschäftigung mit
der organischen Natur, die ihn freilich das übernommene Gut
selbständig weiterbilden ließ. Tiefstes Naturempfinden, ein rastloser
Trieb, die Natur kennen zu lernen, lebhafteste Teilnahme an den
Fortschritten der Naturforschung, ein überlegenes Urteil über den
historischen und kulturellen Wert derselben und ihrer Vertreter, eine
Abneigung gegen alles Spezialistisch-Kleinliche und ein untrüglicher
Sinn für das Ewig-Große in der Natur und ihrer Wissenschaft — das
sind die Züge, die Goethe eine große Bedeutung für die Geschichte
der Zoologie verleihen. An seinem Genius haben sich nicht nur
zahlreiche Zeitgenossen gesonnt, sondern er ist auch später
namentlich als Panazee Haeckels geschichtlich von größter
Bedeutung geworden. Die von Buffon ausgesprochenen Gedanken
der Einheit der organischen Natur, E. Geoffroys Geistesrichtung, die
ganze vergleichende Anatomie des 18. Jahrhunderts fanden in ihm
einen begeisterten und weitblickenden Herold. „Dieses also hätten
wir gewonnen, ungescheut behaupten zu dürfen: daß alle
vollkommeneren organischen Naturen, worunter wir Fische, Vögel,
Säugetiere und an der Spitze der letzteren den Menschen sehen,
alle nach einem Urbild geformt seien, das nur in seinen sehr
beständigen Teilen mehr oder weniger hin und her weicht und sich
noch täglich durch Fortpflanzung aus- und umbildet.“ „Das Gesetz
der inneren Natur, wodurch sie konstituiert werden, und das Gesetz
der äußeren Umstände, wodurch sie modifiziert werden,“ sind für ihn
bei der Bildung der Formen wirksam. Seine Deduktionen des
Zwischenkiefers beim Menschen (1784), der Lehre vom Wirbelbau
des Schädels und der Metamorphose der Pflanze (1790) dürfen
wahrlich nicht als einziger Maßstab für seine Verdienste um die
Zoologie und vergleichende Anatomie (der er den Namen
Morphologie beilegte) genommen werden. Wenn Goethes
Entwicklungspoesie in späteren Jahren einen Zug annimmt, der uns
wenig verständlich ist, so ist zu bedenken, daß er mit seinem
Vorstellungskreis bereits in die Höheperiode der Naturphilosophie
hineinreicht.

2. Naturphilosophie.
Die N a t u r p h i l o s o p h i e beruht auf der Voraussetzung: Natur und
Geist sind identisch, sie sind nur die beiden Pole des Absoluten. Der
negative Pol ist die Natur, welche anorganische und organische
Erscheinungen zu einem Gesamtorganismus verknüpft, wobei die
Kräfte der organischen Natur sich in höherer Potenz in der
organischen vorfinden. Der positive Pol ist der Geist in drei Stufen
seines Verhaltens, dem theoretischen, praktischen, künstlerischen.
Das auf diesen Prinzipien beruhende philosophische System,
verbunden mit religiösen Dogmen und kabbalistischem Einschlag,
enthielt ein in dieser Stärke neues Element: die Entwicklungsidee,
die besonders auf die organische Naturforschung überaus
befruchtend wirkte, so schwer die ganze Geistesrichtung zeitweise
und in gewissen Köpfen der Naturforschung gefährlich wurde.
Jedenfalls wirkte sie in einem Sinne vorteilhaft: man begann die
großen Linien der Biologie aufs neue zu ziehen, und zunehmende
Erfahrung mußte schon die vorschnellen Verallgemeinerungen auf
ein richtiges Maß zurückführen. Wenn wir nicht S c h e l l i n g s
Naturphilosophie als Urbild wählen, sondern die O k e n s , so
geschieht dies, weil doch Oken auch die ausgedehnteste
Sachkenntnis zur Verfügung stand. Das Tierreich ist ein großes Tier,
die Tiere nur Teile desselben, das Tierreich nur das zerstückelte
höchste Tier, der Mensch. Wie dieser vom ersten Keim an in der
Befruchtung entsteht und allmählich Bläschen, Darm, Kieme, Leber,
Geschlechtsteil, Kopf wird, so auch das Tierreich. Es gibt Tiere,
welche dem Menschen während der Schwangerschaft, dem Embryo,
dem Fötus entsprechen. Eine Blüte, welche, vom Stamme getrennt,
durch eigene Bewegung sich selbst den galvanischen Prozeß oder
das Leben erhält, die ihren Polarisationsprozeß nicht von einem
außer ihr liegenden oder mit ihr zusammenhängenden Körper hat,
sondern nur von sich selbst — solche Blüte ist ein Tier. Die Pflanze
ist in die Erde, das Wasser, die Luft eingetaucht, dagegen sind diese
drei Elemente in das Tier eingetaucht. Der Urschleim ist der
Meerschleim, der in ihm ursprünglich ist. Alles Leben stammt aus
dem Meere. Die höheren organischen Formen sind an den seichten
Stellen des Meeres entstanden. Die Gestalt des Urorganischen ist
die der Kugel, die ersten organischen Punkte sind Bläschen, die
organische Welt ist eine Unendlichkeit solcher Bläschen. Besteht die
organische Grundmasse aus Infusorien, so muß auch die
organische Welt sich aus Infusorien entwickeln. Pflanzen und Tiere
können nur Metamorphosen aus Infusorien sein. Das Verfaulen ist
eine Reduktion des höheren Lebens auf das Urleben. Der Mensch
ist nicht erschaffen, sondern entwickelt. Die naturphilosophische
Methode ist nicht die wahrhaft ableitende, sondern die
gewissermaßen diktatorische, aus der die Folgen herausspringen,
ohne daß man weiß, wie. Die Naturphilosophie ist die Wissenschaft
von der ewigen Verwandlung Gottes in die Welt. Solche Sätze aus
Okens Naturphilosophie (1809) mögen einen Begriff von dem
Vorstellungskreis geben, der dieser Richtung zu eigen ist; aber auch
von der Fruchtbarkeit des Entwicklungsgedankens, aus dem die
Zellenlehre, das biogenetische Grundgesetz u. a. m.
hervorsprangen, ehe die Empirie imstande war, der Philosophie zu
folgen.
L o r e n z O k e n (geb. 1779 bei Offenburg, 1807 aus Göttingen nach Jena
berufen, 1827 nach München, 1833 nach Zürich, gest. daselbst 1851)
entwickelte eine reiche literarische Tätigkeit, die zugleich auf
Popularisierung der Wissenschaft zielte; er hat eine große Zahl der
heute gebräuchlichen Bezeichnungen für die höheren Gruppen des
Tierreiches gebildet, war um die Durchführung rationeller
Grundsätze des Naturgeschichtsunterrichts bemüht, begründete die
Versammlung der deutschen Naturforscher und bot in seiner „Isis“
einen Tummelplatz der Meinungen, auf dem alle regen Gelehrten
seiner Zeit sich betätigten. Untersuchungen hat er selbst wenige
angestellt, wohl aber durch seine Polemik höchst wertvoll gewirkt.
Noch sei erwähnt, daß er auf dem Gebiet der vergleichenden
Anatomie mit der Wirbeltheorie einer einheitlichen Betrachtung des
Wirbeltierkopfes ebensowohl wie Goethe vorgearbeitet hat.
An O k e n schließen sich neben Phantasten auch Forscher von
bleibendem Verdienst an oder gehen parallel zu ihm die Wege der
Naturphilosophie. Die umfassendste und reichste Natur unter ihnen
war C . G . C a r u s (geb. 1789 in Leipzig, 1811 daselbst Professor der
vergleichenden Anatomie, der erste selbständige Vertreter dieses Faches in
Deutschland, 1814 Professor der Geburtshilfe an der Medizinischen Akademie
Dresden, 1827 Leibarzt des Königs, gestorben 1869).
Die empirische wie die literarische Tätigkeit von Carus erstreckte
sich fast über alle Gebiete der Biologie. Außer den Lehrbüchern über
Geburtshilfe, Chirurgie und Tierpsychologie, Zootomie (1818) und
vergleichende Anatomie, seinen Atlanten über die Proportionenlehre
des menschlichen Körpers und vergleichende Anatomie besitzen wir
von ihm eine Reihe von empirisch wohlbegründeten Arbeiten über
Aszidien, Kreislauf der Insekten, vergleichende Anatomie des
Nervensystems; daneben beschäftigte er sich im Anschluß an die
Oken-Goethesche Schädeltheorie in mehr phantastischer Weise mit
der Homologie der Skeletteile, wobei er, im Gegensatz zu Geoffroy,
der sich an die Knochenfische hielt, die Bedeutung des Schädels der
Knorpelfische für die vergleichende Anatomie besonders hervorhob.
Sein System der Tierwelt, das prinzipiell dem Okenschen verwandt,
aber besser durchgeführt war, mag hier als Typus eines solchen
wiedergegeben werden:

I. E i t i e r e (mit dominierendem Charakter des menschlichen


Eies):
Infusorien, Zölenteraten, Echinodermen.
II. R u m p f t i e r e (mit vorwiegend vegetativem Leben):
a. Bauch- und Darmtiere (Gasterozoa): Mollusken;
b. Brust- und Gliedertiere (Thorakozoa): Artikulaten.
III. H i r n - u n d K o p f t i e r e : Vertebraten.
a. Kopfgeschlechtstiere: Fische.
b. Kopfbauchtiere: Reptilien.
c. Kopfbrusttiere: Vögel.
d. Kopfkopftiere: Säugetiere.

In seinen Schriften „Psyche“ und „Physis“ tat Carus tiefe


Einblicke in die Natur des Menschen, und wußte seiner Psychologie
eine auch von philosophischer Seite anerkannte Fassung zu geben.
Mit Goethe verband ihn das gemeinsame Interesse für Morphologie,
das auch in einem beachtenswerten Briefwechsel seinen Ausdruck
fand.
Mit einem vielgelesenen Aufsatz über die Lebenskraft eröffnete
J . C . R e i l (1759-1803) sein Archiv für Physiologie, an dem sich
auch später A u t e n r i e t h (1772-1835) beteiligte. Unter dem Einflusse
Kants stehend, suchte Reil die Grundlagen der theoretischen
Biologie auf vitalistischem Boden zu begründen. In ähnlichem Sinne
wirkte F r. T i e d e m a n n (1781-1856), der, wie übrigens auch die
Brüder L . C . und G . R . T r e v i r a n u s (1779-1864 und 1776-1834),
die wertvollsten zootomischen Arbeiten hervorbrachte. Neben den
Genannten trat K . F. B u r d a c h (1776-1847) in Wort und Schrift für
die Bedeutung der vergleichenden Anatomie ein und legte seine
Ansichten in einem größeren Werke: „Physiologie als
Erfahrungswissenschaft“ nieder. Um die Systematik der Histologie
machte sich F. H e u s i n g e r , der Anatom von Marburg, verdient,
indem er eine vergleichende Übersicht der Gewebe durch die
Tierreiche gab. K . A s m u n d R u d o l p h i (1771-1832) begründete das
zoologische Museum zu Berlin, zeichnete sich durch viele und
streng empirische Arbeiten über Wirbeltiere und Helminthen aus,
und war einer der erfolgreichsten Lehrer der Zoologie damaliger Zeit.
Den Namen eines „deutschen Cuvier“ erwarb sich durch die
Meisterschaft in der vergleichenden Anatomie J o h . F r. M e c k e l
(1781-1833, einer um die Anatomie hochverdienten Familie
entstammend, Schüler Kielmeyers). Von Cuvier angeregt, vermehrte
er die Sammlung seines Vaters, die, nach dem Vorbild der
Hunterschen Sammlung geschaffen, zu den größten
Privatsammlungen Deutschlands gehörte. In seinem System der
vergleichenden Anatomie (1821-35) sucht er die Bildungsgesetze
der organischen Natur auf Mannigfaltigkeit und Einheit
zurückzuführen, orientiert die vergleichende Anatomie nach den
Schwesterwissenschaften hin, zieht insbesondere (gleichzeitig mit
Et. Geoffroy, aber unabhängig von ihm) die Lehre von den
Mißbildungen in den Kreis der Morphologie, die er theoretisch-
methodisch im Sinne der Naturphilosophie erörtert. Auch für ihn
existiert der Parallelismus zwischen der individuellen Entwicklung
und der der Tierreihe. Meckel erfreute sich als Lehrer eines
glänzenden Rufes.

3. Empiriker.
Vereinigten schon die genannten Zoologen Empirie und
Philosophie in solchem Grade, daß man manche, z. B. Rudolphi,
von den Naturphilosophen ausschalten könnte, so erwiese sich dies
doch nicht als tunlich. Dagegen stellen die nachfolgenden die
Kerntruppe der allmählich steigenden E m p i r i e der deutschen
Zoologie in der Folgezeit dar, die sich vor allem um die
Entwicklungsgeschichte des Individuums, die Embryologie,
konzentrierte. An ihr fand das phantastisch entwickelte
Gedankenleben der damaligen Entwicklungstheoretiker einen realen
Boden, auf den sich allmählich die nüchternen Gelehrten gerne
zurückzogen, je mehr die Naturphilosophie auf Abwege geriet. Dahin
gehört I g n . D ö l l i n g e r (1770-1841), ein Schüler Schellings, ein
mächtiger Förderer der mikroskopischen Anatomie, der Lehrer C . E .
v o n B a e r s . Ferner C h r. H . P a n d e r (1793-1865, aus Riga, später
Akademiker in Petersburg), welcher die Grundlagen der
mikroskopischen Paläontologie legte, im Verein mit d ’ A l t o n (1772-
1840) den Atlas der vergleichenden Osteologie (1821-31) herausgab
und die Lehre von der Entwicklung sämtlicher Organe aus drei
Keimblättern mit Hilfe der Entwicklungsgeschichte des Hühnchens
begründete. M . H . R a t h k e (1793-1860) hat die sorgfältigsten
embryologischen Monographien seiner Zeit geliefert; klassisch
geblieben sind seine Entwicklungsgeschichte der Natter, der
Schildkröte, des Krokodils, des Flußkrebses, seine Studien über die
Umwandlung des Kiemenskeletts innerhalb der Wirbeltierreihe.
C . E . v o n B a e r (geb. 1792 in Estland, studiert von 1810 an in Dorpat
unter Burdach, geht 1814 nach Wien und Würzburg, wendet sich hier, von der
medizinischen Praxis enttäuscht, den embryologischen Studien unter Döllinger zu;
von 1817 an unter Burdachs Leitung an der Anatomie in Königsberg, wurde er
1819 Professor der Naturgeschichte, siedelte 1834 nach Petersburg als
Akademiker über, kehrt nach größeren Reisen in Nord-Rußland und Kaspien nach
Dorpat zurück, wo er 1876 starb) zählte zu den Naturforschern von
größter Vielseitigkeit der Kenntnisse und von ruhigstem Urteil. Seine
archäologischen, linguistischen, geographischen, anthropologischen
Arbeiten haben für uns ganz aus dem Spiel zu bleiben. Er griff das
von seinem Freunde Pander bald verlassene Gebiet der
Entwicklungsgeschichte des Hühnchens auf und erweiterte es in der
Folgezeit zu der der Tiere überhaupt, der grundlegenden
Monographie der Embryologie (1828-37). 1827 spielte ihm der Zufall
die Entdeckung des menschlichen Eies in die Hände. In Sachen des
Streites um die Präformation nimmt er eine vermittelnde Stellung ein,
da er die erste Entstehung als einen Umbildungsprozeß deutet. In
der Auffassung von der Zeugung als einem „Wachstum über das
Individuum hinaus“, und daß die Wesenheit der zeugenden Tierform
die Entwicklung der Frucht beherrsche, stellt er sich auf
Aristotelischen Boden. Im Anschluß an Cuviers Typenlehre betont er
das frühzeitige Auftreten der typischen Unterschiede und die
gegenseitigen Lagebeziehungen der Organe. Auch führt ihn dies zur
Annahme verschiedener Ausbildungsgrade des Typus, wodurch
z. B. die Vögel höher organisiert sind als der Mensch. Auch dem
biogenetischen Grundgesetz gegenüber hat v. Baer sich in
vorsichtiger Reserve gehalten und bestritten, daß die Embryonen
höherer Tiere in ihrer Entwicklung bekannte bleibende Tierformen
durchliefen. Auch zahlreiche Arbeiten über Wirbellose und deren
Anatomie zeugen von Baers weitem Blick und von dem Ebenmaß in
seiner Devise: „Beobachtung und Reflexion“.
Neben Baer ist der imposanteste deutsche Zoologe J o h a n n e s
M ü l l e r (geb. 1801 in Koblenz, studierte er in Bonn, habilitierte sich 1824 daselbst
nach kurzem Aufenthalt in Berlin, 1826 Professor daselbst, kam nach Rudolphis
Tode 1833 als Anatom und Physiologe nach Berlin, starb 1858). Je mehr die
Sterne der Naturphilosophie und ihre Gründungen erloschen, um so
mehr begann J o h . M ü l l e r die führende Persönlichkeit in unserem
Fache zu werden. Aus der Schule der Naturphilosophen
hervorgegangen, kämpfte er zeitlebens gegen die übertriebene
Spekulation und erntete die reiche Frucht, die eines philosophisch
geschulten Empirikers zu harren pflegt. Daher enthielt er sich der
Einmischung in die große theoretische Abrechnung zwischen Cuvier
und Geoffroy, und suchte in der Ausdehnung der Studien auf das
Erforschbare Ersatz. Er legte den Grund zu einer Sammlung von
über 20000 Präparaten in der Art des Hunterschen Museums, die
jedoch später aufgeteilt worden ist, suchte überall mit schärfster
Methodik die Klassifikation durch Anatomie zu stützen. Wenn dabei
manche früher hochgeschätzte Verallgemeinerung nicht standhielt
(Ganoiden, Schreivögel), so sind doch hinwiederum manche von
größerer Dauer gewesen, weil er durch einen staunenerregenden
Überblick über die Tierwelt zu weitester Verknüpfung der
beobachteten Erscheinungen befähigt war. Sein Meisterwerk ist die
Monographie der Myxinoiden (1835-1845), welche die bedeutendste
Monographie auf dem Gebiete der vergleichenden Anatomie
geblieben ist, weil Müller die Erkenntnis der typischen Bedeutung
der Fische für die Wirbeltiere nicht nur in ihr niedergelegt hat,
sondern auch durch weitere Untersuchungen, eigene und solche
seiner Schüler, erhärtet hat. Nicht nur verdankt jedes Gebiet der
vergleichenden Anatomie der Wirbeltiere Müller nachhaltige
Förderung, sondern auch die Kenntnis der Wirbellosen (Aufstellung
der Gruppe Radiolarien, Entwicklungsgeschichte der Echinodermen,
der Würmer, Auge, Gehörorgan der Insekten usw.). In der
zoologischen Systematik freilich lehnte sich Müller wie in der
vergleichend-anatomischen an Cuvier an, in der physiologischen an
Haller und die französischen Physiologen. Bei seinen übermäßig
ausgedehnten Spezialuntersuchungen vernachlässigte er die
oberste Gliederung seines Stoffes und schlug dadurch eine für
Deutschland um die Mitte des 19. Jahrhunderts fatale Richtung ein.
Neben Joh. Müller stehen als Zootomen an erster Stelle H . S t a n n i u s (1808-
1883) und C . T h . v o n S i e b o l d (1804 bis 1885); jener als Verfasser des
gebräuchlichsten und zuverlässigsten Lehrbuches der vergleichenden Anatomie
der Wirbeltiere (1846), sowie zahlreicher zootomischer Abhandlungen von größter
Exaktheit; dieser, der Sproß einer bedeutenden Gelehrtenfamilie, der von 1853 ab
in München eine überaus fruchtbare Tätigkeit entfaltete, nachdem er 1848 zum
ersten Male die vergleichende Anatomie der Wirbellosen dargestellt hatte. Die
Hauptverdienste erwarb sich indes Siebold um die Kenntnis der Parthenogenese
sowie um die Helminthologie, die sich nach mächtigen Impulsen von R u d o l p h i
um die Mitte des Jahrhunderts zum bedeutendsten Zweig der medizinischen
Zoologie auszuwachsen begann. In dieser Linie steht an Siebolds Seite vor allem
R u d . L e u c k a r t (1822-1898, von 1850 an Professor in Gießen, von 1869 an in
Leipzig), der die Gebiete der Zeugungsphysiologie, der Helminthologie, der
Systematik und Anatomie der Wirbellosen durch eine große Fülle exakter Arbeiten
förderte. Klassisch sind seine Schriften über die Blasenwürmer (1856) und die
Trichine (1860) geworden, sowie Leuckarts zusammenfassendes Werk über die
Parasiten des Menschen (1. Aufl. 1863-76), womit er diesem praktisch wichtigen
Gebiet die vollkommenste systematische Darstellung angedeihen ließ und auch
seine theoretische Bedeutung hervorhob. Wie kaum ein anderer akademischer
Lehrer schulte Leuckart in seinem Laboratorium auswärtige Zoologen nach
deutscher Methode, und verschaffte damit der herrschenden deutschen Zoologie
die größte Anerkennung über den ganzen Erdkreis zu einer Zeit, da die Zoologie
erst begann, Gemeingut auch der erst in die Kultur eintretenden Nationen zu
werden.
C . G . E h r e n b e r g (1795-1876), Professor der Medizin in Berlin, bereiste mit
W. Hemprich die Nilländer (1820-26), später mit A. von Humboldt Asien bis zum
Altai (1829). Daneben galten seine Studien besonders den Infusorien, für die er
das auch mit Illustrationen reich ausgestattete bedeutendste Werk in der ersten
Hälfte des Jahrhunderts (1838) verfaßte. Seine Auffassung, daß die Infusorien
nach Art der höheren Tiere Organe hätten, hielt dem Fortschritt der
Protozoenforschung nicht stand.
Ein gewisses Bindeglied zwischen der französischen und der deutschen
Zoologie bildete K a r l Vo g t (1817-95). In Gießen aufgewachsen, schloß er sich
später Agassiz an und schrieb für ihn die Naturgeschichte der Süßwasserfische,
ferner eine wertvolle Entwicklungsgeschichte der Geburtshelferkröte (1892). Mit
seinen physiologischen Briefen betrat er 1845 die Bahn populärer Darstellung, die
er zeitlebens festhielt, und die in ihm einen geistreichen und humoristischen
Vertreter fand, namentlich vor und in der Periode des Darwinismus, wo seine
Zoologischen Briefe (1851), die Tierstaaten (1851), Köhlerglaube und
Wissenschaft (1855) und die Vorlesungen über den Menschen (1863) die
Stimmung auf deutschem Boden vorbereiteten und heben halfen. Ursprünglich
Cuvierist, nahm er später im Lager des Darwinimus eine erste Stelle ein, um
jedoch dann eigene Wege zu gehen und namentlich an der polyphyletischen
Deszendenz festzuhalten. 1852 wurde er Professor der Zoologie in Genf und starb
daselbst 1895, nachdem er 1885-94 ein originell angelegtes Lehrbuch der
praktischen vergleichenden Anatomie in Gemeinschaft mit E . Yu n g , seinem
Nachfolger im Amt, herausgegeben hatte. Ebenfalls vorwiegend Popularisator der
Zoologie war H . B u r m e i s t e r (1807-1892). Nachdem er 1837 Professor in Halle
und 1852 in Breslau geworden, begann er Reisen in Südamerika zu unternehmen,
gründete 1861 das Museum in Buenos Aires. Er entfaltete eine reiche
schriftstellerische Tätigkeit. Neben zahlreichen Arbeiten über südamerikanische
lebende und ausgestorbene Tierwelt, ferner über Insekten suchte er im Sinne von
Humboldts Kosmos die Schöpfungsgeschichte der Erde darzustellen (1851). Den
folgenden Autoren nähert er sich durch seine Zoonomischen Briefe (1856). In
ähnlicher Weise, wie Burmeister nach Argentinien, verpflanzte R . A . P h i l i p p i
(1808-1904) sie nach Chile, wohin er 1850 übergesiedelt war.
Mit den umfassendsten Kenntnissen verband ein großes Talent zur
Systembildung G . B r o n n (1800-1862). Nachdem er sich besonders der
Paläontologie gewidmet hatte, wurde er 1833 Professor der Zoologie in
Heidelberg. Der erste Paläontologe in Deutschland zu seiner Zeit, kannte er den
ganzen damals bekannten Reichtum der erloschenen organischen Natur und
pflegte daneben die Zoologie der lebenden Organismen. Seine von der Pariser
Akademie preisgekrönte Schrift über die Entwicklungsgesetze der organischen
Natur (1854) und seine morphologischen Studien über die Gestaltungsgesetze
(1858) gehören zu den wichtigsten Vorarbeiten, auf denen Haeckel fußte. Er
übersetzte zuerst Darwins Entstehung der Arten, wenn auch mangelhaft, und
schuf in seinen Klassen und Ordnungen (begonnen 1859) die erste große
Zusammenfassung der zoologischen Systematik nach Cuvier.

In der geistigen Signatur Bronn am ähnlichsten, aber mit


Ausdehnung nach anderen Richtungen steht J . V. C a r u s da (1823-
1903, von 1853 an Professor in Leipzig). In einer Bildungssphäre
aufgewachsen, der ja auch C. G. Carus entstammte, entfaltete V.
Carus früh außergewöhnliche Talente. Nach seinen Studien unter
Siebold und Kölliker knüpfte er in Oxford die Beziehungen an, die ihn
später zu einem der wichtigsten Bindeglieder zwischen deutscher
und englischer Zoologie machten (Übersetzung von Darwins, Lewes’
und Spencers Werken, Vertretung von Professor Wyville Thompson
während der Challenger-Expedition). Neben einigen Arbeiten über
Anatomie und Entwicklungsgeschichte der Wirbellosen ist das erste
größere Werk von V. Carus ein System der tierischen Morphologie
(1853), das neben einer bemerkenswerten Betonung der Induktion
und unter kritischer Auseinandersetzung mit Comte, Mill und Lotze
zwar gewisser Grundlagen entbehrt, aber dennoch zu den besten
biologisch-systematischen Versuchen des Jahrhunderts gehört.
Zeitweise Bibliothekar, ist er der bedeutendste Bibliograph für unsere
Wissenschaft geworden. 1846 begann er schon die Bibliotheca
zoologica herauszugeben, begründete 1878 den Zoologischen
Anzeiger, schuf den Prodromus faunae mediterraneae (1893) und
machte sich besonders bei der Feststellung der internationalen
Nomenklatur und um die Gründung der deutschen zoologischen
Gesellschaft (1890) verdient. Seine Tätigkeit hat wohl ihren
zeitlichen Schwerpunkt in der Periode des Darwinismus, ist aber so
universeller Natur und setzt so früh ein, daß V. Carus nicht zu den
von Darwin und Haeckel wesentlich beeinflußten Forschern zu
zählen ist. Seiner Geschichte der Zoologie 1873 wird an anderer
Stelle gedacht.
Es ist wohl begreiflich, wenn die Naturphilosophie auch noch in dem sonst
ruhigeren Wasser der Klassifikation, das durch Linné und Cuvier hinreichend
eingedämmt war, Wellen schlug. Der Carusschen Klassifikation wurde bereits
oben als einer typischen gedacht. J . H e r m a n n (1738-1800) trat für netzförmige
Verwandtschaft der Lebewesen ein. R u d o l p h i versuchte ein System der Tierwelt
auf das Nervensystem zu begründen, S . Vo i g t (1817) auf die Hartgebilde,
S c h w e i g g e r (1820) auf die Atmungsorgane, W i l b r a n d (1814) auf das Blut,
E h r e n b e r g wiederum auf das Nervensystem, G o l d f u ß spaltete das Tierreich
nach den Organsystemen des Menschen, M a c L e a y (Engländer) begründete
ein System auf die Fünfzahl, ebenso J o h . J a c . K a u p ; P. J . v a n B e n e d e n
und C . Vo g t auf das Verhältnis des Dotters zum Embryo. Unter diesen
Umständen tat das Cuviersche System der vier Typen immer noch die besten
Dienste. Außerdem machte der spezielle Ausbau der Klassifikation insofern die
wichtigsten Fortschritte nach den niederen Wirbellosen hin, indem Siebold die
Protozoen und Leuckart die Zölenteraten absonderten.
Sodann sei hier der Synopsis von L e u n i s (1802-73) gedacht, eines höchst
zweckmäßigen Bestimmungs- und Nachschlagebuches für klassifikatorische
Zwecke.
Dieser Periode gehört auch vor allem als der beste Popularisator der Zoologie
an A l f r e d B r e h m (1829-84). Als Sohn eines bereits um die Ornithologie
hochverdienten Mannes (C. L. Brehm aus Schönau bei Gotha, 1787-1864)
unternahm er wiederholt Reisen in Oberägypten und Abessinien, deren Resultate
er auch in besonderen Schilderungen niederlegte. 1876-79 erschien sein
Tierleben, womit er in den weitesten Kreisen Sinn für die ökologische Seite der
Tierwelt verbreitete.
Eine durchaus selbständige Stellung nimmt L u d w i g R ü t i m e y e r
ein. Geboren 1825 im Kanton Bern, widmete er sich theologischen
und später medizinischen Studien, nach deren Abschluß er
Studienreisen nach Frankreich, England und Italien antrat; von 1855
ab Professor der Zoologie in Basel, starb er daselbst 1895.
Rütimeyer wandte die Schulung des Pariser Pflanzengartens und
der englischen Museen auf Stoffe an, die ihm teils diese stets wieder
von ihm besuchten Stätten, teils sein Heimatland darbot. Lange Zeit
geologische, anthropologische, geographische Studien neben den
zoologischen betreibend, besaß er die Vorbedingungen zu
klassischer Bearbeitung der Grenzgebiete. 1861 erschien seine
Fauna der Pfahlbauten, über 20 Jahre dehnt sich die
Veröffentlichung seiner umfangreichen Studien über die
Naturgeschichte der lebenden und fossilen Huftiere aus, die zu den
sorgfältigsten und überzeugendsten phylogenetischen
Spezialarbeiten über große Formenreihen von Wirbeltieren gehören.
Die geschichtlich bedeutungsvollste Schrift Rütimeyers (Die Herkunft
unserer Tierwelt 1867) verknüpft die Stammesgeschichte der
höheren Landtiere und Verbreitungsgeschichte derselben zu einem
einheitlichen Gesamtbild, das für die Verbindung und Wertung der
verschiedenen Urkunden der Tiergeschichte vorbildlich ist.
Gegenüber dem Darwinismus hat Rütimeyer einem vorsichtigen, die
Unvollkommenheit der einschlägigen Materialen kritisch
beurteilenden, evolutionistischen Standpunkt gehuldigt, der am
meisten an denjenigen C. E. von Baers erinnert und wie er selbst ihn
schon im Anschluß an Is. Geoffroy vor dem Erscheinen der
„Entstehung der Arten“ eingenommen hatte.
Die vergleichende Anatomie vertrat in der darwinistischen
Periode in Deutschland besonders K a r l G e g e n b a u r (1826 bis 1903,
ein Schüler der Würzburger medizinischen Schule in ihrer Glanzzeit, doktoriert
1851, nach mehrfachen Studienreisen an die Meeresküste 1854 Privatdozent, von
1855-73 Professor in Jena, dann in Heidelberg). Gegenbaur ist, auf streng
empirischer Grundlage bleibend, im Anschluß an Joh. Müller und H.
Rathke als Fortsetzer der vergleichenden Anatomie in einer Zeit zu
bezeichnen, die dieser Wissenschaft nicht mehr günstig war. Seine
Arbeiten erstrecken sich über die Wirbellosen, namentlich die
niederen marinen Metazoen, sowie über die meisten Gebiete der
Wirbeltieranatomie mit Einschluß des Menschen. 1859 erschienen
seine Grundzüge der vergleichenden Anatomie, aus denen sich
allmählich immer umfangreichere Gesamtdarstellungen
entwickelten. In zahlreichen Aufsätzen, insbesondere in dem von
ihm 1876 begründeten „Morphologischen Jahrbuch“ behandelte er
einzelne Probleme der Morphologie. Auf dem Gebiet der Wirbeltiere
beschäftigten ihn zunächst histogenetische Fragen, bald aber
wandte er sich dem Problem des Wirbeltierkopfes und der
Schädeltheorie zu, der er im Anschluß an R. Owen und Huxley und
insbesondere auf Grund der Studien über das Kopfskelett der
Selachier neue, der Entwicklungslehre entsprechende Formen zu
geben anfing. Seine umfassendste Untersuchungsreihe betraf das
Extremitätenskelett. Außer auf diesen Arbeitsgebieten nahm er
jedoch an allen Punkten die vergleichende Anatomie in Angriff. Als
Begründer der größten Schule auf dem Gebiete der Morphologie
und in lebhaftem Gedankenaustausch mit seinen Schülern gewann
er die ausgedehnteste Übersicht über das Gesamtgebiet dieser
Wissenschaft, wie er sie in seiner 1898-1901 erschienenen
„Vergleichenden Anatomie“ im Geiste der Entwicklungslehre mit
mächtiger Hand zusammenfaßte.
Als Zoologen der darwinistischen Periode sind ferner zu erwähnen: O s k a r
S c h m i d t (geb. 1823, doktorierte er 1846 zu Berlin, 1857 Professor in Graz, 1872
in Straßburg, starb 1886). Er veröffentlichte 1849 ein Handbuch der
vergleichenden Anatomie, das in mehrfachen Auflagen erschien, schrieb eine
große Anzahl von Schriften über Anatomie, Entwicklung, Verbreitung der
Wirbellosen, insbesondere der Spongien. An den politischen und sozialen
Kämpfen seiner Zeit nahm er regen Anteil und betätigte sich auf vielen
Berührungspunkten seiner Wissenschaft mit Fragen allgemeinerer Art im Sinne
des deutschen Darwinismus. C . C l a u s (1835-1899, von 1860 ab Professor der
Zoologie in Würzburg, Marburg, Göttingen, Wien) machte sich durch
Spezialarbeiten über Zölenteraten und Krustazeen verdient. Seinen Grundzügen
der Zoologie (1866) und dem Lehrbuch der Zoologie (1880) folgten weitere
Auflagen, die sich namentlich durch ebenmäßige Beherrschung des Stoffes und
große Vorsicht gegenüber den unabgeklärten Situationen der damaligen
Naturphilosophie auszeichneten.
K . S e m p e r (1832-93) bereiste nach Absolvierung zoologischer Studien
1859-64 die Philippinen, versah von 1868 an die Professur der Zoologie in
Würzburg. Die Resultate seiner Reisen veröffentlichte er in groß angelegten
Reisewerken, auf theoretischem Gebiete machte er sich in einer nicht eben
glücklichen Polemik gegen Haeckel Luft.
Ein Ehrenplatz in der Geschichte der neueren deutschen
Zoologie gebührt K . A . v o n Z i t t e l , obschon sein Schwergewicht an
das Grenzgebiet nach der Geologie hin fällt. Er wurde geboren 1839
zu Bahlingen im Kaiserstuhl, war Schüler Bronns und doktorierte in

Вам также может понравиться