Why do I get 5 bytes worth of 0x00 hex values in both outputs? From the hex generated by the createrawtransaction command, I understand that the following is the output value:

  60e31600000000001976a914ab68025513c3dbd2f7b92a94e0581f5d50f654e788acd0ef8000000000001976a9147f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a888ac

Output one - Receiver address details:

  60e31600000000001976a914ab68025513c3dbd2f7b92a94e0581f5d50f654e788ac

Output two - Change address details:

  d0ef8000000000001976a9147f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a888ac

My question is regarding the highlighted 0 values, as in the 0x00 hex values.  I understand these are empty arrays, but why 5 bytes worth?  Is this some sort of padding for the maximum allowed satoshi's which can be sent?  Or are these for some other purpose?

The value of an output in a transaction is a 8-byte field encoded in little-endian. The value is always represented with 8 bytes no matter how small it is. Here you have the full transaction structure with sizes:


What is the precise definition of "witness program"? BIP 141 uses the term "witness program" extensively without, apparently, adhering to a consistent definition.

From the heading "Witness Program":

  A scriptPubKey (or redeemScript as defined in BIP16/P2SH) that consists of a 1-byte push opcode (for 0 to 16) followed by a data push between 2 and 40 bytes gets a new special meaning. The value of the first push is called the "version byte". The following byte vector pushed is called the "witness program". [my emphasis]

https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#witness-program

In other words, a "witness program" is a byte sequence 2 to 40 bytes in length. In P2WPKH authentication, the witness program is the 20-byte hash value of a public key. In P2WSH authentication, the witness program is the 32-byte hash value of the serialize "witness script" (last element of witness data).

At least, this is what I gather from reading the definition under the heading.

However, BIP 141 makes other references to "witness program" that seem to suggest something else. For example:

"In addition, opcodes within the witness program are counted identical to as previously within the P2SH check script."
"The P2WPKH witness program is then executed as described in the previous example."

Also, headings seem to suggest that "witness program" means something else:

"P2WPKH witness program" (describes a new authentication template) https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#p2wpkh-witness-program
"P2WSH witness program" (describes a new authentication template) https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#p2wsh-witness-program

What is a precise definition for the term "witness program?"

Thanks for your comments. This is the proposed fix: https://github.com/bitcoin/bips/pull/416


How to make PoS system work? In a r/bitcoin I've found the following statement:

I think it should be noted that this paper covers a "pure" PoS system, but there have been some hacks to PoS systems to make them "work" (work while being insecure). These hacks include having a central authority control the coin (peercoin, blackcoin, and a ton more), making grinding more difficult but certainly not impossible along with making buying old private keys to attack difficult through having a centralized premine that makes the currency insecure to attacks from a central authority (NXT), or even making the next block signer deterministic, which solves stake grinding by substituting the problem with a problem that is probably much bigger, colluding delegates. , this also doesn't solve the problem of people rewriting history (bitshares).

Could one explain in details how to protect PoS system using full pre-mine and a central authority? Will the system be theoretically secure or still not?

If you want a system with centralized trust, I suppose you could do a 100% pre-mine, and have some checkpoints to 'lock' this, and have all nodes verify against the checkpoint coming from a trusted set of nodes. Even with this, you could have some bad players trying to cheat, and it would involve constant 'supervision' and checkpointing as needed... Why would any outsider want to use such a system, is beyond me. If we assume centralized trust, there are probably more efficient ways to build a token exchange platform anyway.

PoS can't really work for the same reason perpetuum mobile is impossible or in other words - you can't pull yourself up by pulling on your own hair.

The problem boils down to the fact that, with PoS, what you're staking and what you're winning is one and the same thing, a digital token. So, you're staking something that doesn't physically exist, to win more of something that doesn't physically exist. And the more you have, the more you're able to win. Sure, because there's a market you can say you're staking something of 'value', but if you got it cheap in the first place and it appreciated 100x in the meantime, the cost for you to start foul play is not at the new price, but at the old price at which you got it. Also, if you're happy with 100x, you just dump it on the market, exit clean and let some other poor soul be exposed to the risk. There's no 'investment' you can lose, because it's all digital - both the prize and the stake.

With PoW, your stake is something physical. You used 'real' money which still stands for actual human work performed, invested into specialized hardware, and consumed hard, physical energy to win the prize. Why this is important? Because energy can't be created out of thin air - you can't cheat laws of physics. This means that the punishment for attempts at cheating will always cost you real-world resources and not some digital token which came into existence from thin air in the first place. Even if you sell all your winnings, it doesn't erase your investment/stake. You still have the hardware you invested in, and there is still incentive to keep it running as long as the market gives value to the token it creates. You can't get rid of it at 100x like in PoS, because only the token appreciates, while the mining gear depreciates.
See the difference?

There's good research on the subject: https://download.wpsoftware.net/bitcoin/pos.pdf

But why do we need PoW at all?

Problem is, in digital world, anything can be simulated. If we're trying to simulate gold, what's to stop us to change the color of this 'virtual gold'. If we can do it, then why it should have value? The most important property of a cryptocurrency is ensuring certainty of its properties, like emission, fungibility, immutability, security etc. We often hear the term 'voting' but I think it is misleading. When you vote, it's someone else performing some action. This is not the case with cryptocurrency. When you 'vote', you're really only saying "the crypto with xyz properties is the one I consider valid" and if someone sends you something with xyq properties, you ignore it as invalid. If there are many peers stating exactly the same xyz properties, then it becomes a currency among them, and anyone accepting xyz as properties is free to join and transact. The more peers accepting it, the more certain you are you will have peers to transact with who're accepting the xyz properties. So where's the vote making someone else do something? There's no such vote. You either accept xyz or you don't. That's the role of nodes. There's one property which the nodes simply aren't able to verify - chronological ordering of transactions and for that, we need miners. That's it.

With PoW, any attempt at rewriting history is expensive. With PoS, it's free. 'Solutions' to make PoS 'work' like checkpoints defeat the purpose because how can you tell which checkpoints are the 'right' ones? Someone said so? Some 'trusted' server? I thought we're building trustless decentralized systems here :)


dyld: Library not loaded when running bitcoind on a mac I'm having trouble running bitcoind on my Mac (Sierra). I previously had bitcoind installed, compiled from source, but had to remove it when I was running low on space. I recently installed Bitcoin Core again, but this time I downloaded a .dmg file. It installed fine and I can run Bitcoin-Qt. Now, when I try to run bitcoind from the command line, or use bitcoin-cli, I get the following error message:

dyld: Library not loaded: /usr/local/opt/miniupnpc/lib/libminiupnpc.16.dylib
  Referenced from: /usr/local/bin/bitcoind
  Reason: image not found
Abort trap: 6

I don´t seem to be able to fix this. I might be an easy fix, but I haven´t been able to take care of it.

Anyone out there with an idea of how to solve it?

The answer below is likely not complete for your situation, but will get things rolling if you take the initiative.

A compiled executable that is statically linked is 100% complete for a particular computer architecture, and are much larger in size than dynamically linked executable that tend to port better across computers with varying architectures.

Your improperly functioning executables are using dynamically linked libraries instead of using statically linked libraries. Your executable(s) are looking for a dynamically linked library (file) in the /usr/local/opt/miniupnpc/lib/ directory called miniupnpc.16.dylib.

If you have Homebrew installed, a "% brew list" will indicate if miniupnpc package is installed. A "% brew ls -v miniupnpc" will identify the path where are the files miniupnpc package files are installed such as the dynamically linked lib/libminiupnpc.16.dylib library file or the statically linked lib/libminiupnpc.a library file.

You will need to read about the HOMEBREW_LIBRARY_PATH environmental variable and the DYLD_LIBRARY_PATH environmental variable used on a Mac.

The path for your command line interface and the *.dmg file are different.  Use the UNIX "% which bitcoind" or "% which bitcoin-cli" to identify what the command line path really is set to within your UNIX shell.


Get public key of SegWit address I'm using bitcoin-cli and I need to get the public key of one of my SegWit addresses. My first attempt was to use 'validateaddress' command and take the 'scriptPubKey' field but that doesn't seem to be the public key of the address. Any ideas?

Because a "segwit address" starting with a 3 is actually a specific type of P2SH, the scriptPubKey will just be a normal P2SH scriptPubKey, which doesn't reveal anything about the script itself (only a hash of the script). You need the redeem script, which will be a null byte followed by a push of the public key hash. From what I can recall, the script is output in the hex field of the validateaddress result.

Again, the public key hash doesn't actually reveal the public key, so once you have that there will probably be an extra step required, perhaps conversion of the public key hash into an address starting with a 1 and then validateaddress on that.

It is unfortunate that the support for segwit addresses is not great in version 0.15.x, it'll be much better in 0.16 when Peter Wuille's segwit wallet PR is merged


Multiple private keys on ledger devices I have read Ledger devices can handle multiple "applications". I suppose an application means a cryptocurrency (btc, eth, etc.).

Is there a private key for each application or is it a single private key for all applications ?

Thanks

I suppose an application means a cryptocurrency (btc, eth, etc.).

This is usually, but not always, the case - for instance, the Ethereum application on the ledger device handles Ethereum, Ethereum Classic, and many other chains that are ethereum forks.

  Is there a private key for each application or is it a single private key for all applications ?

Ledgers use BIP 32/39/44 to derive keys from a single root key, expose that root key as seed words for ease of backup, and follow a common convention for deciding which coin will derive which subkeys from the root.

Each ledger application accepts a derivation path as part of its usage. This path specified how to derive the subkey(s) required from the root key. The device will then derive them and sign the transaction, without exposing the keys to the controlling computer.


How to auto deposit bitcoins on btc-e? BTC-e gives a new address to send to for every time a deposit is to be made. These addressees can be accesses through this url: Bitcoin deposit authentication required

I am currently using python to interact with the BTC-e server. Is there a way of doing the following automatically?

sign into BTC-e using http request
get new address using http request
make a deposit to the new address
And repeat

There is nothing in the official documentation about this sort of thing. In the examples no-one is doing anything with deposits or withdrawals either. A quick google doesn't give any results, so I think you're stuck.

However, when I log in and want to deposit, one of the rules is the following:

  Address can be used for further deposits.

Isn't that working? Just use the same address over and over again? You will have to manually generate an address for the first time. (I know this is violating your first statement, but I used the same address at least twice for a deposit)


How can people in Indonesia use Bitcoins? Dwolla does not accept me.

So what's the alternative?

How can I for example, withdraw money to rupiah or dollar account in US.

Indonesia is one of the countries where no Bitcoin exchanges have much reach to just quite yet.

Are international wire transfers a possibility?  If so, most exchanges offer international wire transfers.

About the only payment network that any bitcoin exchanges use that have the ability to interact with Indonesian banks domestically is Payza, but theirs is a method for adding funds from a bank account and not the other way around.

OKPay is a network that might be usable for you.  They have an international prepaid debit card which can be loaded with USDs from your bitcoins.

There are also other digital currencies which might help -- though there are a couple of hops between your bitcoins before you end up with rupiah.  Aurum X Change can be used to cash out to Liberty Reserve, HD-Money, CosmicPay, SolidTrustPay, Global Digital Pay, and G-Gold e-currencies.  If none of those are familiar to you, you might use an intermediary such as GoldMediator to eventually get a connection to a bank.

Additionally, there may be a local buyer wondering how to buy bitcoins from within Indonesia.  If there are any hacker spaces, you would probably find someone willing to do a trade with you.

The list of exchanges offering cash out methods can be found here:
 - http://en.bitcoin.it/wiki/Selling_bitcoins


Why is everyone encouraging the use of P2Pool as the answer to the 51% problem? As I understand, P2Pool has some problems, since it's just a separate blockchain with a shorter time between blocks, small miners still have more variance, and, hypothetically, if the time between blocks were 10 seconds and each new block took 0.5 seconds to be received by a miner, then the miner would be wasting 0.5/10 seconds working on an old block. So, basically, if the time between blocks is reduced to lower variance, the miners will waste a larger percentage of time and lose money.

Why don't pools just use the BitPenny approach of having the mining client verify that the pool owner isn't trying to mine double spends?

BitPenny seems to be half the solution - it has centralized control, but its clients can verify it behaves nicely in some sense. But it still has central management. A 51% pool can pull off subtle attacks that aren't prevented by BitPenny. For example, it can prune competitors' blocks, which is not always detectable due to the network latency. It can also block certain transactions or all of them. See this Hacking Distributed post for more details. BitPenny won't always detect this behavior.

P2pool is the full solution - it is a truly decentralized mining pool with no central control. There is no entity that can wield its power to do anything other than honest mining.


How can I create uncompressed public key in C++? I need to derive public key from my private key in uncompressed form. I know how to create compressed one with libbitcoin, but I can't find appropriate method for uncompressed form there.

Are there any other libraries in C++ which can do that?

I don't know much about c++ or libbitcoin, but I found a public method in the bc::wallet::ec_public class

bool to_uncompressed(ec_uncompressed& out) const;

So I guess you can probably convert your ec_public to ec_uncompressed(which is just a byte_array) by

ec_uncompressed uncomp;
<public key>.to_uncompressed(uncomp);
std::cout << "Uncompressed: " << uncomp << std::endl;


Whose blockchains are all these ICOs using? Bitcoin's? Ethereum? Are they creating their own? This is a general blockchain question - not specifically bitcoin. Hoping this is the right place:

When a company raises money through an ICO such as Telegram, are they creating their coins and blockchains from scratch? Are they creating their own process of mining which needs to be maintained? OR, are they utilising Ethereum's blockchain and their solidity code as a platform for example?

In your question statement you mentioned TON ICO, (telegram). Telegram never announced any ICO till the date. Though some scams were there cashing out the name of telegram.

Coming back to the Question, ICO may or may not have their own blockchain. Most of the ICOs issue ERC20 tokens that means they are powered by Ethereum blockchain. That means they are not actully creating their own blockchain from scratch. These tokens are backed by ETH blockchain and resources.

Few ICOs (for example electroneum) used their own platform and blockchain for raising funds.

Just like ethereum there are few other players like NEO, Tezos, Stellar, Waves etc having their own properties, advantages and disadvantages. There are many upcoming ICOs powered by Tezos as well.


When is there a charge for sending/recieving BitCoins and other CryptoCurrencies I want to transfer BitCoins from my local wallet (to a new wallet) and then 'extract' the BitCoin Cash to a different new wallet.  Will I incur a charge?

If you move the bitcoins now, the bitcoin cash will stay where it is. There are now two separate chains, one for bitcoin and one for bitcoin cash. There is no reason to move the bitcoins. You need to move the bitcoin cash.

To do that you need two things:

1) Some tool that can compose and submit a bitcoin cash transaction.

2) The private key for the account(s) the bitcoin cash are stored in.


Deposit Litecoin into bitstamp from coinbase I have been having an issue trying to transfer my Litecoin from Coinbase to Bitstamp Litecoin deposit. I think I am correctly following all the steps. When I am in the Bitstamp Litecoin deposit page I copy the address, paste it into the Coinbase transfer recipient address, fill in the amounts and hit send.  I then get an error message to use a valid litecoin address. I then try using the old non M* LTC Multisig address, fill in all details and the error message this time is that I do not have enough funds. But I do have these funds.

Make sure you taken off enough for the transfer fee when sending the coins. That's a common reason for a 'not enough funds' warning.


I have not received my bitcoin after 2 days and 115 confirmations I have sent my first Transaction and waiting for it to arrive at another address but when i click on the Transaction ID 1 of the addresses is Spent and the other is Unspent? It only required 3 Confirmations but is now 115? Where is my bitcoin and how do i receive it?

Thanks in Advance

1 of the addresses is Spent and the other is Unspent?

The simplest transaction has one input and two outputs. One output is the amount to be transferred to the destination-address. The other output is the left-over change being returned to the sender (to the wallet containing the sending-address).

One way of interpreting what you wrote is that the recipient has already spent what you sent them.

Another way of interpreting what you wrote is that you have subsequently spent the change in a second transaction.

  It only required 3 Confirmations but is now 115?

The transaction is confirmed. It is not pending. If you wait longer nothing will change.

  Where is my bitcoin

Someone has already spent it (i.e. spent the amount sent or the change returned).

  and how do i receive it?

It has already been received.

You don't say explicitly that you "own" the sending address and both of the receiving addresses (perhaps in more than one wallet) but if so, your wallet has been compromised and you should immediately move everything into a completely new cold wallet

lets look at the transaction

Transaction: 0ec3e57ee26a68f73030f331fa18184bc3290833fb5b40509caedbd434c99301

Source of funds: Address: 18gLw9DF8aBW2PzY3rVi35bFiuSTNgiv7s
                 Amount:  0.02849847 BTC

Outputs:         0.02054938 BTC to 16FsHnvTqnYrvdPXTH4c7tXD8ZE4r8rXJg - (Unspent)
                 0.00781349 BTC to 1NtLEd3y5wEmR3bsQ1LEeN6g8H3DbxSmiU - (Spent)

Only you know which is the amount transferred and which is the left-over change. So only you know whether the amount or the change has been spent.


What happens if your bitcoin client generates an address identical to another person's? Here's a what-if scenario:

Person A has a Bitcoin address with 25BTC.
Person B opens up their Bitcoin client:

which may or may not have the complete blockchain (the latter would
mean no copies of Person A's transactions)

Person B presses "New Address", and Person A's address happens to somehow be generated. Now, the blockchain finishes synchronizing.

What happens? Is this a possibilty, sans the astonishing improbability? After all, random number generation can be influenced.

If this happens, then Person B will be able to spend person A's bitcoins. However, there are only two ways this can happen:

a) Person B generates the same keypair (private key) as person A

or b) Person B generates a different keypair, which (public key) hashes to person A's address (a hash collision)

Take a look at the specification for at bitcoin address: https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses

  A Bitcoin address is a 160-bit hash of the public portion of a
  public/private ECDSA keypair

For "a" to happen, person B would need to break "secp256k1".
I am no expert on this field, but from what I can find on bitcointalk.org, then the "strength" of this is 2^128 bits. And if you're wondering how strong that is, then look for the video "Exhaustive search attacks" from Dan Boneh. 11 minutes in the video he says "anything that's bigger than 2^90 is considered sufficiently secure" (its about attacking 3DES, which is a symmetric block cipher so I'm not sure it actually apply to secp256k1, but I really have no better argument for why 2^128 is "so secure that you won't never, ever, ever generate the same key as someone else"

And for "b" to happen, you would need to find a collision on RIPEMD-160(SHA-256(pk)). As far as I know, then neither RIPEMD-160 nor SHA-256 is known to have any vulnerabilities to hash collision attacks. So somehow breaking both or randomly generation a key which hashes is exactly the same as another bitcoin address, is highly unlikely.

There is also a chance for you computer to catch on fire, and some of the materials to melt together into a lotto coupon with winning numbers on (and a valid barcode), but it just won't happen because of the chance is so unbelievably small (it's the same with the "click and generate another persons bitcoin address").

EDIT Woops, one important thing: This all assumes that all bitcoin addresses are properly generated using "true random". All brain-addresses and addresses generated using a bad PRG, might be easy to find by either using a flaw in the PRG or exploit the (flaws in the) human brain.


How do I know if I have ever registered a bitcoin account? Just wondering how I could check to see if I own any bitcoins.  How can you do this?

There are a few different ways you can store bitcoins, there isn't just one place you can log in to and check your balance, like you may be used to with online banking. So if you don't remember having a specific wallet with coins stored in it, then you'll have to go on a bit of a hunt.

For example, there are desktop full node wallets (eg bitcoin core), litewallets (eg Bread, or Jaxx), paper wallets (a piece of paper with a keypair on it), hardware wallets (eg Trezor or Ledger), web wallets (eg blockchain.info), and 3rd party wallets/exchanges (eg Gemini, Binance). Each one of these is a different method for storing the cryptographic keypairs that are used to generate a bitcoin address, and interacting with the network. Each one will have different levels of security/ease of use, usually a user will select a method of storage based on their personal needs for security/usability.

If you don't remember specifically what sort of wallet you may have used, then try searching your computer for bitcoin-related files (eg search terms: wallet, bitcoin, btc, etc), as well as your email inbox. Search anywhere you think may hold a clue, such as old hard drives/backups, your internet browsing history, or your social media accounts.

Good luck!


Where does Coinbase buy coins from? When we buy coins from Coinbase, where do they get the coins from?

Coinbase is built on top of Bitstamp. They may work with other exchanges now, but they are (and used to be) very tightly coupled with Bitstamp.

There was an exploit where someone discovered that Coinbase's price was set to the last sale price on Bitstamp.  Basically, this person would sell a small amount of Bitcoin for much lower than market value on Bitstamp.  Coinbases price would match that, where he'd buy again.

Coinbase does operate their own reserves as well, which (as others have pointed out) are used when Coinbase customers buy and sell within the site.  Their prices are set using a weighted average of multiple exchanges.


Bitcoin Wallet for Android - Issues decrypting the wallet backup BIN file using OpenSSL I've followed the advice found here and also on the Github article linked from that post, but I'm still having issues decrypted a wallet backup using the latest version of Bitcoin Wallet on Android (v5.26 released 7/28/17)

I was able to take the BIN file in question and import that between Bitcoin Android wallets, so I know the backup is not corrupted and the password works.

When I run the openssl enc -d -aes-256-cbc -a -in <filename> command, targeting the BIN backup file, it prompts for the password, which is inputted. The resulting decryption fails.

Is there a change made to the encryption algorithm that I'm not taking into account? Any/all help is appreciated.

Thank you

EDIT: To be clear, I also attempted the openssl command string found on the Github article, but that also fails (it includes the -md md5 parameter)

i managed to decrypt a backup by doing this  :

openssl enc -d -aes-256-cbc -md md5 -a -in ./walletbackupfile > decrypted_wallet

however, i have not managed to getting at the private keys from the output.

i have tried wallet-tool dump --dump-privkeys --password=..pin

but it seems like no private keys are dumped in the output

i have also tried wallet-tool raw-dump --dump-privkeys   --password=..pin

that seems to dump some encrypted private keys of some kind, but i am not sure how to proceed from there.


How is Bitcoin's Multi Signature different from NXT's account control feature for security? Bitcoin's multi signature feature requires X number of people to sign a traction to secure your Bitcoins before it can be sent. Comparing this feature how is NXT's account control feature different? And has any other altcoin implemented alternative ways of securing coins like multi-sig and account control?

NXT's account control is based on the phasing feature. It is very different than Bitcoin multisig.
When submitting an NXT phased transaction the user, in addition to the transaction information, attaches a voting model and a block height stating that in order for this transaction to be executed another approval transaction(s) matching the voting model needs to be submitted before the block height is reached. Phased transactions are always included in the blockchain but are only executed if the voting model is matched. You can read more about it in the change log https://bitbucket.org/JeanLucPicard/nxt/downloads/changelog-full.txt

Account Control enforces that all transactions from a certain account has to be phased given a specified voting model and a number of blocks specified by the account control transaction.
In a simplistic form, account control can be used somewhat like Bitcoin multisig, the account control transaction specifies a list of accounts which need to vote for each transaction submitted by the account under control. However voting models are much more flexible and allow many other voting options.


Sending RPC calls asynchronously I have ubuntu server running Bitcoin core v0.16.

I'm sending RPC calls asynchronously using Guzzle (PHP library), but, e.g., if I'm importing 1000 address using importmulti command, any further requests are waits until that command finish.

Even though I have set rpcthreads=100
rpcworkqueue=50 and I've powerful server.

importmulti is a completely blocking RPC call, no amount of CPU power or RPC threads will prevent it from being blocking. You need to create applications which do not use this command if it is an option.


Would it be worth it to start mining bitcoins at this point? My budget for mining hardware is $600. Would there be an ASIC miner that I could buy for this that would return this and also net a decent amount of profit within a month or so? Is it even worth it for beginners without tons of money to invest in it now?

Is it even worth it for beginners without tons of money to invest in
  it now?

Short answer

No.

Longer answer

I spent over $2400 in ASIC mining equipment from butterfly labs. I started out churning an impressive 120GH/s. I've been running 24x7 and am a little over a month in... I've mined ฿0.78

Last night my rig crashed. When it came back on I was down to 100 GH/s. I can only assume that one of the on board chips failed. There is apparently no recourse to this loss.

Couple things to note... The difficulty rate is increasing exponentially, at the start I was earning ฿0.03 ($33) per day today I'm done to ฿0.02 ($19) for the same rig and the same approximate contribution to the mining pool. In March, the new 600 GH/s miners come out, at the same price range as the rig I'm running now. I expect that my earnings with the current rig will tank, and at that point be less than the electricity I'm burning to stay hashing.

My expectations / hope is to recover the ฿2.5 necessary to break even before the rig's mining rate becomes a negative investment... it's unlikely.

Note that In my recovery cost calculation, I'm considering the 700w of power used to operate the ASIC chips only... my 'computer' is a raspberry pi and has a negligible power consumption rate.

So to answer your question directly... No, even with a large budget, the hamster wheel will keep you in the roughly same spot. It's likely a better investment to simply buy the btc on speculation through coinbase or mtgox than to waste your time setting up a rig that requires you to be a relatively competent system admin just to get started. What I mean by that, is that I had to 'flash' a unix system onto the pi and download / compile bfg miner just to get started. Additionally it makes ALLOT of noise, and finding a place to keep it from bugging the family was hard (and I have a large 2800 sqft house).


S9 miner shipping time I am having a hard time locating the estimated shipping time for the S9 miner. Estimated shipping dates are listed on the website but delivery times by country are not. How long does shipping take to each of the Group of Eight territories?

https://enshop.bitmain.com/product.htm

I am reading that some will ship June 12th:
http://themerkle.com/ologies-unveils-first-commercially-available-16nm-bitcoin-miner/

Delivery time is sure to vary based on where you live. Based on the selling price I perhaps some sort of delivery tracking would be an option


Bitcoin Difficulty granularity Difficulty adjusts by very granular percentages to target for 10 minutes blocks. But adding another zero at the end of the chain of zeroes from the header hash requirement for a valid block would increase the difficulty exponential. So how does the Alogrithm target so precisely the right difficuly only through the use of "zeroes"?

The difficulty is actually represented by the target threshold encoded in the nBits value in the block header. Where difficulty represents the human readable representation ("how often do we need to try to find a solution"), the target threshold defines the prefix a block must undershoot in order to be valid. This means that the 256-bit block hash interpreted as a number must be lower than the target threshold.
Although, nBits is only a 4-byte value, it is a compressed representation of a 256-bit (32-byte) number. The first byte defines the exponent, the remaining three bytes give a 24-bit mantissa for the target.

While this leaves most of the 32 byte in the target threshold to be just composed of zeroes, the difficulty can adjust in a much more granular fashion than just adding leading zeros.

David Harding has elaborated the full details in How is the target section of a block header calculated?.


How to prove to my landlord that bitcoin came from my wallet? Let's say I'm paying my monthly rent using bitcoin. I'm going to set up a script to send 5 bitcoin from my wallet to my landlord's address every month. I will not be able to tell beforehand which addresses the bitcoins will come from, nor does my landlord want to verify signatures on many addresses.

How can I prove that 5 bitcoin is leaving my wallet every month and going into my landlord's account?

One way might be to have the landlord generate a different address for each tenant. So you pay your landlord using address A, and your neighbour pays using address B, and the landlord can tell who the payment came from by the destination address.

That doesn't prove that the payment came from your wallet of course, but this allows somebody else to make the rent payment on your behalf (and the landlord wouldn't know the difference).


Will large Bitcoin holders be a threat in the future? There are most likely individuals or groups who hold (and hoard?) large sums of Bitcoin because of various reasons. I believe these people are the early adopters or miners of Bitcoin. Basically, we pretty much do not know anything about these people. Will they be a risk in the future?

Large Bitcoin holdings are static assets.  The price only climbs if there are active trades.  It would be in the interest of large holders to promote the use, trade and circulation of the currency.

If a large holder were to dump all their coins on the market all at once would cause the price to drop, but that would not be in their own interest, as they would lose their investment.  Then again, they can only get a return on their investment if they sell it.  It would be sensible that if a large investor wanted to liquidate their holdings, they would trickle them out slowly to keep the price high.

Also, the total amount of money wrapped up in Bitcoins and the risk involved is not enough to attract really serious investors.  There are some large investors, such as the Winklevii, but they are attracting attention because they are the exception, not the rule.


Does the client broadcast it's version? Is it possible to determine which version of client are in use? When the client communicates to other clients does it transmit its version?  If so is it only on certain communications (i.e. originated transactions)?

Can this data be captured?  I would be interested to see if it is possible ot determine which versions are in use and hopefully combine that with geo-location data to map the bitcoin network by client node version.

When you connect to the other Bitcoin client, the first message you send is "version", which states your protocol version. Moreover, it states both your IP address, and the addres you are connecting to. You can capture this data like any other TCP/IP data.


What is the average bandwidth used by the default client? I am asking it because I'd like to install the client in my work office. Is that safe? I know the first time it take a long time downloading about 2 GB or more, but what is the daily normal activity?

100 MB per day, or less.

(i.e., a dial-up modem could handle it.)


Why does my wallet need to download the whole transaction history? I started a wallet, and it is downloading and synchronizing lots of transactions.
This takes time and network bandwidth.

Why is this necessary? Is this some form of accountability?

With Paypal, for example, this isn't done.
And as you grow, I guess this becomes a huge -- will the amount of transaction data become too large? It is a bit scary to have my computer run off and synchronize, without it informing me  what kind of information it is getting and whey this is necessary.

Can't the whole transaction history be shown or available on a website, rather than loaded on my computer?

The short answer to your question is "no". The reason is actually pretty simple: Without the entire block chain, there is no way to know that funds that are claimed to have been sent to you weren't actually sent to someone else. There is no way to prove the absence of a conflicting transaction, other than to check every valid transaction.

With a bank, the bank clears your checks for you. Here, you clear your own checks. Without knowing every check an account has received or sent out, how can you know the account has sufficient balance to cover your check?

Of course, you don't have to run the Bitcoin client. Your alternative is trust someone else with your coins.


How do I get Raw Transaction Txid, Scriptpubkey Using Bitcoin Core Console I just finished downloading bitcoin core on windows 7 and I am trying to create a raw transaction. When I typed listunspent 0 or listunspent 1 on console, I got no message (empty message) in the console. How do I get raw transaction txid, scriptpubkey using bitcoin core console ?

Bitcoin is an open source platform where everyone who runs a full node verifies each and every transaction that has ever happened on the network. It checks that the transaction does not double spend the bitcoins, verifies the signatures (if you set assumevalid=0), and the block structure and proof of work. Thus it takes time for your node to sync up to the current state of the network.

As you have stated in the question, you have just finished downloading the Bitcoin Core software. This means you did not give your node the time yet to finish syncing with the network and verifying every transaction. Depending on the type of machine you are using this should take between couple of days to a week. This is not because of the time needed to download the blocks, but due to the time needed to verify each and every transaction.

If you run your node in pruned mode, you won't be able to query transactions from blocks that are deleted to conform with the prune requirements. Moreover, you will need to set txindex=1 to maintain an index of transaction if you want to query it using txid.


Running two bitcoin instances on a linux server, can't get peers on second instance I am running two bitcoin instances using the method described in this previous thread: https://bitcoin.stackexchange.com/a/13584/6024

I have set the new datadir and each instance has a different wallet.

However, I found that I can't use the same port to listen on, otherwise there is a conflict. If I change the port for the second daemon, it receives no peers and cannot update the blockchain database.

How can I solve this issue?

You'll want to add either addnode=<ipaddress> or connect=<ipaddress> to the bitcoin.conf of the node that is not working, where <ipaddress> equals the 127.0.0.1

These can also be command line flags (e.g., bitcoind -connect=127.0.0.1).

The difference between addnode and connect is explained like this (attributed to 'Noodle' on Freenode):

  Quick Primer on addnode vs connect

  Let's say for instance you use addnode=4.2.2.4
  addnode will connect you to and tell you about the nodes connected to 4.2.2.4.  In addition it will tellthe other nodes connected to it that you exist so they can connect to you.
  connect will not do the above when you 'connect' to it.
  It will only connect you to 4.2.2.4 and no one else
  So if you're behind a firewall, or have other problems
  finding nodes, add some using 'addnode'.
  If you want to stay private, use 'connect' to only connect to "trusted" nodes.
  If you run multiple nodes on a LAN, there's no need for
  all of them to open lots of connections.  Instead 'connect' them all to one node that is port forwarded and has lots of connections.


What are the (non-escrow) methods people are using to minimise bitcoin transaction fraud? Direct peer-to-peer bitcoin transactions are irreversible; and relying on a centralised escrow or reputation service for fraud protection is contrary to bitcoin's decentralised philosophy.

What other methods or techniques have people devised to reduce bitcoin fraud to a modest amount?

For example, two traders don't know each other* and want to exchange goods, services or currency directly.

* on bitcoin anyone can be a dog... or Walt White or Cthulhu.

One possibility is to use 2-of-2 multisig. This means that if the parties don't reach an agreement, the funds are lost so they have an incentive to cooperate. (This is still vulnerable to blackmailing).

Another is 2-of-3 multisig with a 3rd party. If the parties agree (which is usually the case) the 3rd party doesn't need to do anything and can't control anything. If the parties disagree the 3rd party can arbitrate. This means that for a problem to exist, one of the parties and the 3rd one must misbehave, which is by far rarer.

It is a mistake to think that Bitcoin means there should be no centralized services. It means that whatever can be decentralized, should be; leaving centralized services with a reduced role, leading to lower barrier of entry, lower vendor lock-in and more competitive service.


Measuring levels of spammer participation on the Bitcoin network Is there any reliable way of estimating the number of spammer controlled miners?  I was thinking about the common wisdom that BitCoin should have been implemented with a hashing mechanism that is resistant to distributed processing (i.e. scrypt) and I have my doubts.

The first thing I thought when I saw a headline about BitCoin I rolled my eyes, it looked like a spammer's dream come true.  But the recent protocol breakage and the (successful) coordinated effort to fix it, some I saw some comments attributing it to the concentration of miners.  I also know a pooled miner that griped about an obvious hacker that he banned form his pool because the clients were doing way too much network traffic for too little work.

So, I am looking for a way to track this.  The IP's stored in the Blockchain are of the first IP's that saw the coin and the payouts would go to a centralized wallet.

Any thoughts?

I'll assume you're confusing the term "spammer" (someone who sends unsolicited email, or posts unsolicited advertising) with "hacker" (of which black hat ones might operate a botnet and mine cryptocurrency), so I've updated your question.

Bitcoin is generally substantially less worthwhile for a black hat hacker to mine with a botnet than an altcoin using scrypt (such as Litecoin). This is because Bitcoin hashing happens to be more efficient to run on GPU hardware, whereas scrypt is more efficient to run on CPUs.

IP addresses are not stored in the blockchain.

Not much is available in the way of statistics for Bitcoin users, so you'll probably find it difficult.

Pool operators can collect IP addresses of those connecting to their pool, so they may have some (or could potentially collect some) data useful for what you describe. Even then, tracking it would be difficult; it may become a cat and mouse type game like virus writers and anti-virus companies play, if the operator of a botnet becomes aware of what you're doing.


in bitcoin core, how to use Tor for broadcasting new transactions only? I have set up a full node with bitcoin core running on the internet.  I have also set up a wallet running on a private machine that communicates to the full node to broadcast new transactions.
To enhance privacy, I plan to enable Tor on the full node.  However, it is not clear to me how to use Tor only for broadcasting new transactions from my wallet.
Many tutorials tell you how to use Tor exclusively for everything.  That is not very good, because it wastes bandwidth, is slow and does not help bitcoin community.
Some other tutorials talk about using both Tor and IPv4/IPv6 at the same time.  However, with this setting it is not clear whether new transactions from my wallet are sent out via IPv4/IPv6 or not.  If they do, then you don't have much privacy after all.
Appreciate any pointers on this.

You cannot.
The node side of Bitcoin Core treats wallet transactions as any other transaction. They aren't treated any differently from transactions received over the network. So once the transaction is added to the node's mempool, it will be broadcast to connected nodes in the same way that any other transaction would be relayed.
All you can do is to temporarily run Tor only for transaction broadcast.


Transaction unconfirmed after almost 2 day! Help! I tried to send a bitcoin transfer Wednesday evening and it is still unconfirmed. It says "fees 0" but I have my block chain account set to "use recommended fee" by default. Can anyone help me get this confirmed? If greatly appreciate it!

Here it is: https://blockchain.info/tx/f054dbba378cea1b82168214cf28771f60c7cc30be0963b0b38498c7a0ec9166

There are two obvious reasons why your tx remains unconfirmed:

You have not included the recommended tx fee (that's probably your wallet's fault, unless you've manually overridden its default settings)
You are spending an unconfirmed output: https://blockchain.info/tx-index/81648421/0 (also an insufficient tx fee issue). Unless this output gets confirmed, the tx above will never get any confirmations.

Most probably the tx will get invalidated by the network soon and the "spent" funds will return to your wallet.

In the meantime I would suggest you to be careful with spending unconfirmed outputs (there is an option to disable the spending of unconfirmed outputs in the bitcoin-core client) and avoid it whenever it's possible. Also, including the appropriate fee will make your tx much more likely to get confirmed soon by the network.


Viewing total number of coins mined for an Altcoin I am a newbie to crypt-currencies so for school, I forked a coin from litecoin to help me understand how it works and so far, I got it to work using a VPS with some other friends mining on it. I am trying out new things but I am having a hard time determining the total number of coins mined between all users. I can't seem to find the main ledger that is distributed among all the nodes, my question is how to view it and monitor how much of my altcoin is in each address. Can anyone help me figure this out? Where is the ledger or the blockchain? I would really appreciate it as I have be rattling my brain on this for the past few days.

Generally that would be the job of a block explorer application. You would have to build one for your altcoin if it doesn't exist. Otherwise you could issue rpc calls on the client and sum up all the block rewards.


What are Zombie Channels? In the Lightning Network, what is the definition of a zombie channel?

Can they clearly be identified or is it more of a undefined term that is used for channels that are assumed to be obsolete?

I am not aware of a clear definition for the term zombie channels. At least I don't recall the term being used in the lightning rfc. Also I didn't hear lightning devs in conversations to talk about them. Thus I think the semantics are more along your suggestion that they refer to channels which are for some reason obsolete / inactive / unusable. Disclaimet: just because I never saw the term doesn't mean it has no definition


What is the motive of a miner to include transaction in a block? My question is divided into different parts :

Can a block include only coinbase transaction ?
Why should a miner wait \ include more transaction after starting to create a block ?
If a miner stops the mining process for including new arrived transaction, does that makes him re calculate the previous nonce possibilities for creating the block ?

Blocks can contain whatever is valid, anything beyond that is up to the miner to decide. Including no transactions other than the coinbase transaction is valid, and there is no way of having a rule where this is not the case (was there transactions to include at that point in time?). Miners will absolutely not wait for transactions to be available to mine, as their main source of income is the block reward.
Miners are incentivized to include transactions by the creator of the transaction paying a fee, and the miner collecting it. Including no transactions mean they miss out on income.
Mining is progress free, each attempt is completely unique and has the same chance of winning no matter how many you have made previously or what the contents of those attempts were. Inclusion or exclusion of transactions has zero effect on the chance of a block winning or not as the header is exactly the same length for each and every attempt.


Can the Bitcoin halving be delayed? Currently the next halving date is May 2020 (provisional) according to enter link description here.

I understand that every 210k blocks, the block reward is halved and this works out, roughly, to once every 4 years.

I guess I have two questions:
1) The 2012 halving took place approx. 3.8 years after genesis, and the 2016 halving took place a further 3.6 years after that. During this period hash rate increased almost continuously and at exaggerated rates due to continuous developments in mining technology from general to specific solutions (CPU -> GPU / FPGA -> ASIC). So were these 'premature' halvings due to the positive rate of change of hash rate?

2) A halving on 23 May 2020 is roughly 3.9 years from the last halving. It seems this is linked to 2018's drop in hash rate, could a hash rate collapse lead to a delayed halving event (i.e. adding the current 210,000 blocks takes longer than 4 years)?

Thank you.

So were these 'premature' halvings due to the positive rate of change of hash rate?

Bitcoin is designed to keep the block time at 10 minutes. The difficulty increases/decreases as the mining hash rate increases/decreases. At this 10 minute rate the the halving event comes every 4 years. As miners started using ASIC chips to mine blocks, the average time came down and that led to slightly lower halving time.

  could a hash rate collapse lead to a delayed halving event (i.e. adding the current 210,000 blocks takes longer than 4 years)?

If hash rate declines continuously so that even after difficulty gets adjusted to account for lower hash rates, miners continue to lower their hash powers, then it could take longer than 4 years.


signrawtransaction hex When calling RPC signrawtransaction it returns a hex-encoded string that contains the raw tx request with its signatures.

Is this string:

malleable?
unique?

signrawtransaction signs all inputs your wallet can sign. As multiple inputs in a transaction can exist, it might be possible that not all inputs are signed.

The signrawtransaction command returns whether the transaction is fully signed or not: https://github.com/bitcoin/bitcoin/blob/0.13/src/rpc/rawtransaction.cpp#L616
If it is fully signed, the output is not malleable.

The output is not unique as is discussed in the comments below.


How many Hashes are in a single Terrahash Im looking at getting an ASIC that runs about 1 Th/s and im wondering how many hashes is equal to a terrahash?

Tera is an SI prefix that means 1 trillion.

That means 1 terahash/s means 1,000,000,000,000 hashes per second.


Can I sign a message with an Open-PGP key? I want to prove that I control an address for asset verification. To lawyers that might not even know what a blockchain is.

Signing using the private key of an address does nothing for me, as it doesn't prove I control the address (I could have told someone else to sign their address). Is there a way I can leverage PGP signatures in the signing message?

Signing using the private key of an address does nothing for me, as it doesn't prove I control the address (I could have told someone else to sign their address).

In general, OpenPGP keys and Bitcoin keys are incompatible.

You can sign a message using the private key to sign a message that says "This address, and this PGP key are held by so-and-so."  It's possible to forge this by asking someone else with a lot of Bitcoin to claim that their Bitcoins are yours.

This is a problem that doesn't really have a good solution. You can give them the private key and ask them to derive the public key, to prove that you own that address. However, if you do that, an unethical lawyer could steal your Bitcoins.


What happens to bitcoins in a multi-sig transaction if nobody signes? If I transfer my coins using a multi-sig transaction, they will leave my account, but where are they until the other parties sign and they go to the recipient? If nobody signs, do they come back to me?

They stay in the block chain, just as normal transactions do.

Let's look at normal transactions first: When someone (A) sends bitcoins to another person (B), B is not involved in the process at all. A just publishes a transaction in the so called block chain stating that only B is allowed to claim the coins. Not before B wants to spend them, he has to prove that he owns them. This happens by putting the signature for the first transaction into the follow-up transaction.

Thus, every transaction stays unsigned in the block chain until the coins are spend in a follow-up transaction. "Owning bitcoins" means having the ability to sign a transaction in which someone sent bitcoins to me.

Multi-Sig transactions aren't that different, you just need more than one signature. As long as you can't provide them the money is frozen, nobody will be able to spend it.


Given a bitcoin block, what's the easiest way to determine the minimum net fee rate (including ancestors) for transactions in that block? Given a bitcoin block, what's the easiest way to determine the minimum net fee rate (including ancestors) for transactions in that block?
A naive approach would be to just find the minimum fee rate for a single transaction, but that does not take ancestor and descendant chains into account. I want to know the minimum clearing fee rate for the block considering the full ancestor/descendant chains
I've been looking through the transaction selection algorithm to try and understand the logic, and figured I could try and reverse engineer it to decode an existing block... but I'm wondering if someone has already done the work and created a good tool/script/api that can parse an existing block and determine the minimum net fee rate of the block's transactions

First, even if you find the transaction with the lowest effective fee rate in a block, that will not necessarily mean that the mempool cleared to that level. In their recent paper "On Blockchain Commit Times: An analysis of how miners choose Bitcoin transactions", Messias et al observe deviations in the block composition from the expected norm (GetBlockTemplate) of up to 22%. They surmise that this could be caused by out-of-band prioritization or use of other algorithms.
Fact is, we don't know what software miners are running to compose blocks, how often they update their templates, how often they get acceleration requests or have their own interests to include transactions, and which version of Bitcoin Core they may be running if they even they simply use GetBlockTemplate (GBT).
Assuming that blocks are generally produced by Bitcoin Core's GetBlockTemplate method, and applying general rules for block composition, we know the following:

Transactions must be ordered topologically in a block
If a transaction spends UTXOs created within the
same block, the child transaction must follow the parent in the block's transaction list
GBT selects in order of effective fee rate
GBT will select complete transaction ancestor groups
This means either a single transaction if no child transaction is present, or the descendants have a lower effective feerate, or the complete group derived from the descendant that has the highest effective feerate.
Groups may be skipped when they don't fit in the block
If a transaction group requires more blockspace than is left, a smaller transaction group with a lower effective feerate will get included instead. This means that larger transaction groups may miss a block even though transactions with lower feerates made it in.
Only the best sibling counts
Sibling transactions do not form a shared ancestor group unless the
ancestor group is started from a shared descendant. I.e. if two siblings both have higher feerates than the parent, they each form a separate ancestor group in the candidate list and get prioritized on basis of the effective feerate of their individual group. When the ancestor group with the higher effective feerate gets selected, all remaining ancestor groups get recalculated and the sibling transactions would now likely have the highest effective feerate right afterwards (since it was higher than the parent alone). So, even if siblings and parents all appeared grouped in a block, they would be positioned at the highest effective feerate among the individual ancestor groups, the parent does not gain a special benefit from being CPFPed multiple times in parallel, and they were actually selected iteratively not together.

Altogether, it would be expected that transactions should appear in descending order of their feerate in the block (when using GBT), except where topology interferes, or transactions have been imbued with a "virtual high-feerate" via PrioritiseTransaction. I.e. you could look at the effective feerates of the last few transactions in the block and make a guess from there. Taking a low percentile instead may give you a more representative value.


Advanced Bitcoin Transactions Let's say that 7 users want to spend money from a Bitcoin multisig address. The approval of funds from this address requires the signatures of A (the leader), either B or C (two managers), and 2 of 4 members of a board of investors (D, E, F, G). So if A, B, D, & G all submit their signatures then the transaction should be considered valid. However, even if B, C, D, E, F, and G all submit their signatures, A can veto by not submitting his/her signature.

Does the Bitcoin protocol currently support advanced transactions like this or does it only support basic M-of-N addresses/transactions?

This should be possible by having several checks happen in one script.

So, a normal pay-to-address script looks like:

OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG

And a normal multisig, say for 2-of-3, looks like this (format is a little different from above):

format: [byte value] [meaning]
52 OP_2, meaning you need two signatures
41 push 65 bytes
[pubkey 1]
41 push 65 bytes
[pubkey 2]
41 push 65 bytes
[pubkey 3]
53 OP_3, meaning there are three public keys
ae OP_CHECKMULTISIG described at https://en.bitcoin.it/wiki/Script

And we want to have three checks: A must have signed, 1-of-(B and C) must have signed, and 2-of-(D, E, F, G) must have signed. So we chain it like so:

OP_DUP OP_HASH160 <pubKeyHash A> OP_EQUALVERIFY OP_CHECKSIGVERIFY
OP_1 <pubkey B> <pubkey C> OP_2 OP_CHECKMULTISIGVERIFY
OP_2 <pubkey D> <pubkey E> <pubkey F> <pubkey G> OP_4 OP_CHECKMULTISIG

And hash that script to have something easy to send to (pay-to-script-hash). Note the use of the VERIFY variants in the first two checks and the ordinary one in the last. If you look at the meaning of these OP codes and the fact that a valid transaction needs to end with a non-zero value, the correctness of this should be clear.

It'd be a good idea to try this out on the testnet before using it in a real transaction, so that you don't wind up with unspendable (or spendable-by-anyone) bitcoins.


How can I restore my dogecoin wallet (android client) How can I restore my dogecoin wallet backup? It was created by the dogecoin android client and lives in my Google Drive account.

This question already exists, but no answer is given for Android (and dogecoin might be different, I guess).

I just hit the option softkey and a menu popped up. Then I tapped "Back up Keys" then tapped "Restore private keys".


Do miners have to hold all the blocks in memory? Running a miner node, one would have to verify transactions. This includes checking all the inputs of all the transactions.

Does this mean that a miner must hold all the block-chain in memory (currently about 8.7 GB)? If not, how can a miner find previous transaction (a transaction input does not have an indication to the block containing it)?

No, miners do not need the entire block chain to be accessible. Technically, they don't even need it at all. The blocks themself are only needed for rescanning wallets, reorganisations, and serving blocks to other nodes. That is why pruning them away will likely become viable in the future.

What you need for validating blocks and transactions (a fundamental demand from miners), is the database of unspent transaction outputs. 0.8+ clients maintain this database explicitly in a compact form (around 200 MB now, as of May 2013).

In addition to that, a miner needs to maintain a memory pool: a set of transactions that are validated against the current best chain, to choose transactions for the next candidate block from.


Bitcoin Core 0.16 new address prefix I just downloaded the version 0.16 and tried to generate a new address via GUI while syncing mainnet blocks. I have never activated multi-signature but it gave me an address starting with "3". As far as I know, segwit addresses currently start with "bc1q". Can someone tell me what's going on?

Not all addresses beginning with a 3 are multisig, and Bitcoin Core does not make you multisig addresses. Addresses beginning with a 3 are P2SH addresses. The segwit addresses Bitcoin Core generates by default are segwit scripts nested in a P2SH address in order to allow for backwards compatibility. If you want to use the native segwit addresses (bech32 addresses that begin with bc1), you can start Bitcoin Core with -addresstype=bech32 or go to the receive tab to get a new address and check the "Use bech32" checkbox.


How do you apply "-zapwallettxes" on Windows? On May 27 I tried to sell some Bitcoins(for the first time). Since that day the transaction is in the status "unconfirmed". The amount is booked from my wallet, but isn't booked to my bank account.

The solution I found to solve my problem was to start the Bitcoin core wallet with "-zapwallettxes". I'm using Win10 and don't find a way to do this.

Has anyone got any idea on what can I do to sell or to get back the Bitcoin? Answers in German are welcome too.

-zapwallettxes removes all wallet transactions that are not in the blockchain. It can remove "stuck" transactions, although you don't need this feature in normal operations mode.

Solution A)

On Windows, you need to start the command line prompt (cmd.exe), go to your window search and enter "cmd" and start cmd.exe.
Start bitcoin-qt with --zapwallettxes=1

C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe --zapwallettxes=1

(maybe adapt the program files path)

Solution B)

Create a bitcoin.conf file (normal textfile) here:

C:\Documents and Settings\YourUserName\Application data\Bitcoin (XP)
C:\Users\YourUserName\Appdata\Roaming\Bitcoin (Vista and 7)

Place....

zapwallettxes=1

... in the bitcoin.conf file, start Bitcoin-Qt, remove the zapwallettxes=1, restart Bitcoin-Qt.


Does Bitcoin ensure all messages will be broadcast? Since Bitcoin is largely a flooding-based P2P network it means that any message it receives on one of its connections also needs to be routed to all of its other connections. This means that by definition Bitcoin consumes far more upload bandwidth than it does download bandwidth since every downloaded message will also need to be uploaded to every other peer (by a factor of the number of connections - 1.)

We can assume that a node on the Bitcoin network can only upload messages as fast as it receives them so this means upload is also limited by download. Most ISPs also have far less upload bandwidth available to their customers than download bandwidth so conceivably this means that if a node is maxing its download bandwidth, it will lack the required resources to be able to broadcast those messages to its connected peers.

My question is: what happens when the messages start to overflow and the node can't keep up? Does Bitcoin maintain some kind of queue for the messages and what does it do when it can't keep up any more? Does it simply start to discard random messages? Also, given that you can't semi-reliably know beforehand what the available bandwidth is (without testing), how would you even set a limit for what size the buffer would need to be (the buffer will overflow eventually if the network can't keep up, right?)

(Sorry if these questions seem a bit technical but I am genuinely curious how Bitcoin handles this.)

What you're describing is a push mechanism where each node automatically pushes whatever data it gets. This is not how the networking part of bitcoin works. The network protocol of bitcoin works as a pull mechanism. As a node, you request an inventory of blocks and transactions from other nodes. Usually, you request an inventory of what blocks and transactions other nodes have and then request specifically for the blocks and transactions you don't have. Other nodes you are connected to do the same thing.

As such, the upload bandwidth is only as much as other nodes request from you and given that you only need to receive each transaction or block once, in general, your upload bandwidth will be roughly equal to your download bandwidth.

That said, if you're one of the nodes that has a block first (like a miner), you're going to be uploading the block data to a lot more nodes than you download. If you're running a normal full node and not mining, you'll most likely be downloading more data than uploading.

That said, if your mempool gets flooded with transactions, the bitcoind behavior is to randomly discard transactions so that it's under a certain limit.


How does public address "know" private key? Imagine the following:
someone goes to the .org address of bitaddress, then switches off internet connection, then moves the mouse around until eventually the JavaScript Client-Side Bitcoin Wallet Generator produces a Bitcoin address with its corresponding Bitcoin private key, then saves everything on the screen to cold storage as a PDF, then scans the "Share" QR code onto a phone, then scans this QR code at a Bitcoin ATM to purchase Bitcoin and the Bitcoin in deposited in the wallet and this is confirmed on blockchain.
If later wanting to sell the Bitcoin, how does this public Bitcoin address "know" what the correct private key is?
That is, if the Bitcoin public address and private key have only existed on a non-internet connected PC and as a PDF in cold storage?

How does public address “know” private key?

It doesn't. There's no need.
When receiving money, nobody needs to know anything from you other than your receiving address (in reality a Bitcoin script, the most common types of which can be displayed as an address). At this point no-one cares about your private key.

If later wanting to sell the Bitcoin,

When spending money, you have to provide proof that you know the private key corresponding to that receiving address, without revealing the private key. This is what your wallet does when constructing the transaction details that are sent out for miners to pick up.
Other Bitcoin nodes (wallets, miners etc) can mathematically check that the proof matches the public key and will then know that you have the secret number known as a private-key.

See

https://en.bitcoin.it/wiki/Elliptic_Curve_Digital_Signature_Algorithm


USDT on the Bitcoin blockchain uses the Omni layer, which encodes data in the OP_RETURN outputs. In your transaction, the amount is 0000000006052340, which is hex for 101000000. Omni has a precision of 8, so you can divide that by 10^8 to get 1.01.


Is something gained by double spending myself on a 51% attack? I try to understand what consequences double spending may have.

Let's assume I own 51% of the network and own three bitcoins wallets. If I double spend the coins from Wallet A to B and C - would I have doubled my coins?

I know that they are not really doubled, but if no one would noticed, would I be able to e.g. send them to Coinbase wallet and convert the double amount to USD?

If not, how does an attacker actually make money from a double spending?

Double spending is not about doubling, but about using the same UTXO twice. So, you won't gain anything by double spending coins to yourself.

Let me explain you, with a simple example, how double-spending works:

Lets Alice be an attacker trying to double spend some coins. Alice goes to Bob's store to buy some goods. In order to pay for the goods, she create a transaction, TX1, that spends from an UTXO from a previous transaction, TX0, and pays to Bob. Later on, Alice generates a second transaction, TX2, that also spends from TX0 but this time pays back all the money to herself. Down bellow you can see the scenario depicted.

Now, Alice has multiples ways of double-spending the transaction, depending on her hash power and on whether TX1 has been included in the blockchain or not. Since you assumed you have a 51% of the network hash power, we can assume that Alice can mine a block with a greater probability than anyone else, so we will take it for granted, an analyze only the other factor, what happens with TX1.

TX1 not confirmed

If we assume that TX1 is still not confirmed, but it has been broadcast and the nodes are aware of it, Alice can double spend TX1 with TX2 by just including TX2 in the next block she mines. If Bob has accepted the zero-confirmation transaction as a payment and has delivered the good to Alice before the inclusion of TX1 in the blockchain, Alice will obtain both the goods and the double-spent amount.

TX1 confirmed

If TX1 gets confirmed, either because, against the odds, another miner has mined a block in which the transaction was included before Alice mined hers, since Alice has the greater hash rate she can overcome the previous block by continue mining on the top of the previous block. This will create a blockchain fork, and eventually Alice branch will be longer than the other, since her hash rate is bigger. Notice that if Alice does that frequently lots of forks will occur, in which double-spending transaction could be identified, what will undermine the trust on the currency.

Last, being Alice the most powerful miner, she could just include double-spending transaction without forking the chain, by including a TX2 in the same branch than TX1 was included. Notice that this violates the blockchain inclusion rules, since two transactions can not spend from the same source. Therefore, the rest of the network will not accept this block as valid. However, since Alice has the greater hash power she can just keep going and mine over that block. In this case two things can happen, either the trust in the currency is lost since more of the 51% of the hash power is devoted to cheating, or the branch that includes both transactions is just ignored by the rest of the network.

In conclusion, no good comes from someone controlling such amount of hash power.


Problem with full node I've found serious problem with bitcoinj's fullnode. I started downloading blockchain two days ago with bitcoin-qt and today it's complete. With bitcoinj I started downloading block chain about 4 months ago and now it's still downloading it. I've figured out that it's a problem with downloading speed because of these informations:

[PeerGroup Thread] INFO org.bitcoinj.core.PeerGroup - 0 blocks/sec, 0 tx/sec, 0 pre-filtered tx/sec, avg/last 2.81/0.00 kilobytes per sec (stall threshold <1.56 KB/sec for 10 seconds)
[PeerGroup Thread] INFO org.bitcoinj.core.PeerGroup - 0 blocks/sec, 0 tx/sec, 0 pre-filtered tx/sec, avg/last 2.50/0.00 kilobytes per sec (stall threshold <1.56 KB/sec for 10 seconds)
[PeerGroup Thread] INFO org.bitcoinj.core.PeerGroup - 0 blocks/sec, 0 tx/sec, 0 pre-filtered tx/sec, avg/last 2.19/0.00 kilobytes per sec (stall threshold <1.56 KB/sec for 10 seconds)
[PeerGroup Thread] INFO org.bitcoinj.core.PeerGroup - 0 blocks/sec, 0 tx/sec, 0 pre-filtered tx/sec, avg/last 1.88/0.00 kilobytes per sec (stall threshold <1.56 KB/sec for 10 seconds)
[PeerGroup Thread] INFO org.bitcoinj.core.PeerGroup - 0 blocks/sec, 0 tx/sec, 0 pre-filtered tx/sec, avg/last 1.56/0.00 kilobytes per sec (stall threshold <1.56 KB/sec for 10 seconds)
[PeerGroup Thread] INFO org.bitcoinj.core.PeerGroup - 0 blocks/sec, 0 tx/sec, 0 pre-filtered tx/sec, avg/last 1.25/0.00 kilobytes per sec (stall threshold <1.56 KB/sec for 10 seconds)
[PeerGroup Thread] WARN org.bitcoinj.core.PeerGroup - Chain download stalled: received 1.25 KB/sec for 10 seconds, require average of 1.56 KB/sec, disconnecting [127.0.0.1]:8333

Even when my node is connected with loclahost bitcoin-qt only, it takes about 5-7 minutes to download one block (I've also checked bitcoin-qt logs and depending on the statistics, 1MB has been send to my bitcoinj node). After this, downloading peer is closing and bitcoinj is searching for new downloading peer. Also there is a problem with this:

[Script verification] INFO org.bitcoin.Secp256k1Context - java.lang.UnsatisfiedLinkError: no secp256k1 in java.library.path

Is it a serious issue or should I forget about this information?

From my experience the process of syncing the blockchain is CPU bound, not IO bound (You can check this on Linux by running the top command). bitcoinj has two ways of verifying signatures, either using native code based on the secp256k1 library, or using java code based on the spongycastle library. Your last error message indicates your are not using secp256k1 which is most likely a source of performance degradation and a cause of slow syncing process.

In order for java to use the secp256k1 library, you need to set the environment variable LD_LIBRARY_PATH to a path where the file libsecp256k1.so is located (I am on Debian, this file may have different names on various systems). For example, you could use the command:

$ env LD_LIBRARY_PATH=<path-to-directory> java -cp <classpath> MyJavaClass

However, even if you happen to already have the library libsecp256k1.so on your system (because you installed some other piece of software which relies on it), the above command will not work unless the library was built with the --enable-jni option so as to enable java to interface with it.

In order to build a java-enabled libsecp256k1.so, you can do as follows:

$ git clone https://github.com/bitcoin-core/secp256k1
$ cd secp256k1
$ ./autogen.sh
$ ./configure --enable-jni \
              --enable-module-ecdh \
              --enable-experimental
$ make
$ make check

The library file will then be located in the .libs directory. You can decide to overwrite your existing system file with this new version (but you take the risk of messing up something), or you can simply put this file anywhere you want (or a symbolic link to it) and make sure the LD_LIBRARY_PATH environment variable is properly set to the directory in which it (or a symbolic link) is present.


A proposal for a genuinely distributed blockchain and pruning The following idea is so simple that I cannot believe that it is really new. It must have been presented and discussed at length (and rejected) previously, but I submit it nevertheless, for lack of having found any mention of such discussions.

The basic idea is simple : when a (full) node successfully adds a block to its copy of the blockchain, it broadcasts an inv message giving its address and the identity of the block.

Every node is thus able to maintain for every block a list of nodes having that same block in their blockchain. That inventory will normally be separate from the local blockchain.

Now every node can decide, based on local considerations, whether to include a block in its local blockchain or to only include a small placeholder and call upon other nodes if and when the full contents of that block are required. That would be a base for a genuinely “distributed” blockchain.

In practice, all nodes would probably want to initially include all full blocks, since at that time they would not have identified enough nodes carrying the same block. A capability to replace an existing block with a reference to other nodes would therefore be required. To that effect, block headers should include a reference to the (local) list of alternate source nodes for that block.

A node could then simply erase the payload of a node in its copy of the blockchain, retaining only the header unchanged, including the hash of the full block and of the previous block to retain continuity of the chain. Of course that should be broadcast so that the ofher nodes update their local table of alternate sources.

When a scan of the blockchain hits a block with an empty payload, the node could return a "block unavailable" answer (for instance if multiple nodes are being queried), or the local list of alternate sources for that block could be used to retrieve a copy (or many copies for verification purposes), which could be checked using the hash retained in the abbreviated header.

Some mechanism for ensuring that each block exists in full version on a sufficient number of nodes would be required.

What is wrong with that proposal ?

One thing you're missing is that nodes don't actually need access to blocks.

The only time a "scan of the blockchain" occurs is to give historical blocks to another node that is syncing, or to find historical transactions a wallet missed. Solutions for those case are not hard. Sequential bulk storage and bandwidth are cheap and it's not something every node on the internet needs to provide to everyone. You can find movies on the internet for free that take not much less space than the block chain.

Modern full nodes can even run without keeping blocks on disk at all (see the -prune option in Bitcoin Core). In this mode, all blocks are still downloaded and verified one by one, but not kept on disk after verification. The only thing that is kept is the UTXO set - the database of the current state of the ledger, rather than its entire history. This is sufficient for validating future transactions and blocks, participating fully in the P2P network, and provide wallet functionality.

So can't we use your idea for the UTXO set instead then? Maybe, but it's pretty pointless. The reason you run a full node in the first place is to be able to verify that nobody is violating any of the rules. If you're willing to not do that completely anymore and instead start relying on trusting some of your peers, why bother? Bitcoin provides a lightweight mode where you don't need access to either the blockchain or the UTXO set at all.


Alternative Cloud Hashing sites to Cex.io I am really impressed with Cex.io and their whole concept of trading Ghs for Bitcoin as well as cloud mining which I find to be novel and interesting.

Are there any other sites like that? I know there are a number of cloud hashing sites but what I am looking for is one similar to Cex where I can also do commodity trading.

Cloudhashing.com does cloud mining, but they did not offer trading the last time I checked.


how to send money using json-rpc in bitcoin-cli for php? $bitcoin->sendfrom($this->session->userdata('account'), $_POST['address'], number_format($_POST['amount'], 8));

but this isn't working. i got everything via json-rpc. but can't send or move money using  json-rpc. what is the problem?

The suggested library for Bitcoin JSON-RPC via PHP is the EasyBitcoin-PHP library. Source

Here's a simple example:

<?php
require("easybitcoin.php");

//authenticate
$bitcoin = new Bitcoin("RPCusername", "RPCpassword");

//execute ternary command
$send = $bitcoin->sendtoaddress("1SomeBitcoinAddy", 1);
echo $send ? $send : "Oops an error: ".$bitcoin->error;
?>

The first argument for sendtoaddress() is the address you want to send funds to, the second is the amount in whole bitcoins.


Bitcoin Core `getaddressesbyaccount` method not found (-32601) On macOS Mojave I have a full bitcoin node synced using bitcoind.

I want to get the public address of the default account (i.e. the empty string "").

So I run bitcoin-cli getaddressesbyaccount "" but I get:

error code: -32601
error message:
Method not found

Version of bitcoind is: Bitcoin Core Daemon version v0.18.0.0-g2472733a24a9364e4c6233ccd04166a26a68cc65
Copyright (C) 2009-2019 The Bitcoin Core developers

And of bitcoin-cli is: Bitcoin Core RPC client version v0.18.0.0-g2472733a24a9364e4c6233ccd04166a26a68cc65

What's wrong?

The account API has been deprecated for a while, and was completely removed in Bitcoin Core 0.18.0.

You should be using the new mutliwallet API, or handling account based labelling externally.


Generate keys/addresses for all altcoins I'm looking for a library or method to generate addresses for as many of the most popular currencies/altcoins as possible. Is there a known library that supports this? Or do I need to use a specific client for each coin?

Thanks!

Here is my "quite big answer":
I've successfully used http://cryptolife.net/upwg/ which is stated to be "Open Source JavaScript Client-Side Universal Paper Wallet Generator".

It doesn't generate wallet addresses by coinname, but instead by the leading character within the wallet address.  I get these from the block explorer for the coin, looking at top address.

http://www.universalwalletgenerator.net/ lets you do it by coin name.


RPC errors raised by each command Coming from this question, is there any comprehensive collection of what errors can each RPC command return?

For example. Let's say I want to run getbestblockhash or getblockcount. I'm unsure about what errors to expect. Furthermore, I'm unsure if there's a generic error code that can be return in many cases (RPC_MISC_ERROR for example).

Coming from this question, is there any comprehensive collection of what errors can each RPC command return?
For example. Let's say I want to run getbestblockhash or getblockcount. I'm unsure about what errors to expect.

I don't think that such documentation  exists. You would have to read the source code for a particular RPC. Additionally, since some functions are shared between RPCs and can return specific errors, it may not be easy to enumerate all of the errors.

Furthermore, I'm unsure if there's a generic error code that can be return in many cases (RPC_MISC_ERROR for example).

If there's an error which doesn't have its own specific catching and checking (i.e. an exception is thrown that the RPC doesn't catch), then RPC_MISC_ERROR will be returned.


Convert private key to integer I have a random private key (compressed or uncompressed) 5HpHagT65TZzG1QDbnQCzdudnpknN7nA1SLEt4ZcxsH2SV92yqt or KwDiBf89QgGbjEmUcXPRwPuKPFnFECvJkvovGNiyjaujMCrQXy98. How do I convert this private key back to an integer?

Assuming the key is the posted  compressed WIF KwDiBf89QgGbjEmUcXPRwPuKPFnFECvJkvovGNiyjaujMCrQXy98:

Decode the key you have using the encoder used (in this case base-58)
80-00000000000000000006f5d7d806edef2e1110b0b243f9a90c2aaaaaaaaaaaaa-01-098dbf37
Remove the extra bytes (version byte, compressed byte if present, checksum)
00000000000000000006f5d7d806edef2e1110b0b243f9a90c2aaaaaaaaaaaaa
Take the remaining bytes (in this case it must be 32 bytes) and convert it to an integer assuming it is positive and in big-endian (most significant value is stored first).
666666666666666666666666666666666666666666666666666666


How can I generate a Bitcoin address from a 12 word seed without using a computer? I have a 12 word seed and I want to generate an address without exposing it to any computers. How can I accomplish this?

While theoretically possible, the algorithms involved mean that it is practically impossible. You would need to compute the seed from your mnemonic word according to BIP 39, and then derive the keys and address from that according to BIP 32.

Generating the seed from the mnemonic alone requires executing the PBKDF2 function, which is specifically designed to take a long time for a computer to compute. The time required and the complexity of the problem mean that you've got no chance.


Bitcoin adress security questions I am trying to understand Bitcoin addresses, but it does not seem to be easy at all.

As far as I know, a transaction uses one or more addresses as input and one or more addresses as output. Is this correct?

As I understand it a Bitcoin address is a hash of your public key. So it is not completely collision resistant. So how do you prove, that you are the owner of a Bitcoin address?

Also, since everybody can make an address from your public key and the recipient of a transaction does not have to sign the transaction, how do you make sure no one can send you bitcoins without your consent? (I don't really know if this is a problem to be honest.)

Transactions use at least one input and one output. The exception being the Coinbase transaction which creates new money and doesn't have an input.

While multiple public keys hash to the same address, there are still 2^160 distinct addresses possible. Therefore the chance that two people generate a private key that resolves to the same address is negligible.

You cannot stop anyone from sending you bitcoins. Receiving bitcoins is entirely passive. The only way to refuse a transaction is by returning it to the sender.


Is there a working, functional, maintained way to accept bitcoins through a Wordpress site to an Electrum wallet? I know that there is the Bitcoin Payments for WooCommerce, but it hasn't been updated in over and year and doesn't support the latest version of Electrum MPK.  It only supports Electrum 1.9.8 MPK.

I've searched quite a lot for something like this and to my knowledge, the answer is no.

the bitcoinway plugin you reference was the closest thing to a working plugin that required no middleman.  It used to work with the older woocommerce and the 1.9.8 mpk but it doesn't work at all now with the latest woocommerce version.  It has not been updated in a long time and id say its a dead plugin now.
the closest thing I've found to replace it was the coin simple woocommerce plugin but as of the latest woocommerce update, it no longer works due to a JSON parse error that I can't workaround.  It does require signup on coin simple but from what I can tell, the API key and biz ID are input to allow you to validate transactions.  Your MPK is plugged in on woocommerce and coin simple never controls the wallet.
gourl.io is probably the next best thing but they do have interaction with your wallet and forwarding of the funds.
there is a plugin that works with an MPK that generates addresses with the click of a button.  But its not automated as far as commerce sales go.  The plugin name is "Bitcoin Payments".  https://wordpress.org/plugins/bitcoin-address/

if anybody finds a working plugin without a middleman, please share.


Using MultibitHD to request payment I am moving over from Multibit classic to HD. I am not particularly technical so this may be an obvious question, however I can't find the answer I want in Multibit's help section, so here I am.
On the HD request payment field, there are places for amount,(in BTC and Fiat currency), Recipient (one of my addresses)QR code label and private notes. Where is the section to fill in the address payment is request from? In classic I could copy and paste the address. In the HD help section it says you can also do this, however I cant see where you enter the details. Have I missed something blindingly obvious? Thanks.

With HD wallets you get a new address for each payment request so there is no need to paste a previous address


Exported wallet.dat from bitcoin-qt. Then uninstalled bitcoin-qt. Now the wallet is empty! Some months ago, I installed bitcoin-qt on Ubuntu, created a wallet and address, then transferred funds to it from MtGox. I let it sync up for over 10 days, but it never fully synced. So I exported a wallet.dat file, then uninstalled bitcoin-qt.

Today, I installed MultiBit and imported the wallet.dat file. It is empty. It has one address which shows no transactions or balance on blockchain.info. The wallet in bitcoin-qt had several addresses.

What happened? Is there anything I can do to restore the files containing my bitcoin?

I had the same problem. What I had to do is delete the copy of the blockchain and let the newly installed bitcoin qt download and sync from scratch. All was good after that.


How doest the bitcoind command "move" work? Officiall docs says about this command: "Move from one account in your wallet to another" link

Also from official docs: "Moves are not broadcast to the network, and never incur transaction fees; they just adjust account balances in the wallet." link

As I understand - account is a list of private-public keys (and assosiated metadata)
So only action that we can do - move one or more key pairs from one account to another.
But in this case we have a problem - we could not move any arbitrary amount of BTC, but only the amount that already associated with addresses. Strange command...

So what does this command actually?

I think it refers to the accounts having a shared pool of money. When account A gets a deposit, the account gets a tally and it goes into the pool. When account B gets a deposit, the account gets a tally and it goes into the same pool. Moving money from A to B doesn't actually move the money address-wise, just changes the tallies. So if account A withdraws MORE than account A had deposited, part of that money will come from account B's deposit.


Could a large group of miners theoretically lower the network hashrate to manipulate difficulty? I am relatively new to understanding the fundamentals of the Bitcoin network, so I am still trying to learn how the actions of miners can influence the direction of the blockchain.

Back to my main question, since the difficulty adjusts at a fixed rate of every 2016 blocks (~2 weeks), what would prevent a large hashrate miner or pool from entirely shutting down their mining power minutes before the 2016th block was found? The incentive here would be that the next difficulty would become significantly lower until it is readjusted in 2016 more blocks. This process of course, could be repeated.

Is there some sort of method in place which averages transaction times preventing this from happening? If so, would such an action still have any affect?

Thanks :)

The difficulty adjusts every 2016 blocks based on the average block time for all of those 2016 blocks. So just making the 2016th block take longer to mine has little effect on adjustment. A miner would have to manipulate block times for the entire 2016 block period to get any significant difficulty change.


Is a multi script possible that requires relative time locks relative to each signature? I've been wondering about cold storage multi sig security.

Specifically, I was wondering how secure it is with respect to a kidnapper. If a kidnapper took X hostage, and threatened to kill him, X would simply share the other members (ie Y, Z), required to submit a transaction. In that case, X could be forced to call Y & Z, and tell them some arbitrary reason he needed them to sign on such short notice, (or even tell them the truth if he really feared for his life), and Y and Z would certainly sign to keep their friend X alive.

Please let me know if I'm missing something in the above scenario...

Because of the above scenario, I was wondering if it is possible to require a wait time between signatures in a multi sig.

That would result in a kidnapper needing to hold X hostage for, say 1 week, before Y's signature would be valid, and possibly another 1 week before Z's signature would be valid. This seems a lot safer since the attack cannot be completed as quickly and an attacker would need to 'not get caught by police' over a much longer time frame.

I've looked at OP_CHECKSEQUENCEVERIFY but I have never played with script yet so I'm not sure I totally understand.

Would something like the below work?

"+1week" CHECKSEQUENCEVERIFY DROP <X pubkey>
"+2week" CHECKSEQUENCEVERIFY DROP <Y pubkey>
"+3week" CHECKSEQUENCEVERIFY DROP <Z pubkey>

Your question is a nice thought experiment.

Your example would not itself work: as CHECKSEQUENCEVERIFY is relative to the mining date or height, so in week 3, all three parties could sign at the same time.  On day 1 things work as you intend. On day 8 'X' can now sign at any point without delay but must wait a week for Y and two for Z. On day 15, 'X' and 'Y' can both sign at any point without delay but must wait a further week for Z. On day 22 all three of them can sign without delay, and it's no different to a regular multisig.

The direction of your thoughts seems to be that CHECKSEQUENCEVERIFY could be made relative to a previous signature. I'm not aware of any method of doing this within a single script: how can a computer tell that a signature has been made more than a week prior, other than by seeing it on the blockchain? The mempool would be wholly inappropriate a venue not least because people would be storing something for potentially long periods of time.

An improvement of sorts would be to have the multisig lock 10% of the funds for ten months, and each month, lock another 10%. At the start of the eleventh month, the three of them redeem to a new multisig, and so relock that original 10% for a new set of ten months. In this manner, all three of them are needed and 90% of the funds are locked for at least one month even if they're all present.


On the upcoming potential Bitcoin fork on Aug 1, 2017. Bitcoin seems to be rising while every other coin is falling. Why? With the upcoming bitcoin fork on Aug 1, 2017. Why would all other coins be falling while Bitcoin is rising? Wouldn't one want to sell bitcoin to hide their coins in like LTC to weather the storm?

Several possible reasons come to mind:

People are actually confident that everything will go alright: this is the most unlikely scenario considering everything else is dumping which is the expected panic behavior.
Whales are keeping the price up until the deadline to draw people in: this is more likely I think. I still expect the price to drop considerably before the deadline.
People are selling their alts and moving to BTC massively to take advantage of the hard fork and get some Bitcoin Cash when it splits: I think this is also very likely and will explain the current behavior.

I personally contributed to the 3rd option.


Bitcoin RPC SSL error I recently tried running Bitcoin-QT as a server with SSL enabled, but when I was testing the connection, with this command:

openssl s_client -connect 111.11.111.111:8332

I got this error:

CONNECTED(00000003)
4308:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:/SourceCache/OpenSSL098/OpenSSL098-35.1/src/ssl/s23_lib.c:182:

Does anyone have an idea what is causing this problem and how should I go about fixing it?

After a bit of mocking about with this problem, I figured the certificate files were in a wrong folder. As I was running Bitcoin on testnet, the directory in which it looks for certificates is different, than on the main net. On the other hand, it loads the Bitcoin.conf from the same place...

The folder bitcoin looks for the certificate in is the folder containing wallet.dat, which for testnet is in .bitcoin/testnet/ folder


Bitcoind daemon return "timeoffset" : -10,-15,-50,-60 and more Bitcoind daemon return "timeoffset" : -10,-15,-50,-60 and more..

Timeoffset value is constantly increasing(decreases*) (~ "-1" per day), i dont can restart daemon with command -reindex / -rescan (daemon restart with reindex/rescan is very long).
How i can fix it ?

Blocks count is valid (Sometimes there with delays 1-4 blocks)

{
    "version" : 110200,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 305.11300817,
    "blocks" : 406061,
    "timeoffset" : -75,
    "connections" : 10,
    "proxy" : "",
    "difficulty" : 166851513282.77719116,
    "testnet" : false,
    "keypoololdest" : 1457952689,
    "keypoolsize" : 10001,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00005000,
    "errors" : ""
}

Wallet.dat is big ~95mb, with "connections" : 35 - problem same..

Server(XEN) - 4gb ram / Xeon-2.60Ghz*4 / HDD 130gb/ Ubuntu 14.04.3 LTS / 100mbit/s

The timeoffset simply shows the relative time with respect to the peers you are connected to (actually the median of your peers). A consistent increase in the count would indicate that your server's clock is drifting, hence your server is counting time a bit faster than it's peers. This is normal (although 1 second/day drift is already quite a lot) and is not a cause for concern. If you'd like to fix it I suggest to synchronize with some timeserver over NTP.