Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the bitcoind command

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to use the bitcoind command, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Usage: bitcoind [options] starts the Bitcoin core daemon

Options:

-?

Print this help and exit

-alertnotify =

Execute orders when we receive the relevant alarm or when we actually see it.

Long fork (s in cmd is replaced by message)

-assumevalid =

If the block is in the chain, it and its ancestors are considered valid.

And may skip their script validation (0 to verify all

Default:

0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8

Testnet:

0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75)

-blocknotify =

Execute the command when the best block changes (replace% s in cmd with

Block hash)

-blockreconstructionextratxn =

Rebuild additional transactions in memory for compact blocks

(default: 100)

-blocksdir =

Specify the block directory (default: / blocks)

-conf =

Specify the profile. The relative path will be prefixed with datadir

Location. (default: bitcoin.conf)

-datadir =

Specify data directory

-dbcache =

Sets the database cache size (in megabytes) (4 to 16384, default: 450)

-debuglogfile =

Specifies the location of the debug log file. The relative path will be prefixed with a

A network-specific database location. (- nodebuglogfile disabled

Default value: debug.log)

-includeconf =

Specify additional profiles relative to the-datadir path

(available only from the configuration file, not the command line)

-loadblock =

Blk000 from the outside at startup. Dat file import block

-maxmempool =

Keep the transaction memory pool below megabytes (default: 300)

-maxorphantx =

Keep a maximum of unreachable transactions in memory (default: 100)

-mempoolexpiry =

Do not keep transactions in mempool for more than an hour (default:

336)

-par =

Set the number of script validation threads (- 4 to 16 minutes 0 = auto, = 550 = automatically trim the block file to remain in the

Target size specified in MiB)

-reindex

Rebuild chain state and block index from blk * .dat files on disk

-reindex-chainstate

Rebuild the chain state from the block of the current index

-txindex

Maintain complete transaction indexes used by getrawtransaction rpc

Call (default: 0)

-version

Print the version and exit

Connection options:

-addnode =

Add the node to connect and try to keep the connection open see

The `addnode` RPC command helps get more information. This option can

Multiple nodes are specified multiple times.

-banscore =

Threshold for disconnecting misbehaved peers (default: 100)

-bantime =

The number of seconds to reconnect a misbehaving partner (default:

86400)

-bind =

Bind to the given address and always listen to it. Use [host]: Port notation

For IPv6

-connect =

Connect to specified nodes only;-noconnect disables automatic

Connect (the rules for this peer are the same as for

-addnode. You can specify this option multiple times to connect

To multiple nodes.

-Discover

Find your IP address (default: 1 when listening, no-- externalip

Or-agent)

-dns

Allow DNS to find-addnode,-seednode and-connect (default: 1)

-dnsseed

If the address is low, the peer address is queried through the DNS query (default: 1

Unless you use-connect)

-enablebip61

Press BIP61 to send a reject message (default: 1)

-externalip =

Specify your own public address

-forcednsseed

Always query peer address through DNS lookup (default: 0)

-listen.

Accept connections from outside (default: 1 if there is no-proxy or-connect)

-listenonion

Automatically create Tor hidden service (default: 1)

-maxconnections =

Stay connected to your partner at most (default: 125)

-maxreceivebuffer =

Maximum receive buffer per connection, * 1000 bytes (default: 5000)

-maxsendbuffer =

Maximum send buffer per connection, * 1000 bytes (default: 1000)

-maxtimeadjustment

The maximum median allowed is adjusted for equal time offset. Local perspective

Time may be affected by the forward or backward companions.

Quantity. (default: 4200 seconds)

-maxuploadtarget =

Attempt to maintain outbound traffic at a given target (MiB every 24 hours)

0 = unlimited (default: 0)

-onion =

Use a separate SOCKS5 proxy to reach the peer through Tor hidden service settings

-noonion disabled (default:-proxy)

-onlynet =

Establish an outgoing connection only through the network (ipv4,ipv6 or .net)

Onion). Incoming connections are not affected by this option.

You can specify this option multiple times to allow multiple

The Internet.

-peerbloomfilters

Support the use of bloom filters to filter blocks and transactions (default:

1)

-permitbaremultisig

Trunk is not P2SH multisig (default: 1)

-port =

Connection on listening (default: 8333 or testnet:18333)

-proxy =

Through the SOCKS5 proxy connection, set-noproxy to disabled (default:

Disable)

-proxyrandomize

Randomize the credentials for each proxy connection. This makes Tor possible.

Stream isolation (default: 1)

-seednode =

Connect to the node to retrieve the peer address and disconnect. This

You can specify options multiple times to connect to multiple

Node.

-timeout =

Specifies the connection timeout in milliseconds (minimum: 1, default: 5000)

-torcontrol =:

If onion snooping is enabled, the Tor control port is used (default:

127.0.0.1purl 9051)

-torpassword =

Tor control port password (default: empty)

-upnp

Use UPnP mapping to listen on ports (default: 0)

-whitebind =

Bind to the given address and whitelist the whitelist connected to it. Use

[host]: Port representation of IPv6

-whitelist =

A whitelist peer connected from a given IP address (for example, 1.2.3.4) or

The CIDR tagging network (for example, 1.2.3.0 lap24). You can specify more than one

Times. Whitelist peers cannot be banned by DoS and their

Transactions are always forwarded, even if they are already in the transaction

Mempool, useful for example for gateways

Wallet options:

-address Typ

Which type of address to use ("legacy", "p2sh-segwit" or "bech42"

Default: "p2sh-segwit")

-avoidpartialspends

Group output by address, select all or all, rather than select on

The basis of each output. Privacy is improved because the address is unique

Use it once (unless someone gives it after spending money)

However, the cost may be slightly higher because of the second-best coin.

Selection may be caused by added restrictions (default: 0)

-changetype

What type of change is used ("legacy", "p2sh-segwit" or "bech42").

The default value is the same as-addresstype, unless

-addresstype = p2sh-segwit when using native segwit output

Send to local segwit address)

-disablewallet

Do not load wallet and disable wallet RPC call

-discardfee =

The rate (BTC / kB) indicates your tolerance for discarding

Change it by adding it to the expense (default: 0.0001). Note: output

If it is at this speed the dust is discarded, but we will forever

Relay fee for discarding dust and higher than this fee

Limited by the cost estimate of the longest target

-fallbackfee =

Rate to be used in cost estimation (BTC / kB)

Insufficient data (default: 0.0002)

-keypool =

Set the key pool size to (default: 1000)

-mintxfee =

Fees less than this (BTC / kB) are considered zero.

Transaction creation (default: 0.00001)

-paytxfee =

Fees (in BTC / kB) are added to the transaction you send (default: 0.00)

-rescan

Rescan the block chain at startup to find the missing wallet transaction

-salvagewallet

Try to recover the private key from the damaged wallet at startup

-spendzeroconfchange

Unverified changes are spent when sending transactions (default: 1)

-txconfirmtarget =

If paytxfee is not set, please include sufficient fees to start the transaction

Average confirmation within n blocks (default: 6)

-upgradewallet

Upgrade the wallet to the latest format at startup

-wallet =

Specify the wallet database path. Loading can be specified multiple times

Multiple wallets. The path is interpreted relative to if.

It is not absolute, if it does not exist, it will be created (such as

The directory that contains wallet.dat files and log files. For

Backward compatibility this will also accept the existing name

The data file in the. )

-walletbroadcast

Make wallet broadcast transaction (default: 1)

-walletdir =

Specify the directory where the wallet is saved (default: / wallets, if it

Exist, otherwise)

-walletnotify =

Execute command when wallet transaction changes (replace s in cmd)

Via TxID)

-walletrbf

Use full RBF to choose to join the send transaction (RPC only, default: 0)

-zapwallettxes =

Delete all wallet transactions and restore only those parts

Chaining blocks with-rescan at startup (1 = retain TX metadata, for example

Account owner and payment request information, 2 = drop tx meta

Data)

ZeroMQ Notification options:

-zmqpubhashblock =

Enable publish hash blocks in

-zmqpubhashtx =

Enable publish hash transactions in

-zmqpubrawblock =

Enable publishing of original blocks in

-zmqpubrawtx =

Enable publishing the original transaction in the

Debugging / testing options:

-debug =

Output debug information (default:-nodebug, provide yes

Optional). If not provided or = 1

Output all debugging information. It could be: net,tor

Mempool,http,bench,zmq,db,rpc,estimatefee,addrman

Selectcoins,reindex,cmpctblock,rand,prune,proxy,mempoolrej

Libevent,coindb,qt,leveldb .

-debugexclude =

Exclude debugging information for categories. Can be used in combination

Use-debug = 1 to output debug logs for all but one category

Or more specified categories.

-help debugging

Show all debugging options (usage:-help- help-debug)

-logips

Include the IP address in the debug output (default: 0)

-logtimestamps

Pre-debug output with timestamp (default: 1)

-maxtxfee =

Maximum total cost used in a single wallet transaction or in the original transaction (in BTC)

Transaction; setting this too low may abort large transactions

(default: 0.10)

-printtoconsole

Send trace / debug information to the console (default: 1, when there is no-daemon. Forbidden

Log to file, set-nodebuglogfile)

-shrinkdebugfile

Shrink the debug.log file when the client starts (default: 1, when there is no-debug)

-uacomment =

Attach comments to the user agent string

Chain selection:

-testnet

Use test chain

Node Relay options:

-bytespersigop

Equivalent bytes per sigop in relay and mining transactions

(default: 20)

-datacarrier

Relay and my data carrier transaction (default: 1)

-datacarriersize

The most big data size of the data carrier transactions we relay and mine

(default: 83)

-mempoolreplacement

Enable transaction substitution in the memory pool (default: 1)

-minrelaytxfee =

The cost less than this (BTC / kB) is considered to be zero cost for the relay.

Mining and creating transactions (default: 0.00001)

-whitelistforcerelay

This is true even if it violates the transaction compulsory relay of whitelist partners.

Local Relay Policy (default: 1)

-whitelistrelay

Accept relay transactions received from whitelisted peers, even if

Do not forward the deal (default: 1)

Block creation options:

-blockmaxweight =

Set the maximum BIP141 block weight (default: 3996000)

-blockmintxfee =

Set the minimum rate for transactions to be included in the block (BTC / kB)

Create. (default: 0.00001)

RPC server options:

-rest

Accept public REST requests (default: 0)

-rpcallowip =

Allows JSON-RPC connections from the specified source. What applies to is

Single IP (e.g. 1.2.3.4), network / netmask (e.g.

1.2.3.4Universe 255.255.255.0) or network / CIDR (for example, 1.2.3.4Universe 24). This

Options can be specified multiple times

-rpcauth =

The user name and hash password for the JSON-RPC connection. Field

The format is:: $. One

The canonical python script is included in share / rpcauth. Client

And then usually use the

Rpcuser = / rpcpassword = parameter pair. This

Options can be specified multiple times

-rpcbind = [: Port]

Binds to the given address to listen for JSON-RPC connections. This option is

Unless-rpcallowip is also passed, it will be ignored. Port is optional

Override-rpcport. Use the port representation of [host]: IPv6. This

Options can be specified multiple times (default values: 127.0.0.1 and

:: 1 is localhost, or if-rpcallowip is specified

0.0.0.0 and:: that is, all addresses)

-rpccookiefile =

The location of the authentication cookie. The relative path will be prefixed with a

A network-specific database location. (default: data directory)

-rpcpassword =

Password for JSON-RPC connection

-rpcport =

Listen for JSON-RPC connections on the (default: 8332 or testnet:

18332)

-rpcserialversion

Sets the serialization of the original transaction or block hexadecimal returned

Non-verbose mode, non-segwit (0) or segwit (1) (default: 1)

-rpcthreads=

Sets the number of threads for service RPC calls (default: 4)

-rpcuser=

User name of the JSON-RPC connection

-server

Accept command line and JSON-RPC commands

Thank you for reading this article carefully. I hope the article "how to use bitcoind commands" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report