Skip to content

Commit d36159b

Browse files
committed
Merge #1015: Bitcoin Core 27.0
d5102c5 27.0 RPC docs (Ava Chow) 948010d Update maintenance table after 27.0 (Ava Chow) 8ff3cb2 Bitcoin Core 27.0 (Ava Chow) Pull request description: Blog post, release notes, and RPC docs for 27.0. Also updates the maintenance table. ACKs for top commit: laanwj: ACK d5102c5 Tree-SHA512: 9fc7e02b25ea7275f8e825f37b3449d3d1f2ac25492dc305e7553f92566eb84abcca5af6d37255aa38d9d78206754460faa5c905ab4aac0e47ef37a599aba605
2 parents 6005bff + d5102c5 commit d36159b

File tree

160 files changed

+6812
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+6812
-2
lines changed

_doc/en/27.0.0/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: index
3+
btcversion: 27.0.0
4+
btcgroup: index
5+
permalink: en/doc/27.0.0/
6+
---
7+
8+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: dumptxoutset
3+
btcversion: 27.0.0
4+
btcgroup: blockchain
5+
permalink: en/doc/27.0.0/rpc/blockchain/dumptxoutset/
6+
---
7+
8+
dumptxoutset "path"
9+
10+
Write the serialized UTXO set to a file.
11+
12+
Arguments:
13+
1. path (string, required) Path to the output file. If relative, will be prefixed by datadir.
14+
15+
Result:
16+
{ (json object)
17+
"coins_written" : n, (numeric) the number of coins written in the snapshot
18+
"base_hash" : "hex", (string) the hash of the base of the snapshot
19+
"base_height" : n, (numeric) the height of the base of the snapshot
20+
"path" : "str", (string) the absolute path that the snapshot was written to
21+
"txoutset_hash" : "hex", (string) the hash of the UTXO set contents
22+
"nchaintx" : n (numeric) the number of transactions in the chain up to and including the base block
23+
}
24+
25+
Examples:
26+
> bitcoin-cli dumptxoutset utxo.dat
27+
28+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: getbestblockhash
3+
btcversion: 27.0.0
4+
btcgroup: blockchain
5+
permalink: en/doc/27.0.0/rpc/blockchain/getbestblockhash/
6+
---
7+
8+
getbestblockhash
9+
10+
Returns the hash of the best (tip) block in the most-work fully-validated chain.
11+
12+
Result:
13+
"hex" (string) the block hash, hex-encoded
14+
15+
Examples:
16+
> bitcoin-cli getbestblockhash
17+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getbestblockhash", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
18+
19+
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
name: getblock
3+
btcversion: 27.0.0
4+
btcgroup: blockchain
5+
permalink: en/doc/27.0.0/rpc/blockchain/getblock/
6+
---
7+
8+
getblock "blockhash" ( verbosity )
9+
10+
If verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'.
11+
If verbosity is 1, returns an Object with information about block <hash>.
12+
If verbosity is 2, returns an Object with information about block <hash> and information about each transaction.
13+
If verbosity is 3, returns an Object with information about block <hash> and information about each transaction, including prevout information for inputs (only for unpruned blocks in the current best chain).
14+
15+
Arguments:
16+
1. blockhash (string, required) The block hash
17+
2. verbosity (numeric, optional, default=1) 0 for hex-encoded data, 1 for a JSON object, 2 for JSON object with transaction data, and 3 for JSON object with transaction data including prevout information for inputs
18+
19+
Result (for verbosity = 0):
20+
"hex" (string) A string that is serialized, hex-encoded data for block 'hash'
21+
22+
Result (for verbosity = 1):
23+
{ (json object)
24+
"hash" : "hex", (string) the block hash (same as provided)
25+
"confirmations" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain
26+
"size" : n, (numeric) The block size
27+
"strippedsize" : n, (numeric) The block size excluding witness data
28+
"weight" : n, (numeric) The block weight as defined in BIP 141
29+
"height" : n, (numeric) The block height or index
30+
"version" : n, (numeric) The block version
31+
"versionHex" : "hex", (string) The block version formatted in hexadecimal
32+
"merkleroot" : "hex", (string) The merkle root
33+
"tx" : [ (json array) The transaction ids
34+
"hex", (string) The transaction id
35+
...
36+
],
37+
"time" : xxx, (numeric) The block time expressed in UNIX epoch time
38+
"mediantime" : xxx, (numeric) The median block time expressed in UNIX epoch time
39+
"nonce" : n, (numeric) The nonce
40+
"bits" : "hex", (string) The bits
41+
"difficulty" : n, (numeric) The difficulty
42+
"chainwork" : "hex", (string) Expected number of hashes required to produce the chain up to this block (in hex)
43+
"nTx" : n, (numeric) The number of transactions in the block
44+
"previousblockhash" : "hex", (string, optional) The hash of the previous block (if available)
45+
"nextblockhash" : "hex" (string, optional) The hash of the next block (if available)
46+
}
47+
48+
Result (for verbosity = 2):
49+
{ (json object)
50+
..., Same output as verbosity = 1
51+
"tx" : [ (json array)
52+
{ (json object)
53+
..., The transactions in the format of the getrawtransaction RPC. Different from verbosity = 1 "tx" result
54+
"fee" : n (numeric) The transaction fee in BTC, omitted if block undo data is not available
55+
},
56+
...
57+
]
58+
}
59+
60+
Result (for verbosity = 3):
61+
{ (json object)
62+
..., Same output as verbosity = 2
63+
"tx" : [ (json array)
64+
{ (json object)
65+
"vin" : [ (json array)
66+
{ (json object)
67+
..., The same output as verbosity = 2
68+
"prevout" : { (json object) (Only if undo information is available)
69+
"generated" : true|false, (boolean) Coinbase or not
70+
"height" : n, (numeric) The height of the prevout
71+
"value" : n, (numeric) The value in BTC
72+
"scriptPubKey" : { (json object)
73+
"asm" : "str", (string) Disassembly of the public key script
74+
"desc" : "str", (string) Inferred descriptor for the output
75+
"hex" : "hex", (string) The raw public key script bytes, hex-encoded
76+
"address" : "str", (string, optional) The Bitcoin address (only if a well-defined address exists)
77+
"type" : "str" (string) The type (one of: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_scripthash, witness_v0_keyhash, witness_v1_taproot, witness_unknown)
78+
}
79+
}
80+
},
81+
...
82+
]
83+
},
84+
...
85+
]
86+
}
87+
88+
Examples:
89+
> bitcoin-cli getblock "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
90+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblock", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
91+
92+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: getblockchaininfo
3+
btcversion: 27.0.0
4+
btcgroup: blockchain
5+
permalink: en/doc/27.0.0/rpc/blockchain/getblockchaininfo/
6+
---
7+
8+
getblockchaininfo
9+
10+
Returns an object containing various state info regarding blockchain processing.
11+
12+
Result:
13+
{ (json object)
14+
"chain" : "str", (string) current network name (main, test, signet, regtest)
15+
"blocks" : n, (numeric) the height of the most-work fully-validated chain. The genesis block has height 0
16+
"headers" : n, (numeric) the current number of headers we have validated
17+
"bestblockhash" : "str", (string) the hash of the currently best block
18+
"difficulty" : n, (numeric) the current difficulty
19+
"time" : xxx, (numeric) The block time expressed in UNIX epoch time
20+
"mediantime" : xxx, (numeric) The median block time expressed in UNIX epoch time
21+
"verificationprogress" : n, (numeric) estimate of verification progress [0..1]
22+
"initialblockdownload" : true|false, (boolean) (debug information) estimate of whether this node is in Initial Block Download mode
23+
"chainwork" : "hex", (string) total amount of work in active chain, in hexadecimal
24+
"size_on_disk" : n, (numeric) the estimated size of the block and undo files on disk
25+
"pruned" : true|false, (boolean) if the blocks are subject to pruning
26+
"pruneheight" : n, (numeric, optional) height of the last block pruned, plus one (only present if pruning is enabled)
27+
"automatic_pruning" : true|false, (boolean, optional) whether automatic pruning is enabled (only present if pruning is enabled)
28+
"prune_target_size" : n, (numeric, optional) the target size used by pruning (only present if automatic pruning is enabled)
29+
"warnings" : "str" (string) any network and blockchain warnings
30+
}
31+
32+
Examples:
33+
> bitcoin-cli getblockchaininfo
34+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockchaininfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
35+
36+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: getblockcount
3+
btcversion: 27.0.0
4+
btcgroup: blockchain
5+
permalink: en/doc/27.0.0/rpc/blockchain/getblockcount/
6+
---
7+
8+
getblockcount
9+
10+
Returns the height of the most-work fully-validated chain.
11+
The genesis block has height 0.
12+
13+
Result:
14+
n (numeric) The current block count
15+
16+
Examples:
17+
> bitcoin-cli getblockcount
18+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockcount", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
19+
20+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: getblockfilter
3+
btcversion: 27.0.0
4+
btcgroup: blockchain
5+
permalink: en/doc/27.0.0/rpc/blockchain/getblockfilter/
6+
---
7+
8+
getblockfilter "blockhash" ( "filtertype" )
9+
10+
Retrieve a BIP 157 content filter for a particular block.
11+
12+
Arguments:
13+
1. blockhash (string, required) The hash of the block
14+
2. filtertype (string, optional, default="basic") The type name of the filter
15+
16+
Result:
17+
{ (json object)
18+
"filter" : "hex", (string) the hex-encoded filter data
19+
"header" : "hex" (string) the hex-encoded filter header
20+
}
21+
22+
Examples:
23+
> bitcoin-cli getblockfilter "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09" "basic"
24+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockfilter", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09", "basic"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
25+
26+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: getblockfrompeer
3+
btcversion: 27.0.0
4+
btcgroup: blockchain
5+
permalink: en/doc/27.0.0/rpc/blockchain/getblockfrompeer/
6+
---
7+
8+
getblockfrompeer "blockhash" peer_id
9+
10+
Attempt to fetch block from a given peer.
11+
12+
We must have the header for this block, e.g. using submitheader.
13+
Subsequent calls for the same block may cause the response from the previous peer to be ignored.
14+
Peers generally ignore requests for a stale block that they never fully verified, or one that is more than a month old.
15+
When a peer does not respond with a block, we will disconnect.
16+
Note: The block could be re-pruned as soon as it is received.
17+
18+
Returns an empty JSON object if the request was successfully scheduled.
19+
20+
Arguments:
21+
1. blockhash (string, required) The block hash to try to fetch
22+
2. peer_id (numeric, required) The peer to fetch it from (see getpeerinfo for peer IDs)
23+
24+
Result:
25+
{} (empty JSON object)
26+
27+
Examples:
28+
> bitcoin-cli getblockfrompeer "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09" 0
29+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockfrompeer", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09" 0]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
30+
31+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: getblockhash
3+
btcversion: 27.0.0
4+
btcgroup: blockchain
5+
permalink: en/doc/27.0.0/rpc/blockchain/getblockhash/
6+
---
7+
8+
getblockhash height
9+
10+
Returns hash of block in best-block-chain at height provided.
11+
12+
Arguments:
13+
1. height (numeric, required) The height index
14+
15+
Result:
16+
"hex" (string) The block hash
17+
18+
Examples:
19+
> bitcoin-cli getblockhash 1000
20+
> 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/
21+
22+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: getblockheader
3+
btcversion: 27.0.0
4+
btcgroup: blockchain
5+
permalink: en/doc/27.0.0/rpc/blockchain/getblockheader/
6+
---
7+
8+
getblockheader "blockhash" ( verbose )
9+
10+
If verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'.
11+
If verbose is true, returns an Object with information about blockheader <hash>.
12+
13+
Arguments:
14+
1. blockhash (string, required) The block hash
15+
2. verbose (boolean, optional, default=true) true for a json object, false for the hex-encoded data
16+
17+
Result (for verbose = true):
18+
{ (json object)
19+
"hash" : "hex", (string) the block hash (same as provided)
20+
"confirmations" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain
21+
"height" : n, (numeric) The block height or index
22+
"version" : n, (numeric) The block version
23+
"versionHex" : "hex", (string) The block version formatted in hexadecimal
24+
"merkleroot" : "hex", (string) The merkle root
25+
"time" : xxx, (numeric) The block time expressed in UNIX epoch time
26+
"mediantime" : xxx, (numeric) The median block time expressed in UNIX epoch time
27+
"nonce" : n, (numeric) The nonce
28+
"bits" : "hex", (string) The bits
29+
"difficulty" : n, (numeric) The difficulty
30+
"chainwork" : "hex", (string) Expected number of hashes required to produce the current chain
31+
"nTx" : n, (numeric) The number of transactions in the block
32+
"previousblockhash" : "hex", (string, optional) The hash of the previous block (if available)
33+
"nextblockhash" : "hex" (string, optional) The hash of the next block (if available)
34+
}
35+
36+
Result (for verbose=false):
37+
"hex" (string) A string that is serialized, hex-encoded data for block 'hash'
38+
39+
Examples:
40+
> bitcoin-cli getblockheader "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
41+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockheader", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
42+
43+

0 commit comments

Comments
 (0)