mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2024-12-22 14:48:09 +00:00
check 3;
This commit is contained in:
parent
731fe75319
commit
b2a08a2d23
@ -681,7 +681,8 @@ Result:
|
||||
Examples:
|
||||
> bitcoin-cli getblockhash 1000
|
||||
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest",
|
||||
"method": "getblockhash", "params": [1000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
|
||||
"method": "getblockhash",
|
||||
"params": [1000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
|
||||
----
|
||||
|
||||
At the end of the help information you will see two examples of the RPC
|
||||
@ -984,7 +985,8 @@ client to construct one of these JSON-RPC calls:
|
||||
|
||||
----
|
||||
$ curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest",
|
||||
"method": "getblockchaininfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
|
||||
"method": "getblockchaininfo",
|
||||
"params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
|
||||
----
|
||||
|
||||
This command shows that +curl+ submits an HTTP request to the local host
|
||||
@ -1007,10 +1009,18 @@ $ cat .bitcoin/.cookie
|
||||
__cookie__:17c9b71cef21b893e1a019f4bc071950c7942f49796ed061b274031b17b19cd0
|
||||
|
||||
$ curl
|
||||
--user __cookie__:17c9b71cef21b893e1a019f4bc071950c7942f49796ed061b274031b17b19cd0 --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockchaininfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
|
||||
--user __cookie__:17c9b71cef21b893e1a019f4bc071950c7942f49796ed061b274031b17b19cd0
|
||||
--data-binary '{"jsonrpc": "1.0", "id":"curltest",
|
||||
"method": "getblockchaininfo",
|
||||
"params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
|
||||
|
||||
{"result":{"chain":"main","blocks":799278,"headers":799278,
|
||||
"bestblockhash":"000000000000000000018387c50988ec705a95d6f765b206b6629971e6978879","difficulty":53911173001054.59,"time":1689703111,"mediantime":1689701260,"verificationprogress":0.9999979206082515,"initialblockdownload":false,"chainwork":"00000000000000000000000000000000000000004f3e111bf32bcb47f9dfad5b","size_on_disk":563894577967,"pruned":false,"warnings":""},"error":null,"id":"curltest"}
|
||||
"bestblockhash":"000000000000000000018387c50988ec705a95d6f765b206b6629971e6978879",
|
||||
"difficulty":53911173001054.59,"time":1689703111,"mediantime":1689701260,
|
||||
"verificationprogress":0.9999979206082515,"initialblockdownload":false,
|
||||
"chainwork":"00000000000000000000000000000000000000004f3e111bf32bcb47f9dfad5b",
|
||||
"size_on_disk":563894577967,"pruned":false,"warnings":""},"error":null,
|
||||
"id":"curltest"}
|
||||
----
|
||||
====
|
||||
|
||||
|
@ -234,7 +234,7 @@ Type "help", "copyright", "credits" or "license" for more information.
|
||||
> p = 115792089237316195423570985008687907853269984665640564039457584007908834671663
|
||||
> x = 55066263022277343669578718895168534326250603453777594175500187360389116729240
|
||||
> y = 32670510020758816978083085130507043184471273380659243275938904335757337482424
|
||||
>>> (x ** 3 + 7 - y**2) % p
|
||||
> (x ** 3 + 7 - y**2) % p
|
||||
0
|
||||
----
|
||||
====
|
||||
@ -342,7 +342,7 @@ Implementing the elliptic curve multiplication, we take the private key
|
||||
_k_ generated previously and multiply it with the generator point G to
|
||||
find the public key _K_:
|
||||
|
||||
[source="python"]
|
||||
[source, python]
|
||||
----
|
||||
K = 1E99423A4ED27608A15A2616A2B0E9E52CED330AC530EDCC32C8FFC6A526AEDD * G
|
||||
----
|
||||
|
@ -1048,8 +1048,8 @@ WrUE9i6GoNMKUga5biW6Hx4tws2six3b9c
|
||||
Here's the corresponding extended _public_ key, encoded in base58check:
|
||||
|
||||
----
|
||||
xpub67xpozcx8pe95XVuZLHXZeG6XWXHpGq6Qv5cmNfi7cS5mtjJ2tgypeQbBs2UAR6KECeeMVKZBPLrt
|
||||
JunSDMstweyLXhRgPxdp14sk9tJPW9
|
||||
xpub67xpozcx8pe95XVuZLHXZeG6XWXHpGq6Qv5cmNfi7cS5mtjJ2tgypeQbBs2UAR6KECeeMVKZBP
|
||||
LrtJunSDMstweyLXhRgPxdp14sk9tJPW9
|
||||
----
|
||||
|
||||
[[public__child_key_derivation]]
|
||||
|
@ -270,7 +270,7 @@ information, including:
|
||||
+nTime+:: The current time
|
||||
+addrYou+:: The IP address of the remote node as seen from this node
|
||||
+addrMe+:: The IP address of the local node, as discovered by the local node
|
||||
+subver+:: A subversion showing the type of software running on this node (e.g., [.keep-together]#+/Satoshi:0.9.2.1/+#)
|
||||
+subver+:: A subversion showing the type of software [.keep-together]#running on this node (e.g.,# [.keep-together]#+/Satoshi:0.9.2.1/+#)
|
||||
+BestHeight+:: The block height of this node's blockchain
|
||||
+fRelay+:: A field added by BIP37 for requesting not to receive unconfirmed transactions
|
||||
|
||||
@ -949,12 +949,12 @@ When it has received money::
|
||||
|
||||
Specifically, when a transaction
|
||||
output contains a script that the wallet controls (such as by
|
||||
controlling the authorized private key).
|
||||
controlling the authorized private key)
|
||||
|
||||
When it has spent money::
|
||||
|
||||
Specifically, when a transaction input
|
||||
references a previous transaction output that the wallet controlled.
|
||||
references a previous transaction output that the wallet controlled
|
||||
|
||||
A secondary goal during the design of compact block filters was to allow
|
||||
the wallet receiving the filter to verify that it received an accurate
|
||||
|
@ -224,7 +224,7 @@ $ bitcoin-cli getblock \
|
||||
"difficulty": 1,
|
||||
"chainwork": "[...]000000000000000000000000000000000000000000000100010001",
|
||||
"nTx": 1,
|
||||
"nextblockhash": "00000000839a8e6886ab5951d7[...]8afc90947ee320161bbf18eb6048",
|
||||
"nextblockhash": "00000000839a8e6886ab5951d7[...]fc90947ee320161bbf18eb6048",
|
||||
"strippedsize": 285,
|
||||
"size": 285,
|
||||
"weight": 1140,
|
||||
@ -672,7 +672,7 @@ $ bitcoin-cli -signet getblockchaininfo
|
||||
"chain": "signet",
|
||||
"blocks": 143619,
|
||||
"headers": 143619,
|
||||
"bestblockhash": "000000c46cb3505ddd296537[...]65ad1c5768e2908439382447572a93",
|
||||
"bestblockhash": "000000c46cb3505ddd296537[...]ad1c5768e2908439382447572a93",
|
||||
"difficulty": 0.003020638517858618,
|
||||
"time": 1684530244,
|
||||
"mediantime": 1684526116,
|
||||
@ -719,7 +719,7 @@ $ bitcoin-cli -regtest getblockchaininfo
|
||||
"chain": "regtest",
|
||||
"blocks": 0,
|
||||
"headers": 0,
|
||||
"bestblockhash": "0f9188f13cb7b2c71f2a335e3[...]beb436012afca590b1a11466e2206",
|
||||
"bestblockhash": "0f9188f13cb7b2c71f2a335e3[...]b436012afca590b1a11466e2206",
|
||||
"difficulty": 4.656542373906925e-10,
|
||||
"mediantime": 1296688602,
|
||||
"verificationprogress": 1,
|
||||
|
@ -394,7 +394,7 @@ The calculation can be seen in function +GetBlockSubsidy+ in the Bitcoin
|
||||
Core client, as shown in <<getblocksubsidy_source>>.
|
||||
|
||||
[[getblocksubsidy_source]]
|
||||
.Calculating the block reward—Function +GetBlockSubsidy+, Bitcoin Core Client, main.cpp
|
||||
.Calculating the block reward—Function [.plain]#+GetBlockSubsidy+,# Bitcoin Core Client, main.cpp
|
||||
====
|
||||
[role="c_less_space"]
|
||||
[source, cpp]
|
||||
|
@ -117,9 +117,9 @@
|
||||
<li>Maximilian Reichel (phramz)</li>
|
||||
<li>MG-ng (MG-ng)</li>
|
||||
<li>Michalis Kargakis (kargakis)</li>
|
||||
<li>Michael C. Ippolito <span class="keep-together">(michaelcippolito)</span></li>
|
||||
<li><p>Michael C. Ippolito <span class="keep-together">(michaelcippolito)</p></span></li>
|
||||
<li>Michael Galero (mikong)</li>
|
||||
<li>Michael Newman <span class="keep-together">(michaelbnewman)</span></li>
|
||||
<li><p class="left-align">Michael Newman <span class="keep-together">(michaelbnewman)</span></p></li>
|
||||
<li>Mihail Russu (MihailRussu)</li>
|
||||
<li>mikew (mikew)</li>
|
||||
<li>milansismanovic</li>
|
||||
|
@ -65,6 +65,11 @@ pre.c_less_space2 {
|
||||
line-height: 105%;
|
||||
}
|
||||
|
||||
/*--left align paragraph for credits--*/
|
||||
p.left-align{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/*----Uncomment to temporarily turn on code-eyballer highlighting (make sure to recomment after you build)
|
||||
|
||||
pre {
|
||||
|
Loading…
Reference in New Issue
Block a user