What is the proper way to authenticate to Bitcoind for multiple users? This question was asked here: Bitcoind and multiple users but its answer is a link to a deprecated feature.

If I am running bitcoind on a server and want it to manage multiple users, what is the proper way to authenticate to that server and have separate user accounts, or should I implement user accounts on my own end which interact with a master bitcoind instance?

You should implement it as a separate layer.

Bitcoind doesn't really support multiple users.  It lets you set a single username/password to connect to the RPC server, as well as encrypting the (single) wallet with a passphrase.  But there's no way within bitcoind to have individual authentication credentials that will allow one to spend some of the coins in the wallet but not others.

So a typical way to do this would be to have bitcoind store all the coins of all the users, pooled in a single wallet.  Then your software has to track how many coins belong to each user, authenticating the users, and ensuring that they can only spend those coins which are credited to them.  (The accounts feature might have helped with the first of these, but not the others.)

Alternatively, you can run a separate bitcoind instance for each user, but this will require more resources.


Where can I find a roadmap of the main bitcoin client? Wallet encryption is long overdue, and AFAIK is coming in the next client version (0.4.0). What are the next planned milestones in the development of the main client and/or protocol? Where can I find information about that?

You can read the Roadmap and the status before v0.4 release

They discuss the development at
http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development


How can we look up any transaction in a blockchain if they are encrypted? When we add a transaction to a blockchain, aren't all the transactions hashed? Once we do that and keep on adding hashed blocks, how are we able to look up any transactions and their details?

Hashing and encrypting are separate things, and not really relevant to your question actually. You can read up more on them separately.

When a transaction is broadcasted, the raw serialized tx is broadcasted. This includes the inputs, outputs, and signatures. The transaction hash is actually the hash of this serialized tx.

When blocks are mined, they simply include a block header, plus the serialized transaction data for each transaction in that block. Once again, the block hash and tx hashes are the hashes of the block header and the serialized txs.

Since the serialized data contains the inputs, outputs, and signatures, it is possible to view the history by simply going through the blockchain.


Where is debug.log file in Bitcoin source code? I am running 64bit Ubuntu 17.04, I am following this tutorial for creating a new altcoin. I am up to section 7, here to be exact:

The first time you run the compiled code (daemon or qt), it will say "assertion failed". Just exit the program, go to
config dir (under AppData/Roaming), open the debug.log, get the hash after "block.GetHash() = ", copy and paste it to the beginnig of main.cpp, hashGenesisBlock. Also get the merkle root in the same log file, paste it to the ... position in the following code, in LoadBlockIndex()

I am struggling to find the debug.log file, and so cannot get my hashes to continue. This guide is quite old (4 years) and I think is for setting up an altcoin on Windows.

Where is my debug.log file? If it doesn't exist, what is my next step?

On Unix systems the debug.log file, as well as all other files created by the client (blockchain data, databases, etc) are placed by default in ~/.bitcoin; that is, a subdirectory of your home directory named .bitcoin.  If you have used -datadir to set a different data directory, debug.log will be placed there instead.

Note that the ls command normally will not show files or directories that start with ., so you won't see this if you just ls your home directory.  But you can still cd there, or use ls -a to see it.


about a stuck bitcoin transaction I sent 24mbtc over a week ago with the transaction number abef483d268dc61214fd5bf25c602256cf447aa65bec2e539fee42f59a3b90b3
the person i sent to still says, they have not received anything yet the transaction says in my wallet it is confirmed. What could be the problem?

EDIT: while your transaction did go through (see below), you sent a different amount (~11 or ~19 mBTC depending on which is the change address) from what you said the recipient wanted.

Looking at https://blockchain.info/tx/abef483d268dc61214fd5bf25c602256cf447aa65bec2e539fee42f59a3b90b3, it seems that your transaction is not stuck at all. It has been confirmed over a thousand times as of today. So there's three possibilities here:

a) the recipient of the transaction doesn't know how his wallet works and is somehow unable to see the received transaction

b) they gave you a wrong address or you mistyped or mis-copypasted it (which would mean the coins were sent to an address somebody else owns, or nobody at all)

c) the recipient is lying to you.


How does the bip32 version bytes convert to base58? Converting the BIP32 version bytes - x04\x88\xad\xe4 - from base256 to base58 and base58Check returns 7irrX and 1kz713TZjju, respectively.

I thought the version bytes represented xprv. What am I missing?

I'm using pybitcointools, if that makes a difference.

Just like in regular bitcoin addresses (or anything base 58 encoded), the version bytes don't get encoded by themselves. As described in the Serialization format section, there is 78 byte payload that gets versioned and checksumed before then being encoded into base 58:

  4 byte: version bytes (mainnet: 0x0488B21E public, 0x0488ADE4 private; testnet: 0x043587CF public, 0x04358394 private)
  1 byte: depth: 0x00 for master nodes, 0x01 for level-1 derived keys, ....
  4 bytes: the fingerprint of the parent's key (0x00000000 if master key)
  4 bytes: child number. This is ser32(i) for i in xi = xpar/i, with xi the key > - being serialized. (0x00000000 if master key)
  32 bytes: the chain code
  33 bytes: the public key or private key data (serP(K) for public keys, 0x00 || ser256(k) for private keys)

There's not a byte-to-character mapping when you do base58 serialization of a multi-byte structure. It's not like 0x04 becomes 'x', 0x88 becomes 'p', etc. Rather, the whole 86 (78 payload + 4 version + 4 checksum) byte structure gets encoded to something that starts with 'xpriv' when the 4 most significant bytes of the 86 bytes structure are [0x04, 0x88, 0xad, 0xe4].


What the difference between old segwit (3) and new segwit address (bc)? i'm not that kind of person who understands cryptography and math, can you tell me simply the main purpose of new segwit address? are transactions fee the same for new segwit (bc1)?

instead of "Old Segwit" and "New Segwit" what would you call em?

The difference lies in the encoding and the underlying representation in the transaction data stored on the blockchain.

The 3-segwit addresses are known as P2SH-P2WPKH or P2SH-P2WSH. This stands for Pay-to-witness-pubkey-hash wrapped in pay-to-script-hash and pay-to-witness-script-hash wrapped in pay-to-script-hash respectively. This was done to provide backwards compatibility with existing wallets and allow time to upgrade to the bc1 addresses.

The bc1 addresses are known as native segwit addresses. An address starting with bc1 is always going to be segwit, while a 3-address could also be a regular multisig or other script address.

Both the 3-address version and the bc1 version require less fees, although the bc1 version requires even fewer fees than the 3-address.

bc1 is bech32 encoded, which improves error detection over the original base58 encoding, and also helps prevent cross chain transactions (for instance, you will not be able to send LTC to a bc1 address, but sending LTC to a 3-address will go through just fine)

You can learn more about the design of bech32 in this talk by Pieter Wuille.


What are the differences and advantages of stratum to HTTP? I understand that Stratum is a kind of protocol specifically designed for ASIC miners. I found this page from its creator, but it is very technical.

I want to know, in layman's terms, what are the differences between Stratum and HTTP. I also want to know if this means anything to me; do it give me more hash, or more shares in the pool, etc. Or is it mostly a concern for the pool operators; running my miners on Stratum is better for them.

Stratum is an over-the-wire protocol that solves the headaches created by HTTP when used for mining. To understand why Stratum is necessary, you have realize the fact that HTTP is designed for serving web applications and web pages, it's main job is to return files and not to coordinate peers. But miners need to do more than receive information, they also need to send. The following are issues with HTTP:

Miner's request information

If a miner wants a new mining job, they have to send a request through HTTP. Why bother with having the miners request this information when the mining pool knows more efficiently what each individual miner should be doing? What happens if a new block appears on the network and the miner doesn't know about this? So Stratum flips this and has the mining pool sending information as it becomes available, not miners asking for available information periodically.

Long-polling

Long-polling is a very hacky solution to fix the one-sided nature of HTTP. It's done by setting a very high timeout limit (say 10 seconds) where the server purposely delays sending information until it has something to send. Imagine a URL address taking minutes to load because the server is simply waiting for something to happen on it's network. This creates a lot of inefficiency as miners are requesting data that simply isn't there and servers have to maintain those connections as well for as long as mining happens.

Ntime rolling

This is a more technical problem, and its fix is considered the biggest innovation of stratum. Miners are given the ability to modify 2 fields, the nonce and the time. This becomes a problem for large miners as they can run through all possible values of the two fields in search of the solution. If a miner runs out of unique possibilities, they have to send a new request. Newer and faster miners make this more easier to do by the month and bandwidth usage for a pool increases dramatically. Stratum solves this by giving the miners a few more fields which seriously increase the total possible solutions to a block.

TL;DR

Stratum makes it so that the miner and pool are freed from the inefficiencies of HTTP, which is not meant to support mining at all. It makes communication more efficient meaning future exohash mining equipment will have enough jobs to complete while the pool operator isn't being gutted by massive bandwidth and server fees.


Why does the hash come before the signature? The first figure in the original paper of Satoshi is a diagram of transactions.  This diagram seems to indicate that the transaction data is hashed before the sender's signature is appended.  Why not just hash the entire transaction, including the signature, to produce all-encompassing transaction hash?

Update:  I want to highlight the comment by @David Schwartz on the accepted answer.

Because it would not have a function. The hash listed in the picture of the original whitepaper is just to make the signature shorter (and possibly the process of creating it faster) without losing security, its only function is the authentication of a transaction, it is not used for anything else (or even stored).

To clarify, this is the diagram mentioned in the question:


Transaction validation by full nodes All the full nodes in Bitcoin network validate a new block as soon as it is mined and propagated on the network, by verifying the nonce and the resulting block hash.  Now the question is that, Do full nodes validate each transaction in the Block, based on its complete history of input and outputs to check for any error?

Yes, all transactions in every block are verified by full nodes. Nodes do not have to traverse the full history though, because they would have already validated the parent transactions before the child block is received usually. So they can just make sure the new transaction is valid in the ways it needs to be.


How to stream transactions on the network How would I go about getting a stream of transactions broadcast on the Bitcoin network? Is this supported by the vanilla client?

I know that the client can notify me on new blocks and on all transactions that effect an address in my wallet, but I want to stream ALL transactions on the network.

Reading your question again, and looking at the comments, I think your question is slightly misinformed.

The standard bitcoin QT client is a node, which means that it receives the inventory of all transactions and relays all valid transactions it requests to receive (from the inventories). That's a bit of a mouthfull but read it carefully.

This has nothing to do with your wallet. It is a standard function of the full node on the peer to peer network.

What you appear to be mixing is the functionality of the wallet and the functionality of the node. These are two different things.

Bitcoin QT is unlike other (lightweight or SPV) clients which only request information specific to the addresses they hold, when trying to syncronise themselves with the network.

If you are looking to essentially print all transactions that are being relayed through your node, I think this would be pretty straitforward using something like Node.js or just running a continuous regular process which queries Bitcoind using RPC.


How can I use bitcoin testnet in coinbase php I'm using coinbase wallet for bitcoin transactions. Is there any option to use testnet for transactions testing purpose in coinbase?

Any suggestions will helpful.

Yes, Coinbase now supports using the Testnet.


Some doubts about mining mechanism I have some questions about the mining mechanism.

1) After the block has been mined (and the miner found the nonce for the proof of work) the block is broadcast to the network. Are the transactions in the mined block also verified by the other nodes in the network, after checking the correctness of the nonce by the network?

If so, how many confirmation nodes are needed to say "Yes, this mined block contains correct transactions! Let's add it to the blockchain"? If it isn't so, can a miner mine a block with incorrect transactions and then broadcast it into the network?

2) Can a well mined block be rejected by the network? Maybe by some malicious host ?

Well, are the transactions in the mined block verified also by the other nodes in the network, after checking the correctness of the nonce by the network?

Yes.

  If so, how many confirmation nodes are needed to say "yes, this correct mined block contains correct transactions! let add it to the blockchain"?

It doesn't work that way. If a node thinks a block is invalid, it doesn't relay the block. If all nodes who got the block in first place, thinks that the block is invalid, other nodes don't receive that block and it gets forgotten. If they think the block is valid, the clients add the block to their blockchain and relay it to other nodes.

  Can a well mined block be rejected by the network? Maybe by some malicious host ?

Yes, ISPs can do that (although big pools run their own ISP). But that's pretty hard (impossible) without the help of the miner's ISP.


How to install litecoin daemon in AMI I have cent os in my amazon ec2 instance i try this post to install litecoin daemon after done compilation and run ./litecoind gives the following error

litecoind: key.cpp:134: {anonymous}::CECKey::CECKey(): Assertion `pkey != __null' failed.
Aborted

How to configure litecoin.conf in AMI?

In my personal experience, CentOS is the absolute worst choice of Server OS for compiling altcoins. I have yet to compile and run a single daemon on this Operating System. Cent OS is dead. Instead, use Ubuntu or any other Debian based OS and enjoy the benefits of painless compiling.

If you're in a situation where your main application resides on a centos server, and you don't want to change up your whole operation my suggestion would be:

buy a small vps and put ubuntu on it(install fail2ban and clamav, in addition to dependencies.

then download and configure yaproxy to safely tunnel into the vps(you can make rpc calls from the subnet without outside exposure). now make a database on the main server to store your wallet credentials.

now you need to setup ufw at this point.

you should allow with UFW the following:

connection to the default port of the wallet from any ip or a list of trusted nodes
connection for yaproxy confined to the ip of your main server.
connection to the rpcport from localhost to the subnet address of the main server

anyway, probably went way into left field on this one, but it should be enough to get your headed in the right direction when you inevitably realize why you can't compile correctly on cent os. it's because no body updates the yum package repositories, because cent os is just waning in popularity for various reasons.


Why am i picking up 2 blockchains for my BTC address So this is my address
38UPP6po1NJvNQoTavvTBzbRi1bKcyR7tZ
And i am picking up 2 blockchains ,one for BTC and BCH ? I did a transfer a week ago and i am not sure why i cant see the funds in my coinbase account ?
Please help

I am picking up 2 blockchains, one for BTC and BCH?

There are a vast amount of numbers that are valid Bitcoin-addresses (BTC). Most of them have never been used and never will be.
Many of these same numbers are also valid Bitcoin-cash addresses (BCH) because of the way Bitcoin Cash was created.
So your address is a valid address in at least four different cryptocurrencies.

I did a transfer a week ago

That address has only ever been used in Bitcoin-Cash (BCH). It was used once last week.
That address has never been used in Bitcoin (BTC) and never had any amount of Bitcoin associated with it.

I am not sure why I can't see the funds in my Coinbase account?

If the above doesn't help, you should probably contact Coinbase and ask them for assistance.


Help with Coinbase? Confused BCC address with BTC one As a newbie a friend who owed me some money suggested I get Coinbase and let him pay me in bitcoin.  I got the address but didn’t realize I got the address to my BCC wallet instead of bitcoin wallet.  It is quite a lot of money and I have no idea what to do.  Am i just out of luck?  Thanks a lot for any help.

Did he actually send you the bitcoins to the BCC address? If yes, and the transaction has been sent to the blockchain, then you are indeed out of luck and can't recover that.
Sorry!


What happens to bitcoins if the site shuts down? My father just asked me:  What happens if the bitcoin people decide to shut down the website, what happens to my bitcoins?  I didn't know.

The ledger of Bitcoin balances is stored on a network comprised of thousands of individual computers around the world. Anyone can run the Bitcoin program which contributes to that network and stores the record of every transaction that has ever happened. This is what is called a peer-to-peer network or a decentralized network.

There is no website that controls Bitcoin, but there are websites that pull information from the network and present it to you. You can trust them to store and report to you that data, but using the program itself on your computer is the most secure way to handle your funds, and it has the added benefit of also securing the network a bit more.

There are many websites which do the work of downloading the program and managing your Bitcoins for you - in the same way that paypal manages your money on their website. If you trust paypal to not decide to "freeze" your funds for no apparent reason, which they have MANY TIMES before, you would deposit money into their website. It's exactly the same with a Bitcoin website that stores your funds. However, a very notable benefit of Bitcoin is the ability to securely store your coins on your PC, which is not possible with cash. Additionally, as long as you hold the wallet file or technically the private key that is assigned to the program on your PC, your Bitcoin can never be frozen by anyone. The only requirement for spending those Bitcoin in the future is that you have your wallet file (or your private key) and that the network still exists. Currently the network is only getting bigger as the days pass.

There are questions that follow after understanding this answer, such as how transactions are validated if there is no central authority, and there are considerably sufficient answers to those questions elsewhere on this forum and other places online.

I suggest you check out https://www.weusecoins.com/en/questions -- it has the answer to many of the preliminary questions you may have, and the main page also has a quick video which does a good job of explaining the concepts to newcomers.


How is a miner prevented from adding transactions without signatures to their block? Consider I'm a miner. I mine on my own, I don't mine in pools. I have power enough to find the hash, lets say, once per 2 years.

When I find the hash within those 2 years I send the block back to the network and since the hash is low enough the block would be accepted and added to the block-chain.

It's up to miners (so me) to check the transaction signatures but the block AFAIK doesn't contain the signatures. How can others within the network can be sure that all the transactions in my block which I calculated were signed?

If I was an evil miner, I could have added a transaction without a signature. How is this prevented? Am I the only one who checks the signatures within my block?

Thanks for explanation.

No, you're not the only one who checks signatures.

Before a block is submitted, every signature / transaction is checked/verified by other nodes.

I believe the SHA256 hash is the first thing which they check, which contains all/most headers for the block.Then every tranasaction hash +/signature is checked.

If they can't confirm a transaction hash / block hash i believe your block will be rejected.

This might help you out a bit, -> https://en.bitcoin.it/wiki/Protocol_rules#Explanation_of_Some_Rules


Wallet advice for users without technical knowledge I just want to buy £50 worth and forget about it for ten years. I live in the UK, don't have a smartphone, bank online, but can't prove ID easily (because I rent a room in a block). I don't understand highly technical explanations. What's the best wallet for me?

When you register to LocalBitcoins you get a free web bitcoin wallet. You can access this with a web browser and protect it with secure paper codes log in.

Also the site allows you to buy bitcoins with cash, so you get two birds with one stone.


What software/hardware is required to mine with an FPGA? I have been looking for a device that would allow me to mine Bitcoins without too much noise and heat. Something relatively small that I could keep in a shelf without worrying too much about it.

A rig with GPUs is too noisy so I looked into FPGAs, but I have no idea what these devices are. From what I understand, an FPGA is just a card (like a GPU) so I would still need to keep a computer on 24/7, right?

So do I need special hardware/software to connect an FPGA to my computer or does it work like a GPU?

You would need a computer to program the FPGA, obtain the work units, distribute them to the FPGAs, collect the shares, and submit them back. If you're not using a mining pool, you'll also need the computer to generate the work unit, assemble solved blocks, and submit them to the Bitcoin network.

The computer won't be doing that much work. So you can use a very low-end machine and optimize it for low power consumption and low noise.

Cablesaurus built the first commercially available FPGA Bitcoin miner. There is a lot of innovation going on and what's available is changing rapidly, but most of the current designs are very similar to this design.


Newb Help - Output not matching input I've just attempted to send some bitcoin between 2 wallets and the amount received in the receiving wallet doesn't match the input, can someone explain why?

Here is the transaction https://blockchain.info/tx/53d1083c08eacf36629f544d19546199029a6fc461215a73a07c7c4adb01a7c2

The input was 0.0032 BTC, the fees were 0.00050278 so I expected to see 0.00269722 hit the receiving wallet. What looks to have happened though is the output was split and I actually received 0.00069722 BTC and the 0.002 BTC has gone to a wallet that I don't recognise.

Can someone shed some light on what's happened? Why the 2 outputs? Looking at my previous transactions it's always been a 1:1 input/output relationship.

I know it's only small amounts but keen to understand whats happened and where I can retrieve that 0.002 BTC.

Cheers

check your wallet: wallet like jaxx and other have some fees


BIP9: What happens if I make a segwit transaction after lock in but before activation? Will it be treated a anyone-can-spend or do the nodes enforce the new rules?

Along the same lines, what exactly happens when we say a soft fork is activated?

Are the enforced at the time SF becomes activated?
Or they are always enforced from the moment you download the client, but we consider it safe to use after activation?

The new rules are come into effect only when the softfork activates.

I am not completely sure, but I think in the case of segwit transactions these would be treated as non-standard nodes and thus not accept it in their mempool. If a miner does have it in their mempool, they will not mine it into a block.

Hopefully, everyone that receives it would immediately drop it, but I think that third parties could pick the input up with an ANYBODY_CAN_SPEND transaction. They'd need to deposit the transaction directly to a miner that mines this type of non-standard transactions though for it to be mined.


Why not speed up block mining? After reading Why is increasing block size in the Bitcoin network considered to decrease security?, I have a follow-up question about increasing block sizes:
why do we not reduce the difficulty of PoW?
If I understood correctly, this would speed up the mining of the blocks, so we could do more transactions for a still low cost and keep security, is that right ?

why not reduce the difficulty of PoW?

I'm going to assume you mean we decrease the block interval, so that blocks are found more often than the current 10 minute target. Manually altering the difficulty would indeed allow blocks to be found faster, but only until the difficulty adjustment resets it.
So really, to change the block interval, you'd need to change the difficulty adjustment algorithm, so that the target time interval is shorter.

If I understood correctly, this would speed up the mining of the blocks, so we could do more transactions for a still low cost and keep security, is that right ?

Bitcoin's proof-of-work allows miners to turn energy into security, so the amount of energy spent per time is equivalent to the amount of security attained per time.
So we could allow twice as many transactions per time, but assuming the amount of hashpower remains unchanged, we will still have the same amount of energy being spent per time to secure those transactions. This also means that at the moment of transaction confirmation, the "security per transaction" would be halved, since only half the time has passed. After two blocks, the transaction would have security equivalent to a single block's confirmation on the unaltered chain.
Related: this is why blockchains which claim to have 'faster finality than Bitcoin' are a farce: the Bitcoin network consumes more energy per time (and thus provides more security) than any other network. The number of blocks that have passed is meaningless as far as security is concerned, what really matters is the cost of rewriting those blocks. For example, rewriting 100 blocks of a low hashpower coin might be cheaper than 1 block on the Bitcoin network. So in this way the Bitcoin network's single block provides more security, more quickly.
So, why don't we do this, and lower the block interval?
With respect to the question you quoted, it is worth noting that halving the block time would be equivalent to doubling the block size, in terms of the computational, bandwidth, and storage (ignoring pruning) resources required. Doing so would put more strain on network nodes, as it would require more resources to run one. With an increase in required resources, we should expect that less nodes will exist, and that negatively impacts the degree of network decentralization. Having nodes remain as decentralized as possible is important for the bitcoin network, as the value proposition of the network largely depends on it.
As Pieter mentioned in the comments, another negative effect is increased block orphan rates. I'll copy the text from the link in Pieter's comment, which was written by Pieter, and is a great description of the issues with decreasing the block interval:

There are two issues that get worsened by this:

The shorter the inter-block interval is, the more advantage you're giving to an attacker. You see, blocks take time to propagate through the network to all miners, at the very least limited by the speed of light. Due to PoW resulting in a Poisson process for block generation time, there is a nontrivial chance for two blocks being found within a very short time of one another. If that period of time is so short that the first block has not had time to reach the miner producing the second, the second block will be a waste of power (both in terms of income and in security to the network). This wouldn't be a problem if it affected every miner equally, but it doesn't. More well-connected (geographically centralized) miners suffer less, as they're relatively closer to everyone. But most importantly, a 51% attacker does not suffer from this at all, as he only builds on top of his own blocks, and thus never needs to wait for propagation. For some numbers, at block interval 600s there is about a 0.83% chance that two blocks are produced within 5s of each other. With block interval 60s that goes up to around 8.0%. If block propagation takes 5s, that means giving a direct 8% cost reduction to a mining collusion attack.
Overall resource consumption for full nodes. If you have 10x more blocks of the same size, full nodes will need 10x more resources to verify history and maintain in sync (bandwidth, CPU, I/O, storage, ...).

In my opinion, considering these negative effects, the linear gains in scale achieved would not be worth the work and risks involved in pushing out a rule change like this.


How to find private key in blockchain.info account? I have been trying to send some bitcoin from my blockchain.info account but was asked to provide my private key how can I find my private key on blockchain wallet?

There is no way to export your private keys directly unless its an imported address that you imported to your wallet.

To get the private keys for your main wallet addresses:

login to blockchain.info.
Click Settings > Security > Backup Recovery Phrase > write down your phrase with exact order to import it later using Electrum wallet.
Download Electrum bitcoin wallet and setup on your computer.
Start Electrum then choose file > new/restore > click next > choose the option "Standard Wallet" > then choose I already have a seed.
Enter the seed phrase you saved from Blockchain.info then click next you can choose a password to protect your wallet.
Now you control your wallet  click addresses tab then choose the address you want right click and choose private key option.

Dont give your private keys to anyone not to lose your coins


What Do SegWit Addresses Look Like? Probably a question that has been asked a lot before, but how do I know if an address I generate with bitcoind and bitcoin-cli is SegWit?

I take the following steps to (attempt to) generate a SegWit address with the command prompt:

$ bitcoin-cli -testnet getnewaddress

n2BC24zr3L5BwVazecnvPPh7NwgcV2Vfxa

$ bitcoin-cli -testnet -addwitnessaddress n2BC24zr3L5BwVazecnvPPh7NwgcV2Vfxa

2NBnkQpnPitDbE3evwZXGpNpRLE51cJpdGA

Now this confuses me because in this post it is stated that SegWit addresses start with a '3'. Yet in this address it is said that they start with 'bc'.

The address I've generated in the above example starts with 2N, which is neither of the above. How can I know if it is still SegWit? Or did I do something wrong while trying to make a SegWit address?

You are using the testnet which uses 2 instead of 3, but as far as i know it is impossible to tell if something is a multisig or segwit adress when they both start with 3 on the "real" bitcoin chain, It could be both..

However you can indeed be sure that it is a segwit adress when they start with BC1, these are so called bech adresses. See more here, https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki


How big is the blockchain on disk as of 5th July 2012? I just started Bitcoin-qt for the first time, and it is syncing. How much space does the blockchain take up? I have my drive heavily partitioned, and my /home partition (linux mint) is only about 20GB. Does anyone have a size accurate within 100MB?

At the moment, it's about 2.6GB, but it will be growing with time.

You can try looking into using an eWallet or some lightweight clients if you are tight on the disc space. Their space requirement is minimal in comparison, but the security model they offer is different. The lightweight clients are developed by other people than the core Bitcoin team, so you have to know that you can trust them (haven't yet heard about a case of the lightweight clients being malicious). With the eWallets you put the security of your money in the hands of the third party and their server. There have been incidents of people losing a lot of coins because of this (like MyBitcoin), but if ran well and by trustworthy people, your Bitcoins can be more secure than on your computer.


Address no longer shows up in Bcoiner account Here is what I did:

Downloaded Bcoiner on my iPad.
Made an account.
Generated a new address, which was 1NEuLDXuBRTYfcbGpzUbpkr4Sg2p7sNLB4.
I sent 4.69 bitcoins to this address.

I logged back into my account an hour or so later. I found that the address which I created earlier above has disappeared. I sent all my coins there.  I can see that they made it to the address but I have no access to them because the address is no longer visible on my account with Bcoiner.

I have emailed support at Bcoiner; they have not replied.

Unfortunately if this is a Bcoiner bug only them can recover your address and your Bitcoin.

When you generate an address, you generate a private key (linked to your bcoiner account) if Bcoiner can't recover it I'm afraid you have lost your bitcoin forever.

The best solution is then to contact them.

Remember : use a local wallet (Bitcoin-qt for example) and make a bakup of your wallet periodically, if you want to use an online service then make a local backup of your wallet to avoid this kind of problems.


Making change in a timely manner If using Bitcoins in a real world brick and mortar store, a customer presents a paper with a QR code, merchant scans QR code and deducts purchase cost from Bitcoin total presented. How can merchant print change receipt in a timely manner, <10 , if you have to wait for another block creation?

The store would accept the paper wallet, import the private key and sent the money to a safe address (for which only he has the private key).

When it turns out that there was no previous double spend, the store can be sufficiently at ease that the money will arrive.

The customer would now present a second paper wallet from which he only shows the address (and keeps the private key secret). The store could then sent the correct amount of change from its own wallet. Both transactions would be unconfirmed, but for small amounts it should not be an issue.

However, without internet access the customer would have to trust the store that the change was actually sent as promised.


What should I do if I change my BitCoin wallet? At present, I use Electrum as my wallet, and I create private key and transfer some bitcoin to the Electrum wallet.

If I choose a new  wallet such as  BitGo wallet listed on https://bitcoin.org/en/choose-your-wallet, how can I pass bitcoin from old wallet to new wallet?

Do I must to send bitcoin from old Electrum wallet to the new address created by new BitGo wallet?

When switching wallet providers/programs, the safest option is to usually just send the BTC to the addresses provided by the new system (after you have made a backup of the mnemonic phrase/keys for the new wallet).

Although standards compliant wallets should be able to accept each other's seed phrases, a wallet restoration process is an inherent weak point of the system, leaving you susceptible to attacks such as keyloggers and phishing. Thus, it is better to set up a new wallet.

Note that you should be aware of basic security practices regardless of which method you use, such as ensuring you are on the correct website, using a trusted/ clean device, and making sure that no one is looking over your shoulder.


wallet.dat from 2014 shown as empty with latest client 0.18 I have bitcoin wallet from 2014. I have saved it encrypted.
Since then I haven't checked it, until now.
I did sync the whole bitcoin block-chain and when copy my wallet.dat and re-scan wit the client, the wallet got shown as empty. My wallet.dat is 88kb.
Bitcon core Client dump of the wallet shows addresses only from 2019 and wallet keys dump from the client returns error.
Any help is appreciated.

Did you resolve this issue for yourself? If not, please do the following. First remove save your wallet.dat file into another folder on your pc. Second remove BTC Core entirely from your pc and restart the pc. Finally, reinstall BTC Core onto the pc. Go into the wallet directory, rename new wallet.dat which is created. Place backup wallet.dat file here. Restart BTC Core client and let it rescan the network. This will fix your issue.


Do I need to pay taxes if I sit on (do not use) bitcoins? I've done some reading on the IRS bitcoin guidelines and I'm a bit confused how the capital gains taxes works. If I buy some bitcoins in Jan, the value of the bitcoins double by the of the year but I still keep them, do I need to pay a tax on those? Or do I only need to pay tax if I buy something with them/convert them to fiat?

I'm in the USA by the way.

No. Assuming you are not a miner or receiving bitcoin in exchange for services, there are no taxes that you need to pay on the bitcoins until you sell or transfer them. When you sell or transfer them, you need to pay taxes on the difference between the value of the bitcoins and your tax basis in the bitcoins.

The value of the bitcoins would be what you sold them for if you sold them. If you traded them or did not get full value for them the value for tax purposes is their fair market value.

Your basis in the bitcoins is what you paid for them. If you mined them, it's probably their value at the time you acquired them assuming you treated them as income. Otherwise, it gets complicated. (In particular, you should either treat your basis as zero or consult a tax professional if you sell or otherwise dispose of bitcoins you received as a gift!)

If you held the bitcoins for more than a year, this is a long term capital gain. If you acquire and sell bitcoins on a regular basis, the rules get tricky for which sells you have to match to which buys.

I am not a lawyer. Please check with your own tax professional if you need advice you can rely on.


What makes bitcoin decentralized? I want to understand the defense mechanism of the Bitcoin price control.

A rich company can buy a large portion of Bitcoins from different people in different exchanges. Then they can hold on to those Bitcoins, essentially becoming a controller of the Bitcoin economy. A large number of companies can start doing that.

If that becomes the case, then will Bitcoin still be decentralized? Those companies with their fare share of the Bitcoins, can control the price or any other aspect of the economy.

I think you're not understanding what decentralized exactly means.

Sure, a company with a large stake can control the price ( up to a certain degree), but this does not mean that they control (the protocol) Bitcoin itself.

There's no central power which decides what transaction is good, or which one is bad, or who controls what.

which would still be the case even if company X had 90% of the bitcoin supply.


Privacy friendly payment processor What is the most reputable Bitcoin payment processor that has privacy friendly terms and conditions? BitPay and Coinbase are known to have used chain analysis to spy on customers. What are the alternatives for reputable merchants who do not approve of this type of privacy violation applied to their customers?

I'm pretty sure that all crypto payment processors that deal with fiat <-> cryptocurrency exchanges are doing AML/KYC routines including chain analysis. That's not only true for BitPay and Coinbase but Circle et al. too. As soon as you're trying to move value between crypto and fiat you're going to have to deal with different levels of privacy invasions if you're using a payment processor.
The exceptions to those KYC/AML routines is either cash <-> crypto transactions (like localbitcoin, mycelium...) or using a crypto currency that can't be traced by (evil) companies like chainalysis.

tl;dr I don't know any non-privacy invading bitcoin payment processor as soon as fiat gets involved.

ps: However I know that there a various people working on new (open-source) cryptocurrency payment processors. I will try to dig out some additional info on those and update my post accordingly.

edit: interesting update on coinbase: https://news.bitcoin.com/coinbase-helps-fbi-shut-kickasstorrents/


July 2015 forks and SPV mining: Why did F2Pool and AntPool mine an unverfied chain for so long? I've been trying to understand what exactly happened in July 2015. Specifically, I can't figure out why F2Pool and AntPool mined for so long (~1 hour) on an unverified chain?
According to blockchain.info, the first orphaned block was generated at 2:09am [1], while the 6th block was generated at 3:05am [2]. This suggests that F2Pool was "SPV mining" for over an hour, which seems very risky considering they had no information about the validity of the preceding block that they built their first (invalid) block on (i.e. the block in [1]).
I realize that block header timestamps could be off by a little bit, but the time should still be close to an hour, right?
Here's my understanding: I think I see how "SPV mining" can reduce orphan rates by starting to mine earlier on an empty block before verifying its predecessor. From [3] and [4], I understand that an SPV miner would mine block B on top of an unverified block header A (or hash, as in July 2015) under the assumption that it would receive A's block contents soon and verify them. This way, the miner would be sure that its SPV-mined, empty block B is also valid. I also understand that if block A is invalid, then the Bitcoin P2P network (and perhaps other gossip channels Bitcoin miners use such as BRN) will not relay the invalid block's contents to save bandwidth, which means the SPV miner now has to rely on a timeout to tell whether A is valid or not.
What I don't understand is how come F2Pool did not time out in July 2015? Did they not implement that logic? That would seem silly from a money making perspective.
I could not find much about this online.
PS: I've read the answer here but it doesn't explain why F2Pool went on to SPV mine for so long.

It seems that F2Pool implemented their version of SPV mining with insufficient thought to the effects it would have. The proof is right there in the blockchain: they they didn't implement a timeout.

It was a financially expensive mistake, but miners are highly incentivized to decrease latency, so not implementing SPV mining would also have cost them money.


Is there a Bitcoin testnet that is really small so you can quickly download the blockchain and test stuff? Is there a Bitcoin testnet that is really small so you can quickly download the blockchain and test stuff?

Depending what are trying to achieve you can use  testsnet box https://github.com/freewil/bitcoin-testnet-box, it runs two nodes one connect to another in our machine without need to access or the testnet, also gives the ability to generate blocks whenever you want so you don't need to wait.


Is there any opencart extension where I can use address generated by my personal bitcoin daemon? I want to integrate pay via bitcoin option on my website but I dont want to use any third party payment gateways like bitpay or BIPS what I want is a extension of opencart in which I can pass username and password of the daemon running on my server and the extension generate new addresses for every customer upon request.

I can do it by changing php files of opencart but that will take time so I am looking for a ready to use extension.

I do not believe an opencart extension exists.

If you set RPC User and RPC Pass in bitcoin.conf you can use Bitcoind's JSON-RPC:

https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29

I'll add that doing this opens up a whole slew of security vulnerabilities that would need to be addressed. Having your server communicate with your personal Bitcoin daemon over the public network opens up all kinds of issues and I would strongly discourage it.

Alternatively, you could generate a bunch of addresses using your Bitciond and upload the public keys to a DB or txt file on your server, display each address only once and associate it with an order in opencart.


If I'm reading correctly, your input transaction is  7bd31512076520e5fb2ee1cef9b6e63f0571cbd05d26676c7df336b4e0323e3f.  This transaction is not found by a search on blockchain.info.  I would guess one of the following is true:

The transaction id is incorrect
The transaction was never broadcast
The transaction was broadcast, but was never confirmed, and so much time has passed that  blockchain.info stopped keeping track of it.

So, check that the id is correct, and if it is, try (re)broadcasting the transaction.


Doubt about the MultiBit wallet I'm using the MultiBit wallet and I can't get my satoshis from faucetbox. I read on MultiBit page that the most secure way to receive a payment is generating a brand new wallet address.
That's my question, I'm using an old MultiBit wallet address on faucetbox, that can be the reason for this issue? I mean, not receiving my satoshis from faucetbox?
Sorry about my bad english :D
Peace for all.

First of all, most faucets (not all) have a minimum payout of 20000 satoshis. Check the minimum payout of the faucet you are using. Try updating to one of the latest versions of multibit from here. Generate a new address and try again, it should work. Maybe because of the forks in the network the old address may not be valid.


Why is this block empty? The block #492972 mined today, seems to be totally empty (except the 12.5 BTC reward, i.e. 90'000 USD as of today).

How can this happen?

Miners are free to mine empty blocks if they want. They do not HAVE to include transactions in them. Any block that is well-formatted and extends the blockchain is valid. Miners who do that (mining empty blocks) get the coinbase transaction (12.5BTC) and don't have to deal with the "hassle" of checking pending transactions. They lose the potential transaction fees though (much less than the reward).

Sure, if every miner did that, the bitcoin system would be over.


Work distribution in a mining pool How is work distributed among members of a pool?

Regarding the block hashing algorithm and valid hashes of a new node, how is the set of solutions for nonces "distributed" among miners?Is a nonce, for example, tried out multiple times by different miners in the pool? Or do miners split the space of solutions among each other, each working with a limited and mutually exclusive range of nonces?

The pool's mining server gives each miner a template to use for generating blocks. When the server wants to update which transactions are included or which block to build upon it will push a new template to each miner.

To generate work for itself the miner is allowed to change the nonce, the timestamp and the extranonce.

The nonce is just a 32-bit number with no special meaning. All possible nonce values are quickly scanned by modern bitcoin ASIC hardware, so with the same timestamp and extranonce you only have a tiny amount of work.

The extranonce is part of the generation transaction, the transaction that generates new coins, which is the first transaction in the block. The extranonce has no special meaning.

The server must never send out the same block template twice, to ensure that the same work is not done multiple times. In the stratum protocol the extranonce is split in extranonce 1 and extranonce 2. Extranonce 1 belongs to the server and is in a part of the block template that the miner is not allowed to modify. To prevent sending the same work twice the server must never reuse the same extranonce 1 value unless something else (that is not modifiable by the miner) in the template has changed. For example the other (non-generation) transactions, or the previous block (the block we are building upon). As part of the template the server will tell the miner how large the extranonce 2 should be, usually 4 bytes. When the miner has tried all possible nonce values it can generate new work by changing the extranonce 2 value.

The timestamp (known as ntime) can also be useful to generate work. This can reduce the work load on a slow controller feeding work to fast ASIC chips. The controller only has to generate enough work to keep the ASICs busy for 1 second, using different extranonce 2 values. After that the ntime can be incremented by 1 every second and the same extranonce 2 values reused. This is known as "roll ntime" or "roll time", as the ntime field of the block is rolled forward. The ntime value can also be incremented every second for the purpose of more exact timestamps on blocks without reusing extranonce 2 values.

In this way the server and client cooperate to generate work and the same block is never hashed twice.


How to get the capacity of remote channel in Eclair? I want to query an Eclair node for properties of a channel which I'm not a party of. Obviously, this information is in the local view of the network graph and is used for routing. However, the API provides only the following relevant methods:

AllChannels: Returns non detailed information about all public channels in the network. Example output:

[
  {
    "shortChannelId": "508856x657x0",
    "a": "0206c7b60457550f512d80ecdd9fb6eb798ce7e91bf6ec08ad9c53d72e94ef620d",
    "b": "02f6725f9c1c40333b67faea92fd211c183050f28df32cac3f9d69685fe9665432"
  },
  {
    "shortChannelId": "512733x303x0",
    "a": "024bd94f0425590434538fd21d4e58982f7e9cfd8f339205a73deb9c0e0341f5bd",
    "b": "02eae56f155bae8a8eaab82ddc6fef04d5a79a6b0b0d7bcdd0b60d52f3015af031"
  }
]

Channels: Returns the list of local channels, optionally filtered by remote node. Example output: see docs, too long to paste here.

How can I get more information about remote channels, for example, their capacities?

While Eclair itself doesn't provide the information, you can use the information from Eclair to look up the capacity using some other block information provider.

The capacity of channels is not part of the gossip information broadcast over the Lightning Network. The capacities are looked up on the blockchain from the shortChannelId, which fortunately is returned by AllChannels.

The shortChannelID is a triplet consisting of a block height, the index of a transaction within the block, and the index of the output in that transaction. This is the funding transaction outpoint and the amount in the txOut it refers to is the capacity of the channel. Eg,508856x657x0 is this txOutPoint which has a capacity of 0.004BTC.

Perhaps of interest, Blockstream's explorer recognizes the standard shortChannelId encoding <height>x<txIndex>x<outIndex> for searching and will take you directly to the information. I'm not aware of any other block information providers which also do.

Eclair's API doesn't provide you the funding public keys to verify this transaction yourself, but you can probably assume that Eclair has performed the validation else it would not have been accepted into its database.


BitcoinCore wallet still 3 years in sync, funds in account I use bitcoin core and the thing is still syncing after a week and a bit.
I received btc into the account and the transaction was confirmed over 150 times.
Can I move these funds to another wallet with the wallet.dat or is there any alternative or something I can do besides sitting through this sync process? Is there any one I can contact about this? I don't think my computer has 140gb spare space :L.

In order to operate your bitcoins you need two things, your public and private key for your BTC address. You can export them from the bitcoin core wallet.

There is two types of wallets - ones that require you to download the whole blockchain locally and others that uses someone else server to run checks on the blockchain.

Here is list with wallets https://bitcoin.org/en/choose-your-wallet

You can use Electrum to import your keys and use them right away without waiting for sync.


Push notification of incoming transaction Is there a way to be notified by bitcoind via the CLI that some incoming transaction has been confirmed?

A transaction can only be confirmed by a new block being added to the chain. And since that happens on average every ten minutes, it would work just as well to be notified when a block is discovered (and/or the chain is reorganized). You can then check any transactions you care about.

One way to be notified if the chain is changed in any way is with my native long polling patch. This should apply pretty cleanly to any recent version of the client (but is based on 0.4.0):

diff -u orig/init.cpp new/init.cpp
--- orig/init.cpp   2011-09-25 08:29:53.935505617 -0700
+++ new/init.cpp    2011-09-25 08:48:13.667215990 -0700
@@ -199,6 +200,7 @@
             "  -rpcport=<port>  \t\t  " + _("Listen for JSON-RPC connections on <port> (default: 8332)\n") +
             "  -rpcallowip=<ip> \t\t  " + _("Allow JSON-RPC connections from specified IP address\n") +
             "  -rpcconnect=<ip> \t  "   + _("Send commands to node running on <ip> (default: 127.0.0.1)\n") +
+            "  -pollpidfile=<f> \t  "   + _("Support long polling\n") +
             "  -keypool=<n>     \t  "   + _("Set key pool size to <n> (default: 100)\n") +
             "  -rescan          \t  "   + _("Rescan the block chain for missing wallet transactions\n");

diff -u orig/main.cpp new/main.cpp
--- orig/main.cpp   2011-09-25 08:29:53.937505613 -0700
+++ new/main.cpp    2011-09-25 08:48:13.667215990 -0700
@@ -1118,6 +1118,7 @@
 bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew)
 {
     uint256 hash = GetHash();
+    bool lp = false;

     txdb.TxnBegin();
     if (pindexGenesisBlock == NULL && hash == hashGenesisBlock)
@@ -1160,6 +1161,7 @@
     // Update best block in wallet (so we can detect restored wallets)
     if (!IsInitialBlockDownload())
     {
+        lp = true;
         const CBlockLocator locator(pindexNew);
         ::SetBestChain(locator);
     }
@@ -1173,6 +1175,23 @@
     nTransactionsUpdated++;
     printf("SetBestChain: new best=%s  height=%d  work=%s\n", hashBestChain.ToString().substr(0,20).c_str(), nBest

+    if (lp)
+    {
+        // Support long polling
+        string lp_pid = mapArgs["-pollpidfile"];
+        if(lp_pid != "")
+        {
+            FILE *pidFile = fopen(lp_pid.c_str(), "r");
+            if(pidFile!=NULL)
+            {
+                int pid=0;
+                if ((fscanf(pidFile, "%d", &pid) == 1) && (pid > 1))
+                    kill((pid_t) pid, SIGUSR1);
+                fclose(pidFile);
+            }
+        }
+    }
+
     return true;
 }

To use it, just start bitcoin or bitcoind with a command line argument of-pollpidfile=/path/to/some/file. Then write your monitor process' PID to that file. You will receive a SIGUSR1 on any block chain change.


What's the best strategy to send btc from one wallet to a address list with transaction id for each payment? I'm triyng send a mass btc payment, but using "sendToAddress" i'm limited send a new transaction only when the last was confirmed, if i try send when the last was pending of confirmation i'll not have balance on my wallet because the my founds was send to change addresses and is pending.
If i use sendMany i'll only had transaction to all payments and i need an transaction to each address and get controll for the fees for each.
If i wait for the last confirm to send a new my batch payment will spend a lot of time and  will stuck my payment list, i'll limitaded for some payments for day.
What's is the best approuch to this problem? Can someone help me? I tried found solution in older topics but i don't had success with this, maybe i cant express myself correctely or do not know the correct terms.

You can do this with sendmany.
It accepts a minconf parameter (which defaults to 1, for 1 confirmation) - it will spend outputs that have at least minconf number of confirmations.
Setting minconf=0 will allow you to spend unconfirmed coins, such as from the change output of a previous sendmany transaction.


How secure is calling bitcoind JSON-RPC? How secure is calling bitcoind through a JSON-RPC? For example, if I run it on one of my computers, and try calling it from another computer (provided neither of them are compromised), can someone intercept my communication and gain my RPC username and password?

Yes, they can. Unless you enable RPC-over-SSL, the username and password are send Base64 encoded as a header in the HTTP request, which is easily decoded.


Historic market data from Bitfinex I am trying to use the Bitfinex API to get historic OHLC data. I have posted a simmilar question on the main Stack Overflow page: https://stackoverflow.com/questions/47107106/bitfinex-data-api but I figure I might as well try here since there should be more people who are specifically focused on Bitcoin/Crypto here.

I have looked around extensively and can not find a decent API or source for Bitfinex historical data (which is surprising since they are currently the highest volume exchange)

Does any body here have (*successful) experience using the Bitfinex API for pulling historic OHLC data?

Or can someone recommend another reputable 3rd party source for getting this data?

I have posted an answer regarding the code in the stackoverflow question, but if you just want the raw (or sample) data for either BTC/ETH/LTC from Bitfinex or HitBtc, you can head over to my website at www.cryptodatasets.com.
All the data is free, and gets updated every day.


Quick question about wallets On my current OS I have daemons of bitcoin and other altcoins running in bitcoin there were 5 different addresses lets say

userA
userB
userC
userD
userE

userB has sent some coins to a address generated by him, and this transaction was covered in e.g block number 300 but my bitcoind was synced till block number 250 only. Now if I save wallet.dat and place it in the same folder after reinstalling the OS will this retainn the addresses generated by different users ? and after synchronizing to block 300 will those coins comes into the wallet ?

Your balance is kept in the cloud, specifically in the block chain.

Your wallet does not contain any balance info but just a private key that you can use to unlock the funds inside the block chain.

This means that it doesn't matter that you backup your wallet.dat file before your client is fully synched. Since it only contains your private keys, and not the balance itself.

So yes, after a full synch is completed, those coins will appear in your wallet. As long as you have your wallet.dat file, with the private keys associated to your address, you can access your funds.


Ho to identify a multisig transaction? 01000000013dcd7d87904c9cb7f4b79f36b5a03f96e2e729284c09856238d5353e1182b00200000000fd5d01004730440220762ce7bca626942975bfd5b130ed3470b9f538eb2ac120c2043b445709369628022051d73c80328b543f744aa64b7e9ebefa7ade3e5c716eab4a09b408d2c307ccd701483045022100abf740b58d79cab000f8b0d328c2fff7eb88933971d1b63f8b99e89ca3f2dae602203354770db3cc2623349c87dea7a50cee1f78753141a5052b2d58aeb592bcf50f014cc9524104a882d414e478039cd5b52a92ffb13dd5e6bd4515497439dffd691a0f12af9575fa349b5694ed3155b136f09e63975a1700c9f4d4df849323dac06cf3bd6458cd41046ce31db9bdd543e72fe3039a1f1c047dab87037c36a669ff90e28da1848f640de68c2fe913d363a51154a0c62d7adea1b822d05035077418267b1a1379790187410411ffd36c70776538d079fbae117dc38effafb33304af83ce4894589747aee1ef992f63280567f52f5ba870678b4ab4ff6c8ea600bd217870a8b4f1f09f3a8e8353aeffffffff0130d90000000000001976a914569076ba39fc4ff6a2291d9ea9196d8c08f9c7ab88ac00000000

you can decode above tx at http://chainquery.com/bitcoin-api/decoderawtransaction

From bitcoin explorer, I found that above transaction is 2-3 multisig tx. I understood that bolded part fd5d01 is script-length. its value is 349 Bytes. In a normal tx, Within the ScriptSig, the first byte which tells us how long the signature is. followed by the size of the second element and then the second element which is pubkey. Now, how to identify the number of signatures involved in a multisig tx like above example. I mean how did the explorer find out that it is 2-3 multisig. In the first place how to identify a multisig? And what is the significance os OP_0 at the beginnning of scriptsig?

As you have found out correctly, the length field describes the following script length. Then the SigScript follows:

004730440220762CE7BCA626942975BFD5B130ED3470B9F538EB2AC120C2043B445709369628022051D73C80328B543F744AA64B7E9EBEFA7ADE3E5C716EAB4A09B408D2C307CCD701483045022100ABF740B58D79CAB000F8B0D328C2FFF7EB88933971D1B63F8B99E89CA3F2DAE602203354770DB3CC2623349C87DEA7A50CEE1F78753141A5052B2D58AEB592BCF50F014CC9524104A882D414E478039CD5B52A92FFB13DD5E6BD4515497439DFFD691A0F12AF9575FA349B5694ED3155B136F09E63975A1700C9F4D4DF849323DAC06CF3BD6458CD41046CE31DB9BDD543E72FE3039A1F1C047DAB87037C36A669FF90E28DA1848F640DE68C2FE913D363A51154A0C62D7ADEA1B822D05035077418267B1A1379790187410411FFD36C70776538D079FBAE117DC38EFFAFB33304AF83CE4894589747AEE1EF992F63280567F52F5BA870678B4AB4FF6C8EA600BD217870A8B4F1F09F3A8E8353AE

The script starts with a hex "0", which compensates for a very early "off by one error" in the execution routines of the checksig routines. An element too much was popped off the stack. This "bug" is so long in the system, that everyone got accustomed to it, and removing it requires an enormous effort. So it became a feature :-) Even more, if there are tx, which have an execution time in the future, they wouldn't work anymore...

  how did the explorer find out that it is 2-3 multisig. In the
  first place how to identify a multisig?

The explorer finds this in the script sig. There is the two signatures, and the part for the multisig:

<sig1> <sig2> <length> OP2 <pubkey1> <pubkey2> <pubkey3> OP3 AE

to be better able to view, I have decoded the script a bit. The sigs start with hex 0x47 or 0x48, and end with 0x01. They are ASN1-DER encoded, providing a view into the R and S fields, and have surrounding length information. After the second 0x01, follows the length field, and then the multisig OPcode (0x02) and the 3 pubkeys.

00: OP_0, OP_FALSE:      an empty array is pushed onto the stack.
<sig1>
47: OP_DATA_0x47:        push hex 47 (decimal 71) bytes on stack
30: OP_SEQUENCE_0x30:    type tag indicating SEQUENCE, begin sigscript
44: OP_LENGTH_0x44:      length of R + S
02: OP_INT_0x02:         type tag INTEGER indicating length
20: OP_LENGTH_0x20:      this is SIG R (32 Bytes)
02: OP_INT_0x02:         type tag INTEGER indicating length
20: OP_LENGTH_0x20:      this is SIG S (32 Bytes)
01: OP_SIGHASHALL:       this terminates the ECDSA signature (ASN1-DER structure)
<sig2>
48: OP_DATA_0x48:        push hex 48 (decimal 72) bytes on stack
30: OP_SEQUENCE_0x30:    type tag indicating SEQUENCE, begin sigscript
45: OP_LENGTH_0x45:      length of R + S
02: OP_INT_0x02:         type tag INTEGER indicating length
21: OP_LENGTH_0x21:      this is SIG R (33 Bytes)
02: OP_INT_0x02:         type tag INTEGER indicating length
20: OP_LENGTH_0x20:      this is SIG S (32 Bytes)
01: OP_SIGHASHALL:       this terminates the ECDSA signature (ASN1-DER structure)

4C: OP_PUSHDATA1:        next byte is # of bytes that go onto stack
C9: OP_Int(0x01-0xff):   201 bytes onto the stack
52: OP_2:                the number 2 is pushed onto stack
    ################### we go multisig ####################################
41: OP_DATA_0x41:        uncompressed pub key (65 Bytes)
41: OP_DATA_0x41:        uncompressed pub key (65 Bytes)
41: OP_DATA_0x41:        uncompressed pub key (65 Bytes)
53: OP_3:                the number 3 is pushed onto stack
    ################### 2-of-3 Multisig ###################################
AE: OP_CHECKMULTISIG:    terminating multisig

You find a very good explanation in chapter 6 "Transactions" and 7 "Advanced Transactions and Scripting" of Andreas' wonderful book "Mastering Bitcoin", which is also online available.


What kind of fee doesn't change the amount? I sent myself 33 millibits from one wallet to another.  At the destination, I am told that it took three minutes to get 172 confirmations, and there is a fee of 0.2 millibits.  But the balance increased by the full 33 millibits.

Then in another view, it shows two outputs.  One is the 0.033 and the other is a very tiny amount—a few microbits, much less than 0.0002.

The short version is that the sender pays the fees, not the receiver. If you ask a wallet to send 33 millibits, you pay more than 33 millibits, and the receiver receives 33 millibits.

But it sounds like you're using a wallet that shows it to you differently. For instance, Coinbase (which is an exchange and web wallet, of sorts) doesn't charge you transaction fees at the time the actual Bitcoin transaction happens. They probably do this to reduce confusion in how their services work, what your balances are, and when fees are charged.

E.g. if I want to buy .033, it will charge me for (.033 btc at the current buy rate + a bank fee + a coinbase fee), and it will show a balance of .033. I can send .033 to an address, and it adds the transaction fee for me. Your service probably did the same thing.

Other clients (including Bitcoin-QT and Multibit) show your total balance and require that you pay fees out of that balance; so if I have a balance in Multibit of 1 BTC, I can only send about 0.998 BTC, because I need to pay a transaction fee for most clients to relay my transaction.

You asked wallet A (hosted by somesite.com) to send 33 millibits to address C (address "17BK..."). Your transaction actually looked like this:

input: address A ("1PAR..." in wallet A) - 33 millibits
input: address B ("1Mjf..." somesite.com) - 0.64443 millibits
output: address C ("17BK..." in wallet B) - 33 millibits
output: address D ("14ov..." somesite.com) - 0.44443 millibits
transaction fee: 0.2 millibits (calculated from input - outputs)

The second output, to address D, is the change (if you had sent less than your total transaction amount, some of the change would belong to you; as it is, it sounds like it belongs to somesite.com). This exists because a transaction output must be used in its entirety. somesite.com decided to use the money in addressees A and B in order to have enough money for the transaction. Since your inputs came to 33.64443 millibits, and your desired output+fee only comes to 33.2 millibits, the extra money is sent to an address that somesite.com owns (address D).

172 confirmations in three minutes is practically impossible, as one confirmation takes, on average, 10 minutes (not one second). As you noticed, it was instead saying that the first confirmation took 3 minutes, and that 172 total confirmations had been done.

It's expected that the balance of wallet B went up by the full 33 millibits - what you might not've realized is that it cost somesite.com a total of 33.2 millibits, because of the transaction fee. That is, the sender pays the transaction fee. somesite.com showed you a balance of 33 millibits, even though they had to pony up more than 33 to actually use it.

Even though the balance of address A was exactly 33 millibits, somesite.com also had the balance of address B to pull from.


Can I use Bitcoin to send money from a US bank to an Indonesian bank? I now live in Indonesia and want to send money from my US bank account to an Indonesian bank. Can I use Bitcoin to do this transfer?

Bitcoin is not well integrated with the legacy banking system. What you want to do would therefore go somewhat like this:

Open an account with a Bitcoin exchange (A) that takes US customers. (Assuming you are a US citizen.)
Deposit USD into the Bitcoin exchange.
Open an account with a Bitcoin exchange (B) that serves the Indonesian market.
Buy bitcoins for USD on A, transfer the bitcoins to B, sell the bitcoins for Indonesian Rupiah on B
Withdraw Indonesian Rupiah from B to your bank account in Indonesia.

As you can see this is somewhat complicated, and there are likely ways to make this transfer more easily. However, I have successfully used a similar method to transfer money to myself in the past and it was much cheaper than an international wire transfer.


Finding wallet address on peer 2 peer network does anyone here knows how to find the addresses from a tx object from the bitcoin protocol documentation on the peer to peer network??

in the document it says that tx message is only consist of version, flag, tx_incount, tx_in, tx_out count , tx_out, tx_witnesses, lock_time. so i am starting to doubt if there is a way to do it only through p2p network.

if so how do website such as blockchain.info knows the subject of a transaction?

thanks in advance

An address is a human construct, and is meaningless to the p2p protocol - The p2p protocol is only concerned with Bitcoin Scripts.

If you have a raw tx object, you can attempt to find the address for an output by checking if the locking script (scriptPubKey) field matches the format for a known p2sh, p2pkh, p2wpkh, or p2pk address.

If it does, you can follow the respective base58 or bech32 encoding methods to convert it to an address. If it does not, then you have a non-standard output that does not correspond to an address.


Using SIGHASH_NONE in P2SH address I know that using SIGHASH_NONE in signatures is safe for a transaction only if at least one of the inputs is signed with SIGHASH_ALL, so that a miner can't change the outputs and reclaim the inputs.
This kind of transaction is useful when the parties signing their inputs want to leave the capability to decide the outputs to a trusted coordinator.

Let's now suppose that we have a transaction consisting of inputs using P2SH address implementing a 2of2 multisig signature scheme.
Since two signatures are required for each input, what does it happen if one of the signatures is made with SIGHASH_NONE and the second one with SIGHASH_ALL?

My understanding is that the party signing with SIGHASH_NONE leaves the capability to the cosigner to choose the outputs at will and the resulting transaction will be safe (from malicious miners) since all inputs are signed also with one SIGHASH_ALL signature.

Is that correct?

First, it should be said it's not possible to enforce which sighash flags may be used in a P2SH address. Signing is a concern for only the parties to wish to spend funds. Their intent can be captured using SIGHASH flags when signing.

OP is right, and certainly can mix SIGHASH flags in an input script. Signatures in the same script are considered separately, meaning each specifies its own SIGHASH flags. This informs validating nodes how to verify the signature, and mixing them


Building cryptocurrency exchange behind TOR quick question, I don't have much experience with TOR(actually nothing), is it reasonable to build a mobile cryptocurrency exchange, which servers are behind TOR, so that's hard to attack for hackers ?

Tor is just an access network. You can create a service and make it available on any access network, whether exclusively or not. Operating it on Tor exclusively doesn't make it hacker-proof. You need to properly harden the server as well as all access points into your exchange (meaning your executables), and even then there could be vulnerabilities which can lead a hacker to compromise your service.


What consensus algorithm is MimbleWimble/Grin using? Does it use Zero Knowledge Proofs as well? Understand that MimbleWimble/Grin is privacy centric.  Does it use Zero Knowledge Proofs to achieve the privacy goals?

In addition, what consensus algorithm is MimbleWimble/Grin using?

Understand that MimbleWimble/Grin is privacy centric. Does it use Zero Knowledge Proofs to achieve the privacy goals?

Yes. Zero Knowledge Proofs (specifically, Range Proofs. Possibly Bulletproofs in the future) contribute to the privacy goals of Grin by giving validators the ability to verify that no inflation or deflation occured in a transaction without needing know the amounts transacted.

  In addition, what consensus algorithm is MimbleWimble/Grin using?

Grin uses Nakamoto Consensus (Proof of Work) with the Cuckoo Cycle PoW system. You can find more information on that here: https://github.com/tromp/cuckoo


Can I use Multibit private key for paper wallet? I plan to export the private keys from Multibit, keep those and delete everything else.

Now I read about Multibit having some kind of hidden mechanism for spare adresses within a wallet. Would my approach still work or do I risk losing the BTC in the wallet?

Yes, writing your MultiBit (non-HD) private keys on paper should work.

You definitely need to write down the private keys corresponding to public addresses that have a positive balance.

You also need to write down the private keys for public addresses that are present in your MultiBit wallet but have not been used yet. This is because they are considered to be on standby, and may be used in the future for receiving change or incoming payments.

As long as you carefully back up all your private keys and don't generate any new ones, you can always restore your wallet just from the private keys alone (with no other metadata, etc.).

Be warned that whenever you create a new wallet in MultiBit, it will generate one random key for you by default. So even if you import your old keys into the wallet, you will still have that new fresh key which needs to be backed up, otherwise you risk losing coins.


How are MtGox options going to affect Bitcoin price volatility? MtGox plans to introduce Options, would Bitcoin price become more stable or it would just hedge risks?

Probably both, though the effect may be pretty small.

Arguably, the most prudent use of options is reducing risk.  For example, a merchant with accounts receivable in Bitcoins would want to protect the value of the fixed amount of BTC he will receive.  Options can limit his downside risk.  At present the price volatility of Bitcoins hampers its use for commerce, since the value of an asking price in BTC varies so much from day to day.  With options to reduce risk, more businesses will be willing to accept Bitcoins, bringing more liquidity to the Bitcoin "ecosystem".

Increased acceptance of Bitcoins and increased "money supply" are more likely than options to stabilize prices.  They would reduce price fluctuations caused by thin trading.  The same effect is seen in the stock market where relatively unknown stocks undergo drastic price swings due to somewhat small trades.  Conversely, a widely traded stock exhibits much less volatility.


what is referred as coin in bitcoin network? I gathered information about bitcoin from various resources. All those resources said that when a transaction is done, the transaction get added to a block. So when Alice send 2 btc to Bob, network checks all transactions having Alice's wallet address to calculat balance Alice has. If he has 2 btc then transaction is happen.

So in this process, system just checks for total balance Alice has. There is no file or a record for each bitcoin. There's only blocks containing transaction data.

But I found about bitcoin mixers. Those mixers claims that they mix coins. That is, when you give them some coins, they will give you same btc amount back but you receive different coins than the ones you deposited. Also I found many websites using the term coin ("coins transfered", "coins recieved" etc.) But I could find what exactly the "coin" means. There are 'blocks' and 'transactions' but 'coins'?

So the question is, what a coin is? Is it something like block or transaction? Is it a seperate file, so that bitcoin mixers can mix them up?

What is referred as 'coin'?

TL;DR: When bitcoiners refer to a 'coin' they really mean a UTXO, unspent transaction output of any amount from 1/10,000,000th of a BTC to 21million BTC.

When someone sends bitcoin to another person, it gets added to the blockchain as you said. When signed by the sender's (Alice) key and verified by the miners, that transaction becomes a new UTXO.

When Bob goes to spend the 2 BTC that Alice sent him, his wallet will create a new transaction that says, in effect "take the UTXO from X address (that Alice sent him) and transfer it to the following Y address ..." That then creates a new UTXO.

In this example there is simply two bitcoin in each transaction. But what if Bob only spends 1 of the 2 Alice sent him? His transaction will then say "take the UTXO from Y address, send 1 BTC to 'Z' address (his recipient) and return 1 BTC to my wallet at the following 'change address, A The change address, A, is in Bob's wallet, so it can again be spent by him at a later date. In this example, the single UTXO (aka coin) that Alice sent Bob has become two of half the size each. Thus the absolute number of 21 million bitcoin is preserved.


Is it possible to change an output of a partially signed transaction? In step 5 of the procedure described in https://en.bitcoin.it/wiki/Smart_Property#Theory, the buyer creates a partially signed transaction. Will the seller be able to change an output prior to signing and broadcasting - and thus returning the token to an output he may redeem himself?

In one word: no. Changing tx output after signing makes existing signature invalid.

( There are some special cases, like signature hash type SIGHASH_SINGLE or SIGHASH_NONE, but we assume that the buyer uses correct signing SIGHASH_ALL )


What percentage of bitcoins are being traded/used on a regular basis? Clearly a lot of BTC are being hoarded by either early adopters, or small scale speculators like myself, holding out to see what it's value is in 10 or so years.

What percentage of bitcoins are actually changing hands of a regular basis?

As of October 2012, it was determined that around 78% of all bitcoins minted (as of May 13 2012) were being hoarded "in user accounts that have never participated in outgoing transactions", meaning that all other trading and commerce was actually being transacted with a "float" of the remaining 22% (i.e. less than 1 in 4); and there is really no way of knowing how much of THAT might simply be faux-"trades" between accounts owned by the same entity.

Certainly very little of the total float (and thus even less of the total "coinage") is actually being used as a "currency" to make purchases.


Bitcoind in a Windows Azure Worker Role I want to have a Bitcoind node running in Azure. Obviously there are storage requirements from storing the blockchain, so is Bitcoind a candidate for a worker role? Or would I be better off sticking to a VM?

I do not see a worker role as a possible candidate primarily because of the complexity involved. Other than storage and unless I am missing something (just used worker roles once in the past) you will also have deployment difficulties, which will have to be repeated with every bitcoin upgrade. I do not see what you will gain using a worker role anyway (in the context of bitcoind). (?)

So, if the choice is between the two I would say stick with the VM.

Note that Azure also provides an option to easily install a full bitcoin core node using bitcore in a CentOS VM. See here for details; it offers some extras that might interest you.


What pools will allow asic block erupters these days? I'm a Ubuntu cgminer/bfgminer guy and purchased 6 asic block erupters and a newbie to mining.  Could never get into slushpool, but have been mining for poolin for about a week and really don't see any results anywhere.
1-poolin.com?  -  I did create for ETH,  a coinbase wallet entry, although the poolin 'sub-account' dialog field never showed the pasted wallet address  and  still see nothing where it  doesn't even show the hash rate.   Possibly I'm not looking in right place and/or this hardware isn't making any kind of contribution even though the terminal screen shows the miners cranking away full speed, now for some days.
2-other pools? -  I have been reading and realize that block erupters are now considered too slow or inadequate for most pools.   Does anybody recommend of know of a pool where  6 block erupters could make an acceptable contribution and they would allow little me to mine and see the results of dedicated mining hours?
Certainly I do plan to enlarge this configuration but would be very grateful to see some results before making more investment.    Again thanks kindly for your assistance.

You're never going to see anything with these.
Block erupters are simply... ancient. The ones I had did a few hundred megahahes - a reasonable ASIC you'd buy today does 10+ terahashes.
1 terahash = 1,000,000 megahashes
You're essentially never going to contribute enough to a pool to see a reward share that you can actually withdraw.
If you intend to start mining now, you will need to invest several thousand dollars into modern, capable machines to do so.


European online stores selling electronics I know bitcoinstore.com is the heaven for bitcoin loving geeks to buy their gadget. However I'd like to find similar electronics stores in European Union area to avoid extra custom fees.

Are there any bitcoin-friendly stores in EU?

Through websearch I have found e4btc.com. They seem to be based in Berlin.

I do not have any further experience or information about their offers, nor am I affiliated to them in any way.


How do I read this cryptocompare table? in the Cryptocompare table I don't understand what the columns mean, e.g. there is Price, "Open 24H", "Range 24H", etc... Does anyone know what the different columns mean?

24H means 24-hours period.

Open 24H:
The price of the first transaction 24 hours ago.

Range 24H:
H - High: Highest price reached.
L - Low: Lowest price reached

Last Trade:
Value of the last transaction that took place.

Volume 24H:
The amount of BTC that change hands.

Change 24H:
Price and % change during the past 24 hours.


How can I tell when bitcoind has found a block? I'm using the traditional bitcoind -gen on the testnet to mine some test bitcoins. I did this on one machine for a few hours, and stopped when I found a faucet. Later though, I magically obtained 50 coins in my wallet. I think because blocks have a long confirmation?

Anyway, so how can I tell when bitcoind has successfully mined a block (and now just waiting for confirmations)

If you look in debug.log, you should see a message that says "proof-of-work found".

Here is an excerpt from debug.log for a testnet block that I found.  (It was immediately orphaned; in fact an earlier block had been found several minutes earlier but had not yet reached me.  So you won't find it in the blockchain.)

BitcoinMiner:
proof-of-work found
  hash: 00000000609b21ea1d67f7220d12f7e6f06542907fa24511fa416b286e11cb54
target: 00000000ffff0000000000000000000000000000000000000000000000000000
CBlock(hash=00000000609b21ea1d67f7220d12f7e6f06542907fa24511fa416b286e11cb54, ver=2, hashPrevBlock=00000000b96e8a2e2f27bf209a1059fd10b117cdf5a6373559eb93268853bc04, hashMerkleRoot=f25394d1360a276fa5e3c51b245969d193710d06b5bda12468e11074c8740d50, nTime=1383697696, nBits=1d00ffff, nNonce=2576125723, vtx=1)
  CTransaction(hash=f25394d1360a276fa5e3c51b245969d193710d06b5bda12468e11074c8740d50, ver=1, vin.size=1, vout.size=1, nLockTime=0)
    CTxIn(COutPoint(0000000000000000000000000000000000000000000000000000000000000000, 4294967295), coinbase 0330f6010101062f503253482f)
    CTxOut(nValue=50.00000000, scriptPubKey=0226fe62f7b1812c421efd7638907f)
  vMerkleTree: f25394d1360a276fa5e3c51b245969d193710d06b5bda12468e11074c8740d50
generated 50.00
keypool keep 6
AddToWallet f25394d1360a276fa5e3c51b245969d193710d06b5bda12468e11074c8740d50  new
Committing 1 changed transactions to coin database...
SetBestChain: new best=00000000609b21ea1d67f7220d12f7e6f06542907fa24511fa416b286e11cb54  height=128560  log2_work=57.064666  tx=708022  date=2013-11-06 00:28:16 progress=1.000000
ProcessBlock: ACCEPTED

I believe debug.log is overwritten periodically, so if your block was created some time ago, you may no longer have this entry in yours.

Newly generated coins require 100 confirmations before they can be spent, and bitcoind apparently won't show them as spendable until 120.  See also this question.  As far as I know these rules are the same on testnet.

Congratulations on your newfound fake wealth!


This happens when bitcoind has processed a large amount of blocks in its dbcache but has not written them to disk before the process is exited.

See here for more details.


What is the status on webminers? Are there any ongoing projects trying to develop a widely accessible WebCL-powered mining software? I've heard of two in the past, but their websites don't seem to be working any more.

While not directly a WebCL miner there is a miner which uses OpenCL via  Java Webstart so is accessible to any internet user with Java installed and apropriate hardware.

http://www.BitMinter.com

The site is both a pool and a custom java miner.
The pool can be used with other miners however the BitMinter miner works only with the BitMinter pool.


GetRawTransaction not returning time I am trying to write a quick blockchain explorer so that I can lookup transactions on my own server rather than using a 3rd party service - consider this an exercise more than a production service.
I have a bitcoind server running with txindex = 1 and all is well, I can lookup transaction with getrawtransaction. But unconfirmed transactions do not have block data, and most importantly the time field.

However many 3rd party lookup services like blockchain, tradeblock, etc return a timestamp for the transaction even when not confirmed. So I have tried to use the walletnotify command to record the time the transaction is seen but it's not getting called - probably due to the fact I have disablewallet=1 or because these transactions do not relate to my server.

So my next step is to continuously check the transactions in the current block and record the timestamp that way - suffice to say this is not the best approach but I am really struggling to think of another way.

Perhaps someone has a better approach?

getrawtransaction does not return the time, because it only gives you the raw transaction itself, which does not include a timestamp.

However, you can use the getmempoolentry RPC to get mempool metadata about a transaction, which includes the time at which time it entered the mempool.


How Can I import Multibit Private Key into Electrum or Blockchain.com I am having trouble importing a multibit private key into electrum and blockchaing.com.  The key is declared invalid.
the key looks like this
U2FsdGVkX1+vNknxxxxxxxxxxxxxxU/KiWdlFKlBCv0y613C+rP2t3JMGnuR2xxxxxxxxk/gNe9S
lvv/OJQGbRJ4qP07m3CII4FLvovMg71F8cXSav15QeIxxxxxxxxf
Is this the entire key?
Or
Do I extract segments from the key above? What segment?

I am having trouble importing a multibit private key into electrum and blockchain.com.

The presence of '/' and '+' indicate that your key is encoded in Base64
It is likely that the wallets you mention need the key to be presented in Wallet Import Format (WIF)
For example, Importing your private keys into Electrum says

Electrum supports mini private keys and full sized keys in Wallet Import Format (WIF).

also How to import keys to Blockchain.info? says

You can enter WIF (Wallet Import/Export Format) or compressed private key.

I would decode the Base64 into Hexadecimal and then follow the procedure described for WIF.

Related question

Correct way to convert a 256-bit private key to WIF?

Ian Coleman's "Bitcoin Key Compression Tool" can be downloaded and run offline and might be useful. Obviously you need to be very careful choosing and using software that will be given your private key.

Is this the entire key? Or Do I extract segments from the key above? What segment?

I think that looks too long to be a 256-bit number. However, since I am not familiar with Multibit I wouldn't know what to expect and can't identify it. After running it through Base64 decoding, things might be clearer to you?


Is there a limit to sending/ receiving from wallet to wallet? Seems like there is a restricted volume that a user can trade in the exchange, is there a similar restriction on transferring bitcoin from wallet A to wallet B? Say I want to send 100 Bitcoins to wallet B, would the transaction be denied due to its size?

You're only limited by the amount of bitcoins under your control. There is effectively no limit on transferred value on the side of the protocol, as you would in fact be able to spend all bitcoins that will ever exist in a single transaction. (Hat-tip to Andrew Chow.) The biggest transaction in bitcoins I'm aware of were 550,000 BTC (then approx. $1,345,000), and the largest amount of value transferred in one transaction was $149,000,000 (~195,000 BTC) in a Bitstamp audit.

It may be that some exchanges limit the amount of bitcoins that you may withdraw in a single withdrawal. For further information on that, please refer to the respective user guide.


Cryptocurrency compile error I'm compiling a SmallChange clone on Mac OS using the .osx makefile, and I get this error. What should I do?

'boost/assign/list_of.hpp' file not found

Install boost.

See the instructions if you have additional problems.


Bitcoin sent to Bitcoin Cash address, How to Recover? A friend asked for my Bitcoin Cash address to send some BCH, but after giving her my Bittrex Bitcoin Cash wallet address she instead accidentally sent Bitcoin and not Bitcoin Cash from her Blockchain.com wallet.
Of course the transaction has not shown up and she is now missing her Bitcoin. She and I have both emailed Blockchain.com Support and they have been unresponsive in helping to recover her missing Bitcoin so it can be sent to the proper address. Any help anyone may have is Greatly needed and Appreciated!! These mistakes can be very costly as Im sure, whoever may be reading this, already knows!! Thank you Anyone and Everyone for your time and support with help on this issue!!
Again, The Bitcoin was sent from Blockchain.com's wallet to a Bitcoin Cash wallet on the Bittrex exchange..... I have reached out to Bittrex customer support as well but still awaiting a reply! If recovered before someone has a chance to offer help, I will update this post with how it was done, but any and all help is GREATLY Appreciated!!

Unfortunately, once the transaction is confirmed on the blockchain there is no way to retreive the funds and, that I know of, there is no way to zap the pending transaction from the distributed mempool, nor can I imagine a way. The transaction will likely be confirmed in due course.

Even if Blockchain.com zap the tx locally and the Bitcoin show up again in your friends wallet, once the transaction confirms on the blockchain the outputs used to create the transaction will be spent and that Bitcoin will not be spendable. This also protects against double spending.

The one possible solution to this problem is if your friends Blockchain.com wallet allows RBF (replace-by-fee), you could conceivably (and I do not know how granular transaction control is with Blockchain.com) replace the original transaction with a transaction paying instead back to herself and with a higher fee. A few caveats, RBF is opt-in and so would have to be enabled on the original transaction, Blockchain.com needs to have the user functionality necessary to do this and, once the original transaction is confirmed it is game over anyway.


How to restore a ripple wallet, having the security key? If I try to login to ripple.com I get this message

Fetching wallet...
Payward  Wallet not found (Username / Password is wrong)
Local browser  Wallet not found (Username / Password is wrong)

It might be a bug, but let's assume I actually somehow corrupted my password.

Luckily I still have my security key, but I've no idea on how should I use it to restore my wallet.

Following these instructions, after clicking on Create a new wallet, you will have the option of using a custom secret key.


Graceful way to stop bitcoind in Docker container? When I issue docker stop <id>, the process doesn't exit cleanly and bitcoind has to roll-forward blocks on the next startup.

018-03-04 04:15:25 Rolling forward 0000000000000000001728efc81b210835048a7321ba3ec93197f698fac080ab (511863)
2018-03-04 04:15:26 Rolling forward 0000000000000000002be2e2792facd65e2358f874bc48f6410b80ecc8a6e756 (511864)
2018-03-04 04:15:26 Rolling forward 0000000000000000004740c4832b47a1c852db87cf4b9aea559db8712d2971a5 (511865)

This seems to be an issue with the dbcache not being written to disk prior to exit. I'm not sure if it's issuing a SIGTERM and then SIGKILL.

What is the best way to stop bitcoind to prevent any database related issues?

Best way to stop bitcoind is either by calling the JSONRPC interface with the stop command or by issuing a SIGTERM or SIGHUP.

But it may take a couple of seconds to shut down Bitcoin Core since it eventually has to write larger amount of data (time depends on your dbcache, disk-speed, mempool size, etc.).

So the environment layer (docker in your case) must be capable to take this into account (a slow process shutdown).


How do I build bitcoin transactions graph? I'm using blockchain dumps from http://dumps.webbtc.com/
in database schema in mentioned that result of script in pk_script should specify recipient of transaction. But how do I get amount of bitcoin sent and sender?

The database schema is located here: https://webbtc.com/api/schema

You might be disappointed to find out that it's not as simple as an amount and a sender for each transaction. What there are is a list of inputs (references to previous outputs), and a list of new outputs. Each output with an amount and a pseudonymous address. Each input has a TXID and output index to reference which previous output it is spending. Unless you know who owns specific addresses, though, you can't determine the identity of the sender(s).

You can use the prev_out and prev_out_index from a row in the inputs table to find the associated previous output, which will tell you the amount and address.


How do mining pools figure out the hashing speed of the connected miners? How do mining pools figure out the hashing speed of the miners connected to it?

Since pools only receive successfully calculated shares they must approximate your actual hashrate based on the number of shares submitted.

Assuming we're talking about difficulty 1 shares, you should be able to approximate hashrate via H = S * 2^32 / T where H = hashrate, S = shares submitted and T = time in seconds. Your estimate will be more accurate for larger values of T.

It takes approximately 2^32 hashes to find a share and each share has a 1/D (D = difficulty) chance of correctly solving the block. From that, with some simple math, you should be able to calculate almost every important thing about mining.


finding new bitcoins vs processing transactions I'm looking to understand how minting new bitcoins and processing transactions relate on the bitcoin network.

It seems that the term "miner" may refer to machines looking to mint new coins and machines processing transactions.

I can't find any information on whether submitting transactions is directly tied to minting coins.

I'm interested in processing pending transactions.  What does the process of finding unconfirmed transactions and submitting them into the blockchain look like?  Is confirming transactions just as expensive as minting new coins?

Does bitcoin core's bitcoind expose unconfirmed transactions?

How do unconfirmed transactions get submitted into the blockchain?

Thank you!

I'm fairly certain that learning more about mining and proof-of-work in general will help answer most of your questions, but I thought I'd get you started.

  What does the process of finding unconfirmed transactions and submitting them into the blockchain look like?

This is mining.  It means taking unconfirmed transactions, checking if they are valid, grouping them into a block, and performing a proof-of-work on that block.  Miners don't have to "find" unconfirmed transactions; the transactions come to them.  Anyone who is listening on the Bitcoin network will see new transactions as they are broadcast.

  Is confirming transactions just as expensive as minting new coins?

Confirming transactions is mining.  A confirmation is the inclusion of a transaction into a block.  You may have meant validating transactions, meaning checking if a transaction is valid.  In this case, no, validating a transaction is not an expensive operations.  It's simply checking that the transaction conforms to a standard and is not attempting to spend money that has already been spent.

  Does bitcoin core's bitcoind expose unconfirmed transactions?

Yes.  You can use getrawmempool to see the transactions still in the mempool.

  How do unconfirmed transactions get submitted into the blockchain?

The user who creates the transaction broadcasts it to the network, and then miners include it in a block.