100% found this document useful (8 votes)
25 views

Introducing Blockchain with Java: Program, Implement, and Extend Blockchains with Java 1st Edition Spiro Buzharovski instant download

The document introduces 'Introducing Blockchain with Java' by Spiro Buzharovski, which covers the fundamentals of blockchain technology, including definitions, properties, and examples. It explains concepts like ledgers, peer-to-peer networks, digital signatures, and encryption methods necessary for blockchain implementation. The text serves as an introductory chapter, setting the stage for deeper technical discussions in subsequent sections.

Uploaded by

ortisvannewk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (8 votes)
25 views

Introducing Blockchain with Java: Program, Implement, and Extend Blockchains with Java 1st Edition Spiro Buzharovski instant download

The document introduces 'Introducing Blockchain with Java' by Spiro Buzharovski, which covers the fundamentals of blockchain technology, including definitions, properties, and examples. It explains concepts like ledgers, peer-to-peer networks, digital signatures, and encryption methods necessary for blockchain implementation. The text serves as an introductory chapter, setting the stage for deeper technical discussions in subsequent sections.

Uploaded by

ortisvannewk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 85

Introducing Blockchain with Java: Program,

Implement, and Extend Blockchains with Java 1st


Edition Spiro Buzharovski install download

https://ebookmeta.com/product/introducing-blockchain-with-java-
program-implement-and-extend-blockchains-with-java-1st-edition-
spiro-buzharovski-2/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Introducing Blockchain with Java: Program, Implement,


and Extend Blockchains with Java 1st Edition Spiro
Buzharovski

https://ebookmeta.com/product/introducing-blockchain-with-java-
program-implement-and-extend-blockchains-with-java-1st-edition-
spiro-buzharovski/

Introducing Blockchain with Lisp: Implement and Extend


Blockchains with the Racket Language 1st Edition Boro
Sitnikovski

https://ebookmeta.com/product/introducing-blockchain-with-lisp-
implement-and-extend-blockchains-with-the-racket-language-1st-
edition-boro-sitnikovski/

Learn Java with Math 1st Edition Ron Dai

https://ebookmeta.com/product/learn-java-with-math-1st-edition-
ron-dai/

Statistics of Earth Science Data Their Distribution in


Time Space and Orientation 2nd Edition Graham J
Borradaile

https://ebookmeta.com/product/statistics-of-earth-science-data-
their-distribution-in-time-space-and-orientation-2nd-edition-
graham-j-borradaile/
Rethinking darkness cultures histories practices 1st
Edition Nick Dunn Editor Tim Edensor Editor

https://ebookmeta.com/product/rethinking-darkness-cultures-
histories-practices-1st-edition-nick-dunn-editor-tim-edensor-
editor-2/

Junkyard Blues 1st Edition Al Moye

https://ebookmeta.com/product/junkyard-blues-1st-edition-al-moye/

Marketing: An Introduction, 15th Global Edition Gary


Armstrong

https://ebookmeta.com/product/marketing-an-introduction-15th-
global-edition-gary-armstrong/

Spectacular Sports World s Toughest Races Understanding


Fractions Saskia Lacey

https://ebookmeta.com/product/spectacular-sports-world-s-
toughest-races-understanding-fractions-saskia-lacey/

The Grey Eagles of Chippewa Falls 1st Edition John E


Kinville

https://ebookmeta.com/product/the-grey-eagles-of-chippewa-
falls-1st-edition-john-e-kinville/
The Protocol of the Gods A Study of the Kasuga Cult in
Japanese History Allan G. Grapard

https://ebookmeta.com/product/the-protocol-of-the-gods-a-study-
of-the-kasuga-cult-in-japanese-history-allan-g-grapard/
CHAPTER 1

Introduction

to Blockchain

The entirety of this chapter is comprised of an excerpt from


Introducing Blockchain with Lisp: Implement and Extend Blockchains
with the Racket Language by Boro Sitnikovski, and it is reused here
with the author’s permission.

“Chained” by Filip Rizov

© Spiro Buzharovski 2022


1

S. Buzharovski, Introducing Blockchain with Java,

https://doi.org/10.1007/978-1-4842-7927-4_1

Chapter 1 IntroduCtIon to BloCkChaIn

In this chapter, we will see some definitions and examples for


blockchain. We will see what properties a blockchain has, what it
allows us to do, and what it is good for.

Definition 1-1 Blockchain is a system in which a record of


transactions is maintained across several computers that are linked in
a peer-to-peer network.1

We will give an example that will serve as motivation, as well as


define what encryption and hashing techniques are and how they will
help us with our system.

Note that we will skip some of the technical bits in this chapter, as it
is only supposed to serve as introductory material. The technical bits
will be covered later when we start building the blockchain.

1.1 Motivation and Basic Definitions

Let’s assume that you and your friends exchange money often, for
example, paying for dinner or drinks. It can be inconvenient to
exchange cash all the time.

One possible solution is to keep records of all the bills that you and
your friends have. This is called a ledger and is depicted in Figure 1-
1.
1 We will use this definition throughout the book, but note that there
are many different definitions on the Internet. By the end of this
book, you should be able to distinguish the slight nuances and
similarities in each definition.

Chapter 1 IntroduCtIon to BloCkChaIn

Figure 1-1. A ledger and a set of connected friends (peers)


Definition 1-2 a

ledger is a book that contains a record of

transactions.

Further, at the end of every day, you all sit together and refer to the
ledger to do the calculations to settle up. Let’s imagine that there is a
pot that is the place where all of the money is kept. If you spent
more than you received, you put that money in the pot; otherwise,
you take that money out.

We want to design the system such that it functions similarly to a


regular bank account. A holder of a wallet (bank account) should be
able to only send money from their wallet to other wallets. Thus,
every person in the system will have a wallet of a kind, which can
also be used to determine the balance for them. Note that with the
current setup using a ledger, we have to go through all the existing
records to determine the balance of a specific wallet.

If we want to avoid going through all the existing records, there is a


way we can optimize this with unspent transaction outputs (UTXOs),
as we will see later in Chapter 3.

Chapter 1 IntroduCtIon to BloCkChaIn

A problem that may arise is the double-spending problem, where Bob


can try to send all of his money to Alice and you at the same time,
thus effectively doubling the money he sends in relation to what he
owned.

There are several ways this can be resolved, and the solution that we
will provide will be a simple check of the sum of the inputs and the
sum of the outputs.

A problem that might appear with this kind of system is that anyone
can add a transaction. For example, Bob can add a transaction where
Alice pays him a few dollars without Alice’s approval. We need to re-
think our system such that each transaction will have a way to be
verified/signed.

Definition 1-3 a

digital signature is a way to verify the

authenticity of digital messages or documents.

For signing and verifying transactions we will rely on digital


signatures (Figure 1-2). For now, let’s assume that anyone who adds
information to the ledger also adds a signature with each record, and
others have no way to modify the signature, but only to verify it. We
will cover the technical details in the “Encryption” section.

Figure 1-2. Our ledger now contains signatures 4

Chapter 1 IntroduCtIon to BloCkChaIn

However, let’s assume that Bob is keeping the ledger to himself, and
everybody agrees to this. The ledger is now stored in what is a
centralized place. But in this case, if Bob is unavailable at the end of
the day when everybody gathers to settle up, nobody will be able to
refer to the ledger.

We need a way to decentralize the ledger, such that at any given time
any of the people can do a transaction. For this, every person
involved will keep a copy of the ledger to themselves, and when they
meet at the end of the day, they will sync their ledgers.

You are connected to your friends, and so are they to you. Informally,
this makes a peer-to-peer network.

Definition 1-4 a
peer-to-peer network is formed when two or

more computers are connected to each other.

For example, when you are accessing a web page on the Internet
using a browser, your browser is the client, and the web page you’re
accessing is hosted by a server. This represents a centralized system
since every user is getting the information from a single place—the
server.

In contrast, in a peer-to-peer network, which represents a


decentralized system, the distinction between a client and a server is
blurred. Every peer is both a client and a server at the same time.

With the system (Figure 1-3), as the list of peers (people) grows, we
might run into a problem of trust. When everybody meets at the end
of the day to sync their ledgers, how can they believe the others that
the transactions listed in their ledgers are true? Even if everybody
trusts everybody else for their ledger, what if a new person wants to
join this network? It’s natural for existing users to ask this newcomer
to prove that they can be trusted. We need to modify our system to
support this kind of trust. One way to achieve that is through so-
called proof of work, which we introduce next.

5
Chapter 1 IntroduCtIon to BloCkChaIn

Figure 1-3. A decentralized ledger

Definition 1-5 a

proof of work is data that is time-consuming to calculate and easy for


others to verify.

For each record we will also include a special number (or a hash) that
will represent proof of work, in that it will provide proof that the
transaction is valid. We will cover the technical details in the
“Hashing”

section.
At the end of the day, we agree that we will trust the ledger of the
person who has put most of the work in it. If Bob has some errands
to run, he can catch up the next day by trusting the rest of the peers
in the network.

In addition to all this, we want the transactions to have an order, so


every record will also contain a link to the previous record. This
represents the actual blockchain, depicted in Figure 1-4.

Chapter 1 IntroduCtIon to BloCkChaIn

Figure 1-4. A chain of blocks: blockchain

If everybody agreed to use this ledger as a source of truth, there


would be no need to exchange physical money at all. Everybody can
just use the ledger to put in or retrieve money from it.

To understand the technical bits of digital signatures and proof of


work, we will be looking at encryption and hashing, respectively.

Fortunately for us, the programming language that we will be using


has built-in functionalities for encryption and hashing. We don’t have
to dig too deep into how hashing and encryption and decryption
work, but a basic understanding of them will be sufficient.

Observe how we started with a simple definition of a ledger and


gradually built up to a complex system. We will use the same
approach in programming.

1.2 Encryption

We will start with the following definition.

Definition 1-6 Encryption is a method of encoding values such that


only authorized people can view the original content. decryption is a
method of decoding encrypted values.

Chapter 1 IntroduCtIon to BloCkChaIn

Note that in this section we will mostly talk about numbers, but
characters and letters can also be encrypted/decrypted with the same
methods, by using the ASCII2 values for the characters.

Before we talk about encryption, we first have to recall what


functions are, since the encoding/decoding values are achieved with
the usage of them.

1.2.1 Functions

Figure 1-5. A function

Definition 1-7 Functions are mathematical entities that assign


unique outputs to given inputs.

For example, you might have a function that accepts as input a


person and as output returns the person’s age or name. Another
example is the function f ( x) = x + 1. There are many inputs this
function can accept: 1, 2, 3.14. For example, when we input 2, it
gives us an output of 3, since f (2) = 2 + 1 = 3.

2 An ASCII table is a table that assigns a unique number to each


character (such as !, @, a, Z, etc.).

Chapter 1 IntroduCtIon to BloCkChaIn One simple way to think of


functions is in the form of tables. For a function f ( x) accepting a
single argument x, we have a two-column table where the first
column is the input, and the second column is the output.

For a function f ( x, y) accepting two arguments x and y, we have a


three-column table where the first and second columns represent the
input, and the third column is the output. Thus, to display the
function discussed earlier in the form of a table, it would look like
this: x f

( x)

12

23

……
1.2.2 Symmetric-Key Algorithm

We can assume that there exist functions E( x) and D( x) for


encryption and decryption, respectively. We want these functions to
have the following properties:

• E(x) ≠ x, meaning that the encrypted value should

not be the same as the original value

• E(x) ≠ D(x), meaning that the encryption and

decryption functions produce different values

• D(E(x)) = x, meaning that the decryption of an

encrypted value should return the original value

For example, let’s assume there’s some kind of an encryption


scheme, say E("Boro") = 426f726f. We can “safely” communicate the
value 426f726f without actually exposing our original value, and only
those who know the decryption scheme D(x) will be able to see that
D(426f726f) = "Boro".

9
Chapter 1 IntroduCtIon to BloCkChaIn

Another example of encryption scheme is for E(x) to shift every


character in x forward, and for D(x) to shift every character in x
backward.

This scheme is known as the Caesar cipher. To encrypt the text “abc”
we have E("abc") = "bcd", and to decrypt it we have D("bcd") =
"abc".

However, the scheme described makes a symmetric algorithm (Figure


1-6), meaning that we have to share the functions E and D with the
parties involved, and as such, they may be open to attacks.

Figure 1-6. Symmetric-key algorithm

1.2.3 Asymmetric-Key Algorithm

To solve the problems that arise with symmetric-key algorithms, we


will use what is called an asymmetric algorithm or public-key
cryptography (Figure 1-7). In this scheme, we have two kinds of
keys: public and private.

We share the public key with the world and keep the private one to
ourselves.

Figure 1-7. Asymmetric-key algorithm

This algorithm scheme has a neat property where only the private
key can decode a message, and the public key can encode a
message.

10

Chapter 1 IntroduCtIon to BloCkChaIn We have two functions that


should have the same properties as those for the symmetric-key
algorithm.

• E(x, p), which encrypts a message x given a

public key p

• D(x′ , s), which decrypts an encrypted message

x′ given a private (secret) key s

In our example, we will rely on the modulo operation. Recall that a


mod b represents the remainder when a is divided by b. For example,
4 mod 2 = 0 because there is no remainder when dividing 4 by 2;
however, 5 mod 2 = 1.

Here’s one example of a basic encryption algorithm based on addition


and modulo operations:

1. Pick one random number, for example 100. This will represent a
common, publicly available key.

2. Pick another random number in the range (1 , 100), for example


97. This will represent the private key s .

3. The public key p is obtained by subtracting the

common key from the private: 100 − 97 = 3.

4. To encrypt data, add it to the public key and take modulo 100: E(x,
p) = (x + p) mod 100.
5. To decrypt data, we use the same logic but with our private key, so
D(x′ , s) = (x′ + s) mod 100.

For example, suppose we want to encrypt 5. Then E(5, 3) = (5 + 3)


mod 100 = 8. To decrypt 8, we have D(8, 97) = (8 + 97) mod 100 =

105 mod 100 = 5.

This example uses a very simple generation pair of (x + y) mod c.

But, in practice, the pair generation algorithm is much more complex


and harder to break by attackers. After all, the complexity of the
algorithm’s computation is what makes it hard to break it.

11

Chapter 1 IntroduCtIon to BloCkChaIn

We can use a similar algorithm for digital signatures:

• S(x, s), which signs a message x given a private key s (encryption)

• V (x′ , sig, p), which verifies a signed message

x′ , given signature sig and public key p (decryption) As we said


earlier, each record will also include a special number (or a hash).
This hash will be what is produced by S(x, s) (encryption). A hash
can be verified by using the verify function to confirm a record’s
ownership (decryption).

The wallet will contain a pair of public and a private key. These keys
will be used to receive or send money. With the private key, it is
possible to write new blocks (or transactions) to the blockchain,
effectively spending money. With the public key, others can send
currency and verify signatures.

EXERCISE 1-1

Come up with a table of functions such that:

1. the input is a number, and the output is a number 2. the input is a


number, and the output is the name of an employee in a company
given that number

EXERCISE 1-2

Check the three properties for a symmetric-key algorithm to ensure


the Caesar cipher is compatible with them.

12

Chapter 1 IntroduCtIon to BloCkChaIn

EXERCISE 1-3

Come up with an encryption scheme, based on mathematical


substitution.

EXERCISE 1-4

use the asymmetric-key algorithm we defined to sign a message and


verify it.
Hint this is similar to the encryption/decryption example shown
earlier.

1.3 Hashing

Definition 1-8 hashing is a one-way function in that it encodes text


without a way to retrieve the original value.

Hashing is simpler than the previously described encryption schemes.


One example of a hashing function is to return the length of
characters as in H

("abc") = 3, but also H ("bcd") = 3. This means we don’t have a way


to retrieve the original value just by using the return value 3.

As we mentioned earlier, the reason to use such a technique is that it


has some interesting properties, such as providing us with the proof
of work.

Definition 1-9 Mining is the process of validating transactions.

For this effort, successful miners obtain money as a reward.

13

Chapter 1 IntroduCtIon to BloCkChaIn

Hashcash is one kind of a proof-of-work system.3 We will use it to


implement mining. We will see how this algorithm works in detail in
the later chapters where we will implement it.

Hashing functions have another useful property that allows


connecting two or more distinct blocks by having the information
about the current block’s hash (current hash) and previous block’s
hash (previous hash) in each block. For example, block-1 may have a
hash such as 123456, and block-2 may have a hash such as 345678.
Now, block-2’s previous-hash will be block-1’s current hash, that is,
123456. Here, we linked these two blocks, thus effectively creating a
linked list of blocks containing ledgers with transactions. Figure 1-4
depicts this linking.

The hash of the block is based on the block’s data itself, so to verify a
hash we can just hash the block’s data and compare it to current
hash.

Two or more blocks (or transactions) that are connected form a


blockchain. The validity of the blockchain will depend on the validity
of each transaction.

EXERCISE 1-5

Come up with your own hashing function.

EXERCISE 1-6

In which way can the linked list depicted in Figure 1-4 be traversed?
What are the implications of this property?

3 Hashcash was initially targeted for limiting email spam and other
attacks.

However, recently it’s also become known for its usage in blockchains
as part of the mining process. Hashcash was proposed in 1997 by
Adam Backa.

14

Chapter 1 IntroduCtIon to BloCkChaIn


1.4 Smart Contracts

Definition 1-10 a

smart contract is a self-executing contract

with the conditions of an agreement between a buyer and a seller


being directly written into lines of code.

A blockchain is programmable if the transactions themselves can be


programmed by users. For example, users (not necessarily
programmers) can write a script to add additional requirements that
must be satisfied before sending money. It could look something like
this: 1 if (user has more than 10 money)

2 then approve transaction

3 else reject transaction

Smart contracts are implemented as a computation that takes place


on the blockchain.

1.5 Bitcoin

Bitcoin was the world’s first implementation of a blockchain. In


November 2008, a link to a paper authored by Satoshi Nakamoto
titled “Bitcoin: A Peer-to-Peer Electronic Cash System” was published
on a cryptography mailing list. Bitcoin’s white paper consists of nine
pages; however, it is a mostly theoretical explanation of the design
and as such may be a bit overwhelming to newcomers.

The Bitcoin software is open source code and was released in


January 2009 on SourceForge. The design of a Bitcoin includes a
decentralized network (peer-to-peer network), block (mining),
blockchain, transactions, and wallets, each of which we will look at in
detail in this book.

15
Chapter 1 IntroduCtIon to BloCkChaIn Although there are many
blockchain models and each one of them differs in implementation
details, the blockchain we will be building upon in this book will look
pretty similar to Bitcoin, with some parts simplified.

1.6 Example Workflows

We will list a few important workflows that our system will use,
among others.

Mining a block creates a new block, using Hashcash to calculate the


current hash of the block. It also contains the previous hash that is a
link to the previous block in the blockchain.

Checking a wallet balance for person A will first filter all blocks in the
blockchain (sender = A or receiver = A) and then sum them to
calculate the balance. The more our blockchain grows, the longer this
operation will take. For that purpose, we will use unspent transaction
outputs or the UTXO model. This model is a list of transactions
containing information about the owner and the amount of money.
Thus, every transaction will consume elements from this list.

Adding a block to a blockchain consists of sending money from A to


B. One prerequisite is that A has enough money; we check this using
the wallet balance workflow. We proceed by creating a transaction
(sender =

A, receiver = B) and signing it. Then we mine a block using this


transaction and update the UTXO with the rewards.

1.7 Summary

The point of this chapter is to get a vague idea of how the system
that we will implement looks. Things will become much clearer in the
next chapter where we will be explicit about the definitions of every
entity.
16

Chapter 1 IntroduCtIon to BloCkChaIn Here’s what we learned in this


chapter, briefly:

• The core entity of the system is a block.

• A block contains (among other data) transactions.

• We have a ledger that is an ordered list of all valid blocks


(blockchain.)

• Every peer involved with the ledger has a wallet.

• Every record in the ledger is signed by the owner and can be


verified by the public (digital signatures).

• The ledger is in a decentralized location; that is, everybody has a


copy of it.

• Trust is based upon proof of work (mining).

17
CHAPTER 2

Model: Blockchain

Core

“Block” by Filip Rizov

© Spiro Buzharovski 2022


19

S. Buzharovski, Introducing Blockchain with Java,

https://doi.org/10.1007/978-1-4842-7927-4_2

Chapter 2 Model: BloCkChain Core

Now that we have explained in theory what a blockchain is and how


it is useful, the next obvious step is to start implementing it in Java.
In this chapter, we will start by creating the model classes that
represent the most elementary building blocks for our application.
You can either look at the code snippets provided or download the
complete repository from https://github.com/

5pir3x/e- coin. The exercises included will offer insight and give you
ideas for you to modify my code to create alternative
implementations of various aspects of the application. I urge you to
try to complete as many of them as possible; my hope is that at the
end you will have not only a greater and deeper understanding of
blockchain technology but also with a great project for your portfolio
that’s an alternative to my implementation instead of a mere copy. I
have chosen to create a folder named Model inside my
src.com.company folder structure in my repository and keep my
model classes there. It is recommended that you choose the same
folder structure for your project to avoid any pathing or import
problems.

2.1 Block.java

We will start first by listing the imports in the following code snippet:
1 package com.company.Model;

3 import sun.security.provider.DSAPublicKeyImpl; 4

5 import java.io.Serializable;
6 import java.security.InvalidKeyException;

7 import java.security.Signature;

8 import java.security.SignatureException;

9 import java.util.ArrayList;

10 import java.util.Arrays;

11 import java.util.LinkedList;

12

20

Chapter 2 Model: BloCkChain Core

Next we move on to our class declaration and fields, as shown in our


next code snippet:

13 public class Block implements Serializable {

14

15 private byte[] prevHash;

16 private byte[] currHash;

17 private String timeStamp;

18 private byte[] minedBy;

19 private Integer ledgerId = 1;

20 private Integer miningPoints = 0;

21 private Double luck = 0.0;


22

23 private ArrayList< Transaction> transactionLedger = new


ArrayList<>();

The first thing we recognize on line 13 is that this class implements


the interface Serializable. Since all the blocks for our blockchain will
be created using this class, we need them to be serializable so that
we can share our blockchain through our network.

The field prevHash will contain the signature or, in other words, the
encrypted data from the previous block. The currHash will contain the
signature or, in other words, the encrypted data from this block,
which will be encrypted with the private key of the miner that will get
to mine this block. The timeStamp obviously will contain a timestamp
of when this block was mined/finalized. The field minedBy will contain
the public key, which also doubles as the public address of the miner
that managed to mine this block. In the process of blockchain
verification, this public address/public key will be used to verify that
the currHash/signature of this block is the same as the hash of the
data presented by this block and secondary that this block was
indeed mined by this particular miner.

21

Chapter 2 Model: BloCkChain Core

We will touch on this topic a bit later in this section when we explain
the isVerified method of this class. Next is our ledgerId field. Since
we intend to implement a database with separate Block and
Transaction tables, this field will help us retrieve the correct
corresponding ledger for this block. You can also look at this field as
the block number. Our next fields, miningPoints and luck, will be used
to form the network consensus in regard to choosing this block’s
miner.

We will get into the details of how these fields are used in Chapter 6.
The field transactionLedger is simply an arraylist of all the
transactions contained in this block. We will explain the Transaction
class in the section “Transaction.java.”

In the following snippet, we can see the three constructors starting


on line 26, line 38, and line 45:

25 //This constructor is used when we retrieve it from the db

26 public Block(byte[] prevHash, byte[] currHash, String timeStamp,


byte[] minedBy,Integer ledgerId, 27 Integer miningPoints, Double
luck,

ArrayList< Transaction> transactionLedger) {

28 this.prevHash = prevHash;

29 this.currHash = currHash;

30 this.timeStamp = timeStamp;

31 this.minedBy = minedBy;

32 this.ledgerId = ledgerId;

33 this.transactionLedger = transactionLedger; 34 this.miningPoints


= miningPoints;

35 this.luck = luck;

36 }

37 //This constructor is used when we initiate it after retrieve.

38 public Block(LinkedList< Block> currentBlockChain) {

22

Chapter 2 Model: BloCkChain Core


39 Block lastBlock = currentBlockChain.getLast(); 40 prevHash =
lastBlock.getCurrHash(); 41 ledgerId = lastBlock.getLedgerId() + 1;
42 luck = Math.random() * 1000000;

43 }

44 //This constructor is used only for creating the first block in the
blockchain.

45 public Block() {

46 prevHash = new byte[]{0}; 47 }

48

The first constructor is used when we retrieve our blockchain from


the database. Here we retrieve all the blocks completely finalized,
and this constructor helps us instantiate the block with all of the
fields properly set up. The second constructor is used while the
application is running and is used to create a completely new block
(in other words, the head of the blockchain) for us to work on. We
will go over the details of how this is achieved in Chapter 6. Our third
constructor on line 45 will be used only once by our init() method to
create our first block.

Our next snippet showcases the isVerified method:

48

49 public Boolean isVerified(Signature signing) 50 throws


InvalidKeyException, SignatureException {

51 signing.initVerify(new DSAPublicKeyImpl(this.minedBy)); 52
signing.update(this.toString().getBytes()); 53 return
signing.verify(this.currHash); 54 }

55
23

Chapter 2 Model: BloCkChain Core

We accept an object from the Signature class as a parameter. The


Signature class is actually a class from the java security package java.

security.Signature. It is a helper singleton class that allows us to


encrypt/decrypt data using different algorithms. On line 51 we initiate
the signing parameter by using the public key from the minedBy field
of this class. We will use this key to verify the data in this class
against the signature stored in the currHash. On line 52 we insert the
data that we want to verify, which in our case is the contents of the
toString method.

On line 53 we return the Boolean result after verifying the data


contained in this class against its currHash.

What’s left, as shown in our next snippet, are the equals and hash
methods, the generic getters and setters, and the toString() method,
which concludes our Block.java class:

55

56 @Override

57 public boolean equals(Object o) {

58 if (this == o) return true;

59 if (!(o instanceof Block)) return false; 60 Block block =


(Block) o;

61 return Arrays.equals(getPrevHash(), block.getPrevHash());

62 }

63
64 @Override

65 public int hashCode() {

66 return Arrays.hashCode(getPrevHash()); 67 }

68

69 public byte[] getPrevHash() { return prevHash; }

70 public byte[] getCurrHash() { return currHash; }

71

24

Chapter 2 Model: BloCkChain Core

72 public void setPrevHash(byte[] prevHash) { this.prevHash =

prevHash; }

73 public void setCurrHash(byte[] currHash) { this.currHash =

currHash; }

74

75 public ArrayList< Transaction> getTransactionLedger() {

return transactionLedger; }

76 public void setTransactionLedger(

ArrayList< Transaction> transactionLedger) {

77 this.transactionLedger = transactionLedger; 78 }

79
80 public String getTimeStamp() { return timeStamp; }

81 public void setMinedBy(byte[] minedBy) {

this.minedBy = minedBy; }

82

83 public void setTimeStamp(String timeStamp) {

this.timeStamp = timeStamp; }

84

85 public byte[] getMinedBy() { return minedBy; }

86

87 public Integer getMiningPoints() { return miningPoints; }

88 public void setMiningPoints(Integer miningPoints) {

this.miningPoints = miningPoints; }

89 public Double getLuck() { return luck; }

90 public void setLuck(Double luck) { this.luck = luck; }

91

92 public Integer getLedgerId() { return ledgerId; }

93 public void setLedgerId(Integer ledgerId) {

this.ledgerId = ledgerId; }

94

25
Chapter 2 Model: BloCkChain Core

95 @Override

96 public String toString() {

97 return "Block{" +

98 "prevHash=" + Arrays.toString(prevHash) +

99 ", timeStamp='" + timeStamp + '\'' +

100 ", minedBy=" + Arrays.toString(minedBy) +

101 ", ledgerId=" + ledgerId +

102 ", miningPoints=" + miningPoints +

103 ", luck=" + luck +

104 '}';

105 }

106}

107

The first thing to note here is that the equals method compares the
previous hash of the block class. We’ll use this later in Chapter 6
when we explain the consensus algorithm further. The other thing of
note is the fields contained in the toString method. We include
everything that goes into verifying the block against the current hash.

Important!
• remember that a wallet’s public key is also the wallet’s public
address/account number.

• the current hash/signature of the block is just the encrypted version


of the data contained in the block.

• the miner’s private key is used to encrypt the block’s data, which
creates the signature.

26

Chapter 2 Model: BloCkChain Core

• the miner’s public key is used for other peers to verify the block by
comparing the signature’s hash against the hash of the block’s data.

• note how we use the toString() method throughout this class to


prep our data conveniently for comparison.

• note how all of the essential fields that make certain the block is
unique are included in the toString() method.

2.2 Transaction.java

We briefly mentioned that we keep an array list of transactions in our


Block class in the previous section, and now it’s time to explain in
detail what our Transaction.java class contains. First we’ll start with
the imports found in the following code snippet:

1 package com.company.Model;

3 import sun.security.provider.DSAPublicKeyImpl; 4

5 import java.io.Serializable;

6 import java.security.InvalidKeyException;
7 import java.security.Signature;

8 import java.security.SignatureException;

9 import java.time.LocalDateTime;

10 import java.util.Arrays;

11 import java.util.Base64;

12

27

Chapter 2 Model: BloCkChain Core

Next let’s go over the class declaration and its fields, as shown in the
next code snippet:

13 public class Transaction implements Serializable {

14

15 private byte[] from;

16 private String fromFX;

17 private byte[] to;

18 private String toFX;

19 private Integer value;

20 private String timestamp;

21 private byte[] signature;

22 private String signatureFX;


23 private Integer ledgerId;

24

Since this class also creates objects from which we are building our
blockchain, it will implement the interface serializable so that it’s
shareable through the network.

The fields from and to will contain the public keys/addresses of the
account that sends and the account that receives the coins,
respectively.

The value is the amount of coins that will be sent, and timeStamp is
the time at which the transaction has occurred. Signature will contain
the encrypted information of all the fields, and it will be used to verify
the validity of the transaction (it will be used the same way the field
currHash was used in the previous class).The ledgerId serves the
same purpose as in the previous class. The fields with the FX suffix
are simple duplicates formatted to String instead of byte[]. We do
this so that we can easily display them on our front end.

In this class we also have two constructors; the first one is used
when we retrieve a transaction from the database, and the second
one is used when we want to create a new transaction within our
application. Let’s observe them in the following code snippet:

28

Chapter 2 Model: BloCkChain Core

26 //Constructor for loading with existing signature 27 public


Transaction(byte[] from, byte[] to, Integer value, byte[] signature,
Integer ledgerId,

28 String timeStamp) {

29 Base64.Encoder encoder = Base64.getEncoder(); 30 this.from =


from;
31 this.fromFX = encoder.encodeToString(from); 32 this.to = to;

33 this.toFX = encoder.encodeToString(to); 34 this.value = value;

35 this.signature = signature;

36 this.signatureFX = encoder.encodeToString(signature); 37
this.ledgerId = ledgerId;

38 this.timestamp = timeStamp;

39 }

40 //Constructor for creating a new transaction and signing it.

41 public Transaction (Wallet fromWallet, byte[] toAddress, Integer


value, Integer ledgerId,

42 Signature signing) throws InvalidKeyException,


SignatureException {

43 Base64.Encoder encoder = Base64.getEncoder(); 44 this.from =


fromWallet.getPublicKey().getEncoded(); 45 this.fromFX =
encoder.encodeToString(

fromWallet.getPublicKey().getEncoded()); 46 this.to = toAddress;

47 this.toFX = encoder.encodeToString(toAddress); 48 this.value =


value;

49 this.ledgerId = ledgerId;

50 this.timestamp = LocalDateTime.now().toString(); 51
signing.initSign(fromWallet.getPrivateKey()); 29
Chapter 2 Model: BloCkChain Core

52 String sr = this.toString();

53 signing.update(sr.getBytes()); 54 this.signature = signing.sign();


55 this.signatureFX = encoder.encodeToString(this

.signature);

56 }

57

The first constructor simply sets the class fields according to the
retrieved data from the database and uses the Base64.Encoder class
to convert the byte[] fields safely into String.

The second constructor is a bit more complex, so we will explain it in


more detail piece by piece. First let’s look at the constructor
parameters that are different: Wallet fromWallet and Signature
signing. We will explain the Wallet class in more detail in the next
section, for now we should just note that the fromWallet parameter
contains the public and private keys of the sender/maker of the
transaction. We use the same Signature class as in our Block
isVerified method mentioned in the previous section.

Next let’s explain the body of the constructor so we understand how


encrypting data works in our case. The signature creation phase
shown in Figure 2-1 offers an overview of what we are trying to
accomplish.
Figure 2-1. Signature creation

30

Chapter 2 Model: BloCkChain Core

To achieve this, first we set up our data by initiating our class fields
from the parameters and add a timestamp as shown on lines 44 to
50. Now once we have our data that we would like to encrypt, we set
our private key to the signing object with the statement on line 51.
This tells the signing object, when encrypting, to use the private key
we provided. On line 52

we are putting all the data we want to encrypt in a single String


object by using the toString() method. On line 53 we are feeding all
the data we want to encrypt to the signing object, and on line 54 we
are actually encrypting the data and assigning it to our signature
field.

Next is our method for the verification of transactions, as shown in


the following snippet:

58 public Boolean isVerified(Signature signing) 59 throws


InvalidKeyException, SignatureException {

60 signing.initVerify(new DSAPublicKeyImpl(this.

getFrom()));

61 signing.update(this.toString().getBytes()); 62 return
signing.verify(this.signature); 63 }

64

This method will be used by the other peers to verify that each
transaction is valid. Before explaining the code, let’s look at Figure 2-
2 and see what our method tries to accomplish.
31

Chapter 2 Model: BloCkChain Core

Figure 2-2. Verification phase

The workflow of the schematic is quite simple; we need to compare


the hash of the signature and the hash of the data contained in our
class using the public key.

Now let’s look back at our isVerified method and explain how the
workflow from the schematic is achieved. As parameters we are
getting the Transaction object that we want to verify and the
Signature helper class object, which pre-initialized to use SHA256
with DSA algorithm the same way as before. On line 60 we are
setting the public key with which we would like to decrypt our
signature. The new DSAPublicKeyImpl(byte[]
encoded) is just a wrapper from the sun.security.provider package
that will help convert our public key information from byte[] to
PublicKey object. On line 61 we set the transaction data that we want
to verify against the signature. Finally on line
Blockchaintransaction.java 62 we provide the signature, the process
of comparison/verification gets executed and a result is returned
automatically for us.

32

Chapter 2 Model: BloCkChain Core

We finish up the rest of the class with generic getters, setters, and
our toString, equals, and hash methods, as shown in the following
snippet: 65 @Override

66 public String toString() {

67 return "Transaction{" +

68 "from=" + Arrays.toString(from) +

69 ", to=" + Arrays.toString(to) +

70 ", value=" + value +

71 ", timeStamp= " + timestamp +

72 ", ledgerId=" + ledgerId +

73 '}';

74 }

75

76 public byte[] getFrom() { return from; }


77 public void setFrom(byte[] from) { this.from = from; }

78

79 public byte[] getTo() { return to; }

80 public void setTo(byte[] to) { this.to = to; }

81

82 public Integer getValue() { return value; }

83 public void setValue(Integer value) { this.value = value; }

84 public byte[] getSignature() { return signature; }

85

86 public Integer getLedgerId() { return ledgerId; }

87 public void setLedgerId(Integer ledgerId) {

this.ledgerId = ledgerId; }

88

89 public String getTimestamp() { return timestamp; }

90

91 public String getFromFX() { return fromFX; }

92 public String getToFX() { return toFX; }

33

Chapter 2 Model: BloCkChain Core


93 public String getSignatureFX() { return signatureFX; }

94

95

96 @Override

97 public boolean equals(Object o) {

98 if (this == o) return true;

99 if (!(o instanceof Transaction)) return false; 100 Transaction


that = (Transaction) o; 101 return Arrays.equals(getSignature(),
that.getSignature());

102 }

103

104 @Override

105 public int hashCode() {

106 return Arrays.hashCode(getSignature()); 107 }

108

109}

Important!

• note how we use the toString() method throughout this class to


prep our data conveniently for comparison.

• note how all the essential fields that make certain the transaction is
unique are included in the toString()

method.
34

Chapter 2 Model: BloCkChain Core

EXERCISE 2-1

if we fail to include a timestamp as part of the verification process in


our transaction object, can you think of a way to exploit this
vulnerability?

2.3 Wallet.java

Let’s start as always with the imports for this class located in the
following snippet:

1 package com.company.Model;

3 import java.io.Serializable;

4 import java.security. *;

In the following snippet, observe the class declaration and fields: 6


public class Wallet implements Serializable {

8 private KeyPair keyPair;

Since we would like to be able to store and export/import our wallet


from/to a database, we will also implement the Serializable interface.
This class will contain a single field that will be an object of the
KeyPair class. This class is part of the java.security package and
contains the public key and private key that we mentioned in the
previous sections.

35

Chapter 2 Model: BloCkChain Core

Important!

• note how our blockchain wallet doesn’t require any information


regarding the wallet holder. this is the basis of the wallet holder’s
anonymity.

• our blockchain wallet also won’t contain any field containing the
current balance of the wallet. We will explain how we obtain our
wallet balance in Chapter 6.

Let’s look at our first two constructors on our next snippet, which will
be used when we want to create a new wallet and assign a new key
pair to it:

10 //Constructors for generating new KeyPair

11 public Wallet() throws NoSuchAlgorithmException {

12 this(2048, KeyPairGenerator.getInstance("DSA" )); 13 }

14 public Wallet(Integer keySize, KeyPairGenerator keyPairGen) {

15 keyPairGen.initialize(keySize); 16 this.keyPair =
keyPairGen.generateKeyPair(); 17 }

The first no parameters constructor will call the second constructor


with a default keySize and a KeyPairGenerator instance set to
generate keys using the DSA algorithm. The second constructor
receives these input parameters either from the first or from other
parts of the application and simply sets the size of the keys on line 15
and generates the keys themselves on line 16.

36

Chapter 2 Model: BloCkChain Core

Our third constructor will be used to create our wallet once we have
imported an already existing key pair from our database. We can
observe it in the following snippet:

18

19 //Constructor for importing Keys only

20 public Wallet(PublicKey publicKey, PrivateKey privateKey) {

21 this.keyPair = new KeyPair(publicKey,privateKey); 22 }

The code here simply receives public and private key objects and
creates a new KeyPair object with them.

Finally, we finish up this class and chapter by including the generic


getters and setters in the following snippet:

23

24 public KeyPair getKeyPair() { return keyPair; }

25

26 public PublicKey getPublicKey() { return

keyPair.getPublic(); }

27 public PrivateKey getPrivateKey() {


Random documents with unrelated
content Scribd suggests to you:
immense variety, the differences existing. The organic chemical
combinations in vegetable life are infinite. And all these varieties depend on
the numerical quantities of each of the elements C H O that enter any
composition.

The products of vegetation.

C H ON
Starch food substances, 18 13 15
Sugar, grape, 6 12 6
cane, H2O + 12 22 11
,,
Oils, aniseed, etc., 10 12 1
Acids, tartaric, 4 6 6
, citric, etc., 6 8 7
,,
Hydrocyanic, or prussic, acid, one of the strongest poisons, 1 1 1
Tannin or tannic acid, 27 22 17
Turpentine oil (composed of carbon and hydrogen only) 10 16

We have other vegetable products called alkaloids, that are principally


found in the bark and the leaves. A few examples will suffice:

C HNO
Morphia, 17 19 1 3
Strychnine, 21 22 2 2
Quinine (sulphate H2SO4), 20 24 2 2
The essence of coffee and tea, caffein or thein, 8 10 4 2

The alcohols, acids, ethers, and so on, are all composed of these elements:

CHO
Alcohol, 2 6 1
CHO
Acetic acid, 2 4 2

The combinations are infinite. Volumes are filled with organic chemistry.
Mere mention only can be made, to show the wonderful power these
elements display when variously combined.

The products of destructive distillation of coal yield a remarkable series of


combinations:

Carb. Hyd.
Light carburetted hydrogen, marsh gas, or fire-damp, is 1 4 (C1H4)
composed of
Aceteline, another product, 2 2 (C2H2)
Heavy carburetted hydrogen, olefiant gas, the gas we 2 4 (C2H4)
burn, ethelene,

These may undergo a vast variety of changes and combinations.


Chloroform, alcohol, ethers, acids, oils and fats, resins, balsams, etc., etc.,
all have these elements in combination.

Does it not seem strange that the different numerical combinations of the
same elements should have such different effects upon the animal system?

Why should starch and sugar compounds be good for the sustenance of
animal life while other compounds of the same elements prove destructive
to life? Or, why should morphia have such a peculiar effect upon the animal
tissues—especially the nervous? And why should alcohol have such a
peculiar effect upon the master tissues of the body? The difference in the
chemical composition of quinine and strychnine is not so very great, yet the
action upon the system is by no means the same. The effect upon the tissues
is not the same.

Those who believe in a God easily dispose of these questions by simply


exclaiming, They are the wonderful works of God!
That one drop of hydrocyanic acid upon the tongue of an animal should kill
is very astonishing; that acid being composed only of one of Carbon, one of
Hydrogen, and one of Nitrogen (C N H). Why should it paralyze the brain
first, before it affects the heart, since it has to be carried by the blood
through the circulation to the brain? The derangement of the functions of
that center causes death.

The revelations of these important combinations and actions man had to


make for himself. They were not brought down to us on tablets of stone by
some supernatural agent, nor did spirits or angels communicate the
mysteries and the powers of these elements.

It is owing to the development of man’s intellectual faculties, that the


combinations of these elements has been made possible. It was quite a
discovery when it was found that nitre, sulphur, and charcoal made
gunpowder. There are only five elements in that compound, viz., Nitrogen,
potassium, Oxygen, Carbon, and sulphur. Chili saltpeter is used for
domestic purposes. Harmless to animal life, so is each one of these
elements when they enter into combinations that are not destructive to life.

The forces and powers exercised by any compound depend on the number
and kind of elements that enter into the composition. And the influence that
bears directly upon their mutual activity again depends, when in a state of
nature, upon the presence of heat. When a seed, as of wheat or of any
starchy vegetable, is thrown into the ground, it will not germinate except in
the presence of a certain amount of moisture, and heat, the heat varying
from 50° to 80° Fahrenheit, in addition to free communication with the air.

Temperature, moisture, air, electricity, kind and quantity of the various


elements in the soil present, cause the immense variations in plant life and
plant compositions. Yet the same elementary compositions will be found in
the same species, and the same conditions generally will be required to
reproduce them.

Each group of elements that enters into the composition of any substance,
carries with it qualities and capabilities peculiar to itself, throughout the
vegetable kingdom. Its influence upon the animal economy will depend on
the various atomic elements, and the quantities of each, that enter its
combinations. For example, the atmosphere, the balance of power between
O and N, is essential to both plant and animal. So with water, O H2. And so
with those foods, starch and sugars, C18H30O15 or C6 H12O6; in each of
these substances Carbon has its complement of Hydrogen and Oxygen. That
is, the Carbon is, as it were, diluted in a sufficient quantity of water to make
it suitable for food. Rob it of its Oxygen and it becomes a poison, an active
poison. The less the quantity of Oxygen in any substance of organic origin
the more unfit it becomes as a food. And it becomes poisonous to the
animal system in proportion as the Oxygen is absent or removed from the
composition. We have representatives of poisonous substances in alcohol,
C2H6O, a mild poison; and in hydrocyanic acid, C N H, the strongest poison
known.

Moreover, we see already peculiar manifestations in vegetable life, humble


in character, low in degree. Plants not only rest from activity, but have their
sleep and exhibit sensible movement from irritation. The foliage of the
locust, and of most leguminous plants, and that of oxalis and wood-sorrel,
seem to have their sleep, as seen by the position of their leaves and
blossoms. Irritate the mimosa plant, as by roughly touching it, and the
leaflets will suddenly change position. In the Dionæa muscipula, or Venus’s
flytrap, the touch of an insect, alighting upon the upper surface of the
outspread laminæ, causes its sides to close suddenly, the strong bristles of
the marginal fringe crossing each other like the teeth of a steel trap, and the
two surfaces pressing together with considerable force, so as to retain, if not
destroy, the intruder, whose struggles only increase the pressure which this
animated trap exerts.

It is evident that the elementary combinations under certain conditions and


the influence of heat, will exhibit vital action, in an organic form—manifest
phenomena of life, that are only in degree, and not in kind, inferior to the
lowest plant life. The process is the same. The mode of living differs in
degree, though the results are different.
The combination and exchange of elements takes place in the simple plant
life as in the higher animal life. The watery portion of plant life is
composed of O and H2, the same as water in a free state or water in animal
life, and the combination of Oxygen and Hydrogen with Carbon. The food
substances are found in the vital machinery of vegetation.

The characteristics of life exhibited in the lower grade of vegetation, are


seen in a more perfect degree in animal life—respiration, exchange of
gases, imbibition, absorption, assimilation, evolution of heat and motion,
the power of incorporating material in its own substance, endosmosis,
subjectibility to irritation, exhaustion, spontaneous movement, rest and
sleep, capability of being influenced by various stimuli, etc., etc.

The combination of O, C, and H, organized and vitalized, in conjunction


with a few other less important elements, manifests in conformity with the
laws of nature all functions and activities that plant lie is capable of
realizing. It would neither be extravagant, nor an exaggeration, considering
the important role these elements play in vegetation, if they were rightfully
termed the soul-life of plants.
CHAPTER XXII.
ALCOHOL AND ITS EFFECTS ON THE SYSTEM.
All substances taken into the stomach as food are of three kinds,
carbohydrates, proteids, and fats. This means, starch, sugars, meats, and
fats, besides water and some salts.

Food substances carry their own complement of water, serve nutritive


purposes when taken into the system, and are easily dissolved by the
various fluids in the body.

Food may be taken into the system for three purposes: 1. Simply for the
maintenance of health; 2. For fattening purposes; 3. For the sake of
muscular energy.

The body, the human body, consists, speaking in general terms, of


carbohydrates, fats, and proteids, and water and saline matters.

We have seen that the work done by the master tissues causes a loss, or
produces a certain amount of waste material, consisting of Carbon,
Hydrogen, Oxygen, and Nitrogen, and some mineral matter—salts. This
loss or waste has to be replaced in quantity and quality sufficient in order to
maintain a healthy condition of the body.

And, since we know the precise, or almost the precise, quantity of material
excreted, which consists of Carbon, Nitrogen, Oxygen, and Hydrogen, etc.,
we can also estimate, with considerable precision, the quantity needed to
replace it.

More than 41 per cent of the entire weight of the body is made up of
muscular tissue. The nervous tissue constitutes not quite two per cent.

The chemical composition of muscular and nervous tissue—of the solid


part only—is
Carbon. Hydrogen. Nitrogen. Oxygen. Sul.
51.5 6.9 15.2 20.9 0.3
to to to to to
54.5 7.3 17.0 23.5 2.0

The watery portion of the muscle is not mentioned. Please notice the large
quantity of Carbon and the small quantity of Hydrogen in the composition
of the solid part of the muscle.

We are aware that the muscles are always producing Carbonic Acid—that
is, C and O2—and when a muscle contracts, there is a sudden and extensive
increase of the normal production.

The blood that comes from a contracting muscle is richer in Carbonic acid
—that is, it contains one atom more of Carbon and two atoms of Oxygen
more.

The blood that has passed through the lungs changes from venous to arterial
blood. The venous discharges about 5 vols. of Carbonic acid (C O2); the
arterial carries away about 5 vols. of Oxygen (O) to the tissues.

The carbohydrates taken into the system:

Oz.
Starch and sugars, about 20
Meats, proteids, 15
,,
Fats, 3½
,,
Water, 52
,,

About 32 ounces of saliva converts the starch into sugar. That is, the saliva
changes starch (C18 H30 O15) into sugar (C6 H11 O5). Meats are acted upon
by the gastric juice, it requiring about ten to twenty pints to dissolve three-
quarters to one pound of meat-stuff; and the substances in the stomach are
changed into chyme. The fats are emulsified by the gall from the liver—
about 30 to 40 ounces for 3 to 4 ounces of fat. And the pancreatic juice
completes the work and still farther dissolves all three kinds of substances,
so that, with the aid of the succus entericus, the whole mass is changed into
a substance called chyle. All the carbohydrates and proteids in solution,
together with the fluids taken into the system, are taken up by the veins of
the abdominal organs and conveyed by the portal vein to the liver. Passing
through the liver, the blood is collected by the hepatic vein and emptied into
the inferior vena cava. The fatty substances are taken up by the lacteals to
the receptaculum chyli, passed up the thoracic duct, and poured into the left
subclavian vein, which empties its contents into the superior vena cava.

Both streams of blood—venous blood—from the superior and inferior vena


cava, pass into the right auricle, thence to the right ventricle, through the
pulmonary artery into the lungs, there exchange the Carbonic acid for
Oxygen, and return by means of the pulmonary veins into the left auricle,
thence to the left ventricle, through the aorta into the general system—and
to the master tissues.

In the tissues the Oxygen is taken up. That is, the Oxygen passes from the
blood to the tissues and the tissues throw off the Carbonic acid, which the
veins again carry to the right side of the heart.

Alcohol is composed of Carbon two (2), Hydrogen six (6), and Oxygen one
(1) (C2 H6 O1). Alcohol, like all poisonous substances, carries a small
amount of Oxygen. In composition it resembles very much, and probably is,
a union of C2 H4 + H2 O, C2 H4 = ethane, olefiant gas, or heavy carburetted
hydrogen. It is, in fact, a constituent of the gas we burn, procured from the
destructive distillation of coal—in other words, coal gas. To make it plainer,
ethane contains two of Carbon, four of Hydrogen + one molecule of water.

When alcohol is taken into the system, it is almost immediately absorbed by


the veins of the stomach, is carried at once by the portal vein to the liver,
and returns from the liver by way of the hepatic vein to the inferior vena
cava, to the right auricle, and to the lungs through the right ventricle.
But the lungs cannot supply Oxygen enough to satisfy the Carbon of the
alcohol. There is only one atom of Oxygen in the composition of alcohol,
and three more atoms of Oxygen are needed to form Carbonic acid (C O2).
Under ordinary, normal conditions, Oxygen enough is inspired to satisfy the
wants of the tissues for combustion purposes, but in the case of alcohol an
extra demand for Oxygen is made, and the lungs are not prepared to supply
the demand.

Since oxidation takes place in the tissues and not in the blood, the blood,
being overcharged with heavy carburetted Hydrogen (C2 H4), unloads it
into the tissue. The extra amount of Carbon arriving at the tissue, robs it of
its Oxygen. The Oxygen arriving from the lungs being insufficient, the
tissue loses Oxygen. The presence of Oxygen is necessary for the
maintenance of irritability. From the fact that no free Oxygen is present in
the muscular tissue the tension is nil or even less than nothing.

When the Carbon of the alcohol robs the tissues of its Oxygen, the
Hydrogen is set free. What becomes of it? The muscular and nervous
tissues contain from 51 to 54 per cent of Carbon in their composition, and 6
to 7 per cent of Hydrogen. The free Hydrogen combines with the Carbon of
the tissues and forms carburetted Hydrogen, with which the blood gets
overloaded, and carries it to the other tissues. The nervous system, the
brain, not receiving the Oxygen necessary, in consequence of the blood
being overcharged with both Carbonic acid and carburetted Hydrogen, the
nervous substance is first impaired, next exhausted, and lastly its normal
activity extinguished.

The muscles meantime through having been robbed of both Oxygen and
Carbon—receiving no free Oxygen or very little—and through the presence
in the circulating fluid of Carbonic acid and carburetted Hydrogen, lose the
power to act. The cerebrum, cerebellum, medulla oblongata, with all the
other subordinate nervous centers, being impaired by the poison and the
absence of Oxygen, the nerves of volition lose control, the cerebrum has its
will power impaired or entirely subdued, and the cerebellum loses the
power of muscular coördination.
Thus, then, the master tissues become crippled. At first alcohol may have a
stimulating effect on the nervous system; next, if the indulgence be
continued, the nervous forces become exalted; finally, however, depression
sets in, and proves at last a complete extinguisher of the intellectual
faculties.

The muscles first lose the power of coördination, the irritability and tension
gradually cease, at length they refuse to act.

The brain and muscles being helpless, the body lies in a state of stupor,
motionless. The individual is temporarily deprived of his mental faculties,
incapacitated, and completely oblivious to all his surroundings. The
involuntary organs, however, may act. The stomach may eject its contents,
having lost consciousness and will power. The urine and feces may pass off
involuntarily.

All organs have to suffer, but two more than all the rest—the liver and
kidneys.

The function of the liver, as we have already seen, is the secretion of the
bile. That organ has still another important duty to perform, and that is in
converting the starchy substances, or its already converted sugars, in to
glycogen = C6 H10 O5. The metabolic activity of the hepatic cells lies in the
formation of glycogene. Glycogene is a source of heat in the body. It is
constantly present in the muscle, as a functional material no doubt. The
chief purposes this substance serves are probably for respiration and
production of animal heat.

We must bear in mind that fats are composed of C, H, and O, and that both
fats and carbohydrates serve nutritive purposes. Whether any difference
exists between the two we do not know at present, beyond the fact that in
the final combination of the two, while carbohydrates require sufficient
Oxygen only to combine with their Carbon, there being already sufficient
Oxygen in the carbohydrate itself to form water with the Hydrogen, fats
require in addition Oxygen to burn off some of their Hydrogen.
Alcohol is not convertible into glycogene. The six atoms of Carbon are
complemented by five molecules of water: C6 + 5 O H2 = C6 H{10} O5. As
already stated, alcohol (C6 H2 O) contains only one molecule of water (H2
O + C2 H4 ethane). To convert the four of Hydrogen into water, two of
Oxygen are needed—and to form Carbonic acid three of Oxygen are
wanting.

In this connection we may ask, Is alcohol a food? No! Alcohol is in no


sense a food!

As a stimulant it is very useful, in a certain class of exhausting diseases, but


taken in large quantities alcohol acts as a slow poison.

The action of the alcohol, which must pass through the liver, is certainly not
beneficial. On the contrary, the function of the organ is interfered with and
the tissues of which the liver is composed slowly but surely undergo a
degenerative process.

The alcoholic beverages differ. As for example, whisky, wine, and beer—of
the three beer is probably the least injurious. By reason of the hops it
contains it helps to allay nervous irritability. When taken continuously in
large quantities, it leads to congestion of the liver and the accumulation of
fat. Beer contains only four to five per cent of alcohol, or thereabout. The
effect of beer on some individuals is somewhat similar, in the increase of
size, to the remarkable growth of some aquatic plants, as the gourd, in
which the vegetable tissue cells are very large and increase very rapidly.

The use of the stronger spirits leads to a degeneration of another kind—


contraction of the liver, cirrhosis.

The kidneys are the next to suffer severely by the alcoholic fluids. The
whole blood is purified by the kidneys. The transit is very rapid; the
elimination of impurities must necessarily be rapid. The body under the
normal condition eliminates Nitrogen chiefly; this is the urea and uric acid
found in the diurnal excretion of urine of fifty-two ounces in the twenty-
four hours. But if instead of a man drinking the ordinary allowance of fifty-
two ounces of water, a man takes in several hundred ounces, as in the case
of some beer-drinkers, it is evident that the kidneys have a great deal more
work to perform than usual, in addition to the constant irritability the
kidneys, like the liver and other organs, are subject to.

The sobering up of a man after a drunk, consists in receiving Oxygen


sufficient in quantity into the tissues, to supply the amount he has lost. It
takes several hours before sufficient Oxygen has been introduced into the
tissues to establish the normal equilibrium.

The theories on alcohol are various. I quote some of the more important
ones, briefly stated:

Liebig thought that alcohol disappeared by complete and rapid combustion.

Lallemand and Perrin entertained the theory that alcohol was eliminated by
the excretory organs. (That means, perhaps, that alcohol simply
promenaded through the system.)

Parks was of opinion that alcohol is directly absorbed by the blood-vessels


without undergoing any change or decomposition.

Another theory was that alcohol is converted into acetic acid (C2 H{4} O2);
and that acetic acid is split up into carbonic acid (C O2) and water—which
is impossible, as there is not Oxygen enough for both C O2 and H2 O.

It appears, then, that alcohol does not disappear by rapid combustion,


except when taken in very small quantities and during a state of exhaustion,
and then not by combustion. That alcohol is excreted there is no doubt, but
when taken in large quantities it is not excreted without leaving its
permanent mark behind it. Nor is it absorbed by the blood-vessels without
undergoing any change or decomposition, otherwise it would be excreted
by the kidneys and skin.

That the function of the brain is entirely suspended, for a time at least,
needs no argument, because all will power is arrested, the nerves of special
sense cease to act, all nerve-centers suspend operation, and the nerve-fibers
no longer act as conductors of either motion or sensation. And the muscular
tissues are no longer capable of irritation, stimulation, or coördination;
contraction, flexion, and extension have been temporarily annihilated; the
force, the power, and the action have succumbed to the harmful influence of
alcohol. And the cause of it all is—too much carburetted Hydrogen and the
absence of Oxygen. This has unbalanced the elements that normally enter
into the composition of the tissue both of muscle and nerve.

The master tissues, the nervous and muscular, that get drunk, they are the
first to feel the stimulation, become excited, depressed, and exhausted.

And finally let us sum up some of the effects of alcohol on the system:

1. It is a source neither of heat nor of energy, nor can it be stored up for


future use, nor can it be assimilated in the tissues.

2. Alcohol retards the motion of the blood.

3. It induces specific action after the manner of cumulative poisons.

4. By the veins and absorbents alcohol mixes with the blood, and
immediately acts as a stimulant on all the tissues with which it is brought in
contact.

5. It causes the retention of substances which ought to be eliminated.

6. It is shown by abundant testimony that the blood becomes surcharged


with unchanged and unused material, and contains more Carbon than
normally, at times as much as 20 to 30 per cent.

7. Alcoholic blood coagulates slowly and extravasates easily.

8. The susceptibility to disease is greater, the resisting force is diminished,


and the healing process seriously interfered with.
9. Oxygen is diverted from its proper functions, the exhalation of carbonic
acid at the lungs is diminished, both absolutely and relatively, but the
pulmonary aqueous vapor is not lessened.

10. The functions of the brain are at once stimulated, and all other organs
are excited, and a train of phenomena is induced partly of a chemical nature
and partly of a physical or vital.

11. Alcohol produces a temporary increase of the heart’s action, and a


congestion of the whole of the pulmonary capillaries.

12. It irritates the parts, stimulating the glandular secretions, leads to


congestion of the blood-vessels, in time forms spurious melanotic deposits
and a gradual thickening of the gastric substance.

13. Fat gradually is increased in the blood, and a milky character is


imparted to the serum of the blood, and the red corpuscles in time assume a
wrinkled and contracted appearance.

14. The water of the urine is diminished; the chlorides are greatly lessened,
as well as the acids and bases.

Most people are concerned about themselves only to the extent of securing
the immediate satisfaction of their senses. The superficial surroundings they
utilize to cater to the enjoyment of such indulgences of acquired taste, habit,
passion, feelings or emotions, as prove most gratifying to them, never
thinking that their constitution is nothing more than a vitalized chemical
machine, temporarily passing through its terrestrial cycle of physiological
activity, beginning as a mass of protoplasm, and terminating, when it has
gone through all the phases of animal existence, in the distribution of its
chemical elements.

The deranging effect of alcohol on the nervous and muscular tissues may be
compared to the working of an ordinary battery. We know that the action
and the force depend on the elements that enter into the composition of the
battery, fluids and solids, zinc and copper, and sulphuric acid—representing
zinc, copper, sulphur, Oxygen, and Hydrogen. The action of the zinc and
copper depends upon the fluids. Other fluids, though composed of three
elements, would produce either not the same effect, or no effect at all. It
stands to reason that, since we know the kind of fluid that will set the
elements in action, we certainly should be very unwise to use another fluid
that will either derange or destroy the battery’s working capacity. The forces
or force are in this instance produced by the combination of certain
elements, and in order to continue the activity or action of these elements
one upon the other, a constant supply must be kept up. The mechanism of
muscular action, or nervous action, depends upon the supply of certain
elements; they are continually replacing elements that are used up in the
work they have to perform—that is, the function of brain or muscle. The
moment elements are introduced that do not or cannot make up the loss of
the working expenditure, that tend rather to disorganize or decompose the
tissues, the functions and the natural forces are interfered with, weakened,
or may be brought to a standstill.

The effect of alcohol is much the same on all animals. I mean, that the
master tissues of the lower animals will succumb to the influence of alcohol
as readily as those of a human being. We know with certainty what gets
drunk—where is the spiritual part of man? where is the soul? When the
brain is intoxicated, its functions are more or less suspended, its controlling
or governing action is lost over the muscular tissue, in addition to the
muscles themselves being disabled. Both tissues, having been robbed of
their elementary equilibrium, consequently cease working. The moment the
equilibrium is reëstablished, the tissues assume their functions the same as
before. If a given number of specific parts enter into the construction of any
mechanism in order to produce a certain amount of force and effect, the
number of specific parts must always be present if the same force and effect
is to be realized. Brain and muscle are made up of a specific number of
elements; these must be always present if we would have them produce the
normal force and effect. When too much Carbon and Hydrogen and too
little Oxygen are introduced into the system, as in the case of alcohol, the
derangement of these elements is felt in the poisonous effect, because
enough Oxygen cannot be supplied to keep up with the demand.
CHAPTER XXIII.
THE SOUL—WHAT IS IT?
Dry truth, real knowledge, hard facts, are less interesting, less entertaining,
than a plausible fable or a fanciful story. While the latter is listened to, with
eagerness and pleasure, the former barely receives ordinary civility and
attention. The effort requisite to understand and to think, requires
resolution, determination, and fixed attention. The senses are not
stimulated, the emotions and feelings not aroused, by mathematical
problems or astronomical calculations. The muscular tissues are much more
easily trained, disciplined, and educated than the nervous tissues. In the
former we see immediate results. There is a pleasure in the pursuit, a
palpable satisfaction in watching the muscular action and physical
development. The most agreeable part about that kind of exercise, training
—or education if you choose—is that it is easily acquired and soon put in
practice, and much admired. It has other advantages in addition. The fatigue
and exhaustion in consequence of muscular exercise, add no small amount
of enjoyment to that already experienced, by having to replenish the spent
energies, to fill the demand for new material called for. The gustatory and
olfactory nerves are stimulated by odor of the viands provided, and what is
still more important, the glandular activity that is set in motion produces an
amount of exhilaration, so satisfactory that it is recognized as one of the
principal features for every and on all occasions. “A feast is made for
laughter and wine maketh merry” (Eccles. x, 19 ).

Muscular action, however, cannot take place without nervous action. These
two tissues are dependent one on the other. Yet the muscular tissue may be
considered as subordinate to the nervous tissue. While the muscular tissue
may become totally inactive or incapacitated, or even removed, the brain
tissue may retain its activity and continue to perform its functions. The very
reverse takes place when the brain is either injured or removed. We know
by experience, experiments, that injuries or other pathological changes will
cause impairment to muscular tissue.
It is hard to conceive, and harder still to understand, that an animal—man
included—is nothing more than a vitalized machine, composed in the first
place of two distinct working parts—muscular and nervous—while all the
other portions have to perform duty in order to sustain them.

The word function is a term applied to all tissues in general, as kidneys,


liver, stomach, etc.; each has its function. So have muscles and nerves. The
former has for its function contraction, while the latter has for its function
to control and regulate that contraction.

The first part of the machinery is governed and checked by the domination
of the other. That dominion, that control, is termed Volition, in other words,
will power!

1. Will power! What is it? It is a power which every animal possesses, and
every animal exercises, in accordance with its particular organization and
degree of organic development.

2. Every animal has the power, with the aid of its senses—five senses of
sight, hearing, smelling, tasting, feeling—to select substances from the
vegetable and mineral kingdom, for its immediate want, for the sustenance
of life.

3. It has the power of locomotion to go in search for those substances, and


to carry them to a place of safety, for present or future use. It has the power
to select the kind of food, to choose that which is beneficial and reject that
which is injurious. The five senses direct in that selection.

4. The animal has will power to protect and defend his possessions—
through his senses the brain directs and the muscles act.

5. The animal has will power, when the organs of procreation are
developed, to choose a partner for the production of young. The senses
serve in making the selection, as regards beauty, form, size, etc.

6. It has the will power to nourish and protect its young or to destroy it.
7. Animals have the will power to build their habitation, their home, and
furnish it in a manner best suited for their comfort.

8. Animals have the power to articulate sound, and have the will to
communicate with each other if they so desire, to antagonize or to quarrel.

9. They have the will power to select from the surrounding elements. They
choose water, air, sunshine, high or low altitudes; they migrate from warm
to cold, and from cold to warm, climates.

10. They have social intercourse among themselves; have a will power to
organize as a band or body to protect themselves against the attacks of other
organized bodies, to fight and to battle.

11. Animals instruct their young—guide them and protect them, as well as
feed them. They have their code of morals. They have all such functions as
serenading, love-making, music, jealousy, pleasure, and anger. Animals
have judgment; they can compare and reflect on cold and heat, danger and
tranquillity, comfort and discomfort. They can reject or accept.

12. They have memory, perception, and understanding. Domestic and wild
animals exhibit these peculiarities. They will manifest their likes and
dislikes, hate and love, courage and cowardice.

The will power depends on the nervous system—the cerebral hemispheres,


the cerebrum or small brain, the thalamus opticus, corpus striata, corpora
quadrigemina, the peduncles, medulla oblongata, spinal cord, etc. That is,
all the organs that constitute the nervous machinery, that control the
muscular tissues in all their acts, and keep a watchful outlook over all other
organs of the body.

The will power, then, is the power to act in accordance and in harmony with
the things recognized, or the selection made by any of the five senses,
discriminating between that which is good for them and that which is
injurious, or good and evil.
Animals in selecting grass for food will avoid that which is injurious to
them. The olfactory and gustatory nerves guide them. They will seek
shelter, and evidently know what to do when a thunderstorm approaches,
etc., etc.

Will power is a property, quality, or function belonging to all living


creatures in common. The degree of will power depends upon the quality,
quantity, and perfection of the nervous organization. Man has will power in
a measure greater as the nervous system is developed, educated, and
perfected.

Morality—a quality that does not exclusively belong to man. What is


morality? It is nothing more than a restraint, or check, on our actions and
our feelings. It is the regulating of the actions of life towards ourselves and
towards others. It is the obedience to recognized and established laws in a
community, socially and politically. It means not to trespass against the
laws of nature, against ourselves, or against our neighbors.

Animals restrain themselves and obey.

Morality differs according to the social customs and practices, and the civil
laws regulating the same, which were made and adopted for mutual benefit
and protection. These are either crude or refined, depending on the
condition of society.

To a limited degree animals have morality. Man has it in a higher and more
refined degree, according to the progress and culture attained.

Intelligence—Animals possess intelligence, if the meaning of it is, to


recognize sounds and figures, be obedient to the voice, understand what is
said, perform certain acts, execute the will of a master, know the difference
between right and wrong, express gratitude, exercise watchfulness, protect
life and property, remember places and objects in general, be capable of
some degree of improvement, susceptible of training and modification of
conduct, etc., within the limits of the nervous power the animal has.
What is the soul? Is the soul something quite independent of matter? Is it a
something entire and complete in itself? A perfect part of a perfect whole?
Does the soul possess all the excellences and qualities theologians claim for
it? Whence does it come? What does it consist of? Has it an existence
separate and apart from the body? If so, where? In what state does it exist
previous to entering the body? Does every human being receive a like
quality and quantity? Has it consistency? density? elasticity? Is there any
connection between the soul principle and matter? Spirit and soul, are they
one and the same thing, or do they differ? If so, in what? What is substance
soul and substance spirit? Is it self-acting and self-existing? Is the soul
susceptible to training and education, and the reception of knowledge? Or is
the soul already trained, educated, and possessed of all the knowledge that
is now known or likely to be known? Does the will power reside in the
soul? And is the nervous system subservient to the soul? Is the soul
endowed with passions and emotions? Can the soul deteriorate, be injured
or be afflicted? In what degree does the soul differ in the civilized and in
uncivilized man?

The theological soul has its origin in the Bible, no doubt (from the word
nephesh, breathing; the Greek psyche: Latin animas, chayu, breath of life).

This word gave the impulse to a vast amount of thought and reflection, both
theological and psychological. Discussion and literature followed as
extensive as there has ever been on any metaphysical topic.

It may be interesting to learn some of the attributes of the soul. Here is a


partial list: “Will, passion, love, joy, grief, anger, mirth, sorrow, revenge,
contempt, hatred, honor, pride, humility, jealousy, despair, pity, compassion,
love of fame, of music, of the marvelous, of notoriety, avarice, guilt,
curiosity, astonishment, respect, desire, cheerfulness, melancholy, sense of
beauty, sense of the sublime, sense of friendship, feeling of delight,
selfishness, generosity, etc.” The author of this concoction had not a very
clear notion of what he was writing about, otherwise he would have known
that animals have in common with man most of the emotions above recited.
The soul is a display of nervous phenomena, exhibited under certain
circumstances, differing only in intensity of expression, depending upon the
kind and character of animal and man.

It is one of the common tricks of trade—when theologians argue upon the


immortality of the soul, they bring and ring in any amount of biblical
evidence to sustain them. They prove nothing. They cannot prove anything.
It is the standing puzzle. They try to unravel a mysterious something that is
not mysterious. Nor is there any need of mystery. What is essential for us to
know is the truth, plain natural facts. There is nothing that we need be either
ashamed or afraid of. If we have been deluded by errors made several
thousand years ago, regarding the dual composition of man, or have been
imposed upon and intentionally retarded in the onward progress, it is time
to correct the error and remove the imposition. Let us have a clear,
intelligent view of things and look at them as they are. This mystery, like
other mysteries, can be cleared up by the light of science and modern
investigation.

What is the difference between man and animal? Articulate speech and the
susceptibility of the brain matter to a high degree of culture.

Mind is a term employed to designate the collective acquirements of a


man’s brain. In proportion as the acquirements are greater or less, the mind
is greater or smaller.

These acquirements may be simple, complex, or profound. They may be


biased, general, or scientific; they may be deep, learned, or superficial.
They may be only a slight advance above the general animal instinct; or
may have assumed a superior intelligence and may have arisen to a higher
plane of intellectual qualities.

The acquirement or evolution of mental power and intellectual capacity


depends:

1. On the constitutionally inherited capacity and capability.

2. On the size and general conformation of the brain.


3. On the perfect condition of the organs of special sense.

4. On the quality of the nervous structure.

5. On the general physical constitution of the body.

6. On the evenly balanced equilibrium between the vital organs.

7. On the chemical elementary constituents that enter into the composition


of the various tissues, especially the nervous tissue.

8. And lastly on the education, training, or culture.

9. I may add, suggestively, on the relative quantity and quality of the gray
and white substance of the brain, etc., and perhaps on the depth of the sulci
and the size of the convolutions and the general symmetry of the different
lobes of the cerebrum, etc.

The brain of an idiot is not susceptible to culture or education. He has all


the senses, but of an inferior and imperfect order; a brain insufficient in
quantity and quality to be capable of acquiring anything. No mind can be
formed. The idiot has not any intellect. Has he a soul?

Or supposing any portion of the brain is diseased and any one of the special
senses ceases to act, as sight, hearing, or any part of the muscular tissue,
and the intellect is impaired, either partially or wholly incapacitated, then
has the soul suffered any damage, or does the soul remain intact?

Or supposing that a child is born blind, or that some one of the nerve
centers controlling certain faculties of the brain is absent, and the education
is necessarily limited to the remaining nerve centers, is the soul still
complete and perfect?

Or in case of change of structure of the brain substance, as in softening of


the brain; or in case of tumors, blood clots (thrombosis), or syphilitic
disease, and paralysis either local or general resulting—depending on the
seat of the disease—what has the soul to do with it? Or in disease of the
meninges (coverings); or in case of insanity, whatever morbid cause might
have produced that condition, where is the soul?

Or when, in consequence of morbid changes, the mental and physical


expressions, the actions, change, often extravagantly, is the soul affected
thereby?

When the body is afflicted with disease, does the soul suffer?

At what period of fetal development is it that the soul enters the body? Or
does it enter at birth?

The breath of life is Oxygen. Without that element one could not live.
Without it the newly born babe is more helpless than a lower animal. Not a
single special sense is fully developed. The brain substance is not fully
developed. The babe has no power to will anything. It has no volition—
except the act of nursing, and that is not a voluntary act. The organs over
which will has no control are the first to act—an infant soils its linen
involuntarily. It imbibes nourishment, as a mass of protoplasm imbibes
moisture. It has neither will power nor desire. It cannot select. It has neither
knowledge nor conscience. Since none of the special senses is able to act, it
has no perception of any kind whatsoever. It experiences only two
sensations, pain and hunger. Young birds and other young animals do the
same.

Is there anything in this newly born babe of a supernatural character, such


as a soul, spirit; the knowledge of God, or of good and evil? Does there
exist in this mass of organized protoplasm anything that may be called
divine? Is there aught innate? No! Certainly not!

There are what may be termed latent powers—not unlike latent heat—
capable of being evolved. You may fashion anything out of it—in the
religious line, brutal or uncivilized, etc. It will acquire any kind of speech,
from the howling of a dog to the most refined language. It will contract any
habit, from that of the lowest animal type to that of the most refined lady or
gentleman. You may make either a cannibal out of it or the most fantastic
gustatorian. It will either crawl, climb, or walk. It will live anywhere and
anyhow. It will either parade nude, be painted, or wear a breechcloth, or
wear a swell dress coat, or, if it be a female, a long trailing skirt with all
sorts of gewgaws. In religion you may make anything out of this babe. You
may make it believe the greatest nonsense. It will believe three gods in one
or twenty-five gods in one. It will be a Jew, a Christian, a Mohammedan, or
the lowest brute on the face of the earth.

This mass of vitalized matter is susceptible to training. The physical part,


the muscular part, always develops and is readily trained. In a primitive
state it requires but little discipline to acquire muscular strength. The
muscular powers are the first to assert themselves. This master tissue,
whenever and wherever it excels, receives honor and homage, and prevails
among its companions. In barbaric ages this was the controlling force, the
ruling spirit, the governing power.

The nervous tissues require teaching. The senses must be trained, educated,
cultured, refined. The impressions received through the nerve-centers by the
senses are stored up in the cerebrum. Though they are at first simple, crude,
and incomprehensible, habit, use, or repetition enables them to familiarize
us with the surrounding objects.

If the brain is fully formed, the infantile education begins. By constant


repetition of the same acts, the sense of satisfaction from feeding, and the
sense of comfort from cleanliness, are slowly established in the experience
of the child.

Hunger, cold, heat, and moisture will cause it to manifest its dissatisfaction
by crying. It sleeps twenty out of the twenty-four hours, and wakes only to
indicate its wants of either hunger or discomfort. The more regularly it is
fed, and the more cleanly it is kept, the more peacefully will it rest and the
more soundly will it sleep.

When, however, an infant is born, though physically fully developed, with


face fully formed, but acephalous, without brain—that is, when an arrest of
development has taken place—the babe cannot live, it cannot breathe,
because the principal part of the nervous system is wanting—the medulla
oblongata, cerebrum and cerebellum, etc.—though the lungs, heart, and all
other organs are perfectly developed. This arrest of development may take
place at any time. It is thus that congenital malformations are produced.
Idiots are thus formed, or any other inferior formation of brain may take
place. In proportion as the parts are present or wanting—the brain, or rather
the nervous system—latent (better, inherent) qualities for future capabilities
exist or do not exist. Supposing the optic nerve is arrested in its
development, or any organ with which it is immediately connected, the
special sense of sight is wanting. Though the eye itself, the organ of sight,
may be perfect, all the training and education will never give it capability or
skill in arts and sciences. This can never be acquired by that organ. You
cannot educate that organ which you have not. Whatever perfect brain
formation exists may be trained, fashioned, educated, in any one of the
thousands of directions one pleases. It may be given any bent or bias, good,
bad, or indifferent—depending upon the influences that are brought to bear
on the young brain while it is in the process of developing.

An infant has no mind, intellect, thought, idea, memory, or any other nerve
quality that nerve structure is capable of developing.

Talk of soul or spirit is absurd. It does not exist either in infant or in man
any more than it exists in a plant or an animal—unless the term is applied to
the collective functions of the great central organs, and in that case it would
certainly not be supernatural.

At the time when the books of Moses were written—we need not even go
so far back as when the fable of creation was first related—they knew
nothing of circulation or of respiration, or of the nervous system. It was not
even thought of. I believe you may search the Bible from end to beginning
and from beginning to end without finding such a thing. No such word as
brain is mentioned. What is known of the nervous system is, comparatively
speaking, of recent date.

“What seems most marvelous is, that we, in the nineteenth century, boasting
of a high grade of civilization, and, I may say, with all the modern
improvements, should accept and still hold fast to an idea that originated in
the brain of some barbarian four thousand or more years ago, away down in
Mesopotamia (now Turkey) where they are still considered uncivilized.
This is certainly very strange.

But ah! that priestcraft!

THE MIND.

All the organs in the body are capable of performing their functions the
moment the child is born. Most organs have performed their functions prior
to the child’s birth. Circulation, respiration, digestion, secretion, and
excretion—these functions are performed at once. These are involuntary,
and require no educational training. They are performed while the organism
is otherwise entirely helpless.

1. The first few weeks.—

The nervous system is not developed. The special senses are not
responsive—neither sight, hearing, taste, nor smell.
There are no voluntary muscular movements, no coördinations of
muscles.
Nervous and muscular tissues undeveloped.
Special senses undeveloped, no recognition.
It has no mind—no faculties, morality, intellect, memory, reason,
judgment.
In short, it has nothing innate—no principle of either God, soul, or
religion.
No will power. The muscular and nervous tissues are not yet able to
perform their functions, except such as are reflex and of an involuntary
character.
No expression.
2. A few weeks after birth.—

Impressions of light perceptible.


Sensations slightly improved.
Expression still blank.
No volition.
No recognition.
Cry the only sound.

3. Three months.—

Special senses improved.


The eye steadier. The child begins to recognize its mother, etc.
Utters sounds of satisfaction.
Perceives sounds indistinctly.
No coördinate movement.
Upper extremities more active.
Expression of face improved—smiles.

4. Six months.—

Muscular tissues more developed—crawls.


No coördination of muscular action.
Sight improved—recognizes mother, father, etc.
Excretions involuntary.
Expressions of pain and satisfaction more palpable.
Hearing improved—listens to sounds.
Playfulness.
Makes sounds of satisfaction and dissatisfaction more distinctly. No
articulation.

5. One year.—

Special senses more developed.


Coördination still imperfect.
Excretion involuntary.
Upper extremities more active.
Fear manifested.
The dawn of want.
Recognizes a few objects.
Pleasure expressed as well as anger.
Likes and dislikes exhibited in some degree.
Beginning of articulation.
Sounds more distinctly recognized.
Sight more perfect.
Taste slightly developed.
Smell—no discrimination.

A child one year old—(a) Recognizes its parents imperfectly. Has slight
coördinate movement of the upper extremities, and beginning of
coördination of the lower extremities. Manifests its wants by making
noises, but has no articulation. Sensations of pleasure, pain, and anger are
more plainly expressed. Playfulness is greater. Fear is exhibited. (b) It has
no mind, no intellect, no will power. No God, no religion, no soul. No
thought, no idea, no conscience. No faculties, no memory, no judgment. No
knowledge of objects, or numbers. It knows nothing of comparison,
relation, liberty, morality, love, hate, shame, joy, sorrow, despair, envy,
ambition, pride, etc., etc.

6. Second year.—

The master tissues begin to perform their functions—the muscular and


nervous tissues.
Digestive apparatus more completely developed by the appearance of
teeth.
All the special senses more susceptible.
Voluntary muscles begin to act, though imperfectly.
Coördination still uncertain.
Muscles of articulation attempt to produce articulate sound—
beginning to imitate.
Recognizes some objects; cannot discriminate.
The sense of taste shows signs of development.
The sense of smell—no discrimination.
The sense of hearing recognizes simple sounds—voice.
The sense of sight more distinct.
The sense of feeling slightly improved.
Attracted by bright-colored objects.
Selfishness exhibited—seizes objects indiscriminately.
Shows fear; knows nothing of danger.
Manifestation of affection toward those who care and provide for its
comfort.
Excretions still pass involuntarily.
Responds feebly to calls.
Playful.
Cognizant of light and darkness, indoors and out of doors.
Shows signs of preference.
Training begins; involuntary acts checked to a slight extent only.

At the end of the second year the child (a) recognizes its parents and others
about it. Has coördinate movements comparatively correct of both lower
and upper extremities. May manifest its wants by imperfect articulation.
The sensations of pleasure, pain, and anger are more emphatic. (b) The will
power is slight. The memory is very feeble. Discrimination begins in simple
matters.

7. Third year.—

Training progresses.
Coördination complete.
Nerve centers formed.
Will power attempted.
It depends at this age upon the surroundings—the guidance, attention,
direction given to the child.
It is more susceptible to impression.
Memory improving.
Perception manifested, but little discrimination.
Articulates more perfectly.
Imitates to some extent.
Excretion controlled.
Playful, active.
All the senses work.
More subject to discipline—obeys more readily.
Teachable in right and wrong of a simple character.
Likes and dislikes more prominent.
Recognizes objects.
Begins to pronounce.

At the end of this period there is no manifestation of anything innate. The


child knows nothing. Only the muscular tissues are more active, and the
nervous tissues more susceptible to teaching. It has no faculty of any kind.

The functions of the brain are more distinctly manifest through the organs
of special sense. The child will become just what you make it; though the
latent inherited qualities will give impulse to some directions more than
others. Thus inclinations and susceptibilities are awakened that may lead to
greater or less distinction.

All that the child thus far has developed is instinctive, checked and
modified by those in whose care it is. The animal nature predominates, and
the child at this stage will become a brute if left to itself.

If the proper training, teaching, discipline, or education is from this time


forth properly applied and the latent power judiciously brought out, mind
and intellectual qualities may be developed—differing in degree and
intensity—by the bias or bent given to the functions of the great nervous
center. On the culture of this organ depends the kind of creature we may
have when full grown in the shape of either man or woman. Any kind of
sentiment, belief, or superstition, prejudice, hate, brutality, humanity or
inhumanity, good or bad habits, vicious or benign—with no end to the
variety, such as we witness among ourselves and among the various nations
upon earth—may be inculcated.

It is brain function, brain culture, brain education, that produces greater or


lesser minds, that evolves from mere intelligence the highest intellectual
powers, that marks the difference between man and man from the meanest
savage to the greatest philosopher and scientist.

Brain may exercise will power without training, culture, or education. The
muscles may exercise strength without training, culture, or education. It is
the systematic attention of the one as of the other, the frequent repetition,
steady practice, that produces skill in the one, as in the other; it is the
patient application and perseverance in the one as in the other, sustained by
constitutional endurance, that makes the expert in the one as well as in the
other.

It is the united forces of the master tissues that have produced all that is and
was, and will continue to produce all that ever will be.

Soul is the product of the imagination. It has no immortality, because it has


no existence.

There are a class of men that are interested in sustaining the delusion; these
are the priesthood.

What we want is not the salvation of souls, but the salvation of man.

If soul is the collective name of brain product, or combined result of brain


function and education, we need not disagree about the word. But if it is
insisted upon that the word soul means something distinct and apart from
the animal body, a supernatural manifestation, a supernatural gift or
endowment, given to man at birth and to man only, and that this piece of
supposed God enters the body at some period during birth and quits the
body at death, it is not true! On the contrary, it is false. Man has no soul, nor
has any other animal, except that power that is produced by the nervous
material. The brain has a function to perform, like every other tissue in the
body. The muscular tissue, the liver tissue, etc., each perform their function.
The great nervous centers and the special senses, being intimately
connected, carry all impressions direct to the brain; the retention of
impressions, the memorizing, the recollection, the formation of ideas, of
thought, imagination, are the immediate functions of the nervous substance.
These are secreted in a similar manner as the pancreas secretes pancreatin;

You might also like