What are the segregated witness tradeoffs?

If I understand correctly, there is a second Merkle tree of witnesses mirroring the transaction data. The witness tree's root is committed to in the coinbase, but otherwise this second tree lives outside of the block.

That is my understanding as well.

  Don't the witnesses still have to be relayed to other nodes to validate?

Only nodes that actually care about the signatures. There are thousands of SPV nodes, for example, that want to be able to calculate the TXID of the transactions they care about but that don't actually need the scriptSigs other than that, since SPV nodes rely on confirmations for security instead of fully checking scripts.

  Why is it acceptable now to send more data, but raising the block size was dangerous, and exclusionary of nodes on slow connections before?

Many people rejected the idea of increasing the block size limit simply because it was a hard fork. The extra data and exclusion of some nodes is still an issue, and I'm sure there will still be plenty of arguments about how to count the witness data. This just eliminates/postpones the hard fork max block size debate.

Pieter Wuille's current proposal is to give a 75% discount on signature data, increasing the effective max block size to about 4 MB in the worst case, but that would probably never come close to being realized in any normal, non-malicious, circumstance. I would estimate that a full 1M normal block would be a 1.8 MB block of completely SW transactions.

  Also, if witnesses are outside of the block and prunable, how will a fresh fully validating node get up to date? If a smaller subset of full nodes hosts all witnesses, does that trade off security for amount of transactions in a block?

When a full node comes online now, it currently doesn't even check the script evaluations in anything older than the most recent checkpoint. In this sense, it's not a 'fully validating' node, it's more of a 'fully validating from 6 months ago onward' node. But, unfortunately, to build the UTXO set right now you still need to download the scriptSigs, even though they're not used for any validation. The Segregated witness change makes it so that in the case of SW transactions, excessively old scriptSigs that wouldn't be verified anyway don't have to also be downloaded, because the TXIDs don't use them.

Note that some transactions using Segregated witness doesn't magically make old-style transactions more prunable, unfortunately. However, if Segregated witness were fully in use by all transactions today, then in 5 years from now, a node that was getting up to sync wouldn't have to download a lot of the signature data from the past 5 years, just the most recent signature data.

So, there is a security trade-off there, but it's the exact same trade off that already exists. With SW, though, you just have to download less data (~60% less of the new SW transaction data) for the same security.


PoS (Proof of Stake) what happens to the coin age of the change after I send an amount?

Their age is reset.

You're creating a transaction with two outputs: sent amount and change. AFAIU, the age for staking is calculated from the confirmation height of the transaction that created them. Since each was newly created in the transaction, the age for both is reset.


Peergroup download of the blockchain stalls?

The library is abandoned 7 years ago, and I don't see that anybody picked it up for maintenance https://github.com/search?utf8=%E2%9C%93&q=bitcoinsharp&type= Try to base your application on a library that is still maintained.


If I want to build up a website to offer bitcoin exchange service, how to add my site to https://bitcoin.org/en/exchanges

You could probably open a pull request to the bitcoin.org github repository here: https://github.com/bitcoin-dot-org/bitcoin.org

Specifically, this file is the one which provides the content for the exchanges page: https://github.com/bitcoin-dot-org/bitcoin.org/blob/master/_templates/exchanges.html

Then the owners of that project can review the change and decide whether it is an appropriate addition to the website. Keep in mind that if you are just starting out a new exchange, it may not be established/trusted well enough to be featured on such a site, and that is up the site owners' discretion.


Simple solution, here is what I did.

client bitcoin.conf

regtest=1
addnode=$ADDR_OF_HOST

then I opened port 18444 on host and all transactions synced on client.


Confused by the term: trading partners. And how to convert more fringe currencies back to bitcoin

Trading pairs like BTC-ETC at an exchange means that you pay BTC to receive ETH. Your exit should be possible with sending IOTA, SAN to respective wallets supporting these coins. Or you trade back to BTC and send this to your personal wallet or to another trading site where you sell your BTC against USD. You cannot get USD out of Bitfinex presently it seems.


In order to "pay someone back", must I ask them for a return address?

Assuming that the user uses the standard client, or in fact any client, is a very strong assumption. If the user is using an eWallet service such as Instawallet, in all likelihood the user will not get the funds back, they will be held by the operator and possibly credited to one of his other clients.

Even if the input addresses are controlled in some way by the user, paying back to one of them can cause confusion regarding the payment's source - it will look as if the payment was for whatever the address was originally associated with. If there is a change address controlled by the user, it is associated uniquely with the payment to you so the information exists to identify it, though the client may not display it properly.


Can I send a transaction with zero fees?

You can create transaction with zero fee. You can try to broadcast it to your peers. But there is no chance that your peers will accept it and rebroadcast.

  And if I could, what would happen?

The same as for regular transaction with fees. Ignoring zero fee is not a consensus rule, but coded in most nodes.

  Would miners ignore my request?

Today yes

  Who sets the price of fees for transactions?

Market


What is the different between BitcoinCore and other full node wallet?

Bitcoin Core is primarily a node (also known as a peer) intended to join the Bitcoin network. It includes wallet functionality, but its primary purpose is to interact with the Bitcoin p2p network, and help validate all blocks and transactions for adherence to the consensus rules, which are encoded in the Bitcoin Core source code.
Due to this, it also functions as the reference implementation of the Bitcoin Protocol.
If you had another piece of software that connects to the Bitcoin network and performs all functions a full node does (checking block and transaction validity, following the best chain, serving data to other nodes, etc.) and it offered a wallet, it would be functionally equivalent to Bitcoin Core.
However, there are not a whole lot of these softwares around - btcd is one of the most well known and complete ones, but most projects aim to just build a wallet on top of protocols like Simplified Payment Verification (SPV), electrum, or custom solutions to share only the data required by the wallet, instead of the entirety of the Bitcoin blockchain.
Note that even running Bitcoin Core in pruned mode disqualifies it from being a full node, as it is no longer able to fulfill the function of being able to serve historical data to other nodes.


How to exchange bitcoins held in electrum to ethereum?

In electrum wallet do I need to subtract the Bitcoin mining fee manually, or I can send all my bitcoins in the wallet to shapeshift/exchangelly?

You just send Bitcoin with sufficient fee in a same way that you send Bitcoin to a standard address.

Here is the quick way to exchange BTC for ETH at Shapeshift.io
1. Paste your Bitcoin and Ethereum addresses in the filed below

Send some Bitcoins that you want to exchange to the address where shapeshift gives. It depends on how fast you want to get the transaction done. If you want to get it done in 10 mins, you probably have to pay approximately 500 satoshis/byte for the mining fee.


Found an old wallet with transaction history with coins (unconfirmed), but no balance

To check balance, just use this link: https://blockchain.info/address/your-wallet-address-here to check the balance of any wallet. You can also see all the transactions happened through that link.


Flatpak bitcoin-core not generating .cookie file

I ran bitcoind from Flatpak and it outputted the .cookie file


Are there any cryptocurrencies with no mining beyond participation?

On Bitcoin and Red Balloons suggests a method to incentivize network nodes, however no cryptocurrency implements it.


I just sent bitcoin to my bitcoin cash wallet

There may not be a problem... I just asked my son for his bitcoin wallet key (btc) and also for his bitcoin cash wallet key (bch) and also for a few other of his wallet keys (ETH, LTC etc) so that I could send him a small amount of each for his Christmas present... I then noticed that his key for btc was exactly the same as his bch key so I asked him to check, he checked and assured me that they did in fact both have exactly the same key so it seems that one wallet can hold both btc and bch coins... I hope this helps... Best Wishes.


The block header contains the merkle root, but the full block itself contains all the transactions, in order of their appearance as merkle leaves.


Where Can i Buy Bitcoins without using exchange?

Check localbitcoins.com, which is a site allowing users to interact and buy/sell from each other without the traditional exchange 'features'.


Forgot wallet encryption password, are any brute force tools available?

There is a script provided by a forum user Revalin which can be used to attempt variations.  There is a forum user Rix who may be available for hire to provide assistance with this type of problem.

You can also try out this script:
https://bitcointalk.org/index.php?topic=170694.0


did you check that the offline wallet has the same addresses as the online wallet?

btw, please upgrade Electrum, version 1.9.8 is too old.


How can you tell if a Ardor / NXT public node is an archival node?

There are a few ways to do this, but I'll describe the most straight forward one. Find an archival node from http://www.peerexplorer.com/api_openapi_archival.

If you pick any one of the ip addresses in that list you can then query that node to verify if it is a archival node by calling its getBlockchainStatus function, for example: http://23.94.134.161:7876/nxt?requestType=getBlockchainStatus

In the reply you will se a list of services, where 'PRUNABLE' is the one you are after. Any node that has PRUNABLE in their services list is an archival node.

On a side note, you don't need to query a archival node in order to get the actual data. Any node with open API will do, as long as you specify the retrieve=true parameter which is added to most relevant API functions. By doing that on a non archival node, it will locate the data from an archival node and return it in the query. With a bit higher latency of course, since there are multiple network calls that needs to be done.


Connecting Genesis Mining to a bitcoin wallet

Yes, the payouts can be send to your Bitcoin wallet.

But as with all cloud mining services, they would not offer that service if they would not make any profit with it. Instead of investing $ 2400 on life time 10 TH/s mining, have you considered just buying Bitcoin worth $ 2400?

I tend to tell people to be cautious with such services and do the maths properly in advance. Let me do it for you:

10 TH/s, 2400 USD, 0 electricity, 0 fees:

You would lose around 1562 USD on that deal.


Eloipool & Stratum (Slush) seem to be the only active devs that will support the new ASIC chips and move away from the Getwork method.

Going to port an IronPython Version of Stratum :D

Use this as an educational process & maybe one day get a C# version to support the large body of .NET programmers out there

Thanks to Slush & Luke Jr


I study bitcoin and don't exactly understand that how new wallet
  generate?

I think you mean address, not wallet. A wallet is a software application that manages your addresses, and let's you view/spend the Bitcoin associated with them.

Address
A Bitcoin Address is a shortened form of Bitcoin script that locks the funds associated to it. In order to spend the funds, you must provide the necessary input to the script so that it equates to true when the script is executed by nodes on the Bitcoin network. This usually includes a signature of the transaction by the private key associated to the address. Here's an example of a Pay-to-Public-Key Hash (P2PKH) address:

P2PKH
16JrGhLx5bcBSA34kew9V6Mufa4aXhFe9X

Steps to generate the address:

Generate a random 32 byte private key. For example (do not use this): a966eb6058f8ec9f47074a2faadd3dab42e2c60ed05bc34d39d6c0e1d32b8bdf
Calculate it's corresponding public key using secp256k1 elliptic curve
023cba1f4d12d1ce0bced725373769b2262c6daa97be6a0588cfec8ce1a5f0bd09
Calculate the hash = RIPEMD160(SHA256(public-key)): 3a38d44d6a0c8d0bb84e0232cc632b7e48c72e0e
Encode Base58Check(hash): 16JrGhLx5bcBSA34kew9V6Mufa4aXhFe9X

See How to Generate a Bitcoin Address

  How we can found that the new wallet didn't generate before? What is
  complexity of search?

You want to make sure you don't use a private key that someone else might have. There is no way to search all the addresses that might be known because only addresses that have received coins are on the blockchain. Also, many addresses can be derived from the same key pair using different scripts, so you can't be sure you don't have a duplicate just by checking the address.

Since a private key can be nearly any 32 byte number, there are on the order of 10^70 possibilities. You will never have a collision with another key as long as you choose a sufficiently random source for key generation. This is the most important thing to remember. For example, don't use a Brainwallet or any other low entropy source to generate a private key because it makes it easier for someone to guess.


How to find out if Bitcoin is running ANYWHERE on my laptop

By using ps and searching for processes named bitcoin:

ps aux | grep bitcoin | grep -v grep

The second grep just filters out the first grep which might under some conditions show up as well.
If you want to kill them just use the following:

for i in `ps aux | grep bitcoin | grep -v | awk '{print $2}'` do
  kill $i
done

This searches for running bitcoin processes, reduces them to the pid field and for each found pid it sends a kill.


Send Bitcoin payments to any bank via API

The closest solution to this is setting up your supplier with a payments processor like Coinbase or Bitpay, who will convert your BTC to fiat instantly. However, there's no way to send BTC to a bank account directly without some action by the other party.


Why coin wallet shows only 1 connection?

As you said you have only 1 IP hardcoded in chainparams.cpp and when you run your wallet without any .conf file with added nodes it will lookup only for the IP given in the source code.

If you want to add more nodes just write:

addnode=ip.ip.ip.ip

in your coin.conf file. Restart your wallet and it will try to sync to new nodes also.

If you need to hardcode the IPs in your wallet you can contact me here: https://bitcointalk.org/index.php?topic=3196213.0


Why does Bitcoin keep transactions in a memory pool?

A large part of those transactions only needs to be kept for a limited time, in the order of 10 minutes. Once transactions are in a block they are removed from the mempool and the whole block is written to disk.

However while the transactions are in memory they are actually consulted quite often. For every newly incoming transactions checks need to be done to see for example whether it conflicts with any of the existing transactions or whether it's a child or parent to an already existing one.

Writing and reading them from disk will cause quite a bit of overhead. Which is actually important not just because it's a bit of overhead. For example it might open up DOS attacks where hostile nodes can create patterns of transactions that maximise reading and writing disk.

Also for transaction and block propagation speeds it is important that transactions are validated as quickly as possible.

Another point is that the amount of memory used by the mempool isn't actually huge anyway. Work is being done on better filtering of which transactions are allowed into the mempool in the first place (minimum fees and Child Pays for Parent etc.). As well as expunging older and/or low fee or otherwise lower interest transactions out when the mempool nears full.


How does Open Transactions handle counterfeiting of currencies?

In Open-Transactions, both parties have a copy of the "last signed receipt" for any given transaction.

The user forms the receipt and signs it, and then the server countersigns it.

Therefore the server cannot forge your receipt because the server does not have your private key.

When an issuer issues his currency onto an OT server, the server will have a copy of the issuer's "last signed receipt," which includes the server ID and shows the current amount that has been issued.

So the server cannot falsely claim to have a certain currency issued on that server, because the server cannot forge the issuer's signature (in the same way that the server cannot falsify your own receipt, since the server cannot forge your signature.)

The other users cannot forge your signature, nor can they forge the server's signature, nor can they forge the issuer's signature, so they cannot falsely issue units of your currency.

Also, each "last signed receipt" includes the current balance. For example, "My current balance is 100 clams. I am withdrawing 10 clams, and my new balance will thus be 90 clams." This receipt also contains the server ID, as well as the asset type ID, and must be signed by the user before being countersigned by the server. Therefore this is also true for the issuer's last signed receipt, the same as for any other user.


How long does it take for an exchange to send me bitcoins?

If you have the private key that relates to an address, then you can use that to instantly make transactions with bitcoins that are stored against that address.

However, most exchanges and online wallets provide you with a unique address without providing you with the private key for it. This is probably because they consolidate the bitcoins sent to all their addresses into a single address for the exchange, which helps them reduce transaction fees and also allows them to operate with a fractional reserve system.

In the case of a 3rd party controlling your bitcoins, you are at their mercy when it comes to the timeframe of the transaction.

There are some online wallet services that allow you to have the private key for your bitcoins, which gives you the ability to import the private key to your own client and spend your bitcoins. In that case, you have a good level of control over your bitcoins.

The relationship between addresses and a wallet: one wallet can hold many addresses, and can even hold bitcoins against hidden addresses that have received "change" from a previous transaction.


Mining profitability sounds too good! Where is the catch? (2017 edition)

There are many catches.

First of all, the difficulty will adjust and change as new hash power is added. That will then cause profitability to decrease. When new hash power is added to the network, the difficulty adjusts upwards to compensate for that so that blocks continue to be found at a 10 minute interval on average. This means that more work (i.e. more hash rate) is required to mine blocks and thus, given a fixed hash rate, profitability will decrease.

Also, the block reward halves every 4 or so years. That will also effect profitability.

Besides the technicalities of mining, there are also other forces in play that effect profitability. Mining hardware is kind of difficult to acquire; either you have to have millions of dollars to buy something from BitFury or buy equipment from Bitmain which can often be out of stock and unavailable.

Lastly, the price of Bitcoin has a significant effect on profitability. Only recently has Bitcoin's price been high enough to be profitable to mine in the United States (or in many other First World countries). The price of Bitcoin remains highly volatile, so investing a lot of money into mining equipment is extremely risky; the price could drop quickly within a few weeks and make mining very unprofitable.


Does bitcoind send message headers and payload separately in P2P protocol?

TCP is a stream protocol. Even though on the wire the stream is submitted as a series of IP messages, semantically it is just a stream of bytes.

This means that at the application level you shouldn't care about the message boundaries. Routers and other internet infrastructure can arbitrarily split up data into packets to fit in their underlying protocols (e.g. Ethernet has frames of at most 1500 bytes).


How would you create child pay for parent in bitcoind-cli

CPFP - Child Pays For Parent
Child transaction that spends unconfirmed output of parent transaction. Child transaction uses a higher fee rate, prioritized by miners, however it is dependent on other transaction (parent) so both are included in the same block.
Example:
Parent tx: https://blockstream.info/testnet/tx/1fe69c98608653dd129c0abc42324aca8d9fe463235c79c4a293e88eb29273cb
Child tx: https://blockstream.info/testnet/tx/fc07a13c4b919496efbdd5e62b57b9fe6e4080ed43c52a678bab30fe9e195d8e
I used the below commands in bitcoin core to do this:

getnewaddress to get new address. Sent 0.011 BTC to the address in Parent tx mentioned above.

getnewaddress get one more address for Child tx: tb1qazka5ds83ad4nz5qxxgz0dar59hpuradd4xwzj

listunspent 0 0 "[\"tb1qrldlrqajfwujwqfxcgeyrq90q5gw6uw9ge5xm6\"]"

Create a raw transaction to send 0.01 BTC to the address I got from Step 2 and 0.001 fee for the transaction (915.3 sat/vB)

createrawtransaction "[{\"txid\":\"1fe69c98608653dd129c0abc42324aca8d9fe463235c79c4a293e88eb29273cb\",\"vout\":1}]" "[{\"tb1qazka5ds83ad4nz5qxxgz0dar59hpuradd4xwzj\":0.01}]"

Sign transaction

signrawtransactionwithwallet 0200000001cb7392b28ee893a2c4795c2363e49f8dca4a3242bc0a9c12dd538660989ce61f0100000000ffffffff0140420f0000000000160014e8adda36078f5b598a80319027b7a3a16e1e0fad00000000

Broadcast transaction

sendrawtransaction 02000000000101cb7392b28ee893a2c4795c2363e49f8dca4a3242bc0a9c12dd538660989ce61f0100000000ffffffff0140420f0000000000160014e8adda36078f5b598a80319027b7a3a16e1e0fad0247304402203039e3673a8681a3625e38a7980cd9c17f4ee15acac07f60b8d055f9d495eb4a02204da56bec7b8c668bf57ebd082668e9af7fdb92d8cae7c5e9797919b177808c65012102ef547994e2371acbcf6300c343085ad9eee13edfdd00b52bc051006aa8b89d0400000000
Both transactions got confirmed in block 1865124


Tool for calculating profitable coin trading

I found a website that can convert any cryptocurrency into USD or other type of cryptocurrency

https://coinmarketcap.com/calculator/

Use this (mostly what your looking for):
https://www.currexy.com/cryptocurrency/converter

Hope this new link above found what you need, if not tell me


The time required for your transaction to be broadcasted over the network is normally a few milliseconds. A high HD utilization, an outdated processor or many small unspent outputs in your wallet can delay the time required by your client to perform the broadcasting.

The time, however, required for your transaction to get one confirmation, assuming that your client is synched and the transaction itself is valid and carries the right fee to get included right away into the next block, is currently around 8 minutes (6:45 to 8:43 minutes over the past 30 days).


What would a full node do if it finds an error?

From a local user's point of view, the most important function of the full node is to tell them when funds are received and confirmed.  For instance, if the local user is a merchant, this is what they need to know in determining when to ship goods to customers.

So from this perspective, the most important thing for a full node to do if it finds an invalid transaction or block is to ignore it.  For an invalid transaction, it needs to not report the transaction to the user as received funds.  For an invalid block, it needs to not report this as confirmation for the transactions in the block, nor as an additional confirmation for transactions confirmed in previous blocks.

A merchant considers an invalid transaction to be the same as no transaction at all.  A user who paid with an invalid transaction effectively just hasn't paid, and will be ignored until they come up with real funds.  An invalid block simply isn't a confirmation, and if we are waiting for some number of confirmations before shipping goods, then we just have to keep waiting.

Sure, the node can ban the other node that sent the offending data, or log an error, or whatever.  This is a good idea as far as saving bandwidth for valid data, or giving the user some general info about the state of network, or aiding in debugging.  But all this is secondary.


How many channels of Lightning Network can I open in one transaction?

Theoretically this would be possible but the entire work flow of channel creation would be disturbed as you would have to wait for the commitment signed message of each channel before broadcasting the funding TX.

Also currently the funding TX is used to verify the existence of a channel in the gossip protocol.

So yes theoretically this would work. Practicalky this would yield quite some protocol changes


How to create random address from dogecoin?

Each address is an individual address. You can have multiple addresses in one wallet, but you cannot have multiple addresses pointing to the same key.

Whatever wallet system you are using should have an option to generate new addresses, either as part of an HD wallet or as individual keys. You should be able to use that to generate new addresses as required.

Remember to backup the wallet each time you generate an address if it is not an HD wallet, or remember to backup your seed words if it is.


QT wallet never syncronizes; often crashes; is locked and not showing attempt to send BTC

Two actions here:

Back up your wallet.dat file

You will most likely find it here, based on these instructions:
https://en.bitcoin.it/wiki/Securing_your_wallet#Windows_2

  C:\Documents and Settings\YourUserName\Application data\Bitcoin
  (Windows XP)

  C:\Users\YourUserName\Appdata\Roaming\Bitcoin (Windows Vista and 7)

Update your bitcoin-qt instance to the latest version:
http://bitcoin.org/en/download


Is the probability of generating invalid blocks reduced by mining transactions unknown to others?

No, this strategy makes no sense because of how blocks are structured in the blockchain. Also, it is trivial for network participants to keep track of which transactions are confirmed, because that's the whole point of mining and the blockchain.

It is possible for miners to keep transactions secret and publish them when they discover a block. This may make sense when a transaction is secret in the first place, and has particularly large fees.

However:

Most transactions are not secret.
Usually, transactions get relayed via the Bitcoin network to the miners, so everyone else knows about the transactions as well.
Blocks compete in other ways besides the transactions included.
Blocks reference their predecessor. Therefore, when two blocks are found at the same time they will both reference the same predecessor. However, only one of the competing block can be part of the longest chain since the following block can only reference one or the other.
The problem of accidentally including a confirmed transaction is non-existent.
Every network participant keeps track of which Unspent transaction outputs (UTXO) exist. Transactions that try to spend a UTXO that was already used are invalid. This includes doublespends, and a replay of a confirmed transaction. Since each node will always consider exactly one block to be the current blockchain tip, it is trivial to notice that a transaction was previously confirmed. (Or rather, that it is no longer available to be confirmed.)


bitcoin-cli says transaction amount and balance are 0, but that's not the case

it seems to be that you are not on the testnet network. and i noticed that you're sending the commands with attaching -testnet

  bitcoin-cli -testnet getreceivedbyaddress 'mvKoQLrzovNbgALa2D7prh9pagd2QUKpWo'"

To run Bitcoin on testNet

Stop Bitcoin and open ~./bitcoin/bitcoin.conf using any text editor.

and add testnet=1 save and close.

try bitcoin-cli listunspent 0 9999 you should see the transaction.

Anyway if you were already running it on testnet network

try the following command to get address balance

bitcoin-cli getbalance "" 0 true

Arguments:

"account"         (string, optional)
minconf           (numeric, optional, default=1) Only include transactions confirmed at least this many times.
include_watchonly (bool, optional, default=false) Also include balance in watch-only addresses.


you may want to disable dns seeds

use connect=<ip_of_other_node>

instead addnode=<ip_of_other_node> in you coin.conf file.


How create a personal node c-lighting for create a new channel with other node

First you will need to decide which machine will fund the channel. In the current implementation only one party can lock funds to a multi-sig address. Let's say the machine that will fund the channel is A and the other is B. Now open the c-lightning in the terminal on machine B and type lightning-cli getinfo. It will give you a bunch of information. Look for the id and address. Then open the c-lightning on your machine A's terminal and type  lightning-cli connect id@address:9735. Where id and address are the info that you got from the getinfo command on machine B.

After connection has been established, you can then open the channel using the command lightning-cli fundchannel id satoshi [feerate] [announce] on your machine A. Here id is the node id of the node with whom you want to open the channel and satoshi is the amount of bitcoins in satoshis that you want to use to fund the channel. If you want to keep your channel private you can set announce to false.

If you want to expose the node to the internet and use the internal IP addresses you can do so by adding bind-addr=<internal_IP> and announce-addr=<public_IP> in the config files. You can also pass these commands in the terminal when starting the lightningd daemon, but it is easier to do it in config file so that you don't have to do it everytime you start the daemon.


You are correct all transactions other than coinbase transactions utilize previous transaction outputs. You can navigate those using any number of block explorers:

http://blockchain.info
http://blockcypher.com
http://blockr.io

And many more.


Do mined coins show up on blockchain explorers and can the balance of the addresses that mined the coins be seen?

They DO show up in the blockchain. The block reward(new mined coins) is sent to the miners address who has found a block via the coinbase transaction.

The coinbase transaction can be viewed and is found as the first transaction in every block.


What "Identity Verification" features will be part of the QT client?

He was probably referring to the payment protocol, which lets merchants (optionally) attach their online identity to payment requests, so customers can be assured they are actually paying who they think they are paying.

The payment protocol leverages the existing identity infrastructure that we all use every day on the web-- the same infrastructure used by every https-secured website.

There is lots of controversy about certificate authorities and lots of noise about building a better identity infrastructure for the Internet, and I personally look forward to the day when a better, decentralized identity infrastructure replaces the system we have now for both web browsing and Bitcoin payments.

And, again: if you don't want to use the payment protocol, you won't have to -- paying using a Bitcoin address will likely be supported forever. But if you are a merchant with a reputation to uphold, it will give your customers a much better payment experience if you do use it.


Why is Ripple's effective genesis ledger at 32570?

It doesn't mean anything for the average Ripple user. In January of 2013, a bug in the Ripple server caused ledger headers to be lost. All data from all running Ripple servers was collected, but it was insufficient to construct the ledgers. The raw transactions still survive, mixed with other transactions and with no information about which transaction went in which ledger.

Without the ledger headers, there's no easy way to reconstruct the ledgers. You need to know the hash of ledger N-1 to build ledger N, which complicates things.


How do bitcoin miners determine the next valid state of a ledger?

You are mixing the two things. It is not just miners, but the entire network of full nodes that ensure only valid transactions are included in a block. When a block is mined by a miner, it is propagated on the network. All the full nodes go through a detailed checklist (see here) to ensure that the block and the transactions within the block confine with the consensus protocol. This is unlike ledger based systems where an 'authority' is appointed to vote on transactions to maintain a state of the ledger.

Since Bitcoin is peer-to-peer, there is no central authority to control it. As a result, anyone can send any kind of transaction to the network, whether or not it is valid. You could simply send a transaction that sends someone else's coins to yourself. Now, if a miner tries to mine a block with those invalid transaction, the rest of the network will reject the block. So the entire effort (read electricity and time) that the miner put in will go waste as that block will not be added to the blockchain by the rest of the participants.

The 'random hash problem' also has other benefit. It ensures that Bitcoin blocks are mined every 10 minutes. Every 2016 blocks (or ~2 weeks) the difficulty is adjusted to ensure that the average block time remains at 10 minutes.

  And when do the other miner nodes validate that the proposed block is correct after one miner finishes?

As soon as the miner mines a block (finding a valid block whose header hash confines with the current network difficulty), it will propagate the block through the network. Now, the miner not just sends it to other miners, but also all the full nodes that are connected to it. If the block is valid, the full nodes/mining nodes will relay the block to the nodes connected to them. If invalid, the block will be rejected outright and not relayed. When other mining nodes see this block, they will mine the next block on top of this block (provided the block they received was valid).


Why does using a wallet in cold storage make it less secure?

I believe the basis of this recommendation is clients' tendency to create invisible change addresses. A transaction sending the entire balance to a known address eliminates the possibility that a part of the balance could be lost when a private key for a change address is not retained.


Bitcoins being sent to another addres during a transaction

Your total bitcoin balance consists of the combined total of several addresses. Your wallet contains one, some or many addresses, all of which may have bitcoins on them.

So I think that when inspecting your wallet with a tool like pywallet, you will find that both A and C are there.


Welcome to BSE. Sorry to hear this happened. I know of no way to reliably get an IP address associated with a wallet. Your best bet is the phone number.

That's a UK phone number. I'm not aware of your laws and cannot suggest a course of action.

If you're in the US, then you could start with consulting a lawyer.

As a default response, inform the authorities or consult a lawyer before informing the authorities. If the amount is large enough and you're in the US, they might be willing/able to do something. The authorities won't step in to try and track this guy for 100 USD of BTC. 100 million USD and you may be able to find someone willing to take an interest.

If there is enough value there, outside of official channels, there are private investigation firms / lawyers who may be willing to work on contingency. The fact that you have a name and phone number is a good thing. Not sure if they're real or not.

My point is, from a technical perspective you've hit a dead end. That wallet has only transacted 1.8 BTC:

https://longhorn.bullpay.com/?gateway=2&data=3Ncudh6CejAT9C56oX2NkcbQ4uJxXuZtmf

If the name/number are real then it would be much easier tracking and taking legal action against the person.


Whether coldcoinbitcoin.com or some other, possible to save our private key?

They appear to simply be offering a physical coin stamped with the Bitcoin logo. Moreover, it appears that the private key is generated by them, which means that nothing prevents them from keeping a copy.

You are far better off sticking to trusted hardware wallets such as Ledgers and Trezors. Never trust any service that has the possibility of keeping your keys accessible to themselves (obvious exceptions like custodial accounts on exchanges apply).


The only way to exchange Bitcoin for cash is to find someone willing to trade. In person, this can be slightly inconvenient, since verifying that the Bitcoin have been received involves waiting for confirmations from the Bitcoin network. This is true even if you exchange Bitcoin by sharing the private key to your Bitcoin address, since the recipient will still have to transfer the associated Bitcoin to be assured that nobody else has access to them. One way of possibly finding someone willing to trade is to attend a Bitcoin meeting or conference; at least I suspect that those attract enough people interested in buying more Bitcoin at a fair price that you could find someone willing to trade with you for cash.

There are lots of websites aimed at helping you find buyers or sellers of Bitcoin locally or online, ranging from classified ads, possibly including Bitcoin escrow, all the way to broker-like exchanges that may not even inform you of whom they matched you with for trading (but that will then typically require deposits, often through bank transfers). Especially on the extreme of classified ads, using them will typically not require you to have any banking. However, with Bitcoin users in Iraq being apparently even fewer than elsewhere in the Middle East, it is unclear if this will help you beyond giving you the opportunity to make yourself more visible to anyone who might one day become interested.

Finally, if you do trade Bitcoin in person without an established business as an intermediary, please make a conscious decision about how you do it. Apart from the possibility of fraud and disputes---what will you do if, after sending the Bitcoin, the other party claims to never have agreed to handing over money for it?---there is the question of what laws you may have to observe. In trading the private money or whatever your jurisdiction considers virtual currencies without any financial institution, you are doing something that does not necessarily fit into whatever laws, rules, written or unwritten, exist in surprisingly broad contexts. Don't by mistake set yourself up to be framed as a bad guy.


Why isn't importing wallet.dat as straightforward as it seems it should be?

It is not so easy to "open" a wallet, because it requires rescanning the blockchain to find the outputs that are relevant. This can take a very lock time, especially if you do not have an SSD. Because the performance is so poor, it would be disappointing for a lot of users to use this hypothetical feature.


What wallet / e-wallet is the most convenient for new casual Bitcoin users?

Sorry to dig up and old question but I just wanted to add a link to My Wallet provided by blockchain.info

I guess the thing that separates My Wallet from other e-wallet providers is that the site aims to feel more like an actually bitcoin client rather providing disposable addresses. I tried to design the site to be easy to use and it should seem familiar to anyone that has used PayPal or online banking. I will be adding more features soon which should be familiar to novice users such as invoices and monthly statements.

You can generate up to 200 different bitcoin addresses and are free to export the private keys at anytime. In fact if you already have an existing bitcoin address you don't even need to add your private keys at all. For more information about how the site works try the faq or browse the code.


What value does bitcoin add to the world?

If you see bitcoin as a currency, mining is issuing new bitcoins. It is analogous to a central bank issuing (or printing) new currency.

  What product is produced for the world? Mining for coal produces coal to be used for energy production. Mining for precious minerals provides metals for use in products all humanity can use.

You could ask the same question to the central bank example. If The Fed issues $ 1 trillion what product is it producing for the world? The difference with bitcoin is that there is no central authority that chooses when to issue new currency but an algorithm and the issued currency instead of going to the banks in a form of loan, are given to the user who mines the next block.


Why doc says importing private keys is so dangerous?

Key import by itself (from a trusted source of keys, such as your own cold storage or backups) isn't a dangerous thing. However, the vast number of ways one can cause problems for themselves through key import leads to these warnings.

Many such warnings appear to address more complex situations beyond bitcoind's scope. In this case, there can be many situations in which a weak key (e.g. from a brainwallet with bad password), or leaked key (suspicious origin, or generated by someone else) might be imported into bitcoind.

For example, the following may happen (with sample keys, of course):

5KVFiYbW5qbFfuDwrhPdsA3ALH3PmrEdQnQrpDWrqpygncbpPY4 is generated insecurely someplace (used on a physical coin, or otherwise bad origin), translating to address 1CD2nyv22gAGs8GAsdNa1rW3KinkCHgTFd.
User imports 5KVFiYbW5qbFfuDwrhPdsA3ALH3PmrEdQnQrpDWrqpygncbpPY4 and uses it in their wallet, as 1CD2nyv22gAGs8GAsdNa1rW3KinkCHgTFd in the UI.
Dumpster-diver digs up improperly-erased hard disk owned by FooPhysicalCoinForge, digs up 5KVFiYbW5qbFfuDwrhPdsA3ALH3PmrEdQnQrpDWrqpygncbpPY4 and sweeps it. Even if the address had 1 BTC on it originally and received 20BTC more, the attacker now has access to all of the funds received to it and currently spendable.


Is Sharding a Good Alternative to MultiSig?

Advantages of OP_CHECKMULTISIG over Shamir Secret Sharing for k-of-n:

There is no need to reconstruct the actual secret key on one specific machine. With SSS, you're inherently relying on that one machine being able to verify that what it's going to sign is what is intended - otherwise you may e.g. be sending your entire balance instead of just the payment you wanted to make. Also, if that key or (in case BIP32 public derivation is used) any related key is ever reused, that machine being compromised would in fact expose your entire wallet, including future funds. Given that the end goal is reducing the need to rely on the security of a single device, this is not ideal.
Accountability: with an SSS-based signature, the on-chain signature cannot tell you which signer(s) actually signed for spending, while OP_CHECKMULTISIG does. If you want the ability to go after rogue signers.

Advantages of SSS over OP_CHECKMULTISIG:

Cheaper on-chain.
Better policy privacy (you're not revealing on-chain that you were in fact using a multisig policy).

Now, with the hopefully upcoming activation of BIP 341-342 (Taproot) which includes support for BIP 340 Schnorr signatures, there will be more options (disclaimed: I'm a co-author of these proposals):

Native threshold signatures: with Schnorr signatures it is possible to perform something that's effectively equivalent to performing SSS on the public keys, and at signing time on the signatures, and end up with a valid combined signature for the combined public key. This gets you some of the advantages of both, and some additional disadvantages:

No single machine where the private key needs to be combined on (only signatures ever get combined, which are only valid for the specific message the individual signers signed).
Lack of accountability like SSS.
Same on-chain cost as SSS.
Same on-chain policy privacy as SSS.
More complicated protocol that needs multiple interaction rounds between the signers. Also lots of edge cases to take into account to make this secure in practice. For recent work, see FROST. If all you need is n-of-n (rather than k-of-n), it is simpler and less involved; see e.g. MuSig2.

That's not the only option, though. More alternatives are listed in BIP 342, note 5. In a way, SSS and OP_CHECKMULTISIG are two extremes of a spectrum. For example, you can construct an output that contains a Merkle root of a tree for which every leaf is one k-of-k aggregated key. It can be spent by revealing the Merkle branch plus the aggregated signature. This is usually cheaper than OP_CHECKMULTISIG-like constructions that publish all keys and signatures, but not as good as the SSS-like approaches give you. On the other hand, it's simpler too.


The biggest reason why Dash can scale is incentive alignment. Dash splits the block reward between the miners (45%), masternodes (45%) and the treasury (10%).

Masternodes are a special type of node with some extra requirements. In exchange for that, they get paid by the network. Because they get paid, the network can require them to run powerful machines that can handle bigger blocks than what would be possible with volunteer nodes (like what happens with Bitcoin, Bitcoin Cash or Litecoin).

Also, thanks to the masternode layer, Dash is about to release a decentralized API that will allow light wallets to connect to that layer as a class, not an individual (trusted) server. With that, it will be possible to use Dash in a completely trustless way without the need to download the blockchain, reducing the pressure to keep it small because only very specific use cases will require to have your own copy.

There are a few more improvements in the works that will all contribute towards scalability. Arizona State University recently released a paper analyzing Dash scalability:
https://blockchain.asu.edu/block-propagation-applied-to-nakamoto-networks/

As a side note, Dash also has a governance system in place that facilitates decisions around the protocol. That is not technically an advantage towards scalability, but because decisions can be made easily, roadblocks are only temporary. The decisions to go from 1MB blocks to 2MB ones was agreed by the network in less than 48h, saving a lot of time in discussions between parties claiming to represent the best interest of the network but without a real way to prove that.


How single usage of bitcoin address is resistant to quantum computing _and_ replace-by-fee?

It is often said that if a bitcoin user uses addresses only once, then quantum computer cannot compromise their security since the public key is revealed only when the money are actually spent.

There's no quantum computing algorithm that can easily find the pre-image of a hash. Therefore, single-use P2SH/P2PKH/P2WSH/P2WPKH addresses are safe. Its not so much to do with single-use. Single-use helps with Privacy, but the hash protects against an adversary with a quantum computer that is capable of breaking ECDSA.

  But how come an attacker could not detect a transaction, reverse the public key and forge a transaction from the same address with a higher fee before the first transaction is mined?

This follows from the fact that there's hashing involved while producing bitcoin addresses.


Is there any way to store personal data in a blockchain?

You can store data or its hash in the blockchain using OP_RETURN outputs which can store up to 80 bytes http://blog.coinprism.com/2015/02/11/80-bytes-op-return/


Yes Bitcoin is deliberately limited in that there can never be more than about 21 million BTC.
No the existence of other forms of money does not affect this characteristic of this particular form of money. It is an intrinsic characteristic.
Yes the potential for new forms of money means that money in general is unlimited in terms of the sum of the numbers printed on the front of banknotes etc - but this number isn't especially meaningful. The actual collective value of all available forms of money is determined by external factors.
None of this affects that there can never be more than about 21 million BTC. Bitcoin is truly scarce in that sense. This is true whether it takes 10,000 BTC to buy a pizza or a nanosatoshi to buy a Ferrari.
There's little point in indulging in philosophical wrangling over this. The only significant effect of this form of scarcity is a deflationary influence on the value of Bitcoin. Or at least the lack of an inflationary influence at a large scale or in the longer term. There are other things that have inflationary or deflationary influences on Bitcoin. That is, external factors that influence its value either way.


Will the 2nd box effect how / if the order gets filled?

Yes. The order can't be filled until there's crossing offer in the other direction.

  If I want to sell as I say then shouldn't the 2nd box be set to a lower price in USD so that they sell quicker? Or say I wanted to put the 2nd box to a value in USD that is higher than the highest bid then will it take longer (or never) to be filled?

It depends what's more important to you, selling quickly or getting the highest possible price (but possibly never selling at all).

  The fact that the price in the 2nd box doesn't get updated and is editable seams weird; as I thought it was the spread.

You can place an offer to buy or sell at any price you want.

  What if you left the page open for ages and then hit sell? Surly there would be a totally useless order on the book!?

Well, not necessarily. Someone might want to buy more coins than are available at a price closer to the market price and might have to take offers a bit outside of the normal market price. Some people place offers just in case the price moves.

Imagine the price is $300 and nobody places out of market offers. What happens if all the people willing to sell at $300 have their offers taken? There would be no sell offers at all on the books and people willing to sell at, say, $325, would lose an opportunity. So there will generally be lots of offers to sell above, and buy below, the current market price.


Can we I identify crypto-exchange (BTC) hot wallets?

it really depends. Some exchanges have their addresses labeled in services like Blockchain.com and so on. I believe they share with them the Xpub so they can map all of them back to the exchange.

Not all exchanges have that.

I've tried to do that once and gave up because the quality of the data available on which exchange controlling which addresses is really low. Additionally some exchanges (I don't know how many nor which) do these interexchange transactions using the Liquid side chain. Maybe some of the blockstream guys hanging around can illuminate my answer here

So, unless you have direct access to the exchanges' Xpub or some good data source on labels, it's really hard to do this type of analysis


Why does the chart on a coin vary between exchanges?

There is no central market for the bitcoin or other altcoins.

Crypto currencies are exchanged on each exchange for the price set by people transacting there. This means that the price is set exchange by exchange, not centrally for every coin.

Thus the variance of the graphs.

Cheers, David


How much memory(RAM) is used by the mem pool and UTXO pool

In Bitcoin Core, there are two settings, -dbcache and -maxmempool, defaulting to 450 and 300, respectively.

The mempool can only occupy as much as is configured through -maxmempool.

The UTXO set cache can occupy as much as is configured through -dbcache plus the amount of configured mempool space that is currently unused. The memory usage is however much higher than the equivalent representation on disk - loading the entire UTXO set would require 6-7 GiB at the time of speaking.

The in-memory representations are always larger. On disk they're just packed sequences of bytes. In memory, there are indexes and pointers, and memory allocation overhead - all to speed up access. The blowup factor for UTXO data is larger than for memory.

Since 0.14, the mempool is also saved to disk at shutdown (but not continuously).

So far, there is no prioritization done on the UTXO cache. We just keep all accessed entries around, and when it grows too large, all the modified entries are written to disk. One (very) significant optimization is that when a UTXO is created and then spent, without being written to disk in between, we just remove it from memory.


If you could get recent GPUs (Radeon HD 6850 or newer) for very, very cheap, you might be able to make a couple of Bitcoin per month. It may not be worth it, depending your electricity costs.

Use these tools to help guide you to an informed decision:

P3 Kill A Watt power meter, to find your actual power consumption
Mining hardware comparison, to find a GPU that will work in your system and plug its hashrate into...
Mining profitability calculator, to calculate what your break even or profit point will be.

vanitygen is probably your best bet given the equipment that you already have.


Is the nonce in Bitcoin the answer to the puzzle from the previous block?

Nonce of a header is the answer to that block.

Recall the mining process:

Create a template block header
Choose a nonce
Hash the block header
If the hash is lower than network difficulty, broadcast it. Else, choose a different nonce.

To sum up, nonces are for individual blocks, and a different nonce is chosen until the template becomes a valid block.


Can I change wallet without shifting funds

Yes you can, depending on what version of multibit you have, you can do the following :

Multibit HD: You should have the backup seed words. You can directly use those seed words / master public key to create a new wallet like mycelium/electrum
Multibit Classic: Export out all the private keys https://multibit.org/help/v0.5/help_exportingPrivateKeys.html. You can import these private keys into the new wallet


What was the last life sign of Satoshi Nakamoto?

This was his last post on the Bitcoin Forums, December 12th, 2010. The day after he wrote this to the mailing list. As far as I know he did not (publicly) announce his retirement.


Is it possible to talk to bitcoin RPC API with Javascript and WITHOUT using a node server?

It is possible? Yes definitely!

Is it secure and smart to do? NO!

Anyone can see the password of your bitcoin node and thus steal your funds.

You will be hacked in no time.


What mathematical property links the Armory chain to the public/private keys?

ECDSA can be thought of as a special form of mathematics where division is, for all practical purposes, impossible. Public keys are formed from private keys by multiplication -- the public key is multiplied by the generator G. Because of the properties of multiplication, new public keys can be generated by an entity that doesn't know the corresponding private key.

First, a master public/private keypair is generated (master, G(master)). The master private key, master, is stored securely. The master public key, G(master)) is used to generate new public keys as follows:

A new public/private key pair is generated. X, G(X)
The public key is added to the master public key. G(X) + G(master)
This new public key can now be used.

To generate the corresponding private key, the private key generated in step 1 is added to the master private key to form X + master. This works as the private key becauseG(X + Master) = G(X) + G(master) (distributive property of multiplication). Thus the public key corresponding to the sum of the two private keys is the same as the sum of the two public keys.

You can pretty easily show that producing X + master without knowing master or forging a signature of G(X + master) with only X and G(master) is as difficult as breaking ECDSA itself. So this scheme is as secure as any other method of using ECDSA.


Looking for bitcoin and other cryptocurrency intraday prices

Using bfxdata.com which looks at Bitfinex stats, the largest in volume Bitcoin exchange currently, can help you out.

In the link above it allows you to download tons of different types of data in csv format, and from the website you can look up and find tons of information. Be advised, please do not systematically download or set up a bot auto-downloading the csv files, you will be blocked.

And yes that includes all transaction stats since "2013-04-01 02:00:00", but it's updated hourly not by minute. (that would be almost too much data to handle anyway)

Bitfinex also has stuff you can look at, but it doesn't say the price every minute, it just shows all trade history. You can download information with a max of a three month range per time.

Hope this helps.

Happy Bitcoining


I sent a transaction from Electrum to Trezor wallet - the transaction has disappeared and the fund taken

I can't find d18f69c508d9dd5bb5a5038894a79a2c355100a6a185b8aac1df3494ed131e94 on any block explorer. It seems that you managed to redo the transaction with f1aa25811dd5487deb693a5bde124f674c2bf954de95df40bc23749f706b8968, since it has a lot of similar input values.
In the transaction you posted, it seems that you created a raw transaction that didn't claim the change: all funds from inputs that are not assigned to outputs are transaction fee. After defining the recipient, you must claim all the remainder in a change output to yourself.
If you're experimenting with raw transactions or some new software you're writing,
I would emphatically recommend that you use testnet instead of actual Bitcoin.


What's the status of alternative full node implementations?

Update: Coin Dance has an excellent table of node implementations with descriptions and links at the bottom of their Bitcoin Nodes Summary page.

Below are the implementations I've found. I'm not sure if all of them qualify as full nodes.

btcd
(in Go, by Conformal Systems LLC)
Bits of Proof
(in Java, by bits of proof zrt.)
bitcoinj has a
fully verifying mode
(in Java, by Mike Hearn)
picocoin
(in C, by Jeff Garzik)
libbitcoin has an
example full node implementation,
also advertises to be a
completely independent and full Bitcoin stack
albeit only pre-alpha proof-of-concept with no GUI
(in C++, by Amir Taaki)
caesure
(in Python, by Sam Rushing)
Electrum-server,
uses bitcoind as a back-end
(in Python, by thomasv@bitcointalk)
Ufasoft Coin
(in C++, only for Windows, by Ufasoft)
Bitcore (in JavaScript. Note that it needs parts of Bitcoin Core to function)

(Sources: Core Development Update #4 by Gavin Andresen, Jun 21 2013 on the Bitcoin Foundation blog; bitcointalk.org forums)

Updated bitcoinj and libbitcoin status (based on information from
this bitcointalk thread);
Electrum backend
Added Bitcore


How would one extract the list of public keys from Electrum wallet?

You cannot get all of them in one go. You can call getpubkeys("address") for each address (or do it via the GUI by going to the Addresses tab, right clicking on an address, and selecting "Public Keys")

Alternatively, you can get your master public keys (xpub) and derive from those.


Is Bitcoin network an overlay application network?

It sits in the application layer as there's the Bitcoin P2P protocol that runs on of TCP. The P2P protocol has to be implemented for nodes to communicate with each other (i.e. block, tx, inv messages).


Why does the "uptime" RPC API call fail if Bitcoin Core is running but has not synced fully?

The node does not need to sync fully in order for RPC to start responding to queries.

What happens is Bitcoin Core starts up in "warm up" mode. During warm up RPC is unavailable because the system is being setup. This is when wallets, the network your local UTXO information, setting the block index and verifying your local blocks take place. (I suspect you may have confused the "Verifying blocks..." message with sync'ing.). In warmup mode RPC port 8333 is open but it'll return a JSON error for every query. The open port signals to inbound connecting peers that there's a node there, but not yet able to respond to queries.

After this warmup routine is done (takes a few minutes), the node will be up and syncing from the network. During the sync, even if it takes weeks, the RPC server is up. Obviously it will not be able to respond to queries for blocks it hasn't retrieved and verified yet.

  Is this a known issue/bug? Will it be fixed soon?

Not a bug. It's part of how Bitcoin Core starts up.

  Should I be using some other API call to check if Bitcoin Core is running and "can talk to me"?

Try the help command. If it returns, it means the RPC server is up.

  Is there a separate API call I could use to determine whether Bitcoin Core is "all ready for action" (fully synced)?

You can try using getblockcount to see what the last synced block height is. It's fully synced if the height is same as network height. Again you don't need this to use RPC, but I included this to answer your question.

Try getrpcinfo to check on the RPC server status.

Check other API methods here.


Is there a Trading API that spans multiple independent sites, preferably from open source websites?

The Java XChange library could help

It might not be exactly what you're after, but the XChange project provides a demonstration of a general purpose API for communicating with multiple exchanges.

You could repurpose the code to create your own mock trading endpoints and run up a collection of virtual hosts. In this manner you can test against a reasonably well known set of APIs for the usual failure modes.


generating a zprv from a base58 rootKey with bitcoinjs-lib

Your xprv already has the derivation path "baked in" so even if you were to just convert to zprv it will still be under the old m44/ deriv path. Also you can't go from xprv to HD seed. So to change from an xprv to a zprv or yprv you need to start with the HD seed, then declare your derivePath("m84'/...","m49/'/... etc), then you can create an extended public key. Then you'll have to convert to yprv, zprv, ypub, etc...
Example uses bitcoinjs-lib v3.3.2
function seedToXpub(seed, deriv, account){
   var root = bitcoin.HDNode.fromSeedHex(seed);
   var acct = root.derivePath("m/"+deriv+"'/0'/"+account+"'");
   var xpub = acct.neutered().toBase58();
   return{
       xpub
   }
}

function seedToXprv(seed, deriv, account){
   var root = bitcoin.HDNode.fromSeedHex(seed);
   var acct = root.derivePath("m/"+deriv+"'/0'/"+account+"'");
   var xprv = acct.toBase58();
   return{
       xprv
   }
}

function convertXpub(xpub,target){
    //source script for converter https://github.com/jlopp/xpub-converter/blob/master/js/xpubConvert.js
    const prefixes = new Map(
  [
    ['xpub', '0488b21e'],
    ['ypub', '049d7cb2'],
    ['Ypub', '0295b43f'],
    ['zpub', '04b24746'],
    ['Zpub', '02aa7ed3'],
      ['xprv', '0488ade4'],
      ['yprv', '049d7878'],
      ['zprv', '04b2430c']
  ]
  );

  xpub = xpub.trim();

  try {
    var data = b58.decode(xpub);
    data = data.slice(4);
    data = Buffer.concat([Buffer.from(prefixes.get(target),'hex'), data]);
    return b58.encode(data);
  } catch (err) {
    return "Invalid extended public key! Please double check that you didn't accidentally paste extra data.";
  }
}

var mySeed = "114259550292e14ca462e5202875f987fa3c93300306417c8b62de591710e4b34340a9bcdf8241ebbe83cf3cdf428c2f32973c9db68e247ce623fd73b9bd1fb2";
var extPriv = seedToXprv(mySeed,84,0);
var zprv = convertXpub(extPriv,"zprv");

//zprvAcihK1ERNzUfX6zh3v8weMVw5s8Y2xkmjdEfeFF3v9X2jbDf9iJ4vS5t4Po6Jhwsjkzjz1TddTENc5dPVsVFyMZPzWz8Kskci6wkYSmuhup


Where do I find the *actual* blockchain size?

The blockchain sizes of Bitcoin, Litecoin, Dash, Dogecoin, Peercoin and Namecoin are listed here at https://bitinfocharts.com/
(scroll down to Blockchain Size)

As of today (2015-07-12) the sizes are (sorted by market capitalization):

Bitcoin             Litecoin          Dash              Dogecoin          Peercoin          Namecoin
44.73 GB            4.64 GB           1.01 GB           11.41 GB          0.4191 GB         2.64 GB
$4,477,078,707 USD  $209,054,841 USD  $23,217,866 USD   $20,686,200 USD   $15,897,328 USD   $9,888,883 USD

Note that Dogecoin, although very new, has a very big chain already, where Peercoin has by far the smallest.

Your question

On my hard disk the .bitcoin directory uses 45 GiB = 48 GB.


The power to change the Bitcoin protocol depends on the willingness of the economic majority to adopt the changes.

A wishlist exists of some changes that have been considered.

If the change is one that devalues the currency, then those who hold coins or plan to hold them in the future will be less willing to adopt the change(s).  Some suggestions have been discussed and rejected so many times that a separate list of prohibited change suggestions has been compiled.  If the change is one that improves Bitcoin without devaluing the currency or harming it some other way, those changes could be adopted.  If the change is not really necessary it might not be adopted, especially if there is the possibility for unintended consequences to be the result.


The left Y-axis applies to the lighter colored volume bars from the bottom of the chart which denote the trading volume in BTC. Alternatively you have the option to display these volume bars in the respective other currency (USD in this case), if you select the "Volume in Currency" checkbox at the left of the page.

A volume bar shows how many units of the currency were traded within the respective timeframe (days in this case).

To just compare the price of Bitcoin in comparison to the US dollar, you can ignore the volume bars and just look at the price as denoted by the Y-axis on the right of the chart. If you use this link, you see just the daily price over a year without volume bars or candlesticks.


generate/generatetoaddress what are this two rpc methods used for?

but how? bitcoin is hard to mine, how can this method mine nblocks immediately?

generate is only used on the regtest network, where blocks can be mined instantly.


Knowing a single transaction can you track down a Bitcoin user?

Knowing the Wikileaks donation address, one knows every address
that contributed to them.
Knowing a given address we are interested in, we can try tracing the coins back to when they were created (which can be harder if they
were mined by a large pool, in that case you'd probably get a lot of
origin blocks).
Given an address we know when it received coins and from what address.
If the particular wallet contained more than one receiving address, sometimes the addresses would be used together. If you have more than one address in the "From address", you know the person had to have them together in on wallet.

And now a bit of knowledge one can gain from outside the Block Chain:

A lot of people put notes like "My Bitcoin Address is: 1HWbVLhxj7bhewhyapMZpyhqWAeAhJd51E" in places like the forum. Then you can link the addresses to particular nicknames, and in some cases emails, names, facebook pages and so forth. If you use one address for everything, one can know if you contributed to Wikileaks, or other known addresses.
If one would have a big node in the Bitcoin Network that by chance would be connected to your Client when it sends transactions using the known addresses, one could potentially trace the IP of your computer. If you have a static IP, this can identify you.

So all in all, with enough resources, time and determination, one can know quite a lot about a given Bitcoin address. A lot of it can be mitigated with enough diligence, but some of methods might be quite hard.


Hard to say without looking at the code. Want to paste the relevant code?

When dealing with the GreenAddress api we generally sign using libsecp256k1 rather than pycoin (even when we use pycoin for other things)

For example see https://github.com/greenaddress/garecovery - it makes GA multisig transactions with pycoin and then signs them

Hope it helps!


What is the fastest way of litecoin mining?

To my knowledge, all public manufacturers of scrypt asics has ceased their operations. This doesn't mean that there's no scrypt asics being produced, just that they aren't for sale on the open market. If you really want to mine, your best bet is to buy some used equipment on Ebay. However I doubt you'll be profitable, since you have to compete against huge Chinese farms with close to zero electricity costs.


Does submitblock require the wallets private key?

submitblock is not a wallet RPC so it does not need private keys nor is it related to anything in the wallet. It can be used even if the wallet is disabled.


The change is anything that's left over when you take the outputs you'll be spending, subtract the value of the transaction sent, and subtract fees. Since transactions should be as small as possible, as few outputs as needed will be spent. In your case, 3 outputs will be spent, no fee is in place, so the following new outputs will be created:

5 BTC to recipient
1 BTC to a change address.


why is my p2sh raw transaction not being mined or erroring ERROR: 64: NON-MANDATORY-SCRIPT-VERIFY-FLAG (EXTRA ITEMS LEFT ON STACK AFTER EXECUTION?

Your redeemScript contains the length byte for it. The redeemScript is really just a script without any prepended length byte. So for your script, it is

522103e07f96e5ba598431c0c994493a4ae988c9854c171d5d4bb140db0a27a4c853e421031b63f964d8c65d1d1136dcfe5033dedea88c2d411934ea48c9708410be84e5ee52ae

Note how it begins with 52 and not 47.

How P2SH works is that it takes the top stack element and executes it as a script. Since you began your redeemScript with 47, this script just pushes the next 0x47 bytes to the stack instead of executing the multisig that you wanted.

It is perfectly valid to do this, even if that is not what you intended. A non-empty and non-false stack means that the script succeeded, so your transaction is consensus valid and could be included in a block. It is not standard because you have more than one stack element left on the stack after script execution, which is why this does not relay.

The correct version of your transaction is

01000000011af3ab90a1c274ecb1f5e6e499ed2d0b5b2ebc6bbcbab751836ea70c90656e9f00000000db00483045022100f7621bb014d53d8a97c0b5605317dd4a92b53e03dd22e71b1db85c12e92218ff02204b77ff2a5bc9f7921d8a17d36d04ca29cbe25b2061f7c2f5e227e449ba614ee501483045022100e9a2b73ff95e3395034e910d5d69dd3e18e12a28e9dacfd5f3b2894afd5fbf3f022035b50d48506932020fcea1781a0c58e9011918bd2a9cbbb5693027035ca9502b0147522103e07f96e5ba598431c0c994493a4ae988c9854c171d5d4bb140db0a27a4c853e421031b63f964d8c65d1d1136dcfe5033dedea88c2d411934ea48c9708410be84e5ee52aeffffffff0140f60e00000000001976a91452903efc1004de01883ba3687be2a8ea4f6b1b1988ac00000000

but this is not valid. The redeemScript no longer matches the scriptPubKey of the output being spent (script execution stops here). But the signatures would also be invalid because they have signed a different redeemScript.

Because your transaction does not require any signatures, just pushing the script (that does nothing) that matches the hash in your scriptPubKey,

01000000011af3ab90a1c274ecb1f5e6e499ed2d0b5b2ebc6bbcbab751836ea70c90656e9f00000000494847522103e07f96e5ba598431c0c994493a4ae988c9854c171d5d4bb140db0a27a4c853e421031b63f964d8c65d1d1136dcfe5033dedea88c2d411934ea48c9708410be84e5ee52aeffffffff0140f60e00000000001976a91452903efc1004de01883ba3687be2a8ea4f6b1b1988ac00000000

is a valid, relayable, transaction spending your output.


Problem with Bitcoin Core’s regression test mode

Try changing port number in bitcoin.conf.
open file

nano ~/.bitcoin/bitcoin.conf

add new line

  rpcport=18332;

save the file and restart bitcoind


The best way to keep my private keys safe?

The best way currently, that is still easy to access are hardware wallets. The two most famous retailers are:

Trezor:
https://buytrezor.com/

Ledger:
https://www.ledgerwallet.com/

A hardware wallet is dedicated hardware with a defined interface that makes it impossible to extract the private key from the hardware. The interface does however allow signing of transactions. This means that the hardware wallet can safely be plugged into hardware infected with malware.


What is the key difference between the Proof of Activity proposal and Proof of Stake?

From what I understand, Proof of Activity and Proof of Stake are methods of preventing a 51% attack.

Proof of Stake basically means that the people that hold the most coins sign the blocks that will be part of the block chain. This means that the people that have the most to lose from a 51% attack will do their best to prevent it and not risk losing their money. However, this also means that the rich users can control the network.

Proof of Activity from what I gather is a method of selecting a random peer from the entire network to sign a new block that would be temper-proof. This would mean that a 51% attack could not execute too well, as it couldn't predict who the signing peer be in the future.

The latter idea appears to be better for preventing attacks on the network, providing there are no logical problems in there. However, I have not studied either of the two methods in greater detail so I might be wrong.


Why are adresses not showing up in gettxout?

Not every transaction output has an address. In this case, the output you are looking at, while it is a standard output type, it does not have an associated address. It is a Pay to Public Key script for which there is no address. Thus gettxout does not provide an address.


Export from Bitcoin — import to Bitcoin Cash

You are likely importing it as a legacy address, since Bitcoin Cash does not support segwit scripts.
In this scenario, you cannot actually recover the coins yourself. Since segwit isn't activated on the Bitcoin Cash chain, the coins are essentially anyone-can-spend - if you try and build a transaction yourself to move them, other parties on the network will notice that they can be spent by anyone, and there will likely be a few malicious ones who will attempt to take the coins for themselves.
Your best bet, if the value is significant, is to reach out directly to Bitcoin Cash mining pools and ask them to include a transaction directly in a block, without broadcasting it first. You should be able to provide them with the public key, which is sufficient to build the transaction required to move the coins.


Error on Installing Multibit for Windows 7?

Googling for that error there is a similar one at:
http://trac.jajuk.info/ticket/1549

There they suggest it could be something to do with the installed Java Runtime Environment. This is what the installer uses to run.

You could try making sure the Java installation on your machine is 100% by installing the latest version from:
 http://java.com/en/download/index.jsp

Then try the installer again.


A "multisig address" is actually a Pay to script hash (P2SH) address. Unlike normal bitcoin addresses that start with 1, P2SH addresses start with 3 (on the main network, 2 on the testnet). How this works is explained by the P2SH BIP16 wiki page. Essentially, you pay coins to a special address that is a hash of the redeem script. To claim the transaction, one must provide a redeem script that hashes to the correct address, and also provide conditions that make the redeem script evaluate to True.

In your example, paying the multisig is  really easy: Just copy-paste whatever value you got in the address field into your wallet and pay it just like you would a regular transaction.

Claiming the funds in a multisig is a little tricky. First, you must know the redeem script. Hopefully, you saved it, and you also gave it to the other key owners so they could verify the P2SH address is fair (their key is in it). If you lost the redeem script, reenter the createmultisig command with the same parameters and the same public keys in the same order. You're guaranteed to get the same redeem script and the same address.

Then you need to generate and sign the transaction, which is pretty difficult with the core client. You're going to find it simpler if you use a ready-made program.

Essentially, your transaction that paid your multisig address had an output that looked like this:

<hash> OP_EQUAL

and the transaction that spends from the multisig will sign that input with the signature script:

OP_FALSE <Signature1> <Signature2> <redeemScript>

where the redeemScript is what you got when generating the address, serialized and pushed onto the stack. The redeemScript must hash to the value specified by the output. Note that <Signature1> <Signature3> and <Signature2> <Signature3> would also validate, but not any other order. You also can't have more signatures than required: if it's a 2-of-3 multisig, you need exactly 2 signatures, not at least 2, so <Signature1> <Signature2> <Signature3> won't work.


Which is the reliability of a transaction timestamp?

The timestamp is not a part of the standard transaction as per Bitcoin Protocol Specification. It is most likely generated by the standard client during the api call. The standard client might use its internal time (that might differ from the machine time), which is vulnerable to timejacking. I might be wrong, however.

As long as your client is running properly, it should be okay to use its timestamps for various notifications. They might represent the time the client received the transaction however, which may differ from the time the transaction was broadcast the first time.


Yes, you can do all of that. To use your money, you need your private keys. Those are generated by Electrum using your seed. The password only protects the data stored on your computer by Electrum so not everyone who has access to your computer can spend your money. Spending your money without knowing your password is possible if one has your seed.

To sum it up:

Things you need to recover your wallet

Electrum (not even that much of a requirement itself but it's the easiest option)
your seed
some data (which can automatically be retrieved from the internet by Electrum (easiest way; Internet access on the computer you make the transaction on is not a requirement but nice to have.))

Things you don't need to recover your wallet*

the computer you generated the wallet on
any data Electrum stored on that computer
the same operating system you used before
the same version of Electrum you used before
the same kind of device you used before
your addresses
your public keys
your master public key
your private keys
your master private key
your wallet password
an imaginary wallet.dat (because there is no wallet.dat with Electrum ;-) )

 * Of course, some of those or a combination of some of them can be used to spend your money or to determine your wallet's seed, but that's not what you need to care about, here.

You probably still should write your seed onto a piece of paper. This – of course – doesn't mean you can't spend your money in the mean time or have to update the seed afterwards. Your wallet's seed doesn't change.


How is the current hashing power of the entire network measured in real time?

Does hash power refers to mining nodes only?

Exactly. Other nodes just make sure everything's OK, or they don't relay it.

We don't know how many nodes there are on the bitcoin network, correct? How do we count them?

We can only count public nodes, but still, there are nonlistening nodes, nodes on the same IP, etc. So it not 100% accurate.

Would we need to know [2] in order to figure out what the actual hashing power of the network is?

Nope. We can calculate the total hashpower in two ways:

Visit each pool's website and add the hashing power. This method requires trust. On the contrary, it's accurate in practice.

Make an estimation using the network difficulty and the time between blocks. It's not very accurate.

What are the units of hashing power?

1: Hash/second: H/s <--- Not even Hand-scale
1000000: Megahash/second: MH/s
1000000000: Gigahash/second: GH/s
1000000000000: Terahash/second: TH/s <---ASIC-scale
1000000000000000: Petahash/second: PH/s
1000000000000000000: Exahash/second: EH/s <---World-scale


Is it safe to keep a compromised private key in my wallet?

If it is only one private key and you are aware not to use it anymore (and have rerouted any anticipated transactions to a new address), there is nothing harmful that the attacker can do.

Bitcoin-qt sends change from transactions to new unused addresses. Since those are the only transaction outputs that are transmitted to not-explicitly-specified addresses, it is safe to keep the private key in your wallet.

A compromising party could, however, use the private key to sign messages. These messages would appear to be authored by you to recipients that know the respective address to be under your control. Unless the compromising party had additional information about you and the counter-parties of previous transactions the compromised key was used in, this shouldn't be useful to them (nor could you stop it either).


How to get full Block information like blockchain?

Raw blocks are available at datafolder/block/blkXXXXX.dat in serialized in network format or can be downloaded from the p2p network.

As you can see in the format, each block has a list of transactions which in turn has a list of outputs. If you sum each output value, you get the output total.

The estimated transaction volume is calculated like the output total, but not counting the change outputs. There's no reliable way to know which output is being sent and which one is change, so you'll have to guess, take the mean or something like that.

One of these transactions must be coinbase. A coinbase transaction has a single input with txid = 0000000000000000000000000000000000000000000000000000000000000000. If you sum all input values (not including coinbase) and subtract all output values (again, not including coinbase) you get the total fees. Inputs don't have a value, so you have to find the transaction they're referring to (txid) in a previous block and the referenced output in that transaction (vout). There's a cheap (but not reliable) way to calculate the total fees. Just sum the coinbase outputs and subtract the block reward. The value is only accurate if the miner claimed the whole reward and fees (which is not enforced anywhere).

You might have noticed the relayed by is nowhere to be found. This is different for everyone, and is only the client which sent you the block for the first time. To know who relayed the block to you, you have to set a client listening for block broadcasts and just record whoever did broadcast the block to you.


Why is my mempool count so much lower than that of block explorers?

What does bitcoin-cli getmempoolinfo spit out?

You may want to increase the maxmempool config value.


What's the difference between MtGox streaming API hosts?

Origin null is now allowed.

Your Origin header is not being set.

Try running your code in the browser from an actual domain name other than something like about:blank.

In chrome running:

var ws = new WebSocket('ws://websocket.mtgox.com/mtgox');
ws.onmessage = function(e){ console.log(e); };

results in failure from about:blank. However from an actual domain name results in success.


Given a transaction hash, how do you get the block the transaction was included in?

but maybe one could use the block height to match the tx to the block?

Indeed that would work fine, block_height is returned by the /rawtx/ call (https://blockchain.info/rawtx/$tx_hash) for transactions that have been included in a block (unconfirmed transactions have no block_height key). Then you can find the block hash and/or information about the block with the /block-height/ call (https://blockchain.info/block-height/$block_height?format=json)


What is the Bitcoin equivalent of /dev/null?


Regular nodes, by default, only maintain a balance tally for addresses in its own wallet. Your options are to either add every address to the wallet as a watch-only address, or to build your own index on top of the node by scanning each block and extracting the data from it.

There are patched versions of nodes available, such as the ones backing insight explorers, that also maintain an address index to speed explorer operations up. However, these versions are rarely up to date.


You can set up a local Bitcoin testnet with the Bitcoin-Qt client and some relatively simple configuration. Note that you will need a miner to be processing transactions when the the testnet is in use. More information is available at: https://en.bitcoin.it/wiki/Testnet


Nobody "took off" this function, it was only proposed, but was never actually added to Bitcoin Core.

Instead, you can use importprivkey and then send BTC to a new address:

https://en.bitcoin.it/wiki/Help:How_to_import_private_keys_in_Bitcoin_Core_0.7%2B

Note:

Why doc says importing private keys is so dangerous?
Why so many warnings about importing private keys?


The current minimum transaction cost required by the network for a standard transaction is 0.00001 XRP (10 drops). It sometimes increases due to higher than useal load.


Last I heard, they were down to rewrite their code. Apparently too much was being done manually and they're trying to automate as much of the process as possible. There was a landing page for a time and I've not heard anything new on the subject so I'm assuming they've simply taken their web server offline for some reason.


The numbers for the price are on the right of the graph (under the word Price that is turned 90 degrees clockwise) and the numbers on the left are for volume (under the word Volume that is turned 90 degrees counterclockwise.

Price is the amount that was paid on a per-bitcoin basis, the "candles" show where trading occured during the time period in question and the "wicks" show spikes in those same time periods.

Volume is the number of bitcoins bought and sold during a given period, with each period being represented by a direction change on the line graph. This is an important metric because it shows how much trading is happening, whether or not the price is changing significantly (since many people might buy/sell at some times/prices and other times there are few available bitcoins at a given price.)

Price will always remain the same at different levels of zoom, but volume will change based on the number of trades that happened, and since zooming changes the size of the periods (daily in the top, hourly in the bottom) the volume numbers on the left will shift as needed.

The mini-chart allows you to see the volume of the exchange over a very long period, and the highlighted section is what you are currently looking at in the chart above. You can adjust the scope of the main graph by pulling the handles on the mini-graph if you want to see a period of time in more or less detail, or select a specific period of time (like October)

To get more information on asset pricing charts I recommend http://stockcharts.com/school/doku.php?id=chart_school:chart_analysis and for other bitcoin specific charts and graphs be sure to check out http://bitcoinity.org, http://bitcoinwisdom.com, and http://bitcoincharts.com/charts


bitcoin core 0.10.1 upgrade stuck syncing

The message ERROR: AcceptToMemoryPool is to do with your node accepting new transactions from the network and doesn't have anything to do with your local sync state. It just means that someone made a transaction and broadcast it to you which does not respect the rules of your current software version.

It should really be "INFO" rather than error, or simply just not logged at all.


How can trading phisical goods in the blockchain be safe?

Simple answer is that both parties need to trust the escrow! Their is no smart cryptographic technique you can use to ensure a link between maths and physical goods in the real world!

If you're talking about digital goods, or products with DRM, the issue is different, but when you're shipping a physical product, like a phone, without DRM, then you need good old fashioned trust. Now if you use a 'reputable' escrow agent on a 'reputable' site, then you can reasonably trust them.

Customer reviews also play into this. This is how sites like AlphaBay could exist. You have no idea that your illegal product is going to arrive in the post, after all, you're dealing with a criminal by definition! However, the interests of the buyer, vendors and site align to ensure that everything works most of the time... See:
Jamie Bartlett How the mysterious dark net is going mainstream


Those are ASIC miners, not FPGA.

They can mine BTC and clones, but nothing else.


Paper wallets used to be the safest way. But as of late there are many rumors that some of them actually do not generate random keys but can steal your coins (even when generated offline). So sites like bitcoinpaperwallet are a nono.
If you want it for free, you can find many key generators on github. You'll need some programming skills to check them. And before comitting to one test that the keys are generated correctly. Even I have made one in Java at https://github.com/Johanpmeert/GeneratePrivateBitcoinKey
It uses a Intel DRNG to generate 32 random bytes. Or you can bypass this by entering the random bytes yourself or by taking any picture and taking the SHA256 hash. That'll be random enough.
The safest way is buying a ledger or Trezor direct from the manufacturers website.
If you have a paper wallet, that's all you need. Private and bitcoin address on the paper. No need to store anything but that. You can verify the amount on it by entering the bitcoin address on any blockchain explorer. If you have a QR code that is even easier, there's many apps that scan that and give you the balance.


I'd assume it's just so people reading the docs won't try to "tip" the writer and send to a foobar address that was made up for the sake of example

That is correct!

Other than that, there is no other real point at all. These bitcoins are gone forever and no one will ever be able to get them.

However there is some projects or new coins that does Proof-Of-Burning and by sending the bitcoin correctly to the bitcoin eater address you would get corresponding amount in the new cryptocurrency.


Yes, just set X=1, and Y=number of people.


Is there an alternative to salvagewallet that keeps account info?

This could be a solution once released:

"Add -zapwallettx function, a diagnostic tool to assist in wallet repair" - https://github.com/bitcoin/bitcoin/pull/3659


Is there an easy way to search all the transactions?

Try BlockExplorer, it can search by block, public address, and a few other ways. It also has some cool analysis and statistics abilities.


Help decrypting Encrypted Privated Keys (AES)

Is there a way I can input more than 1 encrypted private key at a time?

Write a script using OpenSSL

  I have hundreds of encrypted private keys I want to check for any btc balance.

You should be prepared that they'll all have zero balance soon after typing them into public websites run by people you don't know anything about. Even if the proprietors are honest, you are also putting temptation in front of their new, temporary, weak-willed or disgruntled employees and their third-party support staff and malicious hackers.


Most likely, you are considering 2^16 to be difficulty 1, not 2^32. 2^32 is a common base for SHA256d coins like Bitcoin. 2^16 is common for scrypt coins like Dogecoin.


Where can I buy bitcoins with an American Express gift card?

http://btcquick.com uses Google Checkout and supports Amex, I have not tried a gift card but it should work.

They do require identity verification to combat the (massive) fraud risk they face.


Unable to send 'version' message correctly

The msgUtils.py code didn't work with 64-bit Python due to a bug. I've fixed it, so you can try the updated code. (I'm the author of the article.)


In the sourcecode, what does this line mean that recovers the key from the signature?

It's a custom format that encodes both a signature, and a parameter that allows the public key to be reconstructed from it.

Given a signature (an (r,s) pair), and the message it signs, there can be up to 4 different public keys for which it is valid. To know which one, the number is encoded along the signature.

The first byte is this recovery parameter plus 27. If the corresponding public key is to be a compressed one, 4 is added. The next 32 bytes encode r. The last 32 bytes encode s.

Note that this format is only used for message signatures. The scheme used for transaction signatures is older, doesn't support recovery, and uses DER encoding.


Minar cryptocurrencies without software or special hardware

Are you asking which altcoin to mine?

You mainly just need to look at www.cryptocompare.com and find some of the low priced coins.

However, Bytecoin would be a good thing to start with.


What should I consider when deciding to whether or not to mine?

You really need to take into account some important factors, which that calculator is missing:

The current rate of increase in difficulty
The expected delivery of the mining hardware
The cost of the mining hardware
The cost of running the mining hardware (electricity cost)

I highlighted 2 of the most underestimated factors normally ignored by new miners.

Many mining hardware orders can have significant delays in shipping, due to high demand and low production volume. Sometimes you can wait months for a delivery, by which time the mining difficulty raised so high as to make the hardware unprofitable, even with the rise in BTC/USD price. This is especially true of new hardware pre-orders, be very careful about those (don't believe the expected shipping date).

I would recommend that you use this calculator instead.

Make sure you fill-in a realistic hardware lead time (1 unit for every 12 days wait).

Do your research otherwise you could end up not breaking even.


Is there a mining software that I can run on my webspace (php, ruby, python)?

You should look into webminers - What is the status on webminers?

But generally, it's not really worth it. Unless you get a lot of high-end-graphic-card-owning users to stay on your website for a long while, you won't earn much. You can try running some of the webminers on your own machine and see how much you can earn for example by using my Mining Calculator. Having someone with a 100MHash/s graphic card (fairly decent for a non-dedicated miner) on for 24 hours would give you about a cent of revenue.

All in all, you're probably better off with adding some ads to your website.


How to setup bitcoin network using regtest?

2 ways.

bitcoind --regtest --printtoconsole
Configure bitcoin.conf and include a line regtest=1.

Second way is better so usage of bitcoin-cli is less verbose.


does bitcoin-core support bip44 HD wallet

No, Bitcoin Core uses the BIP32 derivation path m/0'/0', and you are unable to change the derivation path of the wallet in Bitcoin Core.

There is however the Hardware Wallet Interface (HWI) that might be what you are looking for.

https://github.com/bitcoin-core/HWI
https://github.com/bitcoin-core/HWI/blob/master/docs/bitcoin-core-usage.md


lost bitcoin on electrum - wallet closed after transaction went through?

Hmm.. weird. Here is what you can do: Open Electrum, click on on
  wallet, then master public keys. Copy the master public key and paste
  it in blockchain.info/xpub/"your master public key here" without the
  quotes. It will show you all the transactions related to your current
  Electrum seed. Is the 'lost' transaction listed there?

Well, if you are absolutely sure that you saw the transaction in Electrum, and the address has now disappeared even using the same seed. There is only one thing left to do: Submit an issue directly to the Electrum developers. github.com/spesmilo/electrum/issues and mention that you tried with your master public key and didn't find the corresponding transaction.


I assume, since they operate on the same algorithm, they automatically change the goal for their algorithm from time to time without having to verify their assumptions with anyone.

Yes that is correct, every node in the network must calculate this independently and come to the same result. All content used for validation is always independently constructed by every full node, you can manage complete synchronization of the Bitcoin network using only block binaries and no further information at all.

  For example, for some time a certain miner has been trying to provide responses to challenges so that the hash(challenge+proof) has 40 leading zeros.

"Number of leading zeros" is frequently used to describe Bitcoin mining but doesn't really reflect how proof of work operates, it merely shows a side effect how the blocks are encoded and displayed to users. SHA256 hashes are 256 bit integers, miners are attempting to find block hashes that are lower than a particular integer target. If the system were just based on the number of zeros in the hex encoded hash there wouldn't be enough granularity between two levels.

  Even though the miners didn't have an official agreement - "From now on, we are all solving an easier task. Ok? - Ok! - Lets go!"

That would be against the consensus rules, and any blocks arbitrarily targeting the wrong value are simple discarded. Nodes in the network strictly validate every single rule and throw out any blocks with don't follow them. Miners only exist to order valid transactions into blocks and provide relative trust to SPV clients where required, they don't set the rules.