Basic commands to interact with the Bitcoin Core RPC console
Basic commands to interact with the Bitcoin Core RPC console
Original Bitcoin client/API calls list - Bitcoin Wiki
Solo Mining with setgenerate true set generate true -1
API reference (JSON-RPC) - Bitcoin Wiki
PSA: Run A Full Node on Windows -- without the wallet!
For a long time now, I've wanted to run a full bitcoin node on my Windows computer and NOT run the wallet part of Bitcoin Core (formerly -QT). I wanted to contribute a full node to the network, but not use the Core wallet, nor have the wallet software load up and sit there taking up system resources for no reason except to contribute the node. I read and asked a lot, before I finally figured it out. Here's how: Dowload and install Bitcoin Core from the official download page -- https://bitcoin.org/en/download -- but DO NOT START THE PROGRAM in the usual way. Instead, open the Windows Command Prompt program and enter cd\program files\bitcoin\daemon [return] .. then bitcoind [return] That starts the program, even though you see no indication of that in the window. You can't close the Command Prompt window or the program stops; but you can minimize it to the tray and it continues to run fine. After it's downloaded the blockchain and begun doing its regular function, you can check that it's running well this way: Open a second Command Prompt window and enter cd\program files\bitcoin\daemon [return] .. then bitcoin-cli getinfo If you've opened Port 8333, you should see more than 8 connections, and all is well with the world. To stop running the node, you can just close the Command Prompt window it's running in.
My Easter recipe: a battery-powered Raspberry Pi2 bitcoin node!
Just before festivities I bought a new Raspberry pi2, I wanted to see with my eyes if it could be a good Bitcoind node. The result is funny: It's working fine - also on battery power! Here's a quick pic: http://imgur.com/ddMG19b The hardware recipe is easy:
an Rpi2 with any fancy case
a "certified" wi-fi dongle (the Edimax seems good)
a good 64Gb USB drive (I'm using a Verbatim USB3), don't waste money on "fastest USB3 products on market", they are useless for this experiment
a portable battery-power-supply (better if it works also for tablets)
a micro-usb cable ("quick recharge" compatible, important!)
It's important to avoid the need for any powered USB hub, everything should work connected directly on the Rpi itself. On the software side:
"git clone" the Bitcoin repo, compile without GUI
add the mobile phone (or tablet) tethering parameters on the wpa-supplicant.conf file
copy the blockchain files on the USB drive, get them from your desktop computer (otherwise you'll need a lot of time using the Rpi for the full 35Gb blockchain download)
setup the USB drive mount at boot (edit the fstab file)
setup the bitcoind daemon at boot (crontab -e seems fine)
install the avahi-daemon package and change the host name (optional, useful for ssh stuff while on mobility)
After the boot (and after the blockchain align) it's important that the Rpi red light stays always on. If it blinks or stay off there's not enough USB power and there's the risk that the connection drops or the USB drive isn't powered. Install on the phone a good ssh client (e.g. Server Auditor for iOS), just add the raspberrypi.local host (or whatever you've set) to access the Rpi console. Every time you do a reboot allow 2-3 minutes of "blockchain check" and you are ready (issue a "bitcoin-cli getinfo" on the console to be sure). Don't pull the USB cable when you want to turn it off, it can damage the file system, better if you issue a "shutdown -hP now" by ssh and wait some seconds. Next steps:
try to run a local Bitcore webwallet via node.js
(difficult) install a local block explorer - it needs a larger USB drive
add a small button to the GPIOs for shutdown command without opening the ssh shell
Hi guys, I just setup Bitcoin XT on a (headless) Linux box. Since I'm running Debian, I decided to try Mike Hearn's APT repo… Everything went smoothly and the node was up and running in no time. However, it doesn't seem like bitcoin-cli was included so I can't run commands like 'bitcoin-cli getinfo' at the moment. I can see that the node is running fine by looking at the logs, but was just wondering whether anyone else has come across this and already found the solution (or might find the solution in this thread later since nothing comes up in search right now)? Should I just compile it separately? It's late here, but I'll check back in tomorrow. Thanks for your help!
[P2pool] How to make your own personal p2pool Node!
Tired of getting no block rewards and sending many dead shares? Need a p2pool node close to your miner? MAKE YOUR OWN! :D And, Yep, P2pools give 0.5% Rewards to block finders! Here's some info about p2ools: http://whatisp2pool.com/ The stronger the P2Pool network becomes the more resistant the digibyte network is to 51% attacks! Oh and, P2pools are DDOS proof! Now that's News! So if your node gets DDOS'd .. you dont lose your shares as the shares have been saved in the p2pool, its called the sharechain. So you get paid anyhow! Thanks to the p2pool network. and you ccan set your workers to another pool using the "--failover only" command in cgminer (if im not wrong) and get it back to work on the p2pool network! TL;DR; P2POOL = 1 Big fat network Decentrazlized pool! STEPS TO MAKE A P2POOL: Install Ubuntu server or Desktop if you want http://www.ubuntu.com/download/ or u can use a VPS (VirtualPrivateServer -- Link Below with coupon code) So Let's start off in the command line (Open Terminal.. and all you have to do is Cut, Copy Paste! ;) ) Start by updating and upgrading Ubuntu, you know you want the best ;)
git clone git://github.com/digibyte/DigiByteProject.git digibyte #renaming makes it easier ;) cd ~/digibyte/src mkdir obj make -f makefile.unix USE_UPNP=- sudo cp digibyted /usbin cd ~
After it has compiled try running 'digibyted'
If you get an error saying you need to make the digibyte.conf file, good! :) If it doesnt give you that error, make sure you followed the compiling steps appropriately. So, Lets create the conf file here...
cd .digibyte #edited from 'digibyted' .. fixed!! nano digibyte.conf
Paste the following, CHANGING THE USERNAME AND PASS!! make sure to take note of both, you'll need these later!
Press 'CTRL' + ' X', and then 'Y' to save when prompted
cd ~ ./digibyte/src/digibyted ./digibyte/src/digibyted getinfo
Make sure you check the latest block in the block chain or on your local DigiByte Wallets. This is to see how far your p2pool node has gotten! This is gonna take quite a while so lets CONTINUE! Let's get the p2pool software and frontend in! Install the p2pool dependencies!
Time to edit and customise the html code to personalise your p2pool's frontend. Feel free to change the p2pool name and if you're an advanced user, feel free to add your own frontend from git hub after removing the web-static folder. (OPTIONAL: by using rm -f -r web-static #in that directory. And then you can choose whichever frontend you want! by cloning it in the web-static folder) Editing the current frontend html!
cd .. cd web-static nano index.html
After personalising the page, i.e. changing the p2pool name and adding some info! Lets go back and check how far the block downloading has gotten! You can check this by typing this in the command line after going back to the root directory:
cd ~ ./digibyte/src/digibyted getinfo
This is gonna take a while so might as well check for updates again :P
sudo apt-get update sudo apt-get upgrade
After making sure that all the blocks have been synced locally! We're ready to run the p2pool node! Simply enter the string below in the command line, entering your USERNAME and PASS that you saved earlier!
If you want to charge a fee for your node add this to your string, adding your fee address!:
--fee 1.0 --address NEWDGBADDRESS
To see if the node is up and running enter this in the command line:
screen -x myp2pool
'CTRL' + 'A' + 'D' to close the terminal if you press 'CTRL' + 'C', it will terminate the p2pool program and you'll have to restart the pool by using the string above! Once, Everything is setup as planned! Check your p2pool node's ip Address by entering this into the command line:
inet addr: 192.168.1.1 #You'll see a line like this.
So, Your cgminer string should look something like this:
cgminer --scrypt -o 192.168.1.1:9022 -u DGBADDRESS -p x
And your p2pool WEB ADDRESS should look like this:
example: http://192.168.1.1:9022/ You can monitor your p2pool using that web address! Enjoy, your personal p2pool node!! :D If for whatever reason the server shuts off and you need to restart the p2pool node, you should run digibyted again and after it has synced successfully, just type in your p2pool string:
Bitcoin Core 0.10.0 released | Wladimir | Feb 16 2015
Wladimir on Feb 16 2015: Bitcoin Core version 0.10.0 is now available from: https://bitcoin.org/bin/0.10.0/ This is a new major version release, bringing both new features and bug fixes. Please report bugs using the issue tracker at github: https://github.com/bitcoin/bitcoin/issues The whole distribution is also available as torrent: https://bitcoin.org/bin/0.10.0/bitcoin-0.10.0.torrent magnet:?xt=urn:btih:170c61fe09dafecfbb97cb4dccd32173383f4e68&dn;=0.10.0&tr;=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr;=udp%3A%2F%2Ftracker.publicbt.com%3A80%2Fannounce&tr;=udp%3A%2F%2Ftracker.ccc.de%3A80%2Fannounce&tr;=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr;=udp%3A%2F%2Fopen.demonii.com%3A1337&ws;=https%3A%2F%2Fbitcoin.org%2Fbin%2F Upgrading and downgrading How to Upgrade If you are running an older version, shut it down. Wait until it has completely shut down (which might take a few minutes for older versions), then run the installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or bitcoind/bitcoin-qt (on Linux). Downgrading warning Because release 0.10.0 makes use of headers-first synchronization and parallel block download (see further), the block files and databases are not backwards-compatible with older versions of Bitcoin Core or other software:
Blocks will be stored on disk out of order (in the order they are
received, really), which makes it incompatible with some tools or other programs. Reindexing using earlier versions will also not work anymore as a result of this.
The block index database will now hold headers for which no block is
stored on disk, which earlier versions won't support. If you want to be able to downgrade smoothly, make a backup of your entire data directory. Without this your node will need start syncing (or importing from bootstrap.dat) anew afterwards. It is possible that the data from a completely synchronised 0.10 node may be usable in older versions as-is, but this is not supported and may break as soon as the older version attempts to reindex. This does not affect wallet forward or backward compatibility. Notable changes Faster synchronization Bitcoin Core now uses 'headers-first synchronization'. This means that we first ask peers for block headers (a total of 27 megabytes, as of December 2014) and validate those. In a second stage, when the headers have been discovered, we download the blocks. However, as we already know about the whole chain in advance, the blocks can be downloaded in parallel from all available peers. In practice, this means a much faster and more robust synchronization. On recent hardware with a decent network link, it can be as little as 3 hours for an initial full synchronization. You may notice a slower progress in the very first few minutes, when headers are still being fetched and verified, but it should gain speed afterwards. A few RPCs were added/updated as a result of this:
getblockchaininfo now returns the number of validated headers in addition to
the number of validated blocks.
getpeerinfo lists both the number of blocks and headers we know we have in
common with each peer. While synchronizing, the heights of the blocks that we have requested from peers (but haven't received yet) are also listed as 'inflight'.
A new RPC getchaintips lists all known branches of the block chain,
including those we only have headers for. Transaction fee changes This release automatically estimates how high a transaction fee (or how high a priority) transactions require to be confirmed quickly. The default settings will create transactions that confirm quickly; see the new 'txconfirmtarget' setting to control the tradeoff between fees and confirmation times. Fees are added by default unless the 'sendfreetransactions' setting is enabled. Prior releases used hard-coded fees (and priorities), and would sometimes create transactions that took a very long time to confirm. Statistics used to estimate fees and priorities are saved in the data directory in the fee_estimates.dat file just before program shutdown, and are read in at startup. New command line options for transaction fee changes:
-txconfirmtarget=n : create transactions that have enough fees (or priority)
so they are likely to begin confirmation within n blocks (default: 1). This setting is over-ridden by the -paytxfee option.
-sendfreetransactions : Send transactions as zero-fee transactions if possible
(default: 0) New RPC commands for fee estimation:
estimatefee nblocks : Returns approximate fee-per-1,000-bytes needed for
a transaction to begin confirmation within nblocks. Returns -1 if not enough transactions have been observed to compute a good estimate.
estimatepriority nblocks : Returns approximate priority needed for
a zero-fee transaction to begin confirmation within nblocks. Returns -1 if not enough free transactions have been observed to compute a good estimate. RPC access control changes Subnet matching for the purpose of access control is now done by matching the binary network address, instead of with string wildcard matching. For the user this means that -rpcallowip takes a subnet specification, which can be
a single IP address (e.g. 220.127.116.11 or fe80::0012:3456:789a:bcde)
a network/CIDR (e.g. 18.104.22.168/24 or fe80::0000/64)
a network/netmask (e.g. 22.214.171.124/255.255.255.0 or fe80::0012:3456:789a:bcde/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)
An arbitrary number of -rpcallow arguments can be given. An incoming connection will be accepted if its origin address matches one of them. For example: | 0.9.x and before | 0.10.x | |--------------------------------------------|---------------------------------------| | -rpcallowip=192.168.1.1 | -rpcallowip=192.168.1.1 (unchanged) | | -rpcallowip=192.168.1.* | -rpcallowip=192.168.1.0/24 | | -rpcallowip=192.168.* | -rpcallowip=192.168.0.0/16 | | -rpcallowip=* (dangerous!) | -rpcallowip=::/0 (still dangerous!) | Using wildcards will result in the rule being rejected with the following error in debug.log:
Error: Invalid -rpcallowip subnet specification: *. Valid are a single IP (e.g. 126.96.36.199), a network/netmask (e.g. 188.8.131.52/255.255.255.0) or a network/CIDR (e.g. 184.108.40.206/24).
REST interface A new HTTP API is exposed when running with the -rest flag, which allows unauthenticated access to public node data. It is served on the same port as RPC, but does not need a password, and uses plain HTTP instead of JSON-RPC. Assuming a local RPC server running on port 8332, it is possible to request:
In every case, EXT can be bin (for raw binary data), hex (for hex-encoded binary) or json. For more details, see the doc/REST-interface.md document in the repository. RPC Server "Warm-Up" Mode The RPC server is started earlier now, before most of the expensive intialisations like loading the block index. It is available now almost immediately after starting the process. However, until all initialisations are done, it always returns an immediate error with code -28 to all calls. This new behaviour can be useful for clients to know that a server is already started and will be available soon (for instance, so that they do not have to start it themselves). Improved signing security For 0.10 the security of signing against unusual attacks has been improved by making the signatures constant time and deterministic. This change is a result of switching signing to use libsecp256k1 instead of OpenSSL. Libsecp256k1 is a cryptographic library optimized for the curve Bitcoin uses which was created by Bitcoin Core developer Pieter Wuille. There exist attacks against most ECC implementations where an attacker on shared virtual machine hardware could extract a private key if they could cause a target to sign using the same key hundreds of times. While using shared hosts and reusing keys are inadvisable for other reasons, it's a better practice to avoid the exposure. OpenSSL has code in their source repository for derandomization and reduction in timing leaks that we've eagerly wanted to use for a long time, but this functionality has still not made its way into a released version of OpenSSL. Libsecp256k1 achieves significantly stronger protection: As far as we're aware this is the only deployed implementation of constant time signing for the curve Bitcoin uses and we have reason to believe that libsecp256k1 is better tested and more thoroughly reviewed than the implementation in OpenSSL.  https://eprint.iacr.org/2014/161.pdf Watch-only wallet support The wallet can now track transactions to and from wallets for which you know all addresses (or scripts), even without the private keys. This can be used to track payments without needing the private keys online on a possibly vulnerable system. In addition, it can help for (manual) construction of multisig transactions where you are only one of the signers. One new RPC, importaddress, is added which functions similarly to importprivkey, but instead takes an address or script (in hexadecimal) as argument. After using it, outputs credited to this address or script are considered to be received, and transactions consuming these outputs will be considered to be sent. The following RPCs have optional support for watch-only: getbalance, listreceivedbyaddress, listreceivedbyaccount, listtransactions, listaccounts, listsinceblock, gettransaction. See the RPC documentation for those methods for more information. Compared to using getrawtransaction, this mechanism does not require -txindex, scales better, integrates better with the wallet, and is compatible with future block chain pruning functionality. It does mean that all relevant addresses need to added to the wallet before the payment, though. Consensus library Starting from 0.10.0, the Bitcoin Core distribution includes a consensus library. The purpose of this library is to make the verification functionality that is critical to Bitcoin's consensus available to other applications, e.g. to language bindings such as [python-bitcoinlib](https://pypi.python.org/pypi/python-bitcoinlib) or alternative node implementations. This library is called libbitcoinconsensus.so (or, .dll for Windows). Its interface is defined in the C header [bitcoinconsensus.h](https://github.com/bitcoin/bitcoin/blob/0.10/src/script/bitcoinconsensus.h). In its initial version the API includes two functions:
bitcoinconsensus_verify_script verifies a script. It returns whether the indicated input of the provided serialized transaction
correctly spends the passed scriptPubKey under additional constraints indicated by flags
bitcoinconsensus_version returns the API version, currently at an experimental 0
The functionality is planned to be extended to e.g. UTXO management in upcoming releases, but the interface for existing methods should remain stable. Standard script rules relaxed for P2SH addresses The IsStandard() rules have been almost completely removed for P2SH redemption scripts, allowing applications to make use of any valid script type, such as "n-of-m OR y", hash-locked oracle addresses, etc. While the Bitcoin protocol has always supported these types of script, actually using them on mainnet has been previously inconvenient as standard Bitcoin Core nodes wouldn't relay them to miners, nor would most miners include them in blocks they mined. bitcoin-tx It has been observed that many of the RPC functions offered by bitcoind are "pure functions", and operate independently of the bitcoind wallet. This included many of the RPC "raw transaction" API functions, such as createrawtransaction. bitcoin-tx is a newly introduced command line utility designed to enable easy manipulation of bitcoin transactions. A summary of its operation may be obtained via "bitcoin-tx --help" Transactions may be created or signed in a manner similar to the RPC raw tx API. Transactions may be updated, deleting inputs or outputs, or appending new inputs and outputs. Custom scripts may be easily composed using a simple text notation, borrowed from the bitcoin test suite. This tool may be used for experimenting with new transaction types, signing multi-party transactions, and many other uses. Long term, the goal is to deprecate and remove "pure function" RPC API calls, as those do not require a server round-trip to execute. Other utilities "bitcoin-key" and "bitcoin-script" have been proposed, making key and script operations easily accessible via command line. Mining and relay policy enhancements Bitcoin Core's block templates are now for version 3 blocks only, and any mining software relying on its getblocktemplate must be updated in parallel to use libblkmaker either version 0.4.2 or any version from 0.5.1 onward. If you are solo mining, this will affect you the moment you upgrade Bitcoin Core, which must be done prior to BIP66 achieving its 951/1001 status. If you are mining with the stratum mining protocol: this does not affect you. If you are mining with the getblocktemplate protocol to a pool: this will affect you at the pool operator's discretion, which must be no later than BIP66 achieving its 951/1001 status. The prioritisetransaction RPC method has been added to enable miners to manipulate the priority of transactions on an individual basis. Bitcoin Core now supports BIP 22 long polling, so mining software can be notified immediately of new templates rather than having to poll periodically. Support for BIP 23 block proposals is now available in Bitcoin Core's getblocktemplate method. This enables miners to check the basic validity of their next block before expending work on it, reducing risks of accidental hardforks or mining invalid blocks. Two new options to control mining policy:
-datacarrier=0/1 : Relay and mine "data carrier" (OP_RETURN) transactions
if this is 1.
-datacarriersize=n : Maximum size, in bytes, we consider acceptable for
"data carrier" outputs. The relay policy has changed to more properly implement the desired behavior of not relaying free (or very low fee) transactions unless they have a priority above the AllowFreeThreshold(), in which case they are relayed subject to the rate limiter. BIP 66: strict DER encoding for signatures Bitcoin Core 0.10 implements BIP 66, which introduces block version 3, and a new consensus rule, which prohibits non-DER signatures. Such transactions have been non-standard since Bitcoin v0.8.0 (released in February 2013), but were technically still permitted inside blocks. This change breaks the dependency on OpenSSL's signature parsing, and is required if implementations would want to remove all of OpenSSL from the consensus code. The same miner-voting mechanism as in BIP 34 is used: when 751 out of a sequence of 1001 blocks have version number 3 or higher, the new consensus rule becomes active for those blocks. When 951 out of a sequence of 1001 blocks have version number 3 or higher, it becomes mandatory for all blocks. Backward compatibility with current mining software is NOT provided, thus miners should read the first paragraph of "Mining and relay policy enhancements" above. 0.10.0 Change log Detailed release notes follow. This overview includes changes that affect external behavior, not code moves, refactors or string updates. RPC:
f923c07 Support IPv6 lookup in bitcoin-cli even when IPv6 only bound on localhost
b641c9c Fix addnode "onetry": Connect with OpenNetworkConnection
Method 1 PPA (the easy way, works for bitcoin only) First we update the operating system and install the necessary packages for building our wallet. sudo apt-get -y update && sudo apt-get -y upgradesudo apt-get -y install libdb++-dev build-essential libtool autotools-dev autoconf libssl-dev libboost-all-dev python-software-properties curl vim Common operations Listing my bitcoin addresses. Listing the bitcoin addresses in your wallet is easily done via listreceivedbyaddress.It normally lists only addresses which already have received transactions, however you can list all the addresses by setting the first argument to 0, and the second one to true. Getting Started With Bitcoin Mining. You will learn (1) how bitcoin mining works, (2) how to start mining bitcoins, (3) what the best bitcoin mining software is, (4) what the best bitcoin mining hardware is, (5) where to find the best bitcoin mining pools and (6) how to optimize your bitcoin earnings. Bitcoin Knots is a derivative of Bitcoin Core (since 2011 December) with a collection of improvements backported from and sometimes maintained outside of the master git tree. More details on the enhancements in Bitcoin Knots are listed below the downloads . Notable changes Wallet changes Segwit Wallet. Bitcoin Core 0.16.0 introduces full support for segwit in the wallet and user interfaces. A new -addresstype argument has been added, which supports legacy, p2sh-segwit (default), and bech32 addresses. It controls what kind of addresses are produced by getnewaddress, getaccountaddress, and createmultisigaddress.
New Hacker Bitcoin Private Key with Command prompt
Bitcoin Miner Machine is the perfect Windows mining software for beginners and experts alike, offering a ton of useful features that will help anyone get the greatest amount of Bitcoins with the ... Bitcoin miner pro supports the most popular Bitcoin Mining software, including OpenCL Miner for AMD graphics cards, CUDA Miner for Nvidia cards, Bitcoin Miner Machine for any ASIC Miner, and even ... By offering a simple and easy to use graphical interface, Bitcoin Miner Software will let you take full control of your Bitcoin mining process without requiring complicated commands or constantly ... BEST BITCOIN MINING SOFTWARE 2020 - FREE This is an alternative cryptocurrency for everyone, rich or poor. It was created on the basis that bitcoin itself is flawed. While the block chain system ... Bitcoin Miner Pro V 4.07.02 will let you take full control of your Bitcoin mining process without requiring complicated commands or constantly editing configuration files.