From what you said, I'm assuming you're using an option like this when you run Bitcoin Core (bitcoin-qt):

-datadir=D:\BitCoinData

(if not, you should do something like that to specify that the blockchain will be on your 1TB HDD; otherwise, it's only the small client, and not the large and oft-updated blockchain, that resides on your HDD)

In this example, you would move bootstrap.dat to D:\BitCoinData\bootstrap.dat. Move the file there while Bitcoin Core is turned off. Next time you start Bitcoin Core, it will verify and use this file to build its databases before synchronizing the remainder over the network.


Is it possible to calculate the difficulty purely by the number of blocks generated in e.g. 3 month and the staring difficulty?

You should know the current difficulty to adjust the next value.
It can not be found only by number of blocks for past 3 monthes


As Pieter said, in future, please limit questions to one at a time :)

  which makes a lower value than hash values given in transactions

I think you're a bit confused here. The block hash has to be less than the difficulty target, but that has nothing to do with transaction hashes. The difficulty is just determined by how quickly the previous blocks were being mined.

  How many transactions should a miner should verify in a single block?

The miner can choose what transactions to put in the block, usually it is most profitable to fill the block up to its size limit with the highest fee transactions so the miner makes the most profit.

  Is it correct that a block is exactly a text file of “transaction lists+ appropriate nonce value corresponding to those transactions”?

It's not a text file, it's just bytes sent around the network. But yes kind of, it's a list of all the transactions in the block plus a block header, which contains a little extra info about the block such as it's timestamp and a nonce.

  Is he rewarded at the time he created a block or at the time after his block is chosen to be a part of the greatest cumulative difficulty chain?

The mining reward is just a transaction which pays the miner. So like any other transaction, it is valid as long as it is in the main chain, yes.

See also: What exactly is Mining?


"CashAddr" is the name of the new Bitcoin Cash address format, which is heavily influenced by SegWit Bech32 format.

It looks like this:

bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a

The format is consisting of a prefix (bitcoincash, bchtest or bchreg), a seperator (always :), and a 42 character payload.

TIP: P2PKH starts with q while P2SH starts with p

Currently it's compatible with all Bitcoin Cash wallets and services except a few.

The address format can be converted to the old format using cashaddr.bitcoincash.org if your wallet is not compatible.


How to enable replace-by-fee via command-line in bitcoin-core?

According to bitcoin core version 0.12.0 release notes:

It is now possible to replace transactions in the transaction memory pool of Bitcoin Core 0.12 nodes.
Transaction replacement can be disabled with a new command line option, -mempoolreplacement=0.
Note that the wallet in Bitcoin Core 0.12 does not yet have support for creating transactions that would be replaceable under BIP 125.

So the mempool can be configured to accept/reject replacement transactions, but there is not support yet for creating replaceable transactions.
Bitcoin v0.12.1 release notes do not include any modification regarding RBF.
The functionality for the wallets is split in two:

Mark the transactions as RBF (pull request not merged yet).

Replace fee of transactions that were already sent using RBF (no code or pull request in Core yet, but some scripts by Peter Todd can be used).


Are there Miners (or Mining Pools) that accept below standard fee transactions?

Turns out there is a Bitcoin.it wiki site dedicated to this topic: Free transaction relay policy

Currently the only mining pool is eligius that accepts below standard fee transactions. Hopefully there is more to come :)


How does ring signature help in range proofs in confidential transaction?

After a lot of research and reading couple of different documents I found the answer to my own question and thought it would be good to share it with other people in the community.
Pedersen commitment on amount a and blinding factor x is:

C(a) = x*G + a*H

Where G is generator point on Elliptic curve and H is another static point that everyone has agreed on. (It is actually a map of Hash of G on curve).
In order to prove that the amount is within a specific range without revealing the amount, CT uses ring signature.
Lets say Alice wants to prove to Bob that her transaction amount is within the range [0,y]. If Bob calculates:

C' = C(1) - 1*H

It would be equal to:

x*G

If Alice can make a signature with x as a private key (using ECDSA for example) then she can verify that she knows x thus the amount is actually 1.
In Confidential transaction however Alice doesn't want to reveal the amount so instead lets say if she does this operation for all amounts like:

C" = c(2) - 2*H

and etc for all the amounts till y. Then if Alice makes a ring signature for all these amounts then she is basically saying my amount is one of the amounts in the whole range without revealing it. Ring signature is a signature that shows one of the inputs is a signing it without revealing who.
That basically results in the range proof and alice successfully can prove that to Bob through this way without revealing the amount.


How to reduce number of inputs in bitcoin transaction?

This is a common issue for any service with BTC incomings/outgoings.

The answer is simply to consolidate all your inputs in a large transaction all at once, so you remove possibly hundreds of small outputs, and get one big at the end.

Usually people do this semi-regularly, though you also see people waiting until mempool fees are super low.

One reason you can afford to pay a relatively low fee for consolidation transactions, is because you're planning ahead in your consolidation transactions. You don't need it confirmed immediately (like you would for outgoings, perhaps), so it's OK if it takes a few hours, once your wallet has enough to keep paying customers.

Just pick a moment when the mempool looks super empty, and it'll work really well. If it's not super empty, you can still try low-balling the fee and waiting longer.


Nicehash autoselected algorithm with very high difficulty

Difficulty isn't the only factor in choosing which coin is most profitable. NiceHash may have selected Cryptonight because although you will mine fewer blocks, each block is worth more, so you will make more overall.


What's the minimum transaction with nxt?

There is no minimum other than the smallest unit of NXT 0.00000001 NXT. This represents 0,00000000000072 BTC.

The issue is that the minimum fee of 1 NXT is still required for such a transaction.


Bitcoin Stolen from Wallet, where do I stand?

It seems that your coins are indeed long gone, and have traveled to, and through various exchanges. There's really nothing you can do.

If you're interested as to where they went, take a look here,

https://www.walletexplorer.com/wallet/0be05327716173e1?from_address=1KM6rLnwgD67wRdMx9aVLRf1gfoNyCyv7Q


Bitcoin recovery - forgot my 12th recovery word for recovering my crypto account

Disclaimer: there may exist software that does all of this automatically for you, but I'm going to provide a quick walk-through of the steps, which will allow you to compute this manually.
If you only need to recover the last word, then you're in luck, as there are only a small number of possibilities for what that last word could be. The Bip-39 word list has 2048 possibilities, but the last word in a seed phrase is partially determined by a checksum, greatly reducing the number of possibilities. Here is how to determine the possibilities for that last word:
Before beginning, it is worth pointing out that you are going to be handling sensitive data. If you are handling this data on a compromised computer, there is risk of your bitcoins being stolen (ie, the attacker would be able to get a hold of the sensitive data). It is best to use a computer that you trust to be clean, and that is not connected to the internet (at least, until you can recover your funds and move them to a new wallet which is not compromised by handling the seed data in this way). Do NOT use online tools to perform any steps which could potentially leak this sensitive data.
Step 1: reconstruct the binary seed, from the mnemonic.
Here is the BIP39 English word list. Take your mnemonic phrase, and look up the number associated with each word. Subtract 1 from that number, and write it down. For example, the word guitar is number 831, so you would write down 830.
(the reason we subtract 1 is that the word list linked to above starts at index 1, whereas the index used in the actual code starts at zero: 00000000000 (binary representation)).
Step 2: convert those numbers to binary numbers.
Each word represents 11 bits of entropy, which we will write out as a string of zeros and ones. Continuing from the example above, for the word guitar, the number 830 is 1100111110. Notice that this binary string is only 10 digits long though (10 bits), so we need to add another 0 to the start of the string, to make it an 11-bit number. So the binary number we will write down is: 01100111110.
Repeat this process for all the other words, again appending zeros to the front of the binary string as needed to make each number 11 bits long.
Step 3: Assemble all the binary numbers into one long binary string
This step is easy: you should have eleven binary strings, each one 11-bits (11 digits) long. Concatenate them into one long string (in the correct order, of course!).
Continuing from our example above, lets pretend that our seed phrase begins with the word guitar repeated eleven times. Our concatenated binary string would now be: 0110011111001100111110011001111100110011111001100111110011001111100110011111001100111110011001111100110011111001100111110
This 11 word phrase comes from this 121 bit number, but in total, your 12-word mnemonic seed phrase encodes 132 bits of entropy. Of this 132 bits, the first 128 bits are random, and then the last 4 bits are a checksum.
So this means that the last word includes 7 random bits, and then 4 bits that are a checksum (of the 128 bit seed). This means you have 2^7 = 128 possible words to check.
Step 4: Compute the last word
We must iterate through the range of all possible 7-bit numbers, from 0000000 to 1111111. Each attempt will involve appending a 7-bit number to the end of the 121-bit number we built from the list of 11 words. So to begin, we can just append 0000000 to our number from above (the word guitar, repeated 11 times):
01100111110011001111100110011111001100111110011001111100110011111001100111110011001111100110011111001100111110011001111100000000
The next attempt would be:
01100111110011001111100110011111001100111110011001111100110011111001100111110011001111100110011111001100111110011001111100000001
And so on, until we reach:
01100111110011001111100110011111001100111110011001111100110011111001100111110011001111100110011111001100111110011001111101111111
For each of these 128-bit numbers, we will need to SHA256 hash the binary value, and then take the first four bits of the resulting output, and append those 4 bits to the end of the 128-bit number we started this step with.
To perform this step, we can use the command line tool shasum:
echo 01100111110011001111100110011111001100111110011001111100110011111001100111110011001111100110011111001100111110011001111100000000 | shasum -0 -a 256
This command tells your computer to take the 128 bit number, and run 'shasum' on it, -a 256 tells the computer to use the SHA256 hash function, and -0 tells the computer to interpret the input as a string of bits (this is important! If the string is interpreted in some other way, the resulting output will be incorrect).
The output of this command should be (in hex):
21bb0a0efc9fec48880509aa11fd1cc7f16a014b8bee65ab87b0505145e2a865 ^-
In this case we just want the first 4 bits of the output, which is conveniently just the first hex character of the string above: 2. (note that the ^- at the end of the output denotes that the input was interpreted as bits)
So we can convert the hex number 2 back to binary: 0010, and then append this binary value onto the end of our 128-bit binary string:
0110011111001100111110011001111100110011111001100111110011001111100110011111001100111110011001111100110011111001100111110000000000010
For this first attempt, we can see that the last eleven bits are thus: 00000000010. Converted to decimal notation, this is the number 2, which means the last word in our mnemonic is the word at index 2 from the BIP39 word list. BUT! Remember that the BIP39 word list starts at index 0, so similar to the above, we must add 1 to this number, leading us to the word at index 3, which is able.
So the first possible mnemonic would be:
guitar guitar guitar guitar guitar guitar guitar guitar guitar guitar guitar able
You can then input this seed phrase into some software that will accept 12-word BIP 39 seed phrases (such as Electrum wallet), and see what addresses the wallet generates for you. Note that you will also need information pertaining to the derivation path used by the wallet in question, for example was it BIP 44 or BIP 84? etc. I am aware of some tools that can help automate this step, for example see here or here. Ideally, you would know the first couple addresses of your wallet, so you can quickly check to see if electrum generates those same addresses, even in an offline environment. Ian Coleman's BIP39 tool will probably also be helpful, though you should be sure to download and run that webpage in an offline environment.
If you do not generate the correct wallet after this first attempt, you will need to increment the 7-bit number by 1, and then perform this step again. Possibly up to 128 times, but no more than that.


So the scheme you suggest is that signatures are pairs (R, s) such that sG = R + H(P,m)P, where P is the public key, and m is the message.
Pick a random s. Set R = sG - H(P,m)P. (R,s) is now a valid signature for P, without knowing the corresponding private key. So this is a trivially forgeable signature scheme.
In ECDSA, the extraction of R's x coordinate, used as a scalar, plays the role of commitment in the signature to R.


How to detect reorganization from bitcoind via ZMQ?

You can use the rawblock interface in order to determine whether there was a reorg.

Every time you receive a new block, you decode the block, in particular the block header. Then you store in your database each block and its previous block.

When you receive a block which shares the same previous block as another block that you have already received, then you know that a reorg has/is occurring.


How do bech32 addresses compare to P2SH addresses in transaction size?

bech32 produces smaller transactions than P2SH segwit transactions.

one extra byte per output to create P2SH outputs than to create bech32 utxos (P2SH uses OP_HASH160 and OP_EQUAL in addition to a 20 byte hash in its script, whereas bech32 just uses a fixed 00 byte in addition to a 20 byte hash), and
23 extra bytes per input to spend from P2SH utxos than from bech32 utxos (P2SH has to produce the script that was hashed when spending in the sigscript, which takes 23 bytes to encode - bech32 has no non-witness sigscript at all).

Basically P2SH requires a script hash, native SegWit doesn't, and everything else is much the same. Native SegWit provides the script when the output is created, and P2SH provides it when the output is spent.

If you want to know how much you saved (or can save) in each transaction, Blockstream explorer provides nice feature, where you can see the savings. For example for this transaction, can save extra 16% on fees


Any statistics on usage of Bitcoins by region or country?

WebGL Globe shows bitcoin nodes seen during last 48 hours. Install Chrome Web browser if you have problem rendering WebGL.

Google Trends has countries, cities and languages sorted by number of bitcoin related search queries.


How do I develop mobile applications for Bitcoin?

Currently there are only a few mobile apps that use the bitcoin protocol itself. Most communicate with a bitcoin client on a remote machine using the JSON API.

Those few that do, rely on BitcoinJ which is a "selfish" implementation of bitcoin that runs in Java (handily the native language for Android apps). It's got a few key modifications that bring its overhead low enough to run on embedded devices, most notably it does not download all blocks in the block-chain, only those blocks which relate to addresses in its own wallet (hence "selfish" client).

Either method works, and either is as valid a starting point as the other, given the current state of bitcoin's mobile development.


The site covers two topics:

A basic introduction to Bitcoin
How one might be able to obtain Bitcoin for "free"

I'll discuss only item 2.  Several possibilities for earning Bitcoin are presented:

Mining
Performing sponsored actions
Using certain services that offer Bitcoin as an incentive
Performing mechanical turk tasks
Investing
Betting

The page at guadagnarebitcoins.altervista.org does not itself offer any service, and appears to simply offer information.  Therefore, the site itself is not a "scam."

However, as the site references a number of different third-party sites and services, you may find that your experience with those individual sites  will vary along a continuum of legitimacy (or lack thereof).

All of the proposed methods involve some non-zero amount of effort.

Considering the proposed methods ideally involves a good deal of judgment, self-knowledge, and reflection with questions like:

Will mining result in the profit I think it will?
Is this a good ROI for my time and money?
How much do I know about investing?
How much time and/or money can I afford to lose?
Is gambling a good way to earn money for me?
Do I have reasonable confidence that the service will pay me?

And so on.


Bitcoin Core JSONRPC only accept requests with 0.0.0.0 in configs

If your server is behind a NAT or otherwise does not have 94.183.32.151 as the IP address for one of the network interfaces, then rpcbind=94.183.32.151 won't work. You can check what IP addresses your node actually has using ifconfig and then rpcbind=<ip> for one of those.

For example, because my node is behind my router's NAT, I have to do rpcbind=192.168.1.2 instead of binding to my external IP of 12.34.56.78.


Sometimes Google can be a good resource. I recommend this article of the Bitcoin wiki.

As a summary, Bitcoin are created by miners in a way that conforms with the protocol.  All users can verify that miners follow the protocol rules when generating coins, so they can only generate a limited supply.

Every block, an amount of coins is generated and that amount halves every 4 years.  In 2009, it started with 50 bitcoins per block.  Fast forward to 2017, the block reward is only 12.5 bitcoins anymore.  Decreasing like that over time, eventually the reward will drop below the lowest possible amount in Bitcoin (1 satoshi = 0.00000001 BTC) and go to zero.

Ultimately the total supply will be slightly less than 21 million bitcoins.

To respond to your question, bitcoins are not "first purchased for dollars".  Instead, they are generated and might never be sold for dollars at all.  They are just owned by the miners that generated them.  When they are sold for another currency on an exchange, they are no different than other coins that have been in circulation for a long time.  There is no such thing as an "issuance for dollars".


You need to compile them from source or download their binary. Since they both use the same port, you will need to start one of them with -listen=0 command-line argument. Please see this discussion on github for more info: https://github.com/Bitcoin-ABC/bitcoin-abc/issues/25

Bitcoin Core

Compile from source at https://github.com/bitcoin/bitcoin
Download at https://bitcoin.org/en/download

Bitcoin Cash*

Compile from source at https://github.com/Bitcoin-ABC/bitcoin-abc or https://github.com/BitcoinUnlimited/BitcoinUnlimited.
Download binary at https://github.com/BitcoinUnlimited/BitcoinUnlimited

* Contrary to Bitcoin Core there isnt a single authoritative implementation, so you will have to choose which one you want


need advice for Python interaction with bitcoin-core wallet

Maybe you miss how these libraries are implemented, in fact, the standard implementation of python JSON-RPC library already discover RPC function and map to python function, here you can read the official wiki.

If you read the code of this library you cannot find the specific implementation for every method, it's a generic wrapper around the implementation of JSON-RPC standard library.

The feature of this wrapper in detail are specified in README.md file.


Don't use a sha512 brainwallet generator like bitaddress.org to generate your brainwallet. Many people have lost their money by doing so.

Instead use a more secure salted scrypt like warpwallet.

For Ethereum, I made a warpwallet implementation here, that is available as a web version and as a go executable. For extra security you should generate the addresses offline.


Why does blockchain.info say BTC was traded for $35?

In the past blockchain.info got their prices from two sources: MtGox and Tradehill (though in the meantime they have removed the reference to Tradehill from their description). It could be related to that.

Also other media report a peak rate of USD 33, e.g., http://www.economist.com/blogs/babbage/2011/10/virtual-currencies


Is there a compiled list of merchants that are taking lightning network payments for testing?


if I buy bitcoins, what will I need to know about the software involved?

You don't have to know anything really, if you don't want to.

  and where should I keep my bitcoin wallet?

If you don't want to learn about the software or how to keep your wallet secure you should try to find the most reputable e-wallet and keep your money there. People will have different opinions on which one is the safest so have a look around, read forum threads, use something that is well established. MtGox is one option that is well established and is also the exchange with the highest volume.

  I have a home computer and I have a Google account. Can the latter be used?

If you don't want to use an e-wallet you could download the official client from bitcoin.org and store your money in its wallet. Your money is then stored in a file on your computer. You could use your Google account to backup that file (your wallet). That would basically mean that the same money is stored in two places - on your own computer, and in your Google account.

  What security issues are involved?

If you choose the option of downloading the client it means that anyone who gets ahold of your wallet file can spend your money. If you have uploaded the wallet to your Google account that simply means that there are two places to rob you. It would be enough for the thief to get it either from your home computer or from your Google account.

There is an option in the client to encrypt the wallet using a password. That way anyone who gets ahold of your wallet file can't use your money unless they also know your password. Things to keep in mind here is that if you have some malware on your computer it is possible that it could sniff that password as you type it and then the encryption won't help you. Also, if you forget your password your money is gone. There is no way to recover it.

  If I'm travelling and far from home, how would I have access to my bitcoins?

Then the simplest way would be to use the e-wallet option.


How can I configure my miner for two pools simultaneously?

You can use the cgminer -c (config option) to add multiple pools and set up quota system to mine a certain percentage on each pool.

From the CGMiner Readme:

"pools" : [
        {
                "url" : "poola:porta",
                "user" : "usernamea",
                "pass" : "passa"
        },
        {
                "quota" : "2;poolb:portb",
                "user" : "usernameb",
                "pass" : "passb"
        }
]

Will assign 2/3 to poolb, and 1/3 to poola.


No, when multiple entities create a multisig address together, it's still a single address. It's merely that the locking script that holds the funds needs more than one signature to allow funds to be sent. So, when you're writing an indexer, you can likely get away at first with simply not distinguish singlesig and multisig addresses.


Every single attempt at mining a block is independent of every other attempt and has precisely the same chance of succeeding. There is no intermediate work to save or lose.


Depending on the client you use, this could be a very bad idea, the reason being that some clients send change to new addresses while others send the change back to the sending address.

If you use an online wallet such as blockchain.info you should be fine as it sends change back to itself, and in this case you'll both be online so your clients will always have an up to date list of the transactions for that address.

The chance of having a collision (aka: Double spend) is very low as this requires you to both spend the same transactions within seconds of each other and if you are both using the same online wallet it would probably need to be done near simultaneously.

Remember that the private key fully controls ownership of the coins (hence being private) so you need to fully trust anyone with knowledge of it.


Bitcoincore listrecievedbyaddress doesn’t work

Your transaction was mined in block 1773944.
Your node has only synced up to block 626786.
Once your node has synced block 1773944, you should be able to see the transaction.


The reward is per block, it can't be per hash because the number of hashes a miner computed is not known to the network. Furthermore, only the miner who finds a block is rewarded.


The protocol already supports transactions where x out of y keys need to agree in order to spend the coins.

The protocol will never support transactions that change/expire automatically after some period of time, as this causes problems.


Can I detect a 51% attack as a developer

Generally, no, not until it's too late.

A typical 51% attack would look like this:

Attacker privately starts mining their own chain, which diverges from the main chain at some block N.
Attacker deposits coins to your business, sending them from address A.  Call this transaction X.
Attacker inserts in his own chain a transaction X' which conflicts with X; typically X' sends the coins from address A to another address belonging to the attacker.
Attacker waits for several confirmations of transaction X, in blocks N+1, ..., N+6 (replace 6 with however many confirmations your business wants) of the main chain.
Once there have been enough confirmations to satisfy you, you deliver goods or services to attacker.
Attacker releases his own chain, which now has blocks up to, say, N+50.  Being longer, this chain is accepted by the network.  This chain doesn't contain the transaction X but instead X', so you don't have the coins you thought you did.

Notice that up until Step 6, everything on the network looks completely normal; only the attacker knows what is going on.


is it possible to replace the cryptography and public key algorithms in Bitcoin?

Is it possible to replace the cryptographic algorithms used in Bitcoin, such as the hash algorithms and the elliptic curve public key cryptography in Bitcoin?

Yes.

  Does this require a soft fork or a hard fork?

It'll definitely be a hard fork since older clients will not be able to process the new transactions that require different cryptographic algorithms, especially sighashing.


Is encryption really needed for blockchain to work?

Bitcoin does not use encryption, and does not need to in order to secure ownership of coins. Ownership of coins is proven by digitally signing a transaction with the owner's private keys. The signature can be validated by anyone using the owner's public key.

Encryption obfuscates data for anyone that is not authorized to view (decrypt) it. Bitcoin cannot encrypt data that is stored in the blocks because the data needs to be able to be validated by all users (to prevent double spending).

Encryption is used, however in wallets to secure one's private keys, but that depends on the wallet software and how they've chosen to implement this type of protection. For example, Bitcoin Core wallet has a way to encrypt the wallet with a passphrase, see RPC Docs - Encrypt Wallet, but this is not essential for Bitcoin, users can use any wallet application.

Edit: As pointed out in the coments, a point of confustion is that Bitcoin uses Elliptic Curve cryptopgraphy, not RSA. This means that a digital signature in Bitcoin does not use encryption like RSA does, but instead an algorthm called ECDSA.


Cloning a HW wallet's contents to one or more other HW wallets

Yes, you can have multiple instantiations of the same wallet. If you input the same seed phrase, and use the same derivation scheme, then you will have multiple copies of the same wallet.

This works for all types of wallets, software, hardware, etc.

  for example to have identical copies in different locations for backup?

Yes, but the usual recommendation is to keep a backup of your seed phrase, in case you forget your PIN, or the hardware fails, etc.

  if cloning is possible, does it only work for bitcoin or would it cover all cryptocurrencies supported by a HW wallet?

This is possible for all cryptocurrencies included in a BIP39 hardware wallet, I'm not familiar with any exceptions. However it would be best to carefully consult the product manuals in any case, to ensure you understand the nature of the wallet and your backups fully.


How to perform CPU mining on bitcoin TESTNET on Linux?

It's almost impossible to mine Testnet BTC with CPU, but there is a generatetoaddress command in Bitcoin Core:

bitcoin-cli generatetoaddress nblocks "address" ( maxtries )

If you want to continuously mine on Linux, create a bash loop:

while [ 1 ]
do
    bitcoin-cli generatetoaddress 1 "2N5fJkfCv4cF6vsa5QQJnsazBKWNXynn9zp" 10000000
done

Documentation: https://bitcoin.org/en/developer-reference#generatetoaddress


Sent Bitcoin Cash to a Bitcoin segwit address by accident on my Ledger Nano S

It is in principal possible to get them back, but the danger lies in the fact that as soon as you broadcast your new transaction to get them back anyone can change the receiving address, hence steal your Bitcoin Cash coins.

Bitcoin Cash interprets the outpoint which contains your coins as a P2SH. To spend from it you must provide a redeemscript that hashes to image in the P2SH after which the script itself is interpreted and must also validate.

In your case though the redeemscript is a Segwit redeemscript of the form 0014{20-byte-key-hash} (https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#P2WPKH_nested_in_BIP16_P2SH). Since Bitcoin Cash does not understand Segwit, it will evaluate it as a script that simply contains a push of 0 followed by your public-key-hash and therefore is immediately considered valid.

One solution may be to create the transaction that spends this outpoint by simply providing this redeemscript, but instead of broadcasting it to the whole bitcoin cash network somehow give it to a miner directly that does not broadcast the transaction but only includes it in its block...


Bitcoind listtransactions return only received transactions not showing send payment

I believe this is because 'accounts' don't really exist, except to help you to keep track of what address receives what.

listtransactions without an account name should show you the sends, as I believe all transactions get sent with the default account, or *


Are Confidential Transactions on Liquid Opt-in?

Bob:~$ getaddressinfo $ADDR

You should see a long value for the “confidential_key” property within the JSON formatted results. It will look something like this:
"confidential_key": "030788da8d9ca229cbe57e346daaf8d94cba3ed548b41922a8abefaec91ff1abb1"

The confidential_key is the public blinding key, which has been added to the address and is the reason why a confidential address is so long. You will also see that the “getaddressinfo” command shows an associated “unconfidential” address, which can be used to receive assets if you don’t want to make use of the Confidential Transaction feature for some reason.
https://docs.blockstream.com/liquid/developer-guide/developer-guide-index.html#confidential-transactions


How can I process bitcoin payments from a hidden service on Tor?

My suggestion: Don't use windows AT ALL. Easiest way to get hacked.

also here's the answers you are looking for https://en.bitcoin.it/wiki/Tor

specifically this line:
"(after starting tor) Run bitcoind with -proxy=127.0.0.1:9050"


There is only way way to acquire Bitcoin without a previous utxo associated with them: Mine them.

You could pay a miner to mine directly to an address that you control, if you don't have the hashpower yourself.

If you pay someone else who transfers such coins to you, you've already destroyed the value as the act of transferring them will move then from the coinbase (mining output) utxo to your own address, which will be a regular utxo just like any other on the chain.

Verification is easy - just look at the transaction that sends the Bitcoin to you, and verify that it has only one input referencing a 0-hash previous output. When verifying with Bitcoin Core, this will be parsed as a coinbase input. For example, for the latest coinbase tx at time of writing, Bitcoin Core produces the following output (truncated for :

{
  "txid": "21429071642d1838aaaa24b0b5cd5868934952424c9dacd5f63f7f900a416755",
  "hash": "9985102431de97ee3b0cf4e9631daa85a48b84e6476d38998018b268ab27cf99",
  ....
  "vin": [
    {
      "coinbase": "03c13109049f73c25d434e2f54545454545431313131fabe6d6da23d1eb317523b78d2e61f76e493dde0a8f87cd83c585f8bce158d107bf5047c010000004204cb9a8102498456268a5d0aec1c00",
      "sequence": 4294967295
    }
  ],
  "vout": [
   ...
  ],
  "hex": "020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff4e03c13109049f73c25d434e2f54545454545431313131fabe6d6da23d1eb317523b78d2e61f76e493dde0a8f87cd83c585f8bce158d107bf5047c010000004204cb9a8102498456268a5d0aec1c00ffffffff036f65524b0000000017a914f870b7fbb0ce391d9ddc16ad98479d8cbbbd5c41870000000000000000266a24aa21a9ed70b3372921878104277c3e0697fc079b2152d4c2aab2a1c653387f93f416b3290000000000000000266a24b9e11b6da4a898ffc213ffe4708753951bcafa58fcd7d1b9149f39b5c74dc1e1a48b21100120000000000000000000000000000000000000000000000000000000000000000000000000",
  "blockhash": "00000000000000000006d147b5ecfc60100ca2b206240929ffa3f594dae95e08",
  "confirmations": 1,
  "time": 1573024670,
  "blocktime": 1573024670
}


What are some uses of a signed crytocurrency message in a product or service or some other useful use of this feature?

This isn't necessarily a product or service, but Gigabyte distribution (Stellar Lumens distribution was done similarly) was done by distributing the currency to those who owned Bitcoin, based on the amount they owned. Ownership of a Bitcoin address was proven by either sending a micropayment, or signing a message using the address.


What's the difference between `z-addr` and `t-addr` type addresses?

This is now explained in the current Beta Guide:

  Zcash has two kinds of address: a z-addr is a fully private address
  that uses the zero-knowledge proving system to shield a transaction
  and balance privacy. A t-addr (aka "transparent address") is similar
  to a Bitcoin address.

An address can be created using:

zcash-cli getnewaddress    # t-addr, or
zcash-cli z_getnewaddress  # z-addr

t-addr is a 36 characters long string beginning with t.

z-addr has 96 characters and starts with z.


How can a closing transaction in LN have more than 2 outputs?

There are 3 ways to close a channel.

The good way: mutual close
The bad way: force close
The ugly way: revoked close with penalty transaction

In the good case the closing tx should have 2 outputs as you expected. In rate cases even just 1 output.

But in the other two cases a version of the commitment transaction is published. The commitment transactions has additional outputs for pending htlcs that are not settled or timed out yet. So if the channel was routing funds and a force close or protocol breach is happening we can see more than two outputs.


You linked adresses. Not transaction ID's.

It seems to me that you A. either failed to broadcast your transaction, or B. you broadcasted it with a fee that was so low that nodes eventually dropped your transaction.

( Or maybe your coins got double spend?)

A is much more likely. Are you sure you are spending the right outputs? I can't really give a solution other then that you should try to simply rebroadcast your transaction with the information i currently have.


bitcoin transaction showing unconfirmed over 6 days

The only thing we can do is to wait for the transaction confirmation, like me now. This link show that more than 120.000 transaction unconfirmed including ours https://blockchain.info/unconfirmed-transactions

Hope that we get confirmed before it resent


API for automatical buying and selling coins in Java

Pretty much every exchange offers their own APIs for trading.  Take a look at kraken.


What is meant by "Maintenance" of a Crypto Currency Wallet?

In order for the exchange to process deposits and withdrawals, they must have an actively running instance of the coin's daemon, which is connected to the primary chain of the altcoin's network (i.e., not on a fork).

Wallet maintenance implies one of several possible things could be happening:

The exchange wallet is not on the correct fork, and needs to be
synced to the proper chain.
The wallet has been updated by the developer and the exchange is in the process of implementing the wallet update.
The wallet daemon on the exchange's server has hung or crashed.

There are likely other possible scenarios, but the general story is always the same: an exchange with a wallet marked as "maintenance" does not have an actively synced, running client of the altcoin available to the customer at that time, and has disabled access to the wallet to prevent customers from placing requests which cannot be completed.

Because the amount of each customers' funds is kept in a database hosted by the exchange, they are able to process trades for a coin despite the wallet being in maintenance.


Convert 33-byte public key with no parity prefix to address

These are not public keys. Not everything that is 33 bytes is a public key. In this case, it is a 32 byte hash. The first byte indicates that the next 32 bytes are to be pushed to the stack. So the result is that the actual data in this scriptPubKey is a 32 byte string.

In this case, this particular transaction is a coinbase transaction in a block mined by p2pool. This particular script is some p2pool specific data and is a hash, not a public key.


How to use my own web hosting server to mine a bitcoin?

It's as simple as sshing into your server and installing a bitcoin miner such as this one. A server is just a computer and a bitcoin miner is just a program so as long as you can install programs via a terminal you should have no problem and any old getting stated bitcoin mining guide should work.

That being said, this is generally not a good idea to do. Bitcoin mining has gotten to the point where to be cost effective you have to use custom built chips. This means that if you mine bitcoins on a regular old web server making use of the CPU or even the GPU, you will loose money on electricity + server costs.

If you truly do have unlimited free webserver time, then hell, go for it, but understand that this is a net capital loss, your just externalizing the cost to your server provider.


listtransactions returning duplicate transactions with category "Send" & "Received" both

One is showing your send, the other is showing your receipt.  Without seeing both entries your accounting would not add up!


Android BTC clients that remotely use my Bitcoin Core wallet?

No. Something like that would be problematic security wise because it means you have to open up your computer running Bitcoin Core to the rest of the internet. Having two seperate wallets is not really much of an inconvenience because it is easy to send bitcoins between them.


Building cryptocurrency exchange behind TOR

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


Is Bitcoin a fully decentralized network, or how do clients connect to the network?

The various approaches the core client takes are described in some detail on the Bitcoin wiki. Once you're connected to the network, your peers can tell you about more peers, so the big question is, how do you get the first peer?

There are some hardcoded IP addresses and DNS names in the client that point to mostly-stable Bitcoin nodes. If all of these were suddenly taken offline, new users would only be able to join the network by finding one peer via other means, e.g. asking a person who is on the Bitcoin network their IP via a forum, email, or in-person.

If you're wondering if a government (or other entity) could shut down the Bitcoin network by taking out a few (say, 1-10) "central Bitcoin servers", the answer is no. They could, at best, be disruptive to the network. Just to take out the DNS lookup, they'd need the cooperation of (or the ability to DDOS the servers of) the IANA (root DNS servers), or those in charge of all four of the .org (Public Internet Registry), .me (Montenegro), .be (Belgium), and .com (Verisign) TLDs. Or the government would need to be in control of your Internet connection and prevent/redirect these requests, and block the use of Tor (and other proxy/anonymization things) to bypass these restrictions.


Is there any synchronized software update mechanism in Bitcoin-Blockchain?

No there is not. Bitcoin is a protocol, and there are many different implementations of the protocol developed by many different people and groups. It would not make sense to distribute "new software" to all the different implementations.


Does the node count reflect the mining power support of different Bitcoin versions?

No, nodes and miners are separate entities performing different functions in the network.

The miners create the blockchain, which requires specialized hardware that performs hashing. The hardware is acquired through a significant investment.

Nodes are relay points in the network that verify, maintain and distribute the blockchain. They require (by comparison to mining) only a small hardware investment, or can even be run on virtual servers.

Nodes are much easier to be brought online, and can even be artificially inflated by responding to several IP addresses with the same node. Mining power can be directly measured by its output of proof-of-work. The numbers of nodes and mining power are in no direct correlation to each other.


Can Bitcoin and Bitcoin Cash potentially have the same address?

Sure.

Addresses are not really a thing as far as blockchains go - they mostly just care about the keys involved (or in the case of Bitcoin and Bitcoin based networks, the locking script which locks an output to be spendable only by a certain [set of] key[s]).

Since the key generation process relies on entropy, and does not rely on the network you are creating the key for, it is possible, and highly improbable, that two people are able to generate an identical key.

It is so improbable that no wallet I'm aware of actually checks for key reuse on the target chain. It's simply something that is not likely to occur, provided you have a good enough source of entropy.

Note that even if you do end up generating (or manually copying) a key across networks, the actual "address" may still be different, since Bitcoin uses base58/bech32 addresses, while BCH uses base58/cashaddr addresses. This is merely an encoding, however, and does not change the underlying key required to spend the outputs.


First of all, backup your wallet in a couple of places...

If you are in linux, move your ~/.bitcoin to ~/.bitcoin_old, once you've done that start bitcoin-qt, wait another day for the whole blockchain to download. This time it should be working OK.
Replace the wallet in ~/.bitcoin with your wallet in ~/.bitcoin_old and resync.

Remember to have your wallet.dat saved before you do anything (I would have 2 or 3 copies in different places (usb, external HD, etc ...)


MtGox API Overview and explanation of steps required to create connection

Take a look at the Java XChange project

While it is not Objective C it will provide you with all the details you'll need to get your library off the ground including the HMAC authentication process and websockets.

You'll also find a range of other exchanges supported so you can implement those as well thus providing your application with a broader range of potential users since not everyone uses MtGox these days.


How to make data inside blockchain immutable

A blockchain is not intrinsically immutable. What prevents malicious people propagating altered data in the blockchain is that all nodes validate received blocks.

In particular they check the checksums and they check the signatures match the public keys. They check the references (hashes of prior blocks) and they examine the length of competing branches to decide which blocks to trust.

The integrity depends on there being a large number of nodes with no central trusted authority and with no one person or organisation controlling a majority of the computing power.

If you only have a handful of nodes, the blockchain may not be inherently trustworthy.


In compressed public keys, is the 2 or 3 the parity or the sign?

According to https://www.secg.org/sec1-v2.pdf, points are encoded in compressed format as:

0x02 + X coordinate: implicit Y coordinate is even
0x03 + X coordinate: implicit Y coordinate is odd

You can call this parity or sign - it doesn't matter; they're the same thing in a finite field (and arguably, both are inaccurate). As the coordinates are numbers modulo an odd prime p (the field size; p = 2256 - 232 - 977 for the secp256k1 curve used in Bitcoin), -x and p-x are the same coordinate. One of these will always be odd, and the other will be even. One of them will be negative and the other will be positive.
The convention is that "even" refers to the coordinate which manifests as an even number when seen as an integer in the range [0..p-1], and "odd" the opposite. This is an arbitrary choice, as another range could be chosen (such as [-(p-1)/2..(p-1)/2]) in which different coordinates would be seen as even or odd.
Yet, it helps distinguish. If (x,y) satisfies y2 = x3 + 7 mod p, so does (x,y) = (x,p-y). To identify the solution, the criterion of "even/odd when restricted to [0..x-1]" is used in practice.


What can I do to recover my bitcoin from this device?

If the device believes it is in the hands of thieves (many failed PINs) it should never divulge its contents to anyone under any circumstances. I don't know much about the HW 1 but I'd hope (and you should too) it would either self destruct or require some sort of full-reset to be usable again - losing all its contents in the reset process.
The way to recover control over the money is to use the recovery words you wrote down and kept safe back when you first set-up the device.
As one reviewer said in 2016:

The on-boarding process is quick and easy, asking the user to pick a four-digit PIN and to write down a series of ‘recovery words’ on a bundled informational sheet.

These words allow the wallet to be regenerated onto a replacement HW.1 should you lose or damage your original, and represent the device’s weakest link. When you’ve recorded the words, the card should be sealed away in a safe and treated with the same care you would furnish upon a stack of banknotes to the value of your Bitcoin hoard.

Ledger no longer provide support for the HW 1 but the recovery words will work with later Ledger devices.


Hardware Bitcoins (Smartcards, RFID etc.)

It's certainly possible. The card would basically need four functions: add/generate account, add bitcoins, prove bitcoins, spend bitcoins. The card could piggyback on external smart systems so the card doesn't need to do very much.

Each function would be implemented as follows:

Add Account: An ECDSA private key would either be randomly generated by the card or loaded from an external source. The card would add the key to its store of keys. This would be a secure operation that would require the card's internal key to perform.

Add Bitcoins: A list of transaction identifiers and output indexes would be loaded into the card. This would also be a secure operation.

Prove Bitcoins: This operation would prove the ability of the card holder to spend a particular number of Bitcoins. An external device specifies a number of Bitcoins to prove. If desired, approval is sought from the card holder via a PIN or similar mechanism. The card then forms a transaction to pay that number of Bitcoins but damages it so the transaction is invalid (for example, it adds a single transaction input for a billion Bitcoins). Then it signs it. The recipient, seeing the invalid transaction signed knows the card holder could have signed the corresponding valid transaction. (If desired, a challenge can be included to prove the signed transaction was generated on the spot.)

Spend Bitcoins: This is the same as the prove Bitcoins operation except the transaction is valid, the recipient commits the transaction to the block chain, and the card updates its memory to reflect that the coins are spent.

The only other thing you might need is a 'sync' operation where the card fixes any discrepancies. For example, if a spend operation is done but for some reason it doesn't make it into the block chain, the card needs to know that it still holds those Bitcoins. (And can't spend the 'change' from that transaction.)

This is a minimal implementation. You can certainly add more capabilities.


I'll try to answer your questions specifically, but here's a good read on how Bitcoin votes on upgrades.

1) The questions are really all the same question:  which BIPs do you support?  These proposals make their way through the Bitcoin development community, and once implemented, can be voted on by miners.  So basically, anyone can make a proposal.

2) See the answer to question 1

3) No

4) Since the answer to question 3 is "No", this question makes no sense.

5) See questions 3 and 4

EDIT:  I changed the link explaining BIP voting to one with less bias and opinion, and is much more concise an explanation.


Why are the majority of miners not voting on on P2SH?

Here is my personal opinion as to why:

1) There are no release binaries available for the new client, so it must be compiled from source. Some of the smaller pools and P2Pool users may not have the technical knowledge how to do this.

2) If you are running a modified client merging the changes from the latest P2SH code is not straight forward. Nobody wants to spend time upgrading when the changes might have to be reverted if the vote doesn't get past.

3) Downtime during the upgrade process is bad for business, particularly for large pools.

4) No votes ultimately count as votes against, as you say perhaps they don't like either proposals enough to care.

5) Voting hasn't officially started yet - It is based on the last 1000 blocks so should begin sometime on the 24th Jan.


Bumping unconfirmed transaction with sendrawtransaction

Could the free ViaBTC Transaction Accelerator service help you ? The service requires a minimum of fee rate of 0.0001 BTC/kB and has submission limit of 100 that is reset every full hour.
"https://pool.viabtc.com" under "Tool".


What's the mnemonic seed for in Blockchain.info, if they use non-deterministic wallets?

From the source code, one can see that the mnemonic in fact only encodes your password and wallet identifier. You would still need to access you wallet data somehow to recover you coins.


What is to stop people from pumping the volume of transactions via automated micropayments to a large group of addresses?

There's several anti-DOS measures that counter this:

transaction fees get expensive with large numbers of outputs
many rapid transactions with no fees will be rejected
small amounts (less than 0.000045) in an output are called dust, and are rejected

It essentially becomes prohibitively expensive to try to spam.


In Bitcoin the median time past (as in your quote) is used for all operations where the clock matters which limits the effect of any given miners timestamp. Miners can skew the timestamp of their block quite heavily with no ill effect to the network, some previous mining optimisations involved skewing the timestamp forward to avoid needing to do expensive operations to load a new merle root.

There's one exception where some nastiness can occur, which is an off by one error in the difficulty window calculation which means the timestamp of a single block falls outside the calculation window. This is generally known as the timewarp attack, but isn't a significant threat in the real world, it is useful for abusively resetting the difficulty on the test network if it is too high however.


How can I confirm to whom the bitcoin address I sent a payment too?

You usually cannot.

Bitcoin addresses are not explicitly linked to companies or people, unless they decide to publicize that they own an address (or receive funds from it via a third-party custodian).

There is no directory or listing of who owns which address, although some companies and explorers try to tag major addresses to exchanges etc.

You can attempt to follow the BTC from that address and see if it touches a known address. That might give you a lead as to which company is being used to store/cash out Bitcoin by the company you made the payment to. However, if the company you paid has their own system and doesn't cash out frequently, you won't really find anything actionable.


Bitcoin-qt v0.8.0b client on Mac OS X 10.8 crashes, why?

I fixed the problem myself.  During a system sleep or perhaps a hang and hard reset (graceless shutdown) the block index got corrupted.  Best-practices for Bitcoin-qt, at least on a Mac, are probably to quit out of the app before putting the system to sleep.

To fix the problem, I trashed the entire directory

~/Library/Application Support/Bitcoing/chainstate/

and then relaunched the client. It re-indexed all the existing blocks (took about 2 hours,) but did not have to re-download the entire blockchain.

After allowing it to fully re-sync and catch up all blocks, I was able to do transactions normally. 48 hours later the client is still running stably and normally. (Including quitting & re-starting the client.)


This wallet design:

1) Has a holiday feel

2) Includes basic instructions on the back for safekeeping and redeeming.

3) Has a number of tamper-evident and idiot-proof features to prevent revelation of private key.


Yes, use separate wallets.
Bitcoin Core now supports loading multiple wallets simultaneously.
This isn't an exact replacement; you can't transfer between those wallets at zero cost. But on the other hand, the coins are actually physically separated, rather than being virtual bean counters within one wallet.


Who gives SPV nodes merkle path to do validation for small subset of transaction?

The thin client requests the Merkle branch from any full node that has the complete block available. It is requested by specifying the inventory type MSG_MERKLEBLOCK, usually in response to learning that the bloomfilter served to the same full node had some positive results. The response includes the block header, the corresponding transactions and the hashing partners necessary to connect the transactions to the Merkle root.

You can find more details in the Bitcoin Developer Guide on MerkleBlock.


BTC taxation: difference between EU and US

I suspect that the differences in taxation between EU and US may be less than you state.

Salary is taxed based on the cash equivalent value. If you are paid in paperclips, this is sometimes known as a "benefit in kind" and is taxed in the same way as salary paid in fiat currency. The amount is based on the current cash-value of paperclips.

Capital gains are taxed based on the gain in value. If you save your paperclips until the global paperclip shortage disaster and then sell them for ten times their original cash-value, you pay capital gains tax (not income tax) on the difference.

The wording varies from country to country but the same general principles seem to be followed.
The US IRS say

Q–3: Must a taxpayer who receives virtual currency as payment for goods or services include in computing gross income the fair market value of the virtual currency?
A–3: Yes. A taxpayer who receives virtual currency as payment for goods or services must, in computing gross income, include the fair market value of the virtual currency, measured in U.S. dollars, as of the date that the virtual currency was received.
Q–6: Does a taxpayer have gain or loss upon an exchange of virtual currency for other property?
A–6: Yes. If the fair market value of property received in exchange for virtual currency exceeds the taxpayer’s adjusted basis of the virtual currency, the taxpayer has taxable gain.

US IRS treatment of cryptocurrencies
EU tax treatment of cryptocurrencies


Will the payout for mining will always be the same?

No. The payout is determined by the block reward divided by the difficulty. The block reward halves every 210,000 blocks and the difficulty changes based on the total amount of mining.

As I write this, the block reward is 25 BTC and the difficulty is 37,392,766. Dividing gives .0000000668, which would be the pay per share at this moment for a pool that charged no fees and kept all transaction fees.


How does Proof-of-Stake works programmatically

In most proof of stake systems, there isn't really some node that says "this node is the next staker". Rather what many do is, using data from the blockchain, calculate a set of public keys (the set can just be one public key) that can be the next staker. If a node that has the private key for one of those public keys is online, they can construct the next block.

The way that the set of public keys is determined varies by coin, but they all use data from the blockchain and a deterministic algorithm so that all nodes will come to the same set of public keys.

The randomness in these algorithms typically comes from hashing data which could not have been known beforehand (e.g. for block n, take the hash of block n-1). In this way, a random number is generated such that all nodes on the network will generate the same number.


Why does getheaders P2P API return more than getblocks?

Really getblocks should have been called getblockhashes , as the response contains just block hashes, not full blocks.

Every block can be observed in three different ways:

The full block, containing all transactions and header information.
The block without the transactions, but just the 80-byte header which includes a Merkle root committing to the transactions.
Just the 32-byte hash of the block header (which is used to identify the whole block, and is thus also called the block hash).

getblocks was designed to be used for synchronizing blocks. The usual sequence was that node A would send a getblocks, B would respond with an inv with block hashes, A would reply with a getdata for each block he's missing, and B would send over the full blocks using block messages. The limit was 500, as downloading more than 500 blocks at once was presumably deemed too much and pointless (as that could be up to 500 MB of data).

getheaders on the other hand was designed for headers synchronization, something at the time only used by lightweight clients. These would not download (all) full blocks, and the headers sent in response would generally be the only futher communication. As headers are only 80 bytes per block, even 2000 of them is just 160 kB of data.

Since the introduction of headers-first synchronization (which essentially uses getheaders to learn about block hashes and headers simultaneously, and then download missing blocks from multiple peers at once), the old getblocks based synchronization is superseded (it's still implemented for compatibility with software that doesn't have headers-based sync, but other than that inferior in every way except implementation complexity).


remote channel message: Unreasonable to_self_delay = 2016 (max=2000)

Usually you can configure the timelock that you wish your channels should have and the maximum timelock that you are willing to accept. Eclair mobile will set the maximum value that is allowed according to the protocol which is 2016 blocks or statistically two weeks. This means you can technically have your mobile turned off for up to two weeks and still be able to act upon a channel breach.

It looks though like the other node you have has set that it will not accept values above 2000.

You should see if you can configure one or both nodes to make those values be compatible to each other


i have done this by overriding methods of WalletAppkit and its working fine now,
here is code sample for this.

  kit = new WalletAppKit(params, walletFile, APP_NAME) {
            @Override
            protected Wallet createWallet() {
                System.out.println("I am here");
                Wallet wallet = Wallet.fromWatchingKeyB58(params, tPub, DeterministicHierarchy.BIP32_STANDARDISATION_TIME_SECS);
                return wallet;
            }
@Override
        protected void onSetupCompleted() {
            super.onSetupCompleted();
            System.out.println(kit.wallet().currentReceiveAddress());
            System.out.println(kit.wallet().getTotalReceived().toFriendlyString());
            txHistory();

            kit.wallet().addEventListener(new AbstractWalletEventListener() {
                @Override
                public void onWalletChanged(Wallet wallet) {
                    System.out.println(kit.wallet().getTotalReceived());
                }
            });
        }


Upgrading/converting bitcoin core wallet between platforms

I finally got this. Here is a brief summary for the future searcher:

use the old software to launch the node with the old wallet.db file
run the dump wallet command. This creates a file that is in a text format that is more portable than bdb.
run load wallet command on the new node.
rescan the new node (the default scan does not look very far back)

Note that the file created in step 2 is unencrypted and contains your private keys, so handle with care. Though I did wait for the new node to finish syncing, I doubt that is actually a requirement. I did not allow the old node to sync more than a few blocks.


Are the keys in a multisig transaction output hashed?

Typically, you will use P2SH (pay to script hash) for multisig transactions, which means the transaction output does not contain the full script (with full public keys), but instead a hash of that script - and the full script is revealed when spending. See BIP16 for more information.

When this is done, you get the same effect: the transaction output does not contain a public key directly.

Note that there is indeed a  small security benefit to this (it takes 2^160 steps in theory to reverse the hash function, while it takes 2^128 steps to find a private key for a given public key), but there are larger advantages (like the sender not needing to know the full script, and less data in the database of unspent transaction outputs that every full node maintains).


Yes, blockchain.info has its own testnet service: https://testnet.blockchain.info/


What programming language should I learn to create a new altcoin?

The most likely you followed this link to create an altcoin.
If you feel that C++ is a bit cumbersome, then I would try Python.


Batching transactions - calculating batch transaction fee

The function would not work because the transaction fee is based upon the size of the transaction in bytes (well really its weight, which is based on the bytes). While the number of outputs is a factor in this, the other factor is the number of inputs, and what type of inputs they are. So given just the outputs (the value of the outputs doesn't even matter), you still cannot determine how much in transaction fees that you will need to pay. Thus your function F(x, N) would not work.


What makes blockchain technology so attractive to non cryptocurrency applications?

There are two basic categories of applications for the type of distributed ledger technology behind Bitcoin.

The first category are public systems like Bitcoin, Ethereum, and Ripple. These are systems with no central authority that provide open access to the world. The blockchain technology ensures eventual agreement on the state of the system so that changes in that state (whether they represent payments or something else) can be agreed upon. Anyone can participate in these networks so long as they follow the rules, with the rules being enforced by the software ignoring people who violate those rules.

The second category are private/permissioned systems. These are systems that don't require a central authority for their day-to-day operation. They are generally run by a group of interested parties which formally manages group membership. The blockchain technology gives them data replication. Byzantine fault tolerance (protection even if some of the participants are malicious), and eventual (typically very rapid) agreement on the state of the network. The cryptography also ensures that the past is tamperproof and provable.


What is the exact difference between combinepsbt and joinpsbts

combinepsbt takes multiple PSBTs that have different input data and merges them. The base transaction must be exactly the same, i.e. the same inputs are consumed and the same outputs are created. The information for each input is combined into the same input. Inputs and outputs cannot be added or removed. This allows for people to send the same PSBT to be signed by multiple different people and then merge the resulting the PSBTs back together.

For example, suppose you have a PSBT that consumes 2 inputs, with input 1 requiring person A to sign and input 2 requiring person B to sign. You give both person A and person B copies of that PSBT to sign. Person A returns you a PSBT which has input 1 signed (i.e. they fill in input information like UTXO, partial signatures, final scriptSig, etc.) but input 2 is not. Person B returns you a PSBT which does not have input 1 signed but input 2 is signed. combinepsbt allows you to merge the PSBTs from both person A and person B into a single one which has both inputs signed.

joinpsbts is very different from this. joinpsbts joins multiple PSBTs that have different underlying transactions into one transaction. It requires that the inputs of those underlying transactions be different from each other. Furthermore, joinpsbts will discard any signatures and finalized input fields from the original PSBTs (meaning the resulting PSBT will contain no signatures) as those signatures will likely be invalidated when joining.

joinpsbts lets you make transactions which has other people involved in them (such as CoinJoins) more easily. Each person can specify the inputs and outputs they want in a PSBT and then all of these PSBTs with different inputs and outputs are merged together using joinpsbts.


If you are talking about the Bitcoin API, getwork only requires data field, which is a place to put your solution.

However, I do believe that you are talking about the id field of a JSON RPC command. It is used to identify a response to a given request. Generally, it might not be the best place to put extra information. There are already a few extensions to the getwork protocol that you might want to use instead.


The syncnode concept was added in v0.8.2, to make sure we always have at least one connected peer from which we have at least once asked what their current blocks are. The name was pretty confusing, as it does not actually correspond to which peer we're downloading blocks from - just through which peer we actively seek to learn about blocks' existence.

v0.10.0 has a completely different synchronization mechanism (called headers-first), which does no longer have a syncnode. In fact, it downloads from all outgoing peers simultaneously.


Can I emulate a graphics card using software, and use it for mining?

Chances are there is no GPU in the physical host server, servers don't need them.

You could CPU mine, but it would be pointless for Bitcoin, Litecoin and most of the Alt-coins because you just wouldn't have enough processing power to generate anything but dust.

Sorry it's not a helpful answer, but it's better than no answer!


How can I withdraw my mbtc on my testnet 3 wallet?

Testnet coins have no value - there is no way to transfer them to any exchange or broker and exchange for fiat.

If someone is paying you on a testnet and claiming it is valid reimbursement or payment for anything, they are scamming you.


Reference an UTXO of a transaction that has not been yet mined

The UTXO is referenced as an outpoint(TXID, Index) in the input of your time-locked spending transaction.

So, when creating your time-locked transaction, you need to know the TXID of the (unconfirmed) transaction you are spending.

Simply double+sha256 and swap endianness of the over-the-wire transaction serialisation to get the TXID you wish to reference.

This TXID is a unique identifier (assuming no TX malleability). The outpoint you are referencing in your spending transaction is not affected by the confirmation of said UTXO.


Is there a known way to export my wallet private key from the "Bitcoin Android" app (com.bitcoinandroid)?

I would try option 1 first, if you can find the right version of the library.  I'd be willing to try making a general purpose tool to do it, but don't have an Android phone.  Is there any way you can make a new, empty wallet and put a copy online somewhere along with a corresponding bitcoin address or two?

If you're attempting option 2, you probably know at least one of the addresses in the wallet, and so wouldn't need to hit blockexplorer for every guess.  You would expect the private keys to be evenly spread through the wallet, so once you've found a few you can make smarter guesses about where the rest are.


Where could I sell micro BTC and is it possible?

The smallest part of a bitcoin is (currently) called 1 satoshi, and it is equal to 0.00000001 BTC. So selling 0.01 BTC is no problem on any exchange, you only have to take into account the fees which are asked by the exchange. If it's a percentage (as it usually is) you're fine.

If you want to sell you can use big sites like bitstamp, coinbase etc.
To trade for other cryptocurrencies you can use btc-e, kraken, cryptsy, ...


Warning: Unknown block versions being mined! It's possible unknown rules are in effect

Miners have started signalling for BIP 91, which sets bit 4 in version numbers. When BIP 91 activates, it will force miners to set bit 1 (which then indirectly will cause activation of BIP 141 SegWit).

No software release has implemented BIP 91, as a result, it warns because it sees an unknown feature rollout with significant support from miners.


How is PSZ Timestamp encoded in Bitcoin core code?

04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73

The above is actually Bitcoin Script, not just byte data.

This breaks down to:

04         # PUSH the next 4 bytes
ffff001d   # This is the same as the nbits for the block, which was the target for the genesis block difficulty
01         # PUSH 1 byte
04         # PUSHed 1 byte - I'm not entirely sure what this 4 represents
45         # PUSH the next 69 bytes (0x45 == 69)
# The text
5468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73


Should I keep my RPC credentials private?

Yes, you should keep your RPC credentials private. RPC credentials give someone control over your node. They will be able to issue all of the commands that you can issue, including sending coins, shutting down the node, disconnecting and connecting peers, etc. The most important part is that if your wallet is not encrypted OR if you have unlocked the wallet, having the RPC credentials allows someone to move your Bitcoin.

The RPC interface can also be used to overwrite files in your filesystem. The backupwallet command will overwrite files with the backup. An attacker could use this to effectively delete files on your machine by overwriting them with copies of your wallet.

However, the RPC interface is typically not exposed to the internet, so even if someone does have your RPC credentials they probably cannot connect to your node to issue commands. Even so, you should keep your credentials private, or as Nate Eldredge suggests, change them before you post the video.


This thread explains it.

It's a method that allows replacing an already transmitted transaction by transmitting another transaction with a higher fee. This only works on transactions before they are signed by miners (0-confirmations).


Can two private keys generate the same (public) Bitcoin address?

Yes, you can have two keys generate the same address.

There are 2^160 possible addresses, and 2^256 possible private keys, so each address corresponds to roughly 2^(256-160)=2^96 private keys. Any of these will generate the same address and thus be able to spend the money owned by that address. Since 2^160 is so large, however, it would take a near-eternity to find any collisions.

Whether two private keys can generate the same public key is another question. I think the answer is yes, but I am not sure on that. The public key in uncompressed form consists of two 256-bit numbers, which are X and Y coordinates on an elliptic curve. However, the compressed form is just the X coordinate plus a bit, from which you can calculate the whole public key. This means the space is (at most) 2^257. Unless there is a one-to-one mapping due to the mathematical properties of the cryptography used, each compressed public key corresponds to roughly 0.5 private keys (with the same distribution you'd get from picking a random number from 1 to 2^257, 2^256 times), so some private keys will collide, while others will not.

Actually finding any pair of different private keys that generate the same public key or address would be quite difficult. Either it would involve a huge amount of computation and/or luck, or it would be due to finding a serious vulnerability in the algorithm(s) used.


Do transactions with old UTXOs take longer to confirm?

No.

The miners use Bitcoin Core or similar full node software to determine which transactions are valid and suitable for inclusion in a block.  Bitcoin Core maintains a database of all unspent UXTOs.  This database is constructed when the node first downloads the blockchain and is updated as new blocks and transactions arrive.  It's random access and any transaction, regardless of age, can be found by its ID in a very short time.


It's because you've used a very small fees  96.339 sat/B for this transaction.

You can see the current bitcoin fees here : https://bitcoinfees.21.co/ which is recommended. Your transaction will likely drop out of blockchain and you will get your coins back soon.

Solutions :

1) You can contact bitcoin pools and push your transaction in there blocks.

2) You can double spend your bitcoins ( Not easy for beginners/non-technical persons )

3) You can just wait it out.

Please use a higher fees from next time to avoid using these issues.


How does the 12 keyword back phrase works and how does it allow the creation of infinite number wallet address across multiple cryptocoins?

Per BIP39 the original entropy in form of mnemonic can be translated to master seed per BIP32.

  This document describes hierarchical deterministic wallets (or "HD
  Wallets"): wallets which can be shared partially or entirely with
  different systems, each with or without the ability to spend coins.

  The specification is intended to set a standard for deterministic
  wallets that can be interchanged between different clients. Although
  the wallets described here have many features, not all are required by
  supporting clients.

Using BIP44 one can use different coin_type codes for different currencies and standard derivation is m / 44' / 0' / 0'

BIP44:

  m / purpose' / coin_type' / account' / change / address_index

As far as I know BitPay/Copay use this derivation type.


how do i identify the location of a transaction?

The address you linked to only has 2 transactions for a total received of .01 BTC, which was later sent to 1Facb8QnikfPUoo8WVFnyai3e1Hcov9y8T.

Remember that the address you linked may not be the only bitcoin address you had available in your coinbase account. A wallet can provide many addresses.

Transaction info:
https://bitcoinchain.com/block_explorer/address/14vRCiVnT4Su1akXrKmUUa3Ucf971pJXsB

As for figuring out the owner/location tied to a bitcoin address as far as I understand this is not a built in feature of bitcoin. Unless the owner has publicly attached this address to a name somewhere there is not really a way the average person can find out who owns it or where they are from.

I'm sure a hacker/government could find a way to monitor transactions on the network and gain your IP but I don't think that information is made available for the average user.

This thread may help clarify: How do I see the IP address of a bitcoin transaction?


Multiple coins on one server running MPOS/stratum

Have you given proper permission to
www.mysite.com/MPOSSECONDSITE/public

If not, use this:
cd /home/username/mpos chown -R www-data templates/compile templates/cache logs


You've basically described Ripple (aka XRP). You may want to read up on it - and specifically, criticism of it that can help illuminate why this system does not offer the same benefits that Bitcoin's does.


Getting error while accessing bitcoin client from ruby using Rpc

Use the following method to call BitcoinRPC using Ruby:

Create ruby file test.rb as

require 'net/http'
require 'uri'
require 'json'

class BitcoinRPC
  def initialize(service_url)
    @uri = URI.parse(service_url)
  end

  def method_missing(name, *args)
    post_body = { 'method' => name, 'params' => args, 'id' => 'jsonrpc' }.to_json
    resp = JSON.parse( http_post_request(post_body) )
    raise JSONRPCError, resp['error'] if resp['error']
    resp['result']
  end

  def http_post_request(post_body)
    http    = Net::HTTP.new(@uri.host, @uri.port)
    request = Net::HTTP::Post.new(@uri.request_uri)
    request.basic_auth @uri.user, @uri.password
    request.content_type = 'application/json'
    request.body = post_body
    http.request(request).body
  end

  class JSONRPCError < RuntimeError; end
end

if $0 == __FILE__
  h = BitcoinRPC.new('http://username:password@127.0.0.1:8332')
  txid= "611b40973fe68cc42b70ae5af365a449af458d76086415c6fa6c45364c36278e"
  p h.getrawtransaction(txid)
end

NOTE:
username and password are from your bitcoin.conf file.


Bitcoin core syncing at 60% since December 13 and barely moving

I've downloaded the blockchain many times (don't ask why).  Maybe a week or so, just depends, I didn't keep track of the time frame at that point.  If your network is slow, or your computer is slow (when verifying blocks), or if you're going through a VPN that slows you down, all those things could impact your download.


Is there a list of "hardforks that will never happen in Bitcoin"?

Here, I created a page about that: https://en.bitcoin.it/wiki/Prohibited_changes


This issue may be related.

The suggested fix is to start bitcoin-qt with the reindex option. To do that you'll need to start it from a command prompt and use:

bitcoin-qt.exe -reindex

Of course make sure you take a copy of your wallet.dat file and put it somewhere safe.

You could also try updating to the latest version of Bitcoin Core and then copy your wallet.dat file into the data directory BUT the wallet format may have changed in the interim which could prevent it from opening.


I got it working. I had was using the proxy 178.32.31.43 and the port 80 and I changed Port 80 to port 8888 and it works –


I would check these help pages out. The first one explains that your wallet may not be fully deleted.

  https://multibit.org/en/help/v0.5/help_support_missingWallets.html
  https://multibit.org/en/help/v0.5/help_lostOrForgottenPassword.html

Multibit has a pretty good troubleshooting page too, which explains where all their data is stored. I would check and see if you have any data in your system specific directory.

  https://multibit.org/en/help/v0.5/help_troubleshooting.html

If the wallet is truly deleted, and you don't have any backups, then yes, unfortunately your bitcoins are gone forever. :/


How do you get back the private keys you used, after you deploy your wallet with a 12 word seed?

A long sequence of private keys can be computed from the seed in a standard way.  The new client will import those keys for your use, while computing the corresponding addresses and checking the block chain to see which ones have been used.  When it finds many keys in a row that haven't been used (perhaps several hundred; this number may be configurable in your client), it assumes it has found all the keys in the sequence that you actually used, and stops.


Keeping Track of User Deposits with Bitcoin

Yes, each UTXO needs to be spend individually, regardless of which address they were received to. I think it would be appropriate to read this advice as "at least one address per customer". Having separate addresses per customer will make it much simpler for you to track which customer's account needs to be credited than having only a single address for your service altogether. However, if you're not in a scenario where you're just taking deposits for a user, but e.g. selling products or services, I would even recommend to use a separate address for each payment process, which would make it trivial to discern not only the customer but also which invoice got settled.
Today, wallets generally use hierarchical deterministic derivation to generate many addresses from one master secret. Under the hood, each address is associated with a different private key, but all private keys can be regenerated from the master secret. This allows you to track many addresses with a single wallet, but simplifies backups and secret management.
Address reuse is terrible for both your and your users' financial privacy and has no palpable advantages when you start to consider the additional overhead of figuring out who paid with which transaction. I can only vehemently dissuade from using the same address for selling to multiple customers. If you get a lot of volume, it will be trivial for people to claim foreign payments as theirs and you will lose a lot of time investigating and acquiring proof from the actual customer. Using separate addresses may be more work in the beginning, but just gets rid of this whole class of issues.


Is it possible for someone to verify that a wallet is theirs wallet, without providing their private key?

Yes, you can use "Message Signing", available in most Bitcoin clients, including Bitcoin core. If I sign with my address the message "I am Meni Rosenfeld and I am proving to user127317 that this is my address", you can be sure it's mine.


Where are the new smart fee estimate data saved? Can the file be re-used?

In the bitcoin data directory, there is a file called fee_estimates.dat.  This file is only written when bitcoind or bitcoin-qt exits so it is not up to date until that point. After that you could copy it and use it on another node to start with up to date estimates.

There is some trickery if the nodes are at different chain heights, but it should mostly do the right thing. It tracks the block height that the estimates were written as of and the new node won't affect the estimates until it's active chain has advanced beyond the latest recorded block in the old file.  Also if the chain in the new node is past the last recorded block in the file, then the estimates are decayed under the assumption that the data is no longer as meaningful.

In general if you start from scratch, you should only need to wait for about twice as many blocks as the target you would like an estimate for before you are able to get a somewhat reasonable answer.


Which Bitcoin-powered gambling sites are "provably fair"?

BitLotto was likely the first blockchain-based "provably fair".  It uses the transaction ID as the "ticket", and the results of a large government-run lottery to determine the winning numbers.

http://www.BitLotto.com

SatoshiDICE became a blockbuster (pun intended) method for online gambling.  It uses the transaction ID to determine the "lucky number" (between 0 and 65,535).  The secret used for determining that lucky number is revealed after the end of the day.

http://www.SatoshiDICE.com

bitZino gets credit for coining the term "provably fair", and first launched an online blackjack game then followed it up first with video poker and then roulette as well.  The game allows the user to change the client seed used for each play.

http://www.bitZino.com

BitJack21 was possibly the first.  The game gives the ability for the player to change the seed used for each hand.

http://bitjack21.com/

BitDice.com, SatoshiRoulette.com and others claim to be provably fair, I believe.  But I haven't gone through the verification steps myself to confirm.

BitLotto and SatoshiDICE wagers can be verified by anyone at any time after the results are published in BitLotto's instance, and after each day's secret is published for SatsoshiDICE's instance.  Proving that bitZino always computed the results correctly requires logging of the hash, the client seed, and also the way the hand was played -- so it is much more effort to verify unless there is automation but no automated solutions for verifying all wagers on bitZino have been made available.

Here's an article on what provably fair means:

http://www.forbes.com/sites/jonmatonis/2012/08/31/bitzino-and-the-dawn-of-provably-fair-casino-gaming

Here is one explaining how it works:

http://bitcoinreviewer.com/provably-fair/

[*********

Additional sites in which claim to be provably fair but I've not gone to verify:

http://www.satoshibet.com
http://www.BitMillions.com  (Apparently uses as a seed a Twitter sequence?)
http://www.KingCo.in
http://www.BitcoinVideoCasino.com
http://www.Playt.in
http://www.bitino.com
http://www.pinballcoin.com
http://www.blockchainroulette.com
http://www.diceoncrack.com   (Uses transaction hash just like SatoshiDICE, so should be easily to verify)

*********]


the company behind usdt (tether) can create and sell new usdt (eg. if the price is greater than 1$) and buy them back (eg. when the price is smaller than 1$). they say they have enough money to buy all usdt back (but many people are in doubt about it). furthermore the community knows that tether tries always to adjust the price of usdt to 1$. so only very few people will sell usdt for <1$ or buy it for >1$ (because it is probably uneconomical). so the trader-community is "helping" tether a little bit by continuing mostly accepting this 1usdt=1$-"rule" which could be useful for everyone on a long-term basis.


Yeah, you could use Bitcoin.com They don't provide API for total transactions but i've got the link they use to get bitcoin total transactions
Here is it:

https://charts.btctest.net/api/chart/daily-transactions
Response Format is JSON.

I guess you could use it.


Bitcoin was never really meant to have no/low transactions fees.  What was always intended (and still is true) was to have market driven transaction fees.  In fact, as block rewards grow smaller, the plan has always been to eventually compensate miners from fees alone.  Because transactions take up space in a block, and block space is limited, there is a basic economic supply/demand curve at work.  There are many improvements being made to shrink the space that a transaction takes in a block, which effectively increases the supply.  However, as Bitcoin becomes more popular, demand is also on the rise.  In addition, there are layer-2 solutions such as the Lightning Network that only uses the blockchain for settlement, and performs off-chain transactions for common use.  This could also increase the supply, but may also increase the utility enough that demand also skyrockets.  There is a long-standing debate about how to scale Bitcoin, and your question about transaction fees sits right in the middle of it.

Concerning your inquiry for decentralized exchanges between Bitcoin and fiat currencies...

  How do I find someone who is ready to sell me some bitcoins at the market rate and avoid exchange fees

You are trying to have your cake and eat it too.  If you don't want to pay fees, don't expect market rate.  That market rate is really the "market with fees" rate, meaning that there is a separate "market without fees" rate.  The latter is the market you are in when using localbitcoins.  If you don't want fees, you'll pay a higher rate.


The Merkle tree is not stored anywhere.

It is implicitly defined by the transactions in a block. Whenever needed, the portion of it that is needed is computed on the fly using the transaction identifiers.


What’s the point of wannacry for exchanging Bitcoins to Monero?

The sender has a key (view key) that allows one to view to whom and how much was sent.

Yes, the police have access to Shapeshift's viewkey, but they also need Wanancry's viewkey. Shapeshift's viewkey will reveal what address the Monero went to when it left Shapeshift, but where did it go next? The police will not know until they raid Wannacry's physical location and seize their viewkey. Without Wannacry's viewkey, the police can glean very little from the Monero blockchain.

You can observe the obfuscation by looking up a random transaction in a Monero blockexplorer. You will see that the receiving & change addresses are represented by one-time stealth addresses, the amount is represented by question-marks, and you can't tell which one of the 11 ring members made a monetary contribution to this (as opposed to some other) transaction.

Edit: This question has previously been answered in more detail in the Monero StackExchange site.


How can I tell if my Bitcoin-Qt wallet is protected with encryption?

If you encrypt your wallet, it will also be encrypted for all addresses your ever create.
Bitcoin qt will ask you for every transaction you made for the password.

  Does that mean anyone can use the funds I have in my wallet on computer A, without my passcode?

At this moment yes, try to encrypt it again, maybe you made a misstake?

  The status of the transaction on computer B is also, 8 confirmations? Is this a sign of a mistake. Also the 'from' is marked as unknown - is this important?

A confirmation means, that you transaction was successful added to a block and is processed.
Some markets or platforms need a certain number of confirmations.
Your payment is normal confirmed after 1 confirmation.

  There is also no lock icon on my QT client, which I have been told there should be if the wallet has been encrypted?

Yes, there should be a "lock" icon on the right bottom. Try to encrypt your wallet again is it possible.


Lightning LND - Send Payment Both Ways Within Same Channel

The Problem here is the channel reserve. If you fund a channel all the bitcoin are on your side. At this point you can only pay. However let us assume you make a really small payment (below 1% of the channel capacity) your channel partner can't pay you back on that channel. After establishment lightning channels are required to keep at least 1% of the capacity on their side. If it was less it would incentivice the person owning no or only little liquidity to breach to protocol an publish and old channel state. Since the punishment would do basically no other harm then having a channel closed.

I suspect this is what happened between your two nodes. Try to balance the channel a little bit more by sending over 10% of your funds and sending back 5%. if that does work then we found the problem.


Why is this script invalid, and how can I generate valid public key/digital signature pairs?

I have played with the tool for some hours, but couldn't get a single signature to work. Here is what I entered for the famous PIZZA transaction:

# <sig>
OP_PUSHDATA1 71 0x30450221009908144CA6539E09512B9295C8A27050D478FBB96F8ADDBC3D075544DC41328702201AA528BE2B907D316D2DA068DD9EB1E23243D97E444D59290D2FDDF25269EE0E
# <pubKey>
OP_PUSHDATA1 65 0x042E930F39BA62C6534EE98ED20CA98959D34AA9E057CDA01CFD422C6BAB3667B76426529382C23F42B9B08D7832D4FEE1D6B437A8526E59667CE9C4E9DCEBCABB

OP_DUP OP_HASH160
# <pubkeyHash>
20 0x46af3fb481837fadbb421727f9959c2d32a36829
OP_EQUALVERIFY OP_CHECKSIG

The script's content would execute correctly the OP_DUP and OP_HASH160, so the results on the stack match the OP_EQUALVERIFY. Then OP_CHECKSIG returns false... Checking with openssl returns true.

  Is there a way to manually verify that the example digital
  signature/public key pair matches, or to generate matching pairs that
  don't contain or link to my actual Bitcoin addresses, in order to
  experiment with the Script debugger?

yes, I usually have OPENSSL to give me a helping hand. But any ECDSA library should do. A normal P2PKH tx is converted into unsigned format, and the input script is replaced with previous tx' output script (and lengths adapted). This raw tx is then double sha256'd, and the result signed. This hash value can easily be checked with openssl, the signature and the pubkey. I posted this ~2 years ago, and got help from Dave.

How to come to the unsigned transaction is explained by @amaclin's answer in the first link (--> How does the ECDSA verification...). Openssl requires a PEM key to verify, so some conversion takes place from pubkey to PEM format. And then bitcoin works with raw (hex) data, not strings. Hence the efforts to convert with xxd on Linux systems, or with sed and [:xdigit:] on BSD type systems. If you are on unixoide systems, I can provide a script.

  how can I generate valid public key/digital signature pairs?

Maybe "generate" is not the correct word here, but one can take any tx from the blockchain, and extract the elements (raw tx, sig, pubkey, prev tx pubkey hash), and push it through the process described above.


Is there a way to monitor what bitcoin-qt is doing on a mac os x?

It takes forever and a day to have Bitcoin-Qt sync up with the Blockchain for the first time. Also try executing "netstat -n -P TCP | grep '.8333'" in a terminal window to see if you have eight concurrent socket connections into the Bitcoin network.


How many bitcoins would it require for a sustained DOS attack on bitcoin network?

7 transactions per second times 60 equals per minute times 60 equals per hour times 24 equals per day = 604800 satoshis sent in individual transactions.

However, nodes filter such so-called "dust" transactions. The minimum output amount for a transaction to be relayed by the network is 546 satoshis. So: 330220800 satoshis = 3.302208 BTC to fill the network for a day.

(As explained in, http://www.reddit.com/r/Bitcoin/comments/37z9ln/how_much_btc_needed_to_fill_entire_1_mb_block/crqzv63)


Where can I download the Litecoin binary for OSX?

Asked it in the forums, and here's the response:

https://bitcointalk.org/index.php?PHPSESSID=039d3d0433adcf037196613c03d139e1&topic=47417.msg605132#msg605132

Edit - direct link to github downloads


What is the significance of the last 5 digits of Base 58 WIF?

The last 4 bytes of the WIF format is a checksum. The details can be seen here: https://en.bitcoin.it/wiki/Wallet_import_format

That's approximately 5 characters of Base58 that are essentially redundant. This is so that errors in the WIF encoded private key can be detected easily. I believe some wallets will simply ignore the checksum if it's not correct.


It does work. Yes you need an external HD for the blockchain data (unless you want to run a pruned node) and Raspian is fine.

In my opinion the best tutorial for setting up a full node on RP3 is this:

Damian Mee's Guide


How is 6 LTC blocks "more secure" than 6 BTC blocks?

TL;DR: He compares one hour worth of transaction blocks, not six blocks. I.e. he compares the security of 6 blocks in the bitcoin network opposed to 24 blocks in the litecoin network.

In the video the host reads from a sheet with calculations that is supposed to prove that Litecoin is more secure than bitcoin. The calculation is based on the assumption that a 51% attacker wants to mine one hour worth of blocks with 35% of the mining power. Finally, he concludes that 8 transaction blocks in the litecoin network offer a similar security as 6 blocks in the bitcoin network. I.e. block to block litecoin isn't securer than bitcoin, however it reaches the same level of security in less time.

I can't comment in how far the presented numbers are factual (I didn't repeat the calculation), however I am not convinced of the conclusion "litecoin is magnitudes more secure than bitcoin". A 51% attack does not require an hour worth of blocks, but rather a specific number of blocks, in which even the host tells us that Bitcoin is more secure.


No.

Bitcoin is an economical system. To become a pool operator, you must have 1) large amount of bitcoin or 2) large amount of hardware. Both requires you to be an "investor". In contrast to Proof of Stake, it is not easy to sell everything and leave Bitcoin in short time, which means you're informally "contracted" to Bitcoin. To put it another way, the only proper way to profit is long term mining. That requires you to ensure that it won't decrease in value. (1% increase is actually a lot for them) As a consequence, you can't attack Bitcoin even if you have the power to do that, as it'll affect its value.

This was the reason Emin Gün Sirer's Majority is Not Enough: Bitcoin Mining is Vulnerable was controversial.