mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2025-01-11 00:01:03 +00:00
CH10: s/bitcoin/Bitcoin/
This commit is contained in:
parent
e5dc7d86ab
commit
328c11c1ec
@ -17,7 +17,7 @@ networks are inherently resilient, decentralized, and open. A preeminent
|
|||||||
example of a P2P network architecture was the early internet itself,
|
example of a P2P network architecture was the early internet itself,
|
||||||
where nodes on the IP network were equal. Today's internet architecture
|
where nodes on the IP network were equal. Today's internet architecture
|
||||||
is more hierarchical, but the Internet Protocol still retains its
|
is more hierarchical, but the Internet Protocol still retains its
|
||||||
flat-topology essence. Beyond bitcoin, the largest and most successful
|
flat-topology essence. Beyond Bitcoin, the largest and most successful
|
||||||
application of P2P technologies is file sharing, with Napster as the
|
application of P2P technologies is file sharing, with Napster as the
|
||||||
pioneer and BitTorrent as the most recent evolution of the architecture.
|
pioneer and BitTorrent as the most recent evolution of the architecture.
|
||||||
|
|
||||||
@ -29,16 +29,16 @@ that can only be achieved and maintained by a flat, decentralized P2P
|
|||||||
consensus network.
|
consensus network.
|
||||||
|
|
||||||
((("Bitcoin network", "defined")))The term "Bitcoin network" refers to
|
((("Bitcoin network", "defined")))The term "Bitcoin network" refers to
|
||||||
the collection of nodes running the bitcoin P2P protocol. In addition to
|
the collection of nodes running the Bitcoin P2P protocol. In addition to
|
||||||
the bitcoin P2P protocol, there are other protocols such as Stratum that
|
the Bitcoin P2P protocol, there are other protocols such as Stratum that
|
||||||
are used for mining and lightweight or mobile wallets. These additional
|
are used for mining and lightweight or mobile wallets. These additional
|
||||||
protocols are provided by gateway routing servers that access the
|
protocols are provided by gateway routing servers that access the
|
||||||
Bitcoin network using the bitcoin P2P protocol and then extend that
|
Bitcoin network using the Bitcoin P2P protocol and then extend that
|
||||||
network to nodes running other protocols. For example, Stratum servers
|
network to nodes running other protocols. For example, Stratum servers
|
||||||
connect Stratum mining nodes via the Stratum protocol to the main
|
connect Stratum mining nodes via the Stratum protocol to the main
|
||||||
Bitcoin network and bridge the Stratum protocol to the bitcoin P2P
|
Bitcoin network and bridge the Stratum protocol to the Bitcoin P2P
|
||||||
protocol. We use the term "extended Bitcoin network" to refer to the
|
protocol. We use the term "extended Bitcoin network" to refer to the
|
||||||
overall network that includes the bitcoin P2P protocol, pool-mining
|
overall network that includes the Bitcoin P2P protocol, pool-mining
|
||||||
protocols, the Stratum protocol, and any other related protocols
|
protocols, the Stratum protocol, and any other related protocols
|
||||||
connecting the components of the Bitcoin system.
|
connecting the components of the Bitcoin system.
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ connecting the components of the Bitcoin system.
|
|||||||
|
|
||||||
((("Bitcoin network", "node types and roles",
|
((("Bitcoin network", "node types and roles",
|
||||||
id="BNnode08")))((("Bitcoin nodes", "types and roles",
|
id="BNnode08")))((("Bitcoin nodes", "types and roles",
|
||||||
id="BNtype08")))Although nodes in the bitcoin P2P network are equal,
|
id="BNtype08")))Although nodes in the Bitcoin P2P network are equal,
|
||||||
they may take on different roles depending on the functionality they are
|
they may take on different roles depending on the functionality they are
|
||||||
supporting. A Bitcoin node is a collection of functions: routing, the
|
supporting. A Bitcoin node is a collection of functions: routing, the
|
||||||
blockchain database, mining, and wallet services. A full node with all
|
blockchain database, mining, and wallet services. A full node with all
|
||||||
@ -76,7 +76,7 @@ function is indicated by a circle called "Full Blockchain" or the letter
|
|||||||
"B." In <<bitcoin_network>>, SPV nodes are drawn without the "B" circle,
|
"B." In <<bitcoin_network>>, SPV nodes are drawn without the "B" circle,
|
||||||
showing that they do not have a full copy of the blockchain.
|
showing that they do not have a full copy of the blockchain.
|
||||||
|
|
||||||
((("bitcoin nodes", "mining nodes")))((("mining and consensus", "mining
|
((("Bitcoin nodes", "mining nodes")))((("mining and consensus", "mining
|
||||||
nodes")))((("Proof-of-Work algorithm")))((("mining and consensus",
|
nodes")))((("Proof-of-Work algorithm")))((("mining and consensus",
|
||||||
"Proof-of-Work algorithm")))Mining nodes compete to create new blocks by
|
"Proof-of-Work algorithm")))Mining nodes compete to create new blocks by
|
||||||
running specialized hardware to solve the Proof-of-Work algorithm. Some
|
running specialized hardware to solve the Proof-of-Work algorithm. Some
|
||||||
@ -103,12 +103,12 @@ Bitcoin network.
|
|||||||
|
|
||||||
((("", startref="BNnode08")))((("", startref="BNtype08")))((("Bitcoin
|
((("", startref="BNnode08")))((("", startref="BNtype08")))((("Bitcoin
|
||||||
network", "extended network activities")))The main Bitcoin network,
|
network", "extended network activities")))The main Bitcoin network,
|
||||||
running the bitcoin P2P protocol, consists of between 5,000 and 8,000
|
running the Bitcoin P2P protocol, consists of between 5,000 and 8,000
|
||||||
listening nodes running various versions of the bitcoin reference client
|
listening nodes running various versions of the Bitcoin reference client
|
||||||
(Bitcoin Core) and a few hundred nodes running various other
|
(Bitcoin Core) and a few hundred nodes running various other
|
||||||
implementations of the bitcoin P2P protocol, such as Bitcoin Classic,
|
implementations of the Bitcoin P2P protocol, such as Bitcoin Classic,
|
||||||
Bitcoin Unlimited, BitcoinJ, Libbitcoin, btcd, and bcoin. A small
|
Bitcoin Unlimited, BitcoinJ, Libbitcoin, btcd, and bcoin. A small
|
||||||
percentage of the nodes on the bitcoin P2P network are also mining
|
percentage of the nodes on the Bitcoin P2P network are also mining
|
||||||
nodes, competing in the mining process, validating transactions, and
|
nodes, competing in the mining process, validating transactions, and
|
||||||
creating new blocks. Various large companies interface with the Bitcoin
|
creating new blocks. Various large companies interface with the Bitcoin
|
||||||
network by running full-node clients based on the Bitcoin Core client,
|
network by running full-node clients based on the Bitcoin Core client,
|
||||||
@ -117,9 +117,9 @@ mining or wallet functions. These nodes act as network edge routers,
|
|||||||
allowing various other services (exchanges, wallets, block explorers,
|
allowing various other services (exchanges, wallets, block explorers,
|
||||||
merchant payment processing) to be built on top.
|
merchant payment processing) to be built on top.
|
||||||
|
|
||||||
The extended Bitcoin network includes the network running the bitcoin
|
The extended Bitcoin network includes the network running the Bitcoin
|
||||||
P2P protocol, described earlier, as well as nodes running specialized
|
P2P protocol, described earlier, as well as nodes running specialized
|
||||||
protocols. Attached to the main bitcoin P2P network are a number of pool
|
protocols. Attached to the main Bitcoin P2P network are a number of pool
|
||||||
servers and protocol gateways that connect nodes running other
|
servers and protocol gateways that connect nodes running other
|
||||||
protocols. These other protocol nodes are mostly pool mining nodes (see
|
protocols. These other protocol nodes are mostly pool mining nodes (see
|
||||||
<<mining>>) and lightweight wallet clients, which do not carry a full
|
<<mining>>) and lightweight wallet clients, which do not carry a full
|
||||||
@ -140,14 +140,14 @@ image::images/mbc2_0803.png["BitcoinNetwork"]
|
|||||||
=== Bitcoin Relay Networks
|
=== Bitcoin Relay Networks
|
||||||
|
|
||||||
((("Bitcoin network", "Bitcoin Relay Networks")))((("relay
|
((("Bitcoin network", "Bitcoin Relay Networks")))((("relay
|
||||||
networks")))While the bitcoin P2P network serves the general needs of a
|
networks")))While the Bitcoin P2P network serves the general needs of a
|
||||||
broad variety of node types, it exhibits too high network latency for
|
broad variety of node types, it exhibits too high network latency for
|
||||||
the specialized needs of bitcoin mining nodes.
|
the specialized needs of Bitcoin mining nodes.
|
||||||
|
|
||||||
((("propagation", "relay networks and")))Bitcoin miners are engaged in a
|
((("propagation", "relay networks and")))Bitcoin miners are engaged in a
|
||||||
time-sensitive competition to solve the Proof-of-Work problem and extend
|
time-sensitive competition to solve the Proof-of-Work problem and extend
|
||||||
the blockchain (see <<mining>>). While participating in this
|
the blockchain (see <<mining>>). While participating in this
|
||||||
competition, bitcoin miners must minimize the time between the
|
competition, Bitcoin miners must minimize the time between the
|
||||||
propagation of a winning block and the beginning of the next round of
|
propagation of a winning block and the beginning of the next round of
|
||||||
competition. In mining, network latency is directly related to profit
|
competition. In mining, network latency is directly related to profit
|
||||||
margins.
|
margins.
|
||||||
@ -176,7 +176,7 @@ at Cornell University. Falcon uses "cut-through-routing" instead of
|
|||||||
they are received rather than waiting until a complete block is
|
they are received rather than waiting until a complete block is
|
||||||
received.
|
received.
|
||||||
|
|
||||||
Relay networks are not replacements for bitcoin's P2P network. Instead
|
Relay networks are not replacements for Bitcoin's P2P network. Instead
|
||||||
they are overlay networks that provide additional connectivity between
|
they are overlay networks that provide additional connectivity between
|
||||||
nodes with specialized needs. Like freeways are not replacements for
|
nodes with specialized needs. Like freeways are not replacements for
|
||||||
rural roads, but rather shortcuts between two points with heavy traffic,
|
rural roads, but rather shortcuts between two points with heavy traffic,
|
||||||
@ -194,13 +194,13 @@ irrelevant; the Bitcoin network topology is not geographically defined.
|
|||||||
Therefore, any existing Bitcoin nodes can be selected at random.
|
Therefore, any existing Bitcoin nodes can be selected at random.
|
||||||
|
|
||||||
To connect to a known peer, nodes establish a TCP connection, usually to
|
To connect to a known peer, nodes establish a TCP connection, usually to
|
||||||
port 8333 (the port generally known as the one used by bitcoin), or an
|
port 8333 (the port generally known as the one used by Bitcoin), or an
|
||||||
alternative port if one is provided. Upon establishing a connection, the
|
alternative port if one is provided. Upon establishing a connection, the
|
||||||
node will start a "handshake" (see <<network_handshake>>) by
|
node will start a "handshake" (see <<network_handshake>>) by
|
||||||
transmitting a +version+ message, which contains basic identifying
|
transmitting a +version+ message, which contains basic identifying
|
||||||
information, including:
|
information, including:
|
||||||
|
|
||||||
+nVersion+:: The bitcoin P2P protocol version the client "speaks" (e.g., 70002)
|
+nVersion+:: The Bitcoin P2P protocol version the client "speaks" (e.g., 70002)
|
||||||
+nLocalServices+:: A list of local services supported by the node, currently just +NODE_NETWORK+
|
+nLocalServices+:: A list of local services supported by the node, currently just +NODE_NETWORK+
|
||||||
+nTime+:: The current time
|
+nTime+:: The current time
|
||||||
+addrYou+:: The IP address of the remote node as seen from this node
|
+addrYou+:: The IP address of the remote node as seen from this node
|
||||||
@ -223,7 +223,7 @@ addresses of Bitcoin nodes. Some of those DNS seeds provide a static
|
|||||||
list of IP addresses of stable Bitcoin listening nodes. Some of the DNS
|
list of IP addresses of stable Bitcoin listening nodes. Some of the DNS
|
||||||
seeds are custom implementations of BIND (Berkeley Internet Name Daemon)
|
seeds are custom implementations of BIND (Berkeley Internet Name Daemon)
|
||||||
that return a random subset from a list of Bitcoin node addresses
|
that return a random subset from a list of Bitcoin node addresses
|
||||||
collected by a crawler or a long-running bitcoin node. The Bitcoin Core
|
collected by a crawler or a long-running Bitcoin node. The Bitcoin Core
|
||||||
client contains the names of five different DNS seeds. The diversity of
|
client contains the names of five different DNS seeds. The diversity of
|
||||||
ownership and diversity of implementation of the different DNS seeds
|
ownership and diversity of implementation of the different DNS seeds
|
||||||
offers a high level of reliability for the initial bootstrapping
|
offers a high level of reliability for the initial bootstrapping
|
||||||
@ -337,7 +337,7 @@ startref="BNextend08")))((("", startref="BNodiscover08")))
|
|||||||
clients")))((("blockchain (the)", "full blockchain nodes")))Full nodes
|
clients")))((("blockchain (the)", "full blockchain nodes")))Full nodes
|
||||||
are nodes that maintain a full blockchain with all transactions. More
|
are nodes that maintain a full blockchain with all transactions. More
|
||||||
accurately, they probably should be called "full blockchain nodes." In
|
accurately, they probably should be called "full blockchain nodes." In
|
||||||
the early years of bitcoin, all nodes were full nodes and currently the
|
the early years of Bitcoin, all nodes were full nodes and currently the
|
||||||
Bitcoin Core client is a full blockchain node. In the past two years,
|
Bitcoin Core client is a full blockchain node. In the past two years,
|
||||||
however, new forms of Bitcoin clients have been introduced that do not
|
however, new forms of Bitcoin clients have been introduced that do not
|
||||||
maintain a full blockchain but run as lightweight clients. We'll examine
|
maintain a full blockchain but run as lightweight clients. We'll examine
|
||||||
@ -355,7 +355,7 @@ receive updates about new blocks of transactions, which it then verifies
|
|||||||
and incorporates into its local copy of the blockchain.
|
and incorporates into its local copy of the blockchain.
|
||||||
|
|
||||||
((("Bitcoin nodes", "full nodes")))Running a full blockchain node gives
|
((("Bitcoin nodes", "full nodes")))Running a full blockchain node gives
|
||||||
you the pure bitcoin experience: independent verification of all
|
you the pure Bitcoin experience: independent verification of all
|
||||||
transactions without the need to rely on, or trust, any other systems.
|
transactions without the need to rely on, or trust, any other systems.
|
||||||
It's easy to tell if you're running a full node because it requires more
|
It's easy to tell if you're running a full node because it requires more
|
||||||
than one hundred gigabytes of persistent storage (disk space) to store
|
than one hundred gigabytes of persistent storage (disk space) to store
|
||||||
@ -534,7 +534,7 @@ user of that wallet, destroying the user's privacy.
|
|||||||
.SPV node synchronizing the block headers
|
.SPV node synchronizing the block headers
|
||||||
image::images/mbc2_0807.png["SPVSynchronization"]
|
image::images/mbc2_0807.png["SPVSynchronization"]
|
||||||
|
|
||||||
Shortly after the introduction of SPV/lightweight nodes, bitcoin
|
Shortly after the introduction of SPV/lightweight nodes, Bitcoin
|
||||||
developers added a feature called _bloom filters_ to address the privacy
|
developers added a feature called _bloom filters_ to address the privacy
|
||||||
risks of SPV nodes. Bloom filters allow SPV nodes to receive a subset of
|
risks of SPV nodes. Bloom filters allow SPV nodes to receive a subset of
|
||||||
the transactions without revealing precisely which addresses they are
|
the transactions without revealing precisely which addresses they are
|
||||||
@ -747,12 +747,12 @@ client.
|
|||||||
|
|
||||||
((("Bitcoin network", "encrypted
|
((("Bitcoin network", "encrypted
|
||||||
connections")))((("encryption")))((("authentication")))Most new users of
|
connections")))((("encryption")))((("authentication")))Most new users of
|
||||||
bitcoin assume that the network communications of a Bitcoin node are
|
Bitcoin assume that the network communications of a Bitcoin node are
|
||||||
encrypted. In fact, the original implementation of bitcoin communicates
|
encrypted. In fact, the original implementation of bitcoin communicates
|
||||||
entirely in the clear. While this is not a major privacy concern for
|
entirely in the clear. While this is not a major privacy concern for
|
||||||
full nodes, it is a big problem for SPV nodes.
|
full nodes, it is a big problem for SPV nodes.
|
||||||
|
|
||||||
As a way to increase the privacy and security of the bitcoin P2P
|
As a way to increase the privacy and security of the Bitcoin P2P
|
||||||
network, there are two solutions that provide encryption of the
|
network, there are two solutions that provide encryption of the
|
||||||
communications: _Tor Transport_ and _P2P Authentication and Encryption_
|
communications: _Tor Transport_ and _P2P Authentication and Encryption_
|
||||||
with BIP-150/151.
|
with BIP-150/151.
|
||||||
@ -814,7 +814,7 @@ privacy of the SPV client.
|
|||||||
Additionally, authentication can be used to create networks of trusted
|
Additionally, authentication can be used to create networks of trusted
|
||||||
Bitcoin nodes and prevent Man-in-the-Middle attacks. Finally, P2P
|
Bitcoin nodes and prevent Man-in-the-Middle attacks. Finally, P2P
|
||||||
encryption, if deployed broadly, would strengthen the resistance of
|
encryption, if deployed broadly, would strengthen the resistance of
|
||||||
bitcoin to traffic analysis and privacy-eroding surveillance, especially
|
Bitcoin to traffic analysis and privacy-eroding surveillance, especially
|
||||||
in totalitarian countries where internet use is heavily controlled and
|
in totalitarian countries where internet use is heavily controlled and
|
||||||
monitored.
|
monitored.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user