100% нашли этот документ полезным (10 голосов)
46 просмотров

(Ebook) Beginning Ethereum Smart Contracts Programming: With Examples in Python, Solidity, and JavaScript by Lee, Wei-Meng ISBN 9781484250860, 1484250869 2024 Scribd Download

Документ представляет собой описание электронной книги 'Beginning Ethereum Smart Contracts Programming' авторства Вей-Менг Ли, которая охватывает основы программирования смарт-контрактов на Ethereum с примерами на Python, Solidity и JavaScript. Книга включает в себя различные главы, посвященные блокчейну, созданию собственных блокчейнов, работе с Ethereum и разработке смарт-контрактов. Также предоставляется информация о дополнительных ресурсах и материалах, доступных на GitHub.

Загружено:

lunengalgua
Авторское право
© © All Rights Reserved
Мы серьезно относимся к защите прав на контент. Если вы подозреваете, что это ваш контент, заявите об этом здесь.
Доступные форматы
Скачать в формате PDF, TXT или читать онлайн в Scribd
100% нашли этот документ полезным (10 голосов)
46 просмотров

(Ebook) Beginning Ethereum Smart Contracts Programming: With Examples in Python, Solidity, and JavaScript by Lee, Wei-Meng ISBN 9781484250860, 1484250869 2024 Scribd Download

Документ представляет собой описание электронной книги 'Beginning Ethereum Smart Contracts Programming' авторства Вей-Менг Ли, которая охватывает основы программирования смарт-контрактов на Ethereum с примерами на Python, Solidity и JavaScript. Книга включает в себя различные главы, посвященные блокчейну, созданию собственных блокчейнов, работе с Ethereum и разработке смарт-контрактов. Также предоставляется информация о дополнительных ресурсах и материалах, доступных на GitHub.

Загружено:

lunengalgua
Авторское право
© © All Rights Reserved
Мы серьезно относимся к защите прав на контент. Если вы подозреваете, что это ваш контент, заявите об этом здесь.
Доступные форматы
Скачать в формате PDF, TXT или читать онлайн в Scribd
Вы находитесь на странице: 1/ 65

Download Full Version ebook - Visit ebooknice.

com

(Ebook) Beginning Ethereum Smart Contracts


Programming: With Examples in Python, Solidity,
and JavaScript by Lee, Wei-Meng ISBN
9781484250860, 1484250869
https://ebooknice.com/product/beginning-ethereum-smart-
contracts-programming-with-examples-in-python-solidity-and-
javascript-10475520

Click the button below to download

DOWLOAD EBOOK

Discover More Ebook - Explore Now at ebooknice.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

(Ebook) Beginning Ethereum Smart Contracts Programming:


With Examples in Python, Solidity, and JavaScript, 2nd
Edition by Wei-Meng Lee ISBN 9781484292716, 9781484292709,
1484292715, 1484292707
https://ebooknice.com/product/beginning-ethereum-smart-contracts-
programming-with-examples-in-python-solidity-and-javascript-2nd-
edition-48473504
ebooknice.com

(Ebook) Biota Grow 2C gather 2C cook by Loucas, Jason;


Viles, James ISBN 9781459699816, 9781743365571,
9781925268492, 1459699815, 1743365578, 1925268497
https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374

ebooknice.com

(Ebook) Matematik 5000+ Kurs 2c Lärobok by Lena


Alfredsson, Hans Heikne, Sanna Bodemyr ISBN 9789127456600,
9127456609
https://ebooknice.com/product/matematik-5000-kurs-2c-larobok-23848312

ebooknice.com

(Ebook) SAT II Success MATH 1C and 2C 2002 (Peterson's SAT


II Success) by Peterson's ISBN 9780768906677, 0768906679

https://ebooknice.com/product/sat-ii-success-
math-1c-and-2c-2002-peterson-s-sat-ii-success-1722018

ebooknice.com
(Ebook) Beginning Swift Programming by Lee & Wei-Meng;

https://ebooknice.com/product/beginning-swift-programming-38073604

ebooknice.com

(Ebook) Master SAT II Math 1c and 2c 4th ed (Arco Master


the SAT Subject Test: Math Levels 1 & 2) by Arco ISBN
9780768923049, 0768923042
https://ebooknice.com/product/master-sat-ii-math-1c-and-2c-4th-ed-
arco-master-the-sat-subject-test-math-levels-1-2-2326094

ebooknice.com

(Ebook) Cambridge IGCSE and O Level History Workbook 2C -


Depth Study: the United States, 1919-41 2nd Edition by
Benjamin Harrison ISBN 9781398375147, 9781398375048,
1398375144, 1398375047
https://ebooknice.com/product/cambridge-igcse-and-o-level-history-
workbook-2c-depth-study-the-united-states-1919-41-2nd-edition-53538044

ebooknice.com

(Ebook) Beginning iPhone SDK Programming with Objective-C


by Wei-Meng Lee ISBN 0470500972

https://ebooknice.com/product/beginning-iphone-sdk-programming-with-
objective-c-2322220

ebooknice.com

(Ebook) Beginning Swift Programming by Wei-Meng Lee ISBN


9781119009313, 1119009316

https://ebooknice.com/product/beginning-swift-programming-6808572

ebooknice.com
Beginning Ethereum
Smart Contracts
Programming
With Examples in Python,
Solidity and JavaScript

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-5085-3    ISBN-13 (electronic): 978-1-4842-5086-0


https://doi.org/10.1007/978-1-4842-5086-0

© 2019 by Wei-Meng Lee

Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub via the book’s product page, located at www.apress.com/9781484250853. For more
detailed information, please visit http://www.apress.com/source-code.
Contents

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

Chapter 1: Understanding Blockchain���������������������������������������������������������������������� 1


Motivations Behind Blockchain����������������������������������������������������������������������������������������������������� 2
Placement of Trusts����������������������������������������������������������������������������������������������������������������� 2
Trust Issues����������������������������������������������������������������������������������������������������������������������������� 3
Solving Trust Issues Using Decentralization���������������������������������������������������������������������������� 4
Example of Decentralization���������������������������������������������������������������������������������������������������� 4
Blockchain As a Distributed Ledger����������������������������������������������������������������������������������������� 8
How Blockchain Works����������������������������������������������������������������������������������������������������������������� 9
Chaining the Blocks��������������������������������������������������������������������������������������������������������������� 10
Mining������������������������������������������������������������������������������������������������������������������������������������ 12
Broadcasting Transactions���������������������������������������������������������������������������������������������������� 12
The Mining Process��������������������������������������������������������������������������������������������������������������� 13
Proof of Work������������������������������������������������������������������������������������������������������������������������� 16
Immutability of Blockchains�������������������������������������������������������������������������������������������������� 16
Blockchain in More Detail����������������������������������������������������������������������������������������������������������� 17
Types of Nodes���������������������������������������������������������������������������������������������������������������������� 19
Merkle Tree and Merkle Root������������������������������������������������������������������������������������������������� 21
Uses of Merkle Tree and the Merkle Root������������������������������������������������������������������������������ 22
Summary������������������������������������������������������������������������������������������������������������������������������������ 23
Chapter 2: Implementing Your Own Blockchain Using Python������������������������������� 25
Our Conceptual Blockchain Implementation������������������������������������������������������������������������������� 25
Obtaining the Nonce�������������������������������������������������������������������������������������������������������������� 27
Installing Flask���������������������������������������������������������������������������������������������������������������������� 28
Importing the Various Modules and Libraries������������������������������������������������������������������������ 29
Declaring the Class in Python������������������������������������������������������������������������������������������������ 29
Finding the Nonce����������������������������������������������������������������������������������������������������������������� 31
Appending the Block to the Blockchain��������������������������������������������������������������������������������� 32
Adding Transactions�������������������������������������������������������������������������������������������������������������� 32
Exposing the Blockchain Class as a REST API����������������������������������������������������������������������� 33
Obtaining the Full Blockchain������������������������������������������������������������������������������������������������ 33
Performing Mining����������������������������������������������������������������������������������������������������������������� 34
Adding Transactions�������������������������������������������������������������������������������������������������������������� 35
Testing Our Blockchain��������������������������������������������������������������������������������������������������������������� 36
Synchronizing Blockchains��������������������������������������������������������������������������������������������������������� 41
Testing the Blockchain with Multiple Nodes�������������������������������������������������������������������������� 45
Full Listing for the Python Blockchain Implementation��������������������������������������������������������������� 51
Summary������������������������������������������������������������������������������������������������������������������������������������ 59

Chapter 3: Connecting to the Ethereum Blockchain����������������������������������������������� 61


Downloading and Installing Geth������������������������������������������������������������������������������������������������ 62
Installing Geth for macOS������������������������������������������������������������������������������������������������������ 62
Installing Geth for Windows��������������������������������������������������������������������������������������������������� 63
Installing Geth for Linux��������������������������������������������������������������������������������������������������������� 64
Getting Started with Geth������������������������������������������������������������������������������������������������������������ 64
Examining the Data Downloaded������������������������������������������������������������������������������������������� 65
Geth JavaScript Console�������������������������������������������������������������������������������������������������������� 66
Sync Modes��������������������������������������������������������������������������������������������������������������������������� 68
Summary������������������������������������������������������������������������������������������������������������������������������� 69
Chapter 4: Creating Your Own Private Ethereum Test Network������������������������������ 71
Creating the Private Ethereum Test Network������������������������������������������������������������������������������ 71
Creating the Genesis Block��������������������������������������������������������������������������������������������������� 72
Creating a Folder for Storing Node Data�������������������������������������������������������������������������������� 73
Initiating a Blockchain Node�������������������������������������������������������������������������������������������������� 74
Starting Up the Nodes����������������������������������������������������������������������������������������������������������� 76
Managing Accounts��������������������������������������������������������������������������������������������������������������������� 88
Removing Accounts��������������������������������������������������������������������������������������������������������������� 90
Setting the Coinbase������������������������������������������������������������������������������������������������������������� 90
Summary������������������������������������������������������������������������������������������������������������������������������� 91

Chapter 5: Using the MetaMask Chrome Extension������������������������������������������������ 93


What Is MetaMask?�������������������������������������������������������������������������������������������������������������������� 93
How MetaMask Works Behind the Scene������������������������������������������������������������������������������ 94
Installing MetaMask�������������������������������������������������������������������������������������������������������������� 95
Signing in to MetaMask��������������������������������������������������������������������������������������������������������� 97
Selecting Ethereum Networks�������������������������������������������������������������������������������������������������� 103
Getting Ethers���������������������������������������������������������������������������������������������������������������������� 104
Creating Additional Accounts����������������������������������������������������������������������������������������������� 111
Transferring Ethers�������������������������������������������������������������������������������������������������������������� 113
Recovering Accounts����������������������������������������������������������������������������������������������������������� 117
Importing and Exporting Accounts�������������������������������������������������������������������������������������������� 120
Exporting Accounts�������������������������������������������������������������������������������������������������������������� 120
Importing Accounts������������������������������������������������������������������������������������������������������������� 124
Summary���������������������������������������������������������������������������������������������������������������������������������� 126

Chapter 6: Getting Started with Smart Contract��������������������������������������������������� 127


Your First Smart Contract���������������������������������������������������������������������������������������������������������� 127
Using the Remix IDE������������������������������������������������������������������������������������������������������������ 128
Compiling the Contract�������������������������������������������������������������������������������������������������������� 131
Testing the Smart Contract Using the JavaScript VM���������������������������������������������������������� 133
Getting the ABI and Bytecode of the Contract��������������������������������������������������������������������� 136
Loading the Smart Contract onto Geth�������������������������������������������������������������������������������������� 139
Testing the Contract������������������������������������������������������������������������������������������������������������ 142
Calling the Contract from Another Node������������������������������������������������������������������������������ 144
Summary���������������������������������������������������������������������������������������������������������������������������������� 146

Chapter 7: Testing Smart Contracts Using Ganache��������������������������������������������� 147


Downloading and Installing Ganache���������������������������������������������������������������������������������������� 147
Command-Line Interface����������������������������������������������������������������������������������������������������� 148
Graphical User Interface������������������������������������������������������������������������������������������������������ 150
Creating a Smart Contract�������������������������������������������������������������������������������������������������������� 153
Deploying the Contract to Ganache������������������������������������������������������������������������������������� 154
Examining Ganache������������������������������������������������������������������������������������������������������������� 156
Testing the Contract������������������������������������������������������������������������������������������������������������ 159
Connecting MetaMask to Ganache������������������������������������������������������������������������������������������� 161
Summary���������������������������������������������������������������������������������������������������������������������������������� 167

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


What Is web3.js?����������������������������������������������������������������������������������������������������������������������� 169
Installing web3.js���������������������������������������������������������������������������������������������������������������� 170
Testing the web3.js Using MetaMask���������������������������������������������������������������������������������� 171
Testing the web3.js Without MetaMask������������������������������������������������������������������������������� 175
Deploying Contracts Using web3.js������������������������������������������������������������������������������������������ 178
Interacting with a Contract Using web3.js�������������������������������������������������������������������������� 184
Sending Ethers to Smart Contracts������������������������������������������������������������������������������������� 191
Summary���������������������������������������������������������������������������������������������������������������������������������� 198

Chapter 9: Smart Contract Events������������������������������������������������������������������������ 199


What Are Events in Solidity?����������������������������������������������������������������������������������������������������� 199
Adding Events to the ProofOfExistence Contract����������������������������������������������������������������� 200
Deploying the Contract�������������������������������������������������������������������������������������������������������� 203
Handling Events Using web3.js������������������������������������������������������������������������������������������������� 204
Testing the Front End����������������������������������������������������������������������������������������������������������� 208
Notarizing the Same Document Twice��������������������������������������������������������������������������������� 213
Sending Incorrect Amount of Ether������������������������������������������������������������������������������������� 215
Summary���������������������������������������������������������������������������������������������������������������������������������� 219

Chapter 10: Project – Online Lottery�������������������������������������������������������������������� 221


How the Lottery Game Works���������������������������������������������������������������������������������������������������� 221
Defining the Smart Contract������������������������������������������������������������������������������������������������ 223
Constructor�������������������������������������������������������������������������������������������������������������������������� 224
Betting a Number���������������������������������������������������������������������������������������������������������������� 225
Drawing the Winning Number and Announcing the Winners����������������������������������������������� 227
Getting the Winning Number����������������������������������������������������������������������������������������������� 229
Killing the Contract�������������������������������������������������������������������������������������������������������������� 230
Testing the Contract������������������������������������������������������������������������������������������������������������������ 230
Betting on a Number����������������������������������������������������������������������������������������������������������� 231
Viewing the Winning Number���������������������������������������������������������������������������������������������� 236
Examining the Contract on Etherscan��������������������������������������������������������������������������������� 237
Killing the Contract�������������������������������������������������������������������������������������������������������������� 239
Adding Events to the Contract��������������������������������������������������������������������������������������������� 243
Creating the Web Front End������������������������������������������������������������������������������������������������������ 247
Returning Ethers Back to the Owner at the End of the Game���������������������������������������������� 253
Making the Game Run Indefinitely�������������������������������������������������������������������������������������� 255
Summary���������������������������������������������������������������������������������������������������������������������������������� 256

Chapter 11: Creating Your Tokens������������������������������������������������������������������������ 257


What Are Tokens?���������������������������������������������������������������������������������������������������������������������� 257
How Tokens Are Implemented?������������������������������������������������������������������������������������������� 259
Minting New Tokens������������������������������������������������������������������������������������������������������������ 259
Burning Tokens�������������������������������������������������������������������������������������������������������������������� 259
Units Used Internally in Token Contracts����������������������������������������������������������������������������� 260
ERC20 Token Standard�������������������������������������������������������������������������������������������������������� 261
Creating Token Contracts���������������������������������������������������������������������������������������������������������� 263
Deploying the Token Contract���������������������������������������������������������������������������������������������� 272
Adding Tokens to MetaMask������������������������������������������������������������������������������������������������ 275
Buying Tokens��������������������������������������������������������������������������������������������������������������������� 279
Creating an ICO Page����������������������������������������������������������������������������������������������������������� 284
Summary���������������������������������������������������������������������������������������������������������������������������������� 287

Index��������������������������������������������������������������������������������������������������������������������� 289
Introduction
Welcome to Beginning Ethereum Smart Contracts Programming!
This book is a quick guide to getting started with Ethereum Smart Contracts
programming. It first starts off with a discussion on blockchain and the motivations
behind it. You will learn what is a blockchain, 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.
Once that is out of the way, we will dive into the Ethereum blockchain. You will
learn how to use an Ethereum client (Geth) to connect to the Ethereum blockchain and
perform transactions such as sending ethers to another account. You will also learn how
to create private blockchain networks so that you can test them internally within your
own network.
The next part of this book will discuss Smart Contracts programming, a unique
feature of the Ethereum blockchain. Readers will be able to get jumpstarted 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 would be able to write smart contracts, test them,
deploy them, and create web applications to interact with them.
The last part of this book will touch on tokens, something that has taken the
cryptocurrency market by storm. You would be able to create your own tokens and
launch your own ICO and would be able to write token contracts that allow buyers to buy
tokens using Ethers.
This book is 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 will enjoy working on the sample projects as much as I have enjoyed
working on them!
CHAPTER 1

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, we will explore the concept of blockchain,
how the concept was conceived, and what problems it aimed to solve. By the end of this
chapter, the idea and motivation behind blockchain would be crystal clear.

Tip For the clearly impatient – A blockchain is a digital transaction of records


that’s arranged in chunks of data called blocks. These blocks link with one another
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
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 Bitcoin and itself 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.
Chapter 1 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 with


understanding a fundamental concept – trust. Today, any asset of value or transaction is
recorded by a third party, such as bank, government, or company. We trust banks won’t
steal our money, and they are regulated by the government. And even If the banks fail,
it is 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 Trusts
All these boil down to one key concept – placement of trust. And that is, we place our
trust on a central body. Think about it, in our everyday life, we place our trusts on banks,
and we place our trusts on our governments.
Even for simple mundane day-to-day activities, we place our trusts in central bodies.
For example, when you go to the library to borrow a book, you trust that the library
would maintain a proper record of the books that 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 US ten-dollar bill for two cups of coffee. And another person
who offers to pay you for the two cups of coffee using a handwritten note saying he
owes you ten dollars. Which one would you trust? The answer is pretty obvious, isn’t it?
Naturally you would trust the US ten-dollar bill, as opposed to the handwritten note.
This is because you understand that using the ten-dollar bill, you can use it elsewhere
to exchange for other goods or services, and that it is backed by the US government. In
contract, the handwritten note is not backed by anyone else (except perhaps the person
who wrote it), and hence it has literally no value.

2
Chapter 1 Understanding Blockchain

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 as shown in Figure 1-1.

Figure 1-1. Currencies from two countries

Would you accept the currencies as 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 and also your trust in these
governments. You might have read from the news about the hyperinflation in these two
countries, and that these currencies might not retain its value over time.
And so, would you accept these currencies as payment?

T rust Issues
Earlier on, 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

3
Chapter 1 Understanding Blockchain

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 we have seen 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.
All these discussions bring us to the next key issue – even though people trust
institutions, institutions can still fail. And when people lose trust in institutions, people
turn to cryptocurrencies. In the next section, we will discuss how we can 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 now 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 that is based
on our daily lives.

E xample 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 1-2).

4
Chapter 1 Understanding Blockchain

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

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 persons.
To solve this issue, they decided to appoint one person, say B, to keep a ledger, to
hold a record of the whereabouts of each DVD (see Figure 1-3).

5
Chapter 1 Understanding Blockchain

Figure 1-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 in fact could easily modify the
ledger to erase the record of DVDs that he has borrowed. So, there must be a better way.
And then, someone has an idea! Why not let everyone keep a copy of the ledger
(see Figure 1-4)? Whenever someone borrows or lent a DVD, the record is broadcast to
everyone, and everyone records the transaction.

6
Chapter 1 Understanding Blockchain

Figure 1-4. Getting everyone to keep the records

We say that the record keeping is now decentralized! We now have three persons
holding the same ledger. But wait a minute. What if A and C conspire to change the
records together 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 persons 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 DVDs sharing business (see Figure 1-5).

7
Chapter 1 Understanding Blockchain

Figure 1-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 on the ledger,
and that in order to alter a record, it would need to involve a number of people altering
the record all at the same time, which is a time-consuming affair. And this is the key idea
behind distributed ledger, or commonly known as blockchain.

Blockchain As a Distributed Ledger


Now that we have a better idea of a distributed ledger, we can now associate it with
the term – blockchain. Using the DVD rental 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 1-6).

8
Chapter 1 Understanding Blockchain

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

Based on what we have discussed, we can now summarize 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 Blockchain Works


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

9
Chapter 1 Understanding Blockchain

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

The blocks are connected to each other cryptographically, the details in which we
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


Before we discuss how blocks in a blockchain are chained together, we have to discuss
a key concept in blockchain – hashing. 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.
10
Chapter 1 Understanding Blockchain

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.

We are now ready to discuss 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 1-8). That way, if any transactions in a block is altered, that is going to
invalidate the hash of the current block, which is stored in the next block, which in turn
is going to invalidate the hash of the next block, and so on.

Figure 1-8. Chaining the blocks with hashes

11
Chapter 1 Understanding Blockchain

Observe that when hashing the content of a block, the hash of the previous block is
hashed together with the transactions. However, do take note that this is a simplification
of what is in a block. Later on, we will dive into the details of a block and see exactly how
transactions are represented in a block.
Storing the hash of the previous block in the current block assures the integrity of the
transactions in the previous block. Any modifications to the transaction(s) within a block
causes the hash in the next block to be invalidated, and it also affects the subsequent
blocks in the blockchain. If a hacker wants to modify a transaction, not only must he
modify the transaction in a block but all other subsequent blocks in the blockchain. In
addition, he needs to synchronize the changes to all other computers on the network,
which is a computationally expensive task to do. Hence, data stored in the blockchain
is immutable, for they are hard to change once the block they are in is added to the
blockchain.
Up to this point, you have a high-level overview of what constitutes a blockchain and
how the blocks are chained together. In the next section, you will understand the next
important topic in blockchain – mining.

M
 ining
Whenever you talk about blockchain or cryptocurrencies, there is always one term that
comes up – mining. In this section, you will learn what is mining, and what goes on
behind the scene.
Mining is the process of adding blocks to a blockchain. In a blockchain network,
such as the Bitcoin or Ethereum network, there are different types of computers known
as nodes. Computers on a blockchain that add blocks to the blockchain are known as
miner nodes (or mining nodes, or more simply miners).
We will talk about the different types of nodes later on in this course, but for now, we
want to talk about a particular type of node, known as the miner node. The role of the
miner node is to add blocks to the blockchain.
But how are blocks added?

B
 roadcasting Transactions
When a transaction is performed, the transaction is broadcasted to the network (see
Figure 1-9).

12
Chapter 1 Understanding Blockchain

Figure 1-9. Transactions are broadcasted to mining nodes, which then assemble
them into blocks to be mined

Each mining node may receive them at different times. As a node receives
transactions, it will try to include them in a block. Observe that each node is free to
include whatever transactions they want in a block. In practice, which transactions get
included in a block depends on a number of factors, such as transaction fees, transaction
size, order of arrival, and so on.
At this point, transactions that are included in a block but which are not yet added
to the blockchain are known as unconfirmed transactions. Once a block is filled with
transactions, a node will attempt to add the block to the blockchain.
Now here comes the problem – with so many miners out there, who gets to add the
block to the blockchain first?

The Mining Process


In order to slow down the rate of adding blocks to the blockchain, the blockchain
consensus protocol dictates a network difficulty target (see Figure 1-10).

13
Chapter 1 Understanding Blockchain

Figure 1-10. Hashing the block to meet the network difficulty target

In order to successfully add a block to the blockchain, a miner would hash the
content of a block and check that the hash meets the criteria set by the difficulty target.
For example, the resultant hash must start with five zeros and so on.
As more miners join the network, the difficultly level increases, for example, the
hash must now start with six zeros and so on. This allows the blocks to be added to the
blockchain at a consistent rate.
But, wait a minute, the content of a block is fixed, and so no matter how you hash it,
the resultant hash is always the same. So how do you ensure that the resultant hash can
meet the difficulty target? To do that, miners add a nonce to the block, which stands for
number used once (see Figure 1-11).

14
Chapter 1 Understanding Blockchain

Figure 1-11. Adding a nonce to change the content of the block in order to meet
the network difficulty target

The first miner who meets the target gets to claim the rewards and adds the block to
the blockchain. It will broadcast the block to other nodes so that they can verify the claim
and stop working on their current work of mining their own blocks. The miners would
drop their current work, and the process of mining a new block starts all over again.
The transactions that were not included in the block that was successfully mined will be
added to the next block to be mined.

REWARDS FOR MINERS

In the case of Bitcoin, the block reward initially was 50 BTC and will halve every 210,000
blocks. At the time of writing, the block reward is currently at 12.5 BTC, and it will eventually
be reduced to 0 after 64 halving events. For Ethereum, the reward for mining a block is
currently 2 ETH (Ether).

15
Chapter 1 Understanding Blockchain

BLOCKS ADDING RATES

For Bitcoin, the network adjusts the difficulty of the puzzles so that a new block is being mined
roughly every 10 minutes. For Ethereum, a block is mined approximately every 14 seconds.

Proof of Work
The process in which blocks are mined and added to the blockchain is known as the
Proof of Work (PoW). It is difficult to produce the proof but very easy to validate. A good
example of Proof of Work is cracking a combination lock – it takes a lot of time to find the
right combination, but it is easy to verify once the combination is found.
Proof of Work uses tremendous computing resources – GPUs are required, while
CPU speed is not important. It also uses a lot of electricity, because miners are doing the
same work repeatedly – find the nonce to meet the network difficulty for the block.
A common question is why you need to use a powerful GPU instead of CPU for
mining? Well, as a simple comparison, a CPU core can execute 4 32-bit instructions per
clock, whereas a GPU like the Radeon HD 5970 can execute 3200 32-bit instructions per
clock. In short, the CPU excels at doing complex manipulations to a small set of data,
whereas the GPU excels at doing simple manipulations to a large set of data. And since
mining is all about performing hashing and finding the nonce, it is a highly repetitive
task, something that GPU excels in.

Tip When a miner has successfully mined a block, he earns mining fees as well
as transaction fees. That’s what keeps miners motivated to invest in mining rigs
and keep them running 24/7, thereby incurring substantial electricity bills.

Immutability of Blockchains
In a blockchain, each block is chained to its previous block through the use of a
cryptographic hash. A block’s identity changes if the parent’s identity changes. This in
turn causes the current block’s children to change, which affects the grandchildren, and
so on. A change to a block forces a recalculation of all subsequent blocks, which requires
enormous computation power. This makes the blockchain immutable, a key feature of
cryptocurrencies like Bitcoin and Ethereum.

16
Chapter 1 Understanding Blockchain

As a new block is added to the blockchain, the block of transactions is said to be


confirmed by the blockchain. When a block is newly added, it’s deemed to have one
confirmation. As another block is added to it, its number of confirmation increases.
Figure 1-12 shows the number of confirmations that the blocks in a blockchain have. The
more confirmations a block has, the more difficult it is to remove it from the blockchain.

Tip In general, once a block has six or more confirmations, it’s deemed infeasible
for it to be reversed. Therefore, the data stored in the blockchain is immutable.

Figure 1-12. Confirmations of blocks in a blockchain

Blockchain in More Detail


In the previous section, you learned that a block contains a nonce, timestamp, and the
list of transactions. That was a simplification. In real implementation, a block consists of

• A block header

• The list of transactions

17
Chapter 1 Understanding Blockchain

The block header in turn consists of the following:

• The hash of the previous block

• Timestamp

• Merkle root

• Nonce

• Network difficulty target


Note that the block header contains the Merkle root, and not the transactions (see
Figure 1-13). The transactions are collectively represented as a merkle root, details of
which will be discussed in the next few sections.

Figure 1-13. A block contains the block header, which in turns contains the
Merkle root of the transactions

18
Chapter 1 Understanding Blockchain

T ypes of Nodes
Before we address the rationale for storing the Merkle root in the block header, we need
to talk about the types of nodes in a blockchain network. Figure 1-14 shows the different
types of nodes in a blockchain network.

Figure 1-14. Different types of nodes in a blockchain network

As we mentioned in our earlier sections, computers connected to the blockchain


network are known as nodes. We have discussed the role of mining nodes, whose key
responsibility is to gather transactions into blocks and then try to add the block to the
blockchain by finding the nonce that satisfies the network difficulty. Mining nodes are
also known as full nodes.

Tip Note that full nodes are not necessarily mining nodes. However, mining
nodes need to be a full node.

The purpose of a full node is to ensure the integrity of the blockchain and people
running full nodes do not get rewards. On the other hand, mining nodes are rewarded
when they add a block to the blockchain.
19
Chapter 1 Understanding Blockchain

An example of a full node is a desktop wallet, which allows users to perform


transaction using the cryptocurrency.
Each full node has a copy of the entire blockchain. Full nodes also validate every
block and transactions presented to it.
Besides full nodes, there are also light nodes. Light nodes help to verify transactions
using a method called simplified payment verification (SPV). SPV allows a node to verify
if a transaction has been included in a block, without needing to download the entire
blockchain. Using SPV, light nodes connect to full nodes and transmit transactions to the
full nodes for verifications.
Light nodes only need to store the block headers of all the blocks in the blockchain. An
example of a light node is a mobile wallet, such as the Coinbase mobile app for iOS and
Android. Using a mobile wallet, a user can perform transactions on the mobile device.

Note Desktop wallets can be full node or light node.

And so, we can summarize the types of nodes that we have discussed thus far:

• Full node

• Maintains a complete copy of the blockchain

• Able to verify all transactions since the beginning

• Verifies a newly created block and add it to the blockchain

• Visit the following sites to see the current number of full nodes for
the following blockchains:
• Bitcoin – https://bitnodes.earn.com

• Ethereum – www.ethernodes.org/network/1

• Mining node (must be a full node)

• Works on a problem (finding the nonce)

• Light node (e.g., wallets)

• Maintains the headers of the blockchain

• Uses SPV to verify if a transaction is present and valid in a block

20
Exploring the Variety of Random
Documents with Different Content
through a tragedy, on one occasion, which he found “tragicall”
indeed, because there was no time to have any supper. And then,
but six months after Wentworth’s arrival, there came the first hint of
the trouble about Lady Cork’s black marble tomb in St Patrick’s.
Mr. Bagwell has pointed out[31] how, to the old Elizabethan, whose
“Protestantism was not of the Laudian type,” there was nothing
amiss in the fact of a Communion-table standing detached in the
middle of the Church. The Earl, in erecting his monument, had
indeed improved the Chancel of St. Patrick’s, which had been
earthen-floored, and often in wet weather “overflown.” He had
raised it, with three stone steps and a pavement of hewn stones,
“whereon,” the Earl wrote to Laud, “the communion-table now
stands very dry and gracefully.” Laud himself had found it hard to
interfere, in the face of general opinion supported by two
Archbishops.[32] But Wentworth was obdurate, and the King himself
was appealed to. It was considered a scandal that the Cork tomb
should remain “sett in the place where the high altar anciently
stood.”[33] In the end, the great black marble monument was taken
down, stone by stone; and in March 1635 Wentworth was able to
write to Laud: “The Earl of Cork’s tomb is now quite removed. How
he means to dispose of it I know not; but up it is put in boxes, as if
it were marchpanes or banqueting stuffs, going down to the
christening of my young master in the country.”
The reference to “my young master” is evidently to Lady Kildare’s
baby, whose birth—and the fact that it was a boy—was the event of
the moment in the Cork household: indeed, the old Earl had a bet on
with Sir James Erskine, on the subject. In November 1635 the tomb
had been re-erected where it now stands, in the south side of the
Choir, and outwardly, at least, after a long struggle, the matter was
ended. Lord Cork knew nothing of that sneer in Wentworth’s letter to
Laud about the marchpanes and the banqueting stuffs; and when
Wentworth arrived at the Earl’s house one evening in December
1635—he was rather fond of dropping in unexpectedly—and joined
the Earl and his family at supper, the diary records that the Lord
Deputy “very nobly and neighbourlyke satt down and took part of
my super without any addicon.” But between July 1633 and that
December evening of 1635, many things had happened in the Cork
family.
The captain of the Ninth Whelp had been obliged to report that
Lewis, my Lord Kynalmeaky, had run badly into debt at Bristol.
Dungarvan had been recalled, and sent to England with his tutor,
about “thaffair” of his marriage with Mrs. Elizabeth Clifford. George
Goring had been assisted with money to buy a troop of horse; and
“our colonel”—and poor Lettice after him—had sailed for the
Netherlands, and soon settled at The Hague. Little Peggie, her
prospective jointure and husband provided, had been put
meanwhile, with Mary, under the care of Sir Randall and Lady
Clayton at Cork; and Mr. Perkins, the London tailor, had sent the Earl
his new Parliament robes of brocaded satin and cloth of gold.
Dorothy Loftus’s first baby had been born at Rathfarnham, and
Katherine Jones’s first baby at Athlone Castle. Both were girls;
hence, that wager of the Earl’s that his daughter Kildare’s next baby
would be a boy. The Earl of Kildare, with his dice and cards, had
been causing everybody anxiety; and there was a quarrel about
family property going on between the Digby and Offaley family and
the “Faerie Earle.” Wentworth had interfered, and in the autumn of
1634 Kildare, having taking offence, had “stolen privately on
shipboard,” leaving his wife and children and a household of about
sixty persons “without means or monies.” The delinquent was very
soon to come home again; but late in 1634 the old Earl had broken
up the Kildare establishment and settled his daughter and her
children in his own newly built house at Maynooth, riding there with
her, and dining with her “for the first time in the new parlour”, and
sending her two fat oxen “to begin her housekeeping there.”
Dick, “my Lord Dungarvan,” on the other hand, had been proving
himself a very satisfactory son: not very clever, perhaps, but
eminently good-natured and sensible. He had acquitted himself
admirably in England, writing comfortable letters to his father, who
was much gratified to hear that his boy had taken part in the Royal
Masque. It must have been the great Royal Masque in Whitehall, on
Shrove Tuesday night, February 18th, 1634: the Cælum Britannicum,
which followed on the still greater Masque of the Inns of Court. The
words were by the poet Carew, the music by Henry Lawes, who had
set Milton’s Comus; and the scenery was by Inigo Jones. The King
himself and fourteen of his chief nobles were the Masquers, and the
juvenile parts were taken by ten young lords and noblemen’s sons.
No wonder that the old Earl was proud of “Dick”.
And Dungarvan had made such good progress with his wooing
that in July a pretty little letter, neatly wax-sealed on floss-silk, had
come to the Earl of Cork, beginning: “My Lord,—Now I have the
honour to be your daughter.” In September 1634 the indefatigable
Ninth Whelp brought Dungarvan and his bride to Ireland. The Earl
met them at their landing, and drove them back in triumph—three
coaches full—to his town house in Dublin. All the available members
of the family, little Robert Boyle included, were gathered to welcome
the new sister-in-law. It was a great alliance, in which Wentworth
himself, by marriage a kinsman of the Cliffords, had lent a hand. For
the time being, it was to draw the Lord Deputy into the circle of the
Earl’s family, though the personal relations between the Deputy and
the Earl were to become even more strained.
CHAPTER III
SCHOOLDAYS AT ETON
“Where the Provost at that time was Sir Henry Wotton, a person that was not
only a fine gentleman himself, but very well skilled in the art of making others
so.”—Robert Boyle’s Philaretus.

In December 1634, after nearly seven years’ absence, the Earl of


Cork and his family returned to the House of Lismore. They had not
been gathered there, as a family, since the April of 1628, when the
Earl and his wife and daughters set out on their journey to London.
But Parliament was adjourned, and Dungarvan and his wife were
with them, and everything pointed to their spending Christmas in
their home of homes: “And there, God willing, wee intend,” wrote
the Earl the day before they left Dublin to Lady Clifford at Skipton
Castle in Yorkshire—“to keep a merry Christmas among our
neighbors, and to eate to the noble family of Skipton in fatt does
and Carps, and to drinke your healthe in the best wyne wee can
gett....” His new daughter-in-law, he says, “looks, and likes Ireland,
very well.” She was every day winning the affection and respect of
the “best sort of people”—her husband’s and her father-in-law’s
most of all. Incidentally—for he was treading on delicate ground
owing to the family connection between Wentworth and the Cliffords
—the Earl mentions that he is being “sharply persued” in his
Majesty’s Court of the Star Chamber about his titles to the college
and lands of Youghal; and he is only sorry that “this attempt” should
be made upon him just at the time of his daughter-in-law’s arrival in
Ireland.
It is not two hundred miles by rail from Dublin to Lismore; but in
those days travelling was slow and difficult; and the Cork cavalcade
—the family coach and the gay company of horsemen surrounding it
—were four days upon the road. Robert Boyle never forgot that
eventful journey.[34] The English daughter-in-law and her attendant
lady, and the old Earl and all his five sons, were of the party, the
youngest, Robert, not eight years old. Each night they “lay” at
hospitable houses on the road, and all went well till, on the fourth
day after passing Clonmell, as they were crossing the “Four Miles
Water”, their coach was overturned in mid-stream. Robyn
remembered every detail of the adventure: how he had been left
sitting alone in the coach, “with only a post-boy,” and how one of his
father’s gentlemen, “very well horsed,” recognising the danger, rode
alongside and insisted on carrying the little fellow—very unwilling to
leave the apparent safety of the inside of the coach—in his arms
over the rapid water; how the water proved so much swifter and
deeper than anybody had imagined that horses and riders were
“violently hurried down the stream,” and the unloaded and empty
coach was quickly overturned. The coach horses struggled till they
broke their harnesses, and with difficulty saved themselves by
swimming.
So much for the memory of a little sensitive eight-year-old. The
Earl’s diary record is brief and to the point. His coach was
“overthrown”, his horses were “in danger of drowning”, but they all,
God be praised, arrived safely at Lismore, and the journey had cost
him £24.
Christmas was kept at Lismore, and the last two days of the old
year at Castle Lyons, where the Earl’s son-in-law, Barrymore, feasted
them most liberally. He could scarcely have done less, after that
eighteen-months’ visit to the Earl’s town house in Dublin. And so this
year ended.
With the New Year 1635 came the Claytons from Cork, bringing
Mary and little Peggie on a visit to their father. A week or two later
the Earl went back alone to Dublin for the last session of Parliament,
leaving Dungarvan and his wife to keep house at Lismore; and the
four boys—Kynalmeaky, Broghill, Frank and little Robyn—were all left
under the charge of their tutor, Mr. Wilkinson, who was also the
Earl’s chaplain.
It was a severe winter: the very day after the Earl set out from
Lismore there began to fall at Clonmell “the greatest snow that ever
any man now living did see in Ireland.” The House of Lismore must
have stood, very white and quiet, looking down over the precipice
into the swirling Blackwater below it. All about it, white and silent
too, lay the gardens and orchards, the fishponds and park lands, and
the wooded wildernesses; and the mountains beyond were hidden in
falling snows. The roads could not have been easy riding between
Clonmell and Dublin, but the Earl and his servants reached Dublin in
safety, and he sent back by Dungarvan’s man “two new books of
Logick” for the versatile Kynalmeaky’s further education.
Kildare had come back to Dublin also, and not too soon; for he
and his young wife were to make up their differences over a little
grave. Early in March their eldest little girl died under the Earl’s roof
in Dublin; and a few days later Lady Kildare’s boy was born—the
“young master” of Wentworth’s vindictive letter to Laud.
But spring was at hand, and the Lismore orchards were in
blossom. The Earl was busy buying more lands and manors to be
settled on Robyn, and writing to his English friends about a “ffrench
gent” to accompany his sons Kynalmeaky and Broghill as
“governour” on their foreign travels. Great sheet-winged hawks,
also, were brought “to fflye for our sports”; and in July Lord Clifford
and his suite arrived from Yorkshire on a visit to Lismore. The Earl of
Cork was in his element. A great hunting-party had been arranged,
and the huntsmen filled the lodge in the park. Dungarvan and his
wife—Lord Clifford’s daughter and heiress—the Barrymores, and
Katharine and Arthur Jones, were all gathered at Lismore. Lord
Clifford was to see this Munster home at its very best; its terraces
and rose-gardens aflame with colour, its orchards heavy with fruit,
its pigeon-houses and watermills and fishponds and the great
turreted walls—all the “re-edifications” in fact, that had been the
work of years. And the seventeenth-century interior must have been
as imposing; for there was furniture of crimson velvet, fringed with
silver, and furniture of black and scarlet velvet brocade. The walls
were hung with tapestry, the floors were spread with Turkey rugs.
There were high-backed chairs and low-backed chairs, and Indian
embroideries, and “long cushions” for the embrasured window-seats.
The Earl’s hospitable tables were furnished with fish, beef, venison,
and huge all-containing pies—to be washed down by Bordeaux wine,
usquebagh, and aqua vitæ; and they groaned also beneath their
burden of silver;—flagons and trenchers, “covered salts,” “costerns,”
kettles and ladles of silver and silver gilt; while the “ewers and
basons” in the bedrooms were of silver, the great gilded beds hung
with scarlet cloth and silver lace and the ceilings of the children’s
nursery and the Earl’s “studdie” were of “fretwork”—their walls of
“Spanish white”.
Katharine and Arthur Jones went back to Athlone early in
September. The hunting-party was dispersed, and the House of
Lismore was emptying again. It must have been on one of those
autumn days before Katharine left Lismore that there happened the
little “foolish” incident about Robyn and the plums: an incident which
the elder sister would tell, long afterwards, when Robert Boyle had
made his world-wide reputation, and she and he were growing old
together in the house in Pall Mall.[35]
Dungarvan’s wife had already made a special pet of Francis, who
was indeed a lovable and happy-tempered boy. But it was Robyn
who was his sister Kate’s favourite. She seems to have felt a special
tenderness for this little fellow with a little independent character of
his own, so different from all his brothers: a little fellow with a
stutter, attributed by his family to his habit of mimicking some
children with whom he had been allowed to play; a little fellow who
was “studious” at eight years old, and so hopelessly and tactlessly
truthful that the old Earl—fond old disciplinarian that he was—had
never been able to “find him in a lie in all his life.”
And so with the plums. Lady Dungarvan, in delicate health, was
being petted by all the family; and Katharine Jones had given “strict
orders” that the fruit of a certain plum tree in the Lismore garden
should be preserved for Lady Dungarvan’s use. Robyn had gone into
the garden, and, “ignoring the prohibition,” had been eating the
plums. And when his sister Kate taxed him, “by way of aggravation,”
with having eaten “half a dozen plums,”—“Nay, truly, sister,”
answered he simply to her, “I have eaten half a score.”[36]
Mr. Wilkinson and a certain “Mownsier” had between them taught
Robyn to speak some French and Latin and to write a fair hand; and
now that he was in his ninth year, and Frank twelve years old, they
were to be sent to Eton. The Earl had been in correspondence for
some time with his old friend Sir Henry Wotton, not only about this
matter, but about a “governour” who should take Kynalmeaky and
Broghill abroad. Accordingly on September 9, 1635, a few days after
their sister Katharine and Arthur Jones had left Lismore, Francis and
Robert, with Carew their personal servant, under the charge of the
Earl’s own confidential servant, Mr. Thomas Badnedge, left Lismore
for Youghal, there to embark for England, “to be schooled and bredd
at Eaton.” Badnedge was to carry the purse, with £50 in it, and if he
wanted any more was to draw upon Mr. Burlamachy, the Lord Mayor
of London. And the Earl gave the boys at parting £3 between them:
“the great God of Heaven”, he wrote in his diary, “bless, guyde and
protect them!”
It was not till September 24 that the little party actually sailed
from Youghal, for they waited a whole week for a wind, and then
they were “beat back again” by a storm. But at last, “though the
Irish coasts were then sufficiently infested with Turkish gallies,” they
reached Bristol in safety, having touched at Ilfracombe and
Minehead on the way. There was a short stay “to repose and refresh
themselves” at Bristol, and then their journey was “shaped” direct
for Eton College. It was of course a journey by coach-roads; and
their first sight of English scenery was in late September.
They arrived at Eton on October 2; and Mr. Badnedge delivered
the two boys safely into the charge of Sir Henry Wotton. Their
“tuicon” was to be undertaken by Mr. John Harrison, the “chief
schoolmaster.”
Shortly after their arrival, Francis penned a little letter to his
father, the Earl of “Korke,” to be carried back to Ireland by one of
their escort. He began on bended knees with hearty prayers, and
went on to say that he had no news to tell except some things he
had observed on his travels, but these he would leave the bearer of
his letter to narrate, “in regard I am incited by my school exercise.”
Sir “Hary Wutton” had been very kind to them, entertaining them
the first day of their arrival at his own table. He had also put at their
disposal “a chamber of his owne with a bedd furnished afore our
own wilbe furnished.” The young lords at Eton had also been most
friendly, especially the Earl of Peterborough’s son, with whom Frank
and Robyn were, for the present, to dine and sup. And there was a
postscript to say that Mr. Badnedge had been very kind “in all our
travels,” and had sent them a supply of linen from London after their
arrival, for which they were “much bound to him.”
A few days later Mr. John Harrison, the “chief schoolmaster,” also
wrote to the Earl of Cork, a letter concise, dignified, and satisfactory.
He confirmed the arrival at Eton of the Earl’s two sons, “whoe, as
they indured their journeye both by sea and land, beyond what a
man would expect from such little ones so, since their arrival, the
place seemed to be suiting them wonderfully well”. He tells the Earl
that “Mr. Provost” had been so kind as to put the boys under his
care, and lets the Earl know, in parenthesis, that he, John Harrison,
is at present the “Rector” of the school: “I will carefully see them
supplyed with such things as their occasions in the colledge shall
require, and endeavour to sett them forward in learninge the best I
can.”
But it was from Carew,[37] the boys’ personal servant, that the
Earl was to hear all about everything. Carew’s first letter touched
lightly on the “long and tedious navigation and great travels by
land,” and went straight to the subject of subjects—“my two young
masters.” They had been there only a few days, but they were “very
well beloved for their civill and transparent carriage towards all sorts,
and specially my sweet Mr. Robert, who gained the love of all.” Sir
Henry Wotton had been “much taken with him for his discourse of
Ireland and of his travails, and he admired that he would observe or
take notice of those things that he discoursed off.”
Then followed an account of Sir Henry Wotton’s kind reception of
the boys, and the lending of his furnished chamber till their own
should be ready: “We injoy it yett,” says Carew, “which is a great
favor.” The boys had dined several times already with Sir Henry
Wotton. They were very “jocond”, although they showed a “studious
desire”, and they had “very carefull and reverend masters.” There is
just a hint of home-sickness, a longing for the sight of the old Earl
and the brothers and sisters and the roughly splendid Irish life; but
Carew quickly goes on to tell the “Order of the Colledge,” especially
“touching my young masters’ essence.” The boys dine in hall, with
the rest of the boarders;[38] and the Earl of Northampton’s four
sons, and the two sons of the Earl of Peterborough, with other
“Knights’ sons” are at the same table. “They sitt permiscously—noe
observing of place or qualitie”; and at night they supped in their own
rooms, Mr. Francis and Mr. Robert supping with the Earl of
Peterborough’s sons, providing, of course, their own commons.
Carew mentions the “fasting nights” and the fact that the College
allows no meat to be cooked on Fridays or Saturdays; and he hints
that the College commissariat requires a good deal of
supplementing. Master Robert is too busy with his lessons to write a
letter, but sends his love and duty: “They are upp every morning at
half an hour afore 6, and soe to scoole to prayers.”
Sir Henry Wotton, the Provost of Eton[39] of that day, was nearing
the end of his eventful, chequered life when Robert Boyle, not yet
nine years old, came under his care. He was indeed a contemporary
of the old Earl, and a Kentish man as well—one of a fine old Kentish
stock; but no two men could have been more unlike. He had taken
his B.A. at Oxford, and with a slender purse set out on his seven
years’ wanderings in European cities, the very same year in which
Mr. Richard Boyle had turned the lucky ring on his finger and landed
on Irish shores. But that had been forty-seven years before—back in
the mists; and the years between those youthful wanderings and
this pleasant old age in the Provost’s lodging at Eton had been years
of risky secret missions and ill-paid political intrigue. He had been
private secretary to Essex in London, private correspondent abroad,
Ambassador at Venice. In those years, many a fine intellect with big
ambitions had gone under. Sir Henry had come off better than many,
in spite of his slender means and an undeniable weakness for
libraries and laboratories and picture galleries in the intervals of
diplomacy. It was he who had been sent by the Duke of Tuscany on
the secret mission to Edinburgh to tell James VI that he was going
to be poisoned, and to carry with him the little packet of Italian
antidotes, not known at that time in the Scottish pharmacopœia. He
had stayed three months with the Scottish King; and no wonder that
when James ascended the throne of England Sir Henry Wotton was
one of the men then in London whom the King desired to see. He
was a favourite at Court; and his lifelong homage to the Princess
Elizabeth, the unhappy Queen of Bohemia, is well known.[40]
He had risen to great things, and might have risen to greater still
if it had not been for one brilliant Latin epigram written in an album.
Even King James, with pleasant memories of a packet of antidotes
and a most delightful guest in Stirling Castle, found it hard to forgive
the Latin epigram—“a merriment,” poor Wotton had called it—written
in an album in an indiscreet moment many years before, and
officiously forwarded from Augsburg to the Court of London: “An
Ambassador is an honest man sent to lie abroad for the good of his
country.” It is said to have ruined Sir Henry Wotton’s diplomatic
chances; and when, after some other missions, he came home in
1624, it was as a penniless man still, with plans of literary work and
a sufficient stock of memories grave and gay. He had consorted with
princes and statesmen, with artists, men of science, and men of
letters. He had worked for Essex and known Raleigh, and Francis
Bacon was his cousin. Among his friends abroad he had counted
Beza, Casaubon, Arminius and Kepler. He had watched Kepler at
work in his laboratory, and he had supplied Bacon with facts. And
when Bacon sent him three copies of his Novum Organum when it
first appeared, Sir Henry sent one of the copies to Kepler.
When Thomas Murray died, and Sir Henry Wotton was selected,
out of many candidates, for the Provostship of Eton, he was so poor
that he was obliged to borrow money to enable him to settle down
there. King James would have granted him a dispensation, but he
preferred to conform to the rule that the Provost of Eton must be a
man in Holy Orders. He had been duly ordained deacon, and, being
a man of liberal views, had steered “a middle way between
Calvinism and Arminianism.”[41]
When the two young sons of the Earl of Cork arrived at Eton, Sir
Henry Wotton had been Provost for ten years, and Eton could
scarcely imagine itself without him. With a royal pension in addition
to his Provostship, and assisted by a strong staff of Fellows of the
College—the learned Hales, John Harrison and the rest—he was
taking life easily, in the evening of his days, among his books and
curios, his Italian pictures, and those manuscripts—biographies of
Donne and Luther, and the History of England,—which he always
meant to finish and never did. He was not quite so active as when
he had first come among them with his new views of teaching, and
had put up the picture of Venice, where he had lived so long as
Ambassador, and had hung on the wooden pillars of the lower
schools his “choicely drawn” portraits of Greek and Latin orators and
poets and historians, for the little Eton boys to gaze at with round
English eyes; but his familiar figure was still a daily presence,
coming and going amongst them in his furred and embroidered
gown, “dropping some choyce Greek or Latin apophthegm” for the
benefit of the youngsters in class. He was still a “constant cherisher”
of schoolboyhood, taking the “hopeful youths” into his own especial
care, having them at his own hospitable table, picking out the
plodding boys and the boys of genius, and himself teaching best in
his own memorable talk. He liked to indulge in reminiscences of Italy
—“that delicat Piece of the Worlde”; and he sometimes looked
wistfully Londonwards, though in his gentle, deprecatory way he
spoke of it, especially in November, as a “fumie citie.” In his last
years he nursed hopes that he might succeed to the mastership of
the Savoy; meantime, from his Provost’s Lodging, he could look
across the “meandering Thames and sweete meadows,”[42] to the
great pile of Windsor Castle in its “antient magnificence”; and he
read and ruminated and smoked—he smoked a little too much,
according to his friend Izaak Walton—and counted his “idle hours
not idly spent” when he could sit quietly fishing with Izaak Walton in
the river-bend above the shooting fields, then, as now, known as
Black Pots. When Robert Boyle went to Eton in 1635, to be an Eton
boy meant not only being “grounded in learning” by such men as
Hales and Harrison, but being “schooled and bred” under the daily
influence of this soft, rich, delightful personality.
The two boys were known in the school as Boyle A and Boyle I:
Robert was Boyle I. According to Carew, they must have grown with
astonishing rapidity during their first months at Eton. Mr. Francis was
not only tall, but “very proportionable in his limbs,” and grew daily
liker to his brother, Lord Dungarvan. He was not so fond of his books
as “my most honoured and affectionate Mr. Robert, who was as
good at his lessons as boys double his age.” An usher, “a careful
man”, was helping them with their lessons, and Carew was keeping
an eye on the usher. Versions and dictamens in French and Latin
filled their time, and Carew could not persuade them to “affect the
Irish,” though Robert seems to have shown a faint, intermittent
interest in that language.[43] As for Mr. Robert, he was “very fatt,
and very jovial, and pleasantly merry, and of ye rarest memory that I
ever knew. He prefers Learninge afore all other virtues and
pleasures. The Provost does admire him for his excellent genius.”
They had acted a play in the College, and Robert had been among
those chosen to take part in it. “He came uppon ye stage,” wrote
Carew, exultant, to the Earl of Cork; “he had but a mute part, but for
the gesture of his body and the order of his pace, he did bravely.”
The little fellow was not yet nine years old, and his stutter must
have made it highly desirable that the part should be “mute”; but
“Mr. Provost” had already made choice of a “very sufficient man” to
teach both the boys to play the viol and to sing, and also to “helpe
my Master Robert’s defect in pronontiation.” Carew was afraid the
study of music, which “elevats the spirits,” might hinder their more
serious lessons; though up to that time the conduct of both boys
had been exemplary. They had said their prayers regularly and been
equally polite to everybody, and were very neat in their “aparelling,
kembing, and washing.” The elder brother had been laid up with “a
cowld that he tooke in the scoole,” which Carew attributed entirely to
the fact that he had outgrown his clothes; and Mr. Perkins, the
London tailor, had been “mighty backward” in sending their new
suits. Even with a bad cold, Frank was his usual pleasant, merry self;
and when Mr. Provost, according to his custom, prescribed “a little
phisique,” the boy drank it cheerfully to the last drop—and “rejected
it immediately after.” Sir Henry Wotton wrote himself to the Earl,
describing the whole episode with an accuracy of detail worthy of
Kepler’s laboratory.
Meantime, Sir Henry himself had assured the Earl that the “spiritay
Robyn’s” voice and pronunciation had been taken in hand by the
Master of the Choristers. Robyn also had caught cold that first winter
at Eton. He had “taken a conceit against his breakfast, being alwaies
curious of his meat, and so going fasting to church.” But on this
occasion, such was the spiritay Robyn’s popularity, that the whole
College seems to have risen in protest against Mr. Provost’s
prescription of “a little phisique.” And Robert recovered without it,
and “continued still increasing in virtues.”
It is somewhat surprising that the younger brother should have
been the favourite, for it was Francis Boyle who had the “quick,
apprehensive wit,” and whose delight was in hunting and
horsemanship; and it was Robyn who dissuaded him, exhorting his
elder brother to learning in his youth, “for,” says he, “there can be
nothing more profitable and honourable.” With his “fayre amiable
countenance,” this child of nine, according to the ebullient Carew,
was “wise, discreet, learned and devout; and not such devotion as is
accustomed in children, but withall in Sincerity he honours God and
prefers Him in all his actions.”[44]
It is very certain that the spiritay Robyn was not fond of games.
There is no enthusiasm for active sports in his Philaretus, not even
of a certain sport that the boys engaged in on winter evenings in the
hall, for which every recent comer was obliged to “find the candles”;
and a very expensive time for candles it was, according to Carew.
But Mr. Robert learnt to “play on music and to sing”, and “to talk
Latin he has very much affected.” And it speaks very well for both
Frank and Robyn that, their tastes being so unlike, they remained
such excellent friends. “Never since they arrived,” according to
Carew, had two ill words passed between them; which he thought
was rare to see, “specially when the younger exceeds the elder in
some qualities.” Some of the noble brothers in the College were
continually quarrelling; but “the peace of God is with my masters.” It
had been noticed even at the Fellows’ table: “Never were sweeter
and civiller gents seen in the Colledge than Mr. Boyles.” The only
thing in which they do not seem to have excelled was in letter-
writing. Master Frank could not write to the Earl because his hand
shook; and Master Robyn could not write because he had hurt his
thumb.
And so winter and spring passed, and the summer came, and with
it “breaking-time” at Eton. Mr. Provost, Mr. Harrison, and everybody
else went away. The two boys, and Carew with them, spent their
holidays with their sister Lettice in Sussex. It could not have been a
cheerful visit, though Carew assured the Earl that there was
“nothing wanting to afford a good and pleasant entertainment if my
honourable Lady had not been visited with her continuall guest,
griefe and melancholy.” So extremely melancholy was the Lady
Lettice Goring during this visit that it made the two boys “cry often
to looke upon her.” And yet they must have made a pretty pair to
gladden the eyes of an invalid woman. For Mr. Perkins, the London
tailor, had sent them some fine new clothes—little shirts with laced
bands and cuffs, two scarlet suits without coats, and two cloth-of-
silver doublets.
Robert Boyle’s own recollections of Eton were written a good
many years after he left it. He always remembered with gratitude
the kindness of Mr. John Harrison, in whose house, in that chamber
that was so long in furnishing, the two boys lived—except for some
holidays at “breaking-time,” usually spent in Sussex—from October
1635 to November 1638.
From the very beginning John Harrison must have recognised that
in “Boyle I” he had no ordinary boy to deal with. He saw a “spiritay”
little fellow, with a fair, amiable countenance, a slight stammer,
which the child did his best to amend, and the unstudied civilities of
manner of a little prince. According to Boyle himself, Mr. Harrison
saw “some aptness and much willingness” in him to learn; and this
chief schoolmaster resolved to teach his pupil by “all the gentlest
ways of encouragement.” He began by often dispensing with his
attendance at school in ordinary school hours, and taking the trouble
to teach him “privately and familiarly in his own chamber.”
“He would often, as it were, cloy him with fruit and sweetmeats,
and those little dainties that age is greedy of, that by preventing the
want, he might lessen both his value and desire of them. He would
sometimes give him, unasked, play-days, and oft bestow upon him
such balls and tops and other implements of idleness as he had
taken away from others that had unduly used them. He would
sometimes commend others before him to rouse his emulation, and
oftentimes give him commendations before others to engage his
endeavours to deserve them. Not to be tedious, he was careful to
instruct him in such an affable, kind, and gentle way, that he easily
prevailed with him to consider studying not so much as a duty of
obedience to his superiors, but as a way to purchase for himself a
most delightsome and invaluable good.”[45]
All which means that Mr. Harrison was making a very interesting
experiment, and that his system happened to succeed in the case of
Robert Boyle. The boy learned his “scholar’s task” very easily; and
his spare hours were spent so absorbedly over the books he was
reading that Mr. Harrison was sometimes obliged to “force him out to
play.” And what were the books that were read with such zest? It
was, Robert Boyle says, the accidental perusal of Quintus Curtius
that first made him in love with “other than pedantick books”; and in
after life he used to assert that he owed more to Quintus Curtius
than ever Alexander did: that he had gained more from the history
of Alexander’s conquests than ever Alexander had done from the
conquests themselves.[46]
His other recollections of his Eton schooldays are for the most part
of accidents that happened to him there. He was not so good a
horseman as his brother Frank. Once he fell from his horse, and the
animal trod so near to his throat as to make a hole in his neckband,
“which he long after preserved for a remembrance.” Another time his
nag took fright as he was riding through a town, and reared upright
on his hinder feet against a wall; and the boy just saved himself by
slipping off. Yet a third time he nearly met his death by a “potion”
given him “by an apothecary’s error”; and it is interesting, in the
light of what happened and did not happen in Boyle’s later life, to
hear that “this accident made him long after apprehend more from
the physicians than the disease, and was possibly the occasion that
made him afterwards so inquisitively apply himself to the study of
physick, that he might have the less need of them that profess
it.”[47] The fourth and last of this almost Pauline enumeration of
disasters was the falling, one evening, of the greater part of the wall
of the boys’ bedroom in Mr. Harrison’s house. The two brothers had
gone early to their room; Robyn was already tucked into the big
four-post bed, with its “feather bedd, boulster, and two pillows,” and
the curtains of “blew perpetuana with lace and frenge”,[48] and
Frank was talking with some other boys round the fire when, without
a moment’s warning, the wall of the room fell in, the ceiling with it,
carrying bed, chairs, books and furniture from the room above. A
bigger boy rescued Frank from the debris and dust, the chair in
which he had been sitting broken to pieces, and his clothes torn off
his back; and Robyn, the future chemist, peeping from the blew-
perpetuana curtains, remembered to wrap his head in the sheet, so
that it might serve “as a strainer, through which none but the purer
air could find a passage.”
It is observable that there is no mention of any of those accidents
in the letters to the Earl of Cork from either the Provost or the boys’
personal servant, Carew. Perhaps it was as well that the Earl, much
harassed at home, should not be told everything that was happening
at Eton. As it was, he knew too much. Some go-between—Mr.
Perkins, the tailor, or somebody equally officious—must have told the
Earl in what manner Carew—“poor unmeriting me”, as Carew called
himself in one of his fascinating letters to the Earl—had been
utilising his idle hours by the meandering Thames. Frank and Robyn,
and Carew with them, were spending their holidays with Lady Lettice
Goring, when one morning Sir Henry Wotton, sitting in his study at
Eton, received a letter from the Earl of Cork. The contents came as a
thunderbolt. “Truly, my good Lord,” Sir Henry Wotton wrote back to
the Earl, “I was shaken with such an amazement at the first
percussion thereof, that, till a second perusal, I was doubtfull
whether I had readd aright.” For everybody in the college was so
persuaded of young Mr. Carew’s discretion and temper and zeal in
his charge, and “whole carriadge of himself,” that it would be “harde
to stamp us with any new impression.” However, Mr. Provost had
somewhat reluctantly put away his pipe and “bestowed a Daye in a
little Inquisitiveness.” And he had found that the Earl, in Dublin, was
quite right; that between Carew and a certain “yonge Mayed,
dawghter to our under baker—” and Mr. Provost could not but own
that she was pretty—there had passed certain civil, not to say
amorous, language. The old Provost was evidently disposed to look
leniently on this particular foolish pair. Had he not himself once, in
his youth, written a little poem which began—

O faithless world, and thy most faithless part


A woman’s heart!
...
Why was she born to please, or I to trust
Words writ in dust?[49]
However, Sir Henry told the Earl he was going to talk to Carew on
his return from Sussex, and warn him how careful, in his position, he
ought to be; and he would write again to the Earl after seeing
Carew. But, in the meantime he wished to reserve judgment: “For
truely theare can not be a more tender attendant about youre
sweete children.”
And after all news travelled slowly. Those little love passages were
already six months old: “Tyme enough, I dare swere”—wrote the old
diplomatist, sitting alone in his study, with his Titian and his
Bassanos looking down upon him—“to refrigerat more love than was
ever betweene them.”
CHAPTER IV
THE MANOR OF STALBRIDGE
“... He would very often steal away from all company, and spend four or five
hours alone in the fields, and think at random: making his delighted imagination
the busy scene where some romance or other was daily acted.”—Robert Boyle’s
Philaretus.

After the boys went to Eton, the Earl had very unpleasant things
to think about. Wentworth was pressing him hard. It is true that the
little dinner-parties and card-parties and private theatricals at the
Castle were going on as if there were no Star Chamber behind them.
In January 1636 the Lord Deputy was inviting himself to supper at
the Earl’s Dublin house, and bringing Lady Wentworth with him.
Lady Dungarvan’s baby was born in March, a “ffair daughter”, to be
christened Frances, and to figure in the old Earl’s diary as “lyttle
ffranck”; and the Lord Deputy himself stood sponsor, though he had
just lost his own little son, and the Dungarvan christening had been
postponed till the Wentworth baby had been buried. But the Lord
Deputy’s “sharp pursuit” of men was going on all the same. In
February, before the death of Wentworth’s child and the Dungarvan
christening, Lord Mountmorris had been degraded from the office of
Vice-Treasurer, “tried by a Commission and sentenced to be shot, for
no other crime than a sneer” against Wentworth’s government.[50]
The sentence was not to be carried out; but it became every day
more evident that “whatever man of whatever rank” opposed
Wentworth, or even spoke disrespectfully of his policy, “that man he
pursued to punishment like a sleuth-hound”.[51]
At the beginning of that year, the Earl of Cork had made his “Great
Conveighance,” by which he entailed all his lands upon his five sons.
Wentworth had taken exception to the conveyance of some of these
lands to the Earl’s eldest son, Lord Dungarvan; and in February a
“sharp and large discourse” had taken place between the Lord
Deputy and the Earl. In April the Star Chamber Bill against the Earl,
dealing with his titles to the churchlands of Youghal, was still under
discussion; and Wentworth was now pressing for the payment of
money, by way of ransom, which was at first to be £30,000, but was
afterwards reduced to £15,000.
The Earl was still asserting his right to his lands, and unwilling to
compound—no-one had ever heard the Earl of Cork, he said,
“enclyned to offer anything.” Things were at this pass when at the
end of April Lady Dungarvan, six weeks after her baby’s birth, fell
sick; and the next day, “the smallpockes brake owt uppon her.” On
that very day, under pressure from his friends and from his son
Dungarvan, who went down on his knees before his father, the Earl
of Cork gave way. Very unwillingly, on May 2, he agreed to pay the
£15,000 “for the King’s use,” and for his own “redemption out of
Court”—though his “Innocencie and Intigritie” he declared, writing in
his own private diary, were “as cleer as the son at high noon.” The
old Royalist, even then, believed that if his King only knew how
undeservedly the mighty fine had him imposed, “he would not
accept a penny of it.” The Earl was hard hit, though his great
Conveyance was at last signed and sealed, and he could talk of
drinking a cup of sack “to wash away the care of a big debt.”[52] It is
comforting to note that he had meantime cash in hand not only to
tip Archie Armstrong, the King’s Jester, who seems to have passed
through Dublin, but to pay for two knitted silk waistcoats for his own
“somer wearings.”
While all this was going on, Kynalmeaky and Broghill were
enjoying what the Earl called their “peregrination.” A tutor had been
found to accompany them on their foreign travels; a M. Marcombes,
highly recommended to the Earl by Sir Henry Wotton, as a man
“borne for your purpose.” Sir Henry wrote from London, where he
had been spending a week or two, and was returning next day “to
my poore Cell agayne at Eton”;[53] but he gave the Earl a careful
account of Marcombes, whom he had seen in London. He was “by
birthe French; native in the Province of Auvergne; bredd seaven
years in Geneve, verie sounde in Religion, and well conversant with
Religious Men. Furnished with good literature and languages,
espetially with Italian, which he speaketh as promptly as his owne.
And wilbe a good guide for your Sonns in that delicat Piece of the
Worlde. He seemeth of himself neither of a lumpish nor of a light
composition, but of a well-fixed meane.”
M. Marcombes had already won golden opinions in the family of
Lord Middlesex, a former Lord Mayor of London; and was well
known to the then Lord Mayor, Mr. Burlamachy, who also wrote to
the Earl about him. And Mr. Perkins, the tailor, seems to have put in
a word; for there had been a meeting in the “fumie citie” between
Sir Henry Wotton and M. Marcombes and Mr. Perkins, at which Sir
Henry had found the French tutor’s conversation “very apposite and
sweet.”
So in the early spring of 1636 Kynalmeaky and Broghill, with their
governor M. Marcombes, had set out from Dublin on their foreign
travels, stopping long enough in London to kiss the King’s and
Queen’s hands, and obtain the royal licence and passport to travel;
and they took letters also to Sir Henry Wotton at Eton, and to Frank
and Robyn, and poor unmeriting Carew.
The Earl of Cork himself, in the early stages of his struggle with
Wentworth, had thought of going to London, to “justify himself”
once again, as he had done when he was a young man, and
Elizabeth was Queen. But he was no longer a young man, and
Charles I was not Queen Elizabeth, and the Lord Deputy, when he
found it out, had objected strongly to the Earl’s little plan. On the
contrary, the Lord Deputy had gone to England himself, in the
summer of 1636; and though Sir Henry Wotton was under “a kind of
hovering conceypt” that the Earl of Cork was coming over, and there
was even a rumour that he was to be offered the Lord
Chancellorship of England, the old Earl was to remain for two more
years in Ireland. He was busy as usual, moving about, on assize and
other duties, between Dublin and Lismore and Cork; paving the
terrace at Lismore with hewn stones, dedicating the free schools and
almshouses there, setting up an old servant in Dublin in a “tobacko”
business, and paying Mr. Perkins’s bill for those little scarlet suits and
cloth-of-silver doublets that Frank and Robyn were wearing in their
Whitsuntide holidays. Sir Henry Wotton was able to tell the Earl that
Lady Lettice would see Frank in better health and strength than he
had been in either kingdom before, while Robert would “entertayne
her with his pretie conceptions, now a greate deale more smoothely
than he was wonte.”
The Earl had not given up his English project; on the contrary, it
was to mature into the purchase of a little bit of England for his very
own; and his choice had fallen on a “capitall howse, demesne, and
lands” in Dorsetshire. Accordingly in the autumn of 1636 he bought
the Manor of Stalbridge, and sent over a steward, Thomas Cross, to
take possession. At Stalbridge the Earl would be a near neighbour of
the Earl of Bristol—his son-in-law Digby’s uncle—at Sherborne
Castle.
The year 1636 had been a trying year; and one of the first
expenses in the New Year 1637 was a fee to Mr. Jacob Longe, of
Kinsale, “my Jerman physician,” for plaisters and prescriptions, “to
stay the encrease of the dead palsy which hath seized uppon all the
right side of my boddy (God helpe me) £5.” And though the returns
for the year shewed a “Lardge Revenew,” and the diary record for
the year ended in a note of triumph, with a triple “Amen, Amen,
Amen,” there was yet sorrow in store that no revenue, however
large, could avert. For Peggie, the Earl’s youngest daughter, was ill.
The Earl had paid £5 to Mr. Higgins, the Lismore doctor, to give her
“phisick, which he never did”; and either because of this, or in spite
of this, Little Peggie did not get well. She died in June 1637, in Lady
Clayton’s house in Cork, where she and Mary had lived all this time
together. The Lady Margaret Boyle, youngest daughter of the Earl of
Cork—eight years old when she died—was buried in the family tomb
at Youghal.
It was not till Midsummer 1638, when the last instalment of the
mighty fine had been paid, that the Earl began his preparations for a
prolonged visit to England. He revoked all other wills, and again
made a last will and testament; and at the end of July he actually
set out for England, taking with him his daughter Mary, Lord and
Lady Barrymore, and several of the grandchildren.
The parting was a sad one between Mary Boyle and Lady Clayton,
who had just lost her husband, and, a childless woman herself, had
been a real mother to “Moll” and “Peggie.” But the Earl had a grand
marriage in view for his daughter Mary; and he had yet to discover
that Lady Mary had a will of her own: that of all his daughters it was
she who had inherited his own indomitable pride. Hitherto, she had
been a child, brought up away from him; to be gladdened from time
to time by a happy visit or a New Year’s gift. But even these are
indications of the little lady’s tastes and character. It was to Mary the
Earl gave the “ffether of diamonds and rubies that was my wive’s,”
long before he could have known how defiantly she would toss that
little head of hers. She must have been a fair horsewoman already
at nine years old; for it was to her that the Earl sent the dead
mother’s saddle and saddle-cloth of green velvet, laced and fringed
with silver and green silk; and it is certain she inherited the Earl’s
love of fine dressing, from the choice of various small gowns of
figured satins and rich stuffs of scarlet dye. Of even more
significance is the old Earl’s gift of Sir Philip Sidney’s Arcadia, “To my
daughter, Mary Boyle,” when this imperious young creature was only
twelve years old. Do little girls of twelve read Sir Philip Sidney’s
Arcadia to-day? There was to come a moment when, if the Earl had
ever read it himself, he must have heard in “Moll’s” voice, as she
answered him, some echo of Sidney’s teaching—

“... but a soule hath his life


Which is held in loue: loue it is hath ioynd
Life to this our Soule.”
After the usual delays at starting, the Ninth Whelp made a good
passage; and the Earl and his party reached Bristol safely on
Saturday August 4. As usual, presents were dispensed to the ship’s
captain and company, together with what remained of a hogshead of
claret wine. Next day, Sunday, the whole family went obediently to
church; and on Monday morning, leaving the others to follow with
the servants and luggage, the old Earl, riding a borrowed horse, set
off by himself to find his way to Stalbridge.[54]
A wonderful peace and stillness falls on the Dorsetshire uplands at
evening after a long, hot summer day. Up hill and down dale and up
hill again go the Dorsetshire lanes, between their tangled hedges,
through a country of undulating woods and downs and soft green
pastures. The lark sings, high up, invisible: a far-away, sleepy cock-
crow or faint bark of sheepdog breaks the silence; the grazing cattle
bend their brown heads in the fields.
The Earl was in England again, the land of his birth. It was
perhaps not altogether a prosperous and satisfied England, in
August 1638. The heavy hand of taxation was on even these
pastoral uplands. The heart of England was throbbing with political
unrest. But on that evening, at least, there could have been only the
lark’s ecstasy, and the sweet smell of wild thyme and woodsmoke in
the air. Ireland, the distressful country of his adoption, lay behind
the old man, and with it the memories of fifty strenuous years;—all
that was hardest and proudest and tenderest in a lifetime.
Lord and Lady Dungarvan were already at Stalbridge with “lyttle
ffrancke.” There was another baby-daughter now, but it had
apparently been left at Salisbury House, in London. Dungarvan had
ridden some six miles upon the road to meet his father. It was still
daylight when, riding together—the old man must have been pretty
stiff in the saddle, for he had ridden nearly sixty miles that day—they
came in sight of the Elizabethan manor standing among elms and
chestnut trees, surrounded by park lands and hayfields and
orchards: “My owne house of Stalbridge in Dorcetshier; this being
the firste tyme that ever I sawe the place.”[55]
After this, the movements of the Earl and his family read rather
like a Court Circular. Not much is heard of the life that must have
been going on in the little town itself, with its Church and market
Cross; but the mere presence of this great Irish family among them
must, by the laws of supply and demand, have wrought many
changes in the little market town. The Earl paid his love and service
to his neighbour and kinsman, the Earl of Bristol, at Sherborne
Castle, and the Earl and Countess of Bristol, with all their house-
party, immediately returned the visit; after which the whole family at
the Manor were “feasted” for two days at Sherborne Castle. The Earl
of Cork and his house-party rode to “the Bathe”, and return visits
were received at Stalbridge from friends at “the Bathe”. And a week
or two later the Earl, attended by Dungarvan and Barrymore, rode to
London, and was graciously received by the King and “all the Lords
at Whitehall.” The King praised the Earl’s government of Ireland, and
the Archbishop of Canterbury was particularly friendly.
Lady Barrymore and Lady Dungarvan had between them
undertaken to ease the Earl from the “trowble of hows-keeping,” and
for this purpose were allowed £50 a week, and more when they
wanted it; and the cellars and larders at Stalbridge were replenished
from time to time with gifts. A ton of claret wine and six gallons of
aqua vitæ arrived as a New Year’s gift from Munster, and “veary fatt
does” from English friends; while among his assets the Earl counted,
besides the produce of his Stalbridge lands and woods, the twenty
stalled oxen, the powdered beef, the bacon and salted salmon that
were sent from his Irish estates.
Thomas Cross, his steward, became “seneschal”;—perhaps there
was a seneschal at Sherborne Castle; and there was a Clerk of the
Kitchen and a large staff of household servants, men and women,
and a long list of rules for the management of the household drawn
up and signed by the Earl himself.[56] And of course the “re-
edification” of the Manor House began at once. There was water to
be carried in leaden pipes; new furniture to hasten home from the
London upholsterer, who dwelt at the sign of the Grasshopper; a red
embroidered bed, a tawny velvet carpet, couch and chairs. There
was a new coach to buy, and the paths and terraces at Stalbridge
were to be stone paved exactly like the paths and terraces at
Sherborne Castle. Stairs with a stone balustrade, and carved stone
chimney-pieces were to be added to the Manor;—one at least carved
with the Earl’s coat of arms “compleate,” and reaching nearly to the
ceiling, “fair and graceful in all respects.” There was a limekiln to
build, and pit coal to procure and cane apples[57] to be planted in
the orchard. But charity only began at home; and in this case it did
not prevent a subscription being sent—“a myte” of £100—to help the
Archbishop of Canterbury in his scheme of “re-edifying Pawle’s
Church in London.”
Meantime, all the Earl’s daughters and sons-in-law, except Dorothy
and Arthur Loftus, who remained in Ireland, seem to have found
their way, separately or together, to the Manor of Stalbridge; while
grandchildren, nieces and nephews and even “cozens” were
welcomed under its roof. The Dungarvans made their headquarters
there, and the Barrymores, and the little Lady Mary, who was now
fourteen, and to be considered a grown-up young lady, with an
allowance of £100 a year “to fynde herself.” And they were presently
joined by the Kildares, and Katharine and Arthur Jones. Even the
plaintive Lettice and her lord stayed for some time under the Earl’s
roof.[58] And in March 1639, after an absence of three years,
Kynalmeaky and Broghill, with M. Marcombes, returned from their
“peregrination”. They found Frank and Robyn already at Stalbridge,
though not in the great house itself. For their father had taken the
boys away from Eton on his return journey from London in
November 1638, and since then they had been boarded out with the
Rev. Mr. Dowch at the Parsonage, scarcely “above twice a musket-
shot” distant from their father’s house. Their three years at Eton had
cost, “for diett, tutaradge and aparell,” exactly £914 3s. 9d.
When the Earl of Cork visited Eton and took his two boys away, Sir
Henry Wotton must have been already ill. Since his return after the
summer breaking-time of 1638 the old Provost had suffered from a
feverish distemper, which was to prove the beginning of the end.[59]
It is possible that during the Provost’s illness extra duties had
fallen on Mr. Harrison, the Rector; in any case the two boys had
been removed from the care of their “old courteous schoolmaster,”
and handed over to “a new, rigid fellow;” and things were not going
quite so happily for them at Eton as heretofore. Moreover, poor
Carew, the romance of the underbaker’s daughter nipped in the bud,
had, from overmuch fondness for cards and dice, come utterly to
grief.
It was during this last year of Robert Boyle’s schooldays—in the
April of 1638, before Sir Henry Wotton’s illness, and while all was
going on as usual at Eton—that Mr. Provost had entertained at his
hospitable table a guest whose life was to be strangely linked in
after years with that of some members of the great Boyle family.
This was John Milton, then a young poet, living with his father at
Horton—not far from Eton—and just about to set out on his Italian
journey.[60] Was Robert Boyle one of the “hopeful youths” selected
by the Provost to dine at his table that day when Milton dined there?
And did Robert Boyle listen to the talk that went on at table between
Milton and his friend, the learned Hales, and Sir Henry Wotton? It
was very pleasant talk. When Milton returned to Horton he ventured
to send the Provost a little letter of thanks and a copy of his Comus
as a parting gift; and Sir Henry sent his own footboy post-haste to
Horton, to catch Milton before he started, with a pretty letter of
acknowledgment and an introduction to the British Agent in Venice.
It is noteworthy that the advice Sir Henry Wotton gave to Milton,
and the advice he always gave to his own pupils when they were
setting out on a career of diplomacy abroad, showed that, while the
old man had not forgotten his experience of the Augsburg album, his
kindly cynicism remained unchanged. I pensiori stretti, was the
advice he handed on in his charming letter to Milton,—ed il viso
sciolto; while to all young Etonians travelling in diplomacy he used to
say, Always tell the truth; for you will never be believed.
It is hard to say how much Robert Boyle may have owed to the
guidance and talk of Sir Henry Wotton. Boyle remembered him as a
fine gentleman who possessed the art of making others so; and it
was John Harrison’s methods of teaching that had impressed the
boy. Yet it must not be forgotten that the Provost’s tastes were not
only literary and scholarly; that he had not only surrounded himself
with a library of books that Robert Boyle in his boyhood must have
envied—Sir Henry Wotton was of a scientific turn of mind: he was
fond of experimenting. Ever since the days when he had watched
Kepler at work in his laboratory and supplied his cousin Lord Bacon
with facts, he had been accustomed to occupy himself, in more or
less dilletante fashion, with such little experiments as the distilling of
medicinal herbs and the measurement of time by allowing water to
pass through a filter, drop by drop; and it was Sir Henry Wotton
whom Izaak Walton consulted about the preparation of “seductive-
smelling oils” in the catching of little fishes. And who could it have
been, in that last year that Robyn spent at Eton, who lent him the
books that “meeting in him with a restless fancy” gave his thoughts
such a “latitude of roving”? Robyn had been away from school on a
visit to London, and there had fallen ill of a “tertian ague”, and had
been sent back to Eton to see if good air and diet might not do more
for him than all “the Queen’s and other doctors’ remedies” had done.
His own phrase[61] is that “to divert his melancholy they made him
read the State Adventures of Amadis de Gaule, and other fabulous
and wandering stories.” Who was the “they” at Eton? It could not
have been the “new, rigid fellow”. Amadis de Gaule may have been
part of Mr. John Harrison’s system of education, but one would like
to believe that Sir Henry Wotton had some hand in fashioning Robert
Boyle—that his whole library was open to the boy, not only the
books of romance and adventure in it that gave Robyn’s thoughts
such a “latitude of roving.” One would like to believe that the torch
was indeed passed on from Kepler’s laboratory, and by the study of
one of those three copies of Bacon’s Novum Organum, into the
hands of England’s first great experimental chemist.
Be that as it may, Sir Henry Wotton was already ill when Frank
and Robyn were removed from Eton in November 1638; and it was
Mr. Harrison who duly sent after them to Stalbridge the furniture of
their chamber—the blew perpetuana curtains and all the other
things so carefully inventoried by poor Carew. And Carew himself no
longer served his sweet young masters: he had been succeeded by a
manservant with the suggestive name of Rydowt, who appears to
have been a married man, and was accommodated with a little
cottage of his own at Stalbridge, with a garden which the Earl
planted with “cane apples” from Ireland. The boys were to live and
learn their lessons with Mr. Dowch at the Parsonage; and that “old
divine” was very soon to discover that Robyn had not learnt much
Latin at Eton after all, and “with great care and civility” to proceed to
read with him the Latin poets as well as the Latin prose-writers. And
while the Earl gave Frank a horse of his own, and knew him to be
happy and gallant in the saddle, it was Robyn who was the old Earl’s
Benjamin, most loved of all his sons. The family saw a likeness in
Robyn to his father—a likeness both in body and mind. It is difficult
to credit the Earl of Cork with any of his youngest son’s habit of
“unemployed pensiviness,” but there must have been something in
Robyn when he was quite a little fellow—a quiet self-reliance—that
impressed the old Earl strangely. Robyn was only twelve years old;
he had as yet shown none of the traits of character that the Earl so
“severely disrelished” in some of his sons and sons-in-law. And so,
when he gave Frank the horse, the Earl listened perhaps with some
wonderment to Robyn’s “pretie conceptions” in excellent language,
spoken still not quite smoothly; and he was content to let the boy
wander as he liked. He gave his Benjamin the keys of his orchard,
not afraid to leave him in a very paradise of unplucked apples,
“thinking at random.”
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebooknice.com

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