bitcoin-cli get all tx hashes for watch-only address does bitcoin-cli have any functionality to get all tx hashes for a given address (ie the txs that either send or receive funds from the given address). listtransactions sounds like it should do what i want, but when i run it like so then i get no results:
# pick a random address to watch from blockchain.info:
$ addr=1GkktBuJ6Pr51WEJe5ZzyNvMYaMDFjwyDk
# create a watch-only account for this address, with the account name
# being the address itself, for convenience:
$ time bitcoin-cli importaddress $addr "$addr" true
real    41m59.505s
user    0m0.004s
sys 0m0.004s
$ bitcoin-cli listtransactions "$addr" 100 0 true
[
]
$ bitcoin-cli getinfo
{
    "version" : 100200,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 384809,
    "timeoffset" : 0,
    "connections" : 8,
    "proxy" : "",
    "difficulty" : 65848255179.70261383,
    "testnet" : false,
    "keypoololdest" : 1381701523,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00001000,
    "errors" : ""
}

as you can see, it takes 42 minutes to scan the blockchain for this watch-only address, so its not something i want to do often. and its only producing an empty list, whereas blockchain.info shows there are 6 transactions.
why is this not working? is this not the intended functionality of bitcoin-cli listtransactions?
update
listtransactions is supposed to display transactions from watch-only addresses:
$ bitcoin-cli help listtransactions
listtransactions ( "account" count from includeWatchonly)

Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.

Arguments:
1. "account"    (string, optional) The account name. If not included, it will list all transactions for all accounts.
                                     If "" is set, it will list transactions for the default account.
2. count          (numeric, optional, default=10) The number of transactions to return
3. from           (numeric, optional, default=0) The number of transactions to skip
4. includeWatchonly (bool, optional, default=false) Include transactions to watchonly addresses (see 'importaddress')
...
...
...

Seeing as this question remains unanswered after a few months...

You will need to enable txindex = 1 in your bitcoin.conf per @Jannes' suggestion. If you want to scan your downloaded blockchain for another wallet's address transaction history, then you have to build the entire blockchain index on your machine.

Whether it's a watch-only address or not should be irrelevant.

What are pros and cons of txindex option?

Get non-wallet transactions using bitcoin rpc (gettransaction)

UPDATE

I think I may have solved your problem

This is my Bitcoin info

$ bitcoin-cli getinfo
{
    "version" : 110200,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 353776,
    "timeoffset" : -1,
    "connections" : 55,
    "proxy" : "",
    "difficulty" : 47610564513.47126007,
    "testnet" : false,
    "keypoololdest" : 1449210293,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00005000,
    "errors" : ""
}

My blockchain isn't quite as up-to-date as yours, so I gathered this transaction (within block 353776) and used the Bitcoin address of 1CTVqQSSVTjun32gRxmhJHhVYzzXpR894z from that transaction for my example.

# Import address WITHOUT rescan; we'll do this later
bitcoin-cli importaddress 1CTVqQSSVTjun32gRxmhJHhVYzzXpR894z "Index Test" false

# Stop Bitcoin
$ bitcoin-cli stop

# Verify Bitcoin is stopped, then run:
$ bitcoind -rescan

# Wait for rescan... mine took 15-20 minutes

# Once 'bitcoin-cli getinfo' returns valid info, run:
$ bitcoin-cli listtransactions "Index Test" 10 0 true

# Result:

[
    {
        "involvesWatchonly" : true,
        "account" : "Index Test",
        "address" : "1CTVqQSSVTjun32gRxmhJHhVYzzXpR894z",
        "category" : "receive",
        "amount" : 3.50000000,
        "vout" : 0,
        "confirmations" : 22539,
        "blockhash" : "00000000000000000548d8ef9a7d14c75b7b18ae5b792d520f44cc5ddd25adfe",
        "blockindex" : 536,
        "blocktime" : 1416848183,
        "txid" : "1db7b0703f441d4cea63a298131f8e766b557329f44c30898847d0fc23573606",
        "walletconflicts" : [
        ],
        "time" : 1452652576,
        "timereceived" : 1453438387
    },
    {
        "involvesWatchonly" : true,
        "account" : "Index Test",
        "address" : "1CTVqQSSVTjun32gRxmhJHhVYzzXpR894z",
        "category" : "receive",
        "amount" : 1.89990000,
        "vout" : 1,
        "confirmations" : 19031,
        "blockhash" : "0000000000000000134345f88fb68550d2102d392be6e1635eaa6fb50c37a2cc",
        "blockindex" : 15,
        "blocktime" : 1418994502,
        "txid" : "4cc761b286c23dab5dd07c260726d79e4baee88778a402e36c82a6b9e6ac757f",
        "walletconflicts" : [
        ],
        "time" : 1452652576,
        "timereceived" : 1453438430
    },
    ...
    snip
    ...
    {
        "involvesWatchonly" : true,
        "account" : "Index Test",
        "address" : "1CTVqQSSVTjun32gRxmhJHhVYzzXpR894z",
        "category" : "receive",
        "amount" : 13.63000000,
        "vout" : 0,
        "confirmations" : 211,
        "blockhash" : "0000000000000000021df02390f30985f34d871e4cc93c4e349cd3b23574bf76",
        "blockindex" : 1,
        "blocktime" : 1430041109,
        "txid" : "64540e42ec96118d11168d954641dd5390f4a46ba795c7b7588d38141e66117a",
        "walletconflicts" : [
        ],
        "time" : 1452652576,
        "timereceived" : 1453438694
    }
]

As you can see, the last transaction to show in the output is the one I grabbed from block 353776, with all of the correct details as displayed on blockchain.info, indicating a successful transaction listing for the imported address (account containing the address, actually).

As for why your rescan didn't work when you initially imported the address, I can't really say. Perhaps a more seasoned Bitcoin user could shed some light on that.

At this point, I recommend you stop your Bitcoin daemon and run bitcoind -rescan and wait for it to do its magic. Afterwards try your listtransactions again. I'm interested in finding out if it works for you.

Keep in mind that attempting to import a Bitcoin address that already exists within your wallet will not initiate a rescan, even if specified to do so on the command line. --- https://bitcoin.org/en/developer-reference#importaddress


c# BitcoinLib: GetRawTransaction verbose=1 does not work I want to find out confirmation number for non-wallet transaction.

When I use
CoinService.DecodeRawTransaction(CoinService.GetRawTransaction("5bc89f4e7f7fe4bd6bd15b439038e2a50a88c158680814164d3428a73a84daef")) I got transaction details, but without confirmations field.

I assume I should use GetRawTransaction("..", 1) but got exception "There was a problem deserializing the response from the wallet".

RPC decoderawtransaction doesn't return a confirmations field so yes, you should use getrawtransaction in its verbose mode instead.

I called BitcoinLib's GetRawTransaction for the tx in question and I got a proper response, as expected:

Please make sure you have BitcoinLib's latest version and that your wallet is synched and indexed.


EstimateSmartFee returning same amount, regardless of conf_target Running 18.0 on Testnet, fully synced at 1541869 blocks.

bitcoin-cli estimatesmartfee 10

{
  "feerate": 0.00001014,
  "blocks": 10
}

bitcoin-cli estimatesmartfee 50

{
  "feerate": 0.00001014,
  "blocks": 50
}

bitcoin-cli estimatesmartfee 1000

{
  "feerate": 0.00001012,
  "blocks": 1000
}

bitcoin-cli getblockchaininfo

  "verificationprogress": 0.9999922066691247,
  "initialblockdownload": false,
  "size_on_disk": 24450857625,

Any ideas? Thanks

This is expected behavior, especially on testnet. The fee estimator will often return the same fee rate estimate for confirmation targets after a certain value because there isn't enough or any data about transactions confirming at those confirmation targets. So it falls back to the highest confirmation target that it can estimate for and uses that for confirmation targets than that.

Also, you are on testnet which does not really have a fee market, and whatever fees it may have are probably bogus. Thus any fee estimates are also bogus.


BIP39 12 words combination list From where I can get bip39 (2048 words) 12 words length possible combinations.

Note: I am not talking about the wordslist of bip39 (2048 words).

From where I can get bip39 ( 2048 words ) 12 words length possible combinations .

There is no such list, because it is simply too large.

From the 2048 words, 12 word mnemonics are 11 words + 1 checksum word. However, the checksum calculation only affects part of the 12th word, so you are still looking at 12 word combinations

This gives you 2048^12, or 5.44451787e39. That is a 40 digit long number. Even if you were able to calculate 1 billion combinations per second, it would take you
1.726*10^24 years to calculate all combinations, or around 1.3 * 10^14 times the current age of the universe.

Of course, adding in the checksum validation would reduce the list size very slightly, but it would still take you several times the age of the universe to generate that list.


Metrics Correlated to "Health" of Bitcoin Node and Network What metrics can I use as indicators of the health of (a) a full bitcoin node I am running and (b) the bitcoin network as a whole.

Some examples I've considered: recency of last block I received on my node is a good indicator of (a) or (b) -- if a long time passes, I have an indication that either my node or the network is not in a good state.  The number of full nodes (N) participating in the network is a good measure of (b).  N is difficult to measure but the folks here are taking a good run at it: https://getaddr.bitnodes.io/

What other metrics should I look at on my nodes or on broader level across the network, to gauge the health of my nodes and the network?

Due to the way the system operates it's actually a fairly difficult job deriving metrics of health.

Measuring the time since last block is very tricky as a measure of health or connectivity to the network. Block times follow a poisson distribution, you might only see two blocks in a 3 hour period and that would be completely acceptable behavior (though slightly unlikely) and not at all indicative of a problem.

In the other direction the July 2015 incident had over 50% of the global hashrate ended up mining an invalid chain for over an hour. Normally this might eventually indicate that you had been left behind on an invalid chain and action might need to be taken, where in this situation seeing a low hashrate meant that you were on the valid side of things.
Comparing your block height to other websites is pretty unreliable as well, if block explorer websites were an authority on which blocks were value then during the July 2015 event the network would have broken completely. During this event many followed the completely invalid chain and displayed this information for hours or days before being patched. Block explorer services are frequently incorrect, out of date, or simply unavailable for for phone a friend assurance of the correct chain.
The number of nodes is tangentially related to the health of the network, this measure has high latency and is extremely easily fooled by even the most basic of attackers. If you use this as a measure of health it could be pushed way up into the stratosphere by a bored criminal with a botnet, and it would be extremely hard to detect an attack like this happening over large time span. If anything the outlook right now based on this measure would be "extremely poor", with under 5500 nodes exposing listening ports on the public internet.

Statistical projects like Statoshi attempt to quantify node performance and other metrics, though many require deep knowledge of the software to make any sense of and don't give much measure of the network as a whole. Simpler projects like Shorenas network monitor give more general statistics about operation, bandwidth, and connections to the network. The aforementioned Bitnodes project has a limited reach (not all networks are crawled, the data has been inaccurate at times), but gives a general idea of the number of listening sockets available to the wider internet.

It's a lot harder of a task than one might imagine setting out, and no real clear answer.


Online Mining Calculators using prebuilt machines data I've read many comments that mining is not profitable, or barely.

Using the machines' data at Hardware Comparison in online mining calculators do show some with good profits. Am I missing something or misunderstanding the data? I only used the Mhash/s, watts, and price.

The problem is that the difficulty rating is going up, and going up significantly.  This happens for two reasons.  First, the number of mining rigs increases as people try to get involved with Bitcoin mining.  Second, ASIC-based miners which can run over 60GH/s using around 600W are just arriving in the market and once more generally available will cause a big leap in the difficulty.


Strange values in Bitcon Electrum wallet file (change and receiving) I am performing a forensics analysis of a Bitcoin Electrum wallet. When I open the file manually, there are values like this (changed it a bit):

"accounts": {
    "0": {
        "change": [
            "039de61d6f91d6e419641ef61d5df1f65d1fddddfd6fd1e84fe6fd1f1d6dfb5958",
            "02f2ffe6f8d6df5df6e84f684fdf5416d1f6e8ef4964ffd3f3dfdfefe46f1d1f56",
            "037bf6d541df651df3513df1d3f1d35fe6f4e6f4d5fd65fe65f1d3f1d3f1dea996",
            "0266e5f1d651df6d1f6df1dfff6df51d65f1d65f1d6f46ef4ef65f1eff65e1fd3f",
            "02651e65e1e1d1d6e1e5e1e6e6e6e6e65e1e1d31fd3f1d35df13d1f3d5fe216e71",
            "036ef6d1f351d3f131df3df13d51f1d351fd35135151111131df35d1f3df13dcc2"
        ],
        "receiving": [
            "03f6d41f6d51d31df3fe13f1d3521fd35fe5131ff1f11f133fd31fd35d1fd3f639",
            "026e61fd6df1fd6fd6f16d1fdc6c1d6f1d6f1e61f8d4d6c1d65f6df1df1d3f5e14",
            "03ef1dsdgsdgsg6f1d6d1c6d51fd651fed1c63d13fd13f1d32f1d3f31db5e8286a",

...

I thought that these should be just addresses, but obviously they are not. It gets even stranger when I import the file into Electrum - it then automatically changes these values to addresses (in the file too). I don't think, that it's something like a private key - it's 66 chars long. Even if - when imported, Electrum still asks me for it.
What does this all mean and how do I get information about transactions/addresses/amounts?

The fields you are seeing are raw ECDSA public keys.


Creating MultiSig from server I want to create a MultiSig address where user A sends the public key of its bitcoin address (gets saved in the database). User B gets notified that he must send his public key to create the 2-3 MultiSig address. The third address is provided by me as a mediator. My concern is that if the server is hacked, the hacker can change my source code (PHP) so that 2 of 3 public keys are in his possession. Any ideas on how I can secure this 2-3 MultiSig address creation scenario?

I think your worry is that the hacker will change the public key in the database to be the public key for one of their addresses, and get access to the private key that you own, which means they will have the ability to make 2/3 signatures, which is all that they need.

This will only be a risk if you can't detect it and alert those who are funding the addresses to stop. As Matthieu said, the signatures on the old multisig address won't be valid anymore. If your service is queried for an address to send coins to, however, and it returns the new maliciously created address, then your users might be funding an address which can be spent by the hacker.

So, I think your best bet would be to make sure that you can put your service into safe-mode if someone has hacked in.


How does Litecoin compare to Bitcoin? How does Litecoin compare to Bitcoin and what are the differences?

I heard Litecoin is more advanced technology. Is that true?

Litecoin was created as a fork of the Bitcoin Core client in 2011. There were some initial differences: a maximum of 84 million coins (21 million Bitcoins), 2.5 minute block times (10 minute Bitcoin block times) and a different proof-of-work algorithm (Scrypt replacing Bitcoin's SHA256). It is arguable whether this made Litecoin "more advanced" than Bitcoin. Most of the subsequent Litecoin development merely merged updates to Bitcoin Core into its codebase. However, in April 2017 Litecoin activated SegWit that had not been activated into Bitcoin despite being coded and announced by Bitcoin Core developers. This resulted in Litecoin being a more attractive testbed for second layer technologies such as Lightning. There are multiple efforts to activate SegWit on Bitcoin in the next few months (UASF, SegWit2x). Until that happens there is a stronger argument that Litecoin has "more advanced" technology.


How isn't blockchain fundamentally broken? This question is a good 3 to 5 years late on the crypto trend but nevertheless I'm still having trouble to understand.
The chain works by verifying every previous block, right? How does this not become an exponential problem?
Say I want to join the network and start a node, I have to fetch the entire block chain which:

Can grow to unlimited size?
I have to verify, by checking every block of theoretically unlimited count?

I do believe the crypto currency can not grow as it does by having such fundamental flaws, but I seem to not be able to find the solutions to them.

The chain works by verifying every previous block, right? How does this not become an exponential problem?

I think you are assuming Blockchain growth is exponential with time, but it is linear with time (1MB / 10 min).

I have to verify, by checking every block of theoretically unlimited count?

In an extreme scenario, you are right. In the year 3000, we will have ~100 TBs to download and verify and it will keep on increasing ever after. But it's not as bad as it sounds like.

The rate of growth is low: Because it grows linearly with time, at a given time you will always have a finite amount of data to download and verify. As others have mentioned, there are solutions like SPV and node pruning in order to avoid full storage. If you want to run a full node with entire blockchain stored locally, this rate of increase 1MB/10min is considered small relative to the rate of growth of technology.

Increased efficiencies of node resource utilization: A lot of effort goes into managing the node resources to optimize network bandwidth, disk block compression, verification speed in order to mitigate to downfalls of ever-increasing blockchain size. In fact, if you look at the historical bitcoin-core Initial Block Download times, you will find these times have kept the same or improved over time despite the increasing blockchain size.


How to restore a backup made when using the big 20 Gigabyte Core Wallet to current MultiBit wallet? Been running an s3 with slush's pool for a month or so and accumulated maybe 20% of a Bitcoin. I started out using the gigantic Bitcoin Core Wallet because when I first learned about Bitcoin a couple months ago I had these big ideas about solo mining and a 25 Bitcoin chunk breaking off for me. Those were exciting days! Of course now I know I completely missed the boat on those days but I changed computers and do not want to download the core again. As soon as Slush's made a payout to me I backed it up to DropBox so I have that backup file but it isn't as easy as clicking a button in my new MultiBit wallet to recover my little piece of a bitcoin, Please Help! I'm going make a profile on here as soon as I post this question. I'll try to get username: Mickey-Mouse-Blacksmith

First of all it is extremely dangerous to back-up your wallet to Dropbox or any other cloud based file service. You might find that if you do recover your wallet, it may have no more funds in it, but I'm hoping that you encrypted your wallet before backing it up to Dropbox and you can remember the passphrase.

Secondly, running vanilla bitcoind is not a mining version of bitcoin, by default, so I am assuming that you know what you are doing, although it might have cost you a considerable amount to run that on amazon.

Assuming that you haven't been unlucky or naive, you cannot directly recover your wallet to Multibit, the wallet file formats are not compatible but in any case this is not what you should be doing. The simplest way is to make a payment from your running bitcoind wallet to a new address in Multibit.

It actually surprises me just how many people don't understand this.


trouble with bitcoin cli regtest These are the commands I'm running after building a clean ubuntu docker image with all the dependencies:

./src/bitcoin-cli -regtest &

It yields the error:

error: too few parameters (need at least command)

Next I ran:

./src/bitcoin-cli -regtest -daemon

which resulted in:

error: too few parameters (need at least command)

finally:

./src/bitcoin-cli -regtest 101 &

yields:

error: Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file (/root/.bitcoin/bitcoin.conf)

These commands have been taken from the following resource:

https://bitcoin.org/en/developer-examples#regtest-mode

There's a question here, and a corresponding answer that provides a script to start regtest, is that a good solution?

Next step

so I ran first:

bitcoind -regtest -daemon

and I got the output:

Bitcoin server starting

then I tried:

bitcoin-cli -regtest getinfo

which resulted in:

error: Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file (/root/.bitcoin/bitcoin.conf)

these commands also generated the same output as above:

./src/bitcoin-cli -regtest help
./src/bitcoin-cli -regtest 101

so I've created the following file:

vim /root/.bitcoin/bitcoin.conf

it's literally just this:

rpcpassword=123

*also tried with this:

server=1
rpcuser=root
rpcpassword=password
rpcconnect=127.0.0.1
rpcport=8332

and now issued the command:

bitcoin-cli -regtest getinfo

which resulted in the following:

error: couldn't connect to server: unknown (code -1)
(make sure server is running and you are connecting to the correct RPC port)

It seems you're mixing up bitcoind and bitcoin-cli.

bitcoind is the Bitcoin Core daemon. It must be running first before you can do anything. bitcoin-cli is a tool to send RPC commands to a running bitcoind instance.

From the linked documentation page:

  bitcoind -regtest -daemon

No need to put a & after the command if you run with -daemon.

Once bitcoind is running, you can for example send the getinfo command using bitcoin-cli:

  bitcoin-cli -regtest getinfo

Or send generate 101 to generate 101 blocks:

  bitcoin-cli -regtest generate 101

To learn about other commands you can send:

  bitcoin-cli -regtest help

That way you could for example learn about the ping command. To learn more about that, you can send:

  bitcoin-cli -regtest help ping

You need to specify -regtest for every command, as you can have a daemon running for each network (one for mainnet, one for testnet, one for regtest), or more if you configure each to run in separate directories and network ports.

Note that bitcoin-cli is just a program that speaks JSON-RPC (which is a standardized protocol), albeit somewhat specialized for use with bitcoind. You can connect to bitcoind using any JSON-RPC client (for which libraries exist in all popular languages). To do so, you'll need to configure a username/password for connecting to bitcoind.

To explain what you are seeing:

./src/bitcoin-cli -regtest & won't work as bitcoind is not yet running, and you aren't specifying a command to send.
./src/bitcoin-cli -regtest -daemon likewise.
./src/bitcoin-cli -regtest 101 & looks almost right, except you missed the generate, so you're trying to send the non-existing command 101 to a daemon that is not yet running.


Bitcoin client two-way communication When client A opens a connection to client B, it opens its TCP connection to second client's port 8333. Is this connection solely used for A's queries and B's answers to A's query, or can B also query A using the same connection?

For example, A can ask B for list of known peers using this connection, but can B ask A for the same using the connection A established, or does B need to open a new connection to A's port 8333, exchange version messages, and only then send its queries?

Once the connection is established, the communication is completely symmetric-- either end can ask the other anything.


Difficulty to Hash Validation Correlation In the validation of a block it is said that a miner has a valid block if the transactions can be tracked in the chain and the hash of the block header is less than the difficulty. I am having a hard time seeing the relationship in real world blocks that are being solved.

For Example from Block#496785 :

Difficulty("target") = 1,347,001,430,558.57
or in hex
000000000000000000000000000000000000000000000000000001399F8AB21E

Mined Hash = 000000000000000000cf3620d570d08d1799a1cafbbfae512fdba2124665eca0

so it seems to me the hash is now greater than the difficulty so an invalid block but this is obviously not the case.

I have heard also that the difficulty is related to the number of leading zeros after the maximum target in which case may make sense where 1399F8AB21E is a 11 byte number and the hash after the default 8 byte leading target contains 10 bytes which is less than the difficulty 11 bytes of zeros.

so

00000000 0000000000 cf3620d570d08d1799a1cafbbfae512fdba2124665eca0
8 bytes  difficulty             some value

Is this correct? How does this work?

Difficulty is not the same as target hash (target in short).

They are inversely related, so minimal possible difficulty (of 1) gives maximal target, by definition given as (https://en.bitcoin.it/wiki/Target):

  0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

  Because Bitcoin stores the target as a floating-point type, this is
  truncated:

  0x00000000FFFF0000000000000000000000000000000000000000000000000000

The current difficulty is calculated as maximal target divided by the current target. For example (https://en.bitcoin.it/wiki/Difficulty):

  0x00000000FFFF0000000000000000000000000000000000000000000000000000 /
  0x00000000000404CB000000000000000000000000000000000000000000000000
  = 16307.420938523983

So in your example the Difficulty = 1,347,001,430,558.57 would give the current target of:

  current_target =
  0x00000000FFFF0000000000000000000000000000000000000000000000000000 /
  1,347,001,430,558.57

If you calculate this (take care as one number is hexadecimal and other decimal), the comparison should give that this current_target is higher than the mined hash of:

  0x000000000000000000cf3620d570d08d1799a1cafbbfae512fdba2124665eca0

EDIT: Pen and paper calculation gives me that the current target is around:

  0x000000000000000000FFFF000000000000000000000000000000000000000000

How I got this. 1,347,001,430,558.57 is around 1.225 * (16^10). As the target is in base 16, this means that dividing by 1 * (16^10) is like shifting the digits 10 places to the right. To get precise result after digits shifting I should divide by 1.225, but I ignored this in this pen and paper calculation.

EDIT2: To be even more precise I take 16/1.225 is around 13 (D in hex), so the target is around:

  0x000000000000000000D000000000000000000000000000000000000000000000


Bitcoin transaction unconfirmed for 7 days I am new to Bitcoin (using Bitcoin core client) and I ticked the check box that said something like "send with 0 fee when possible". My transaction has been stuck in the unconfirmed status for 7 days and I don't know how to recall it to set a transaction fee. I searched Google and everything but they were guides for other Bitcoin clients and I'm scared of messing up and losing my coins. Can someone give a clear step by step on how to recall and add a transaction fee?

This is my transaction https://blockchain.info/address/19JL8rn56ZWGgqHibB4U11xqvc9pqdrykb

After some time the network nodes will simply drop the transaction from memory. See here


Unable to recovery old btc address Yesterday someone transfer by accident some btc to my old address not used since 6 months. I knew i deleted all this, but last spent hour I was able to find my walltet. So I installed bitcoin core, few months before it looked different but ok, and replaced my walltet.dat , then when I launch it, it says : scanning, and then it starts but there is no any receiving address, can I somehow restore it ?

Unless you have your private key, you will not be able to access that address.


what is the source of bitcoin for trading site like koinexcoinbase/etc...? I understand sites like koinex/coinbase/etc.. credit bit coins when we try to buy bitcoins from them.

How do they (koinex/coinbase/etc..) get bitcoins to give it to users when they buy? are they doing mining and getting coins? or do they buy bitcoins from somebody who is mining ?

No, simply they sell and buy bitcoins. I sell them my bitcoins and you buy from them these bitcoins.


What internet data usage can I expect when mining in pools? I plan to connect my ordinary PC to a pool such as NiceHash or CKPool's solo pools and join the 'lottery'. I can run a few hundred Mhs; I know it's low, but that's why it's called lottery...

Before I commence my mining expedition, I would like to know what data usage I can expect, say by running it for 12 hours.

The research I have done on the topic only points to the fact that it is "not much" but given that data costs in South Africa is among the highest in the world, "not much" has a different meaning to us.

The way I understand these solo pools work is that they pre-package the blocks, send it to me and I start hashing. Given the maximum size of 1MB per and for argument's sake they push a new block to me every 5 minutes, that would be ~150MB in 12 hours, which is more than reasonable.

Is there something wrong with my reasoning? If we start to look at 500MB and above per day, that would start to infringe on our personal usage of the data.

No, it's much less than you think. If you look at the Stratum protocol, you'll see that the pool server doesn't send you the full list of transactions of a block, but just their hash (in a merkle-tree fashion). So, each new block that they'll send you is only a few hundred bytes, every ten minutes or so.

Your miner will likely report shares, but this should be infrequent (once every few seconds at worst), and this is a few dozens of bytes.

All-in-all, you should be looking at less than 100kbyte / hour.

PS : you can join the lottery or... you can mine for science at the 3SUM pool (disclosure: I'm its author).


P2PKH - Sharing a wallet address does not reveal my pub key? Is it technically correct to say that if I share my address with the network, nobody has access to my pubkey still?

But if I share a valid signature to a P2PKH UTXO, someone can derive my pubkey and consequently spend my UTXO?

Is it technically correct to say that if I share my address with the
  network, nobody has access to my pubkey still?

Yes, if your address is a standard address, then deriving the public key from an address is practically impossible (because it is hashed). But as soon as a transaction is made which spends funds sent to that address, then the public key is in the signature of the spending tx.

A P2PKH transaction contains:

scriptPubKey: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
scriptSig: <sig> <pubKey>

So, once a P2PKH UTXO is spent, one can simply look at the script sig for the pubKey.

This is because in order to verify transaction signatures, nodes need the corresponding public key. For this reason, sometimes users will use different addresses for each transaction to help ensure more privacy.


How to watch lots of wallet addresses for new bitcoin transactions? I need to watch many wallet addresses for new bitcoin transactions as they enter new blocks. I also need this transaction data to make updates on my end

What are my options?

Here are a couple strategies I've used:

Run a bitcoin node: bitcoind has a -blocknotify flag you can run that will allow you to execute a command with each new block. You can then use JSON-RPC to query your node for all transactions/addresses in the block. It will take a bit of work to set this up, but it will work

Use a service: I've used https://www.blockcypher.com/ which works well, but it can be pricey. https://blockchainwebhooks.com is much more affordable, but not as many features.

Hope this helps! Let me know if you have any questions


Replace-by-fee issue Ok so i recieved a 50$ transaction and it was on my account ( the bottom transaction) and 2 days later i have 0 $ on account and all funds from that transaction apparently got replaced by fee, am i gonna get it back eventually or , what does this mean,  i tried googling it but language barrier is kinda messing up things for me

'Replace By Fee' (RBF) is a method of increasing the fee rate for a yet-unconfirmed transaction. As a user, if you send a transaction and then realize the fee-rate was set to low, you can utilize RBF to create a replacement transaction which includes a larger fee, in the hopes of quicker confirmation.

In this case, it looks like there was an RBF-enabled transaction that paid those funds to the 18dC... address mentioned in your screenshot. This transaction would otherwise be a normal bitcoin transaction, that just has the 'RBF flag' enabled so that it can be replaced if the user so desires.

If you did not create this transaction, then you should consider the fact that the machine your bitcoin wallet is running on is infected with some sort of malware. Without more info, its not really possible to say for certain what happened here though.


Trying to setup my own pool and having problems connecting to my server So I've setup my own Pushpool server, and now I'm trying to connect using GUIMiner

The server is up and running, this is what my terminal says:

sbin/pushpoold -E -F
[2013-04-19 20:33:5.395392] Listening on host :: port 8336
[2013-04-19 20:33:5.395592] Listening on host :: port 8337
[2013-04-19 20:33:5.395792] initialized

and on the GUIminer I connect with

Host: http://localhost
Port: 8336
Username: username (what I have set in SQLite3)
Password: password

But then when I start mining my console says this

2013-04-18 14:40:53: Running command: poclbm.exe username:password@http://localhost:8336 --device=0 --platform=0 --verbose -r1
2013-04-18 14:40:53: Listener for "Default" started
2013-04-18 14:40:54: Listener for "Default": 18/04/2013 14:40:54,  need more than 1 value to unpack
2013-04-18 14:40:56: Listener for "Default": WARNING: ADL missing (no AMD platform?), temperature control is disabled
2013-04-18 14:40:56: Listener for "Default": At least one server is required
2013-04-18 14:40:56: Listener for "Default": Traceback (most recent call last):
2013-04-18 14:40:56: Listener for "Default": File "Switch.pyo", line 45, in __init__
2013-04-18 14:40:56: Listener for "Default": File "Switch.pyo", line 60, in parse_server
2013-04-18 14:40:56: Listener for "Default": ValueError: need more than 1 value to unpack
2013-04-18 14:40:57: Listener for "Default" shutting down

Anybody here have any idea on how to fix this? Thanks.

You're adding the server the wrong way. The way you note the server's address isn't valid URI syntax.

Bad :

username:password@http://localhost:8336

Good :

http://username:password@localhost:8336


Fingerprinting Bitcoin client, from public information Given a handful of transactions from a single individual, are there any techniques to try to infer/deduce what client the individual was using?  In other words, do any commonly used clients leave a "fingerprint" that can be used to recognize which client was used, based on the information in the public blockchain?

For instance, maybe some clients have a recognizable pattern of how they make change, or which script code they use for transactions, or have some pattern regarding which of the addresses in the output list are for change, or have some pattern in the transaction amounts or the random numbers used in the transaction?  I'm just brainstorming examples -- don't take these too seriously.

So, are there any fingerprints that are left in the blockchain that might reveal which client I'm using?  Even probabilistic attacks ("there's an 80% chance you're using client C") are relevant.

Disclaimer: I should probably add this as a comment because it doesn't answer the question, and just gives a one pointer. I can't add comments yet

The OpenBitcoinPrivacyProject is constantly working to gather as much information of new types of attacks on privacy.

You can search in their github page how do they test for wallet privacy.

https://github.com/OpenBitcoinPrivacyProject/wallet-ratings/blob/master/report-02/threat%20model.wiki

I think this pointer is relevant because one of their tests try to detect just what you are looking for.

  A blockchain observer can derive the type of wallet used to create a
  transaction by observing idiosyncrasies in the manner in which the
  transaction was composed.


Is one blockchain of one exchange place the same blockchain used in other exchange places? Sorry if the title is confusing, here is what I mean.
I recently threw some fiats in Kraken and invested in Bitcoin, the first interrogation I had was "Can I see my transaction publicly on the internet if I could find the right block used for it?".
But on a large scale this interrogation translates to "Is each exchange platform implementing their own clone of the Bitcoin specs or is there a general blockchain that rules the entire decentralised financial system?"

As long as your Bitcoins are in Kraken and you haven't withdrawn them, then the Bitcoins aren't actually recorded on the blockchain -- Kraken just has a line in their database saying they owe you a certain number of Bitcoins. You wouldn't find this on the blockchain until you actually initiate a withdrawal of your Bitcoins from Kraken.
Every Bitcoin exchange, and every Bitcoin user in the world, when they do publish to the Bitcoin blockchain, publish to the same blockchain though.


Partially sign a transaction with coinb.in I'm trying to generate a 2-of-2 multisig address:

pubkey1 and privkey1 on coinb.in
pubkey2 and privkey2 a bitcoin core client
I use createmultisig 2 '''["<pubkey1>", "<pubkey2>']''' on the core to generate the 2-of-2 multisig address.

.

{
  "address": "38RmRDRp4YedPXdh9Vu82akPRtXwvsPeRp",
  "redeemScript": "5221020150ce6954f0cdcc2c5d57cf249f25eab0eed23e39549c4f06bcb42a37f308ce2102224aca2849ddad9c663c0bcfdac5ce3ca06f784ac8eca83404a4ea4ac61dbe7d52ae"
}

I transferred 0.00001BTC to that address in txid 20615db3dcda53ab1e780bb9f2c417c5ad2acfbd475d168b205caba3db401f1a  and my goal is to spend this amount from the multisig address:

I created a raw transaction on the bitcoincore:

.

createrawtransaction '''[{ "txid": "20615db3dcda53ab1e780bb9f2c417c5ad2acfbd475d168b205caba3db401f1a", "vout": 1 }]''' '''{ "1BT8tmV9Exfrx7FUjNvLQaUBgpZJaHyXMT": 0.00000900  }'''

I attempt to sign this transaction on coinb.in with privkey2:

I attempt to sign the second transaction on the core:

.

signrawtransaction "01000000011a1f40dba3ab5c208b165d47bdcf2aadc517c4f2b90b781eab53dadcb35d6120010000006b483045022100d4367946074622b6e22a936adbded609fba5d2501c603b630d3e2edadcb5bcc402203ac6693fbf2ac7ac4d4234ef19be348b6511a0fcdf5991cb26ac2b695876534c0121020150ce6954f0cdcc2c5d57cf249f25eab0eed23e39549c4f06bcb42a37f308ceffffffff0184030000000000001976a91472a2a94468e42593656cc9803c7a48c1863fc3e588ac00000000"
'''[
     {
       "txid": "20615db3dcda53ab1e780bb9f2c417c5ad2acfbd475d168b205caba3db401f1a",
       "vout": 1,
       "scriptPubKey": "a91449e688475c78033674b8a645f4339fe41366251587",
       "redeemScript": "5221020150ce6954f0cdcc2c5d57cf249f25eab0eed23e39549c4f06bcb42a37f308ce2102224aca2849ddad9c663c0bcfdac5ce3ca06f784ac8eca83404a4ea4ac61dbe7d52ae"}
]'''
'''["privkey2"]'''

Output

{
  "hex": "01000000011a1f40dba3ab5c208b165d47bdcf2aadc517c4f2b90b781eab53dadcb35d6120010000009200473044022015ededd076573807b25a4e7facef5ad132683d54ffde8d28c1dbcab4be8e852e02204a063aec61cf6e1eee4825b9f19566a06f87db02913b283f9281a133127002030100475221020150ce6954f0cdcc2c5d57cf249f25eab0eed23e39549c4f06bcb42a37f308ce2102224aca2849ddad9c663c0bcfdac5ce3ca06f784ac8eca83404a4ea4ac61dbe7d52aeffffffff0184030000000000001976a91472a2a94468e42593656cc9803c7a48c1863fc3e588ac00000000",
  "complete": false,
  "errors": [
    {
      "txid": "20615db3dcda53ab1e780bb9f2c417c5ad2acfbd475d168b205caba3db401f1a",
      "vout": 1,
      "scriptSig": "00473044022015ededd076573807b25a4e7facef5ad132683d54ffde8d28c1dbcab4be8e852e02204a063aec61cf6e1eee4825b9f19566a06f87db02913b283f9281a133127002030100475221020150ce6954f0cdcc2c5d57cf249f25eab0eed23e39549c4f06bcb42a37f308ce2102224aca2849ddad9c663c0bcfdac5ce3ca06f784ac8eca83404a4ea4ac61dbe7d52ae",
      "sequence": 4294967295,
      "error": "Script evaluated without error but finished with a false/empty top stack element"
    }
  ]
}

What am I doing wrong? Unfortunately I can't specify the pubkeyscript or redeemscrit to coinb.in, so could this be the reason why the signatures are not validating?

Note: I can sign the transaction successfully on bitcoin core when I specify both private keys in the command.

Well, I managed to solve this issue by manually modifying the transaction in javascript before calling coinbin's sign method. I've filed an issue with details here. This is how I ended up solving the issue in Javascript (this is kind of a hack, I just specify the same redeemScript for each input, which works for my specific usecase):

var rawtx2 = "01000000021a1f40dba3ab5c208b165d47bdcf2aadc517c4f2b90b781eab53dadcb35d61200100000000ffffffff05ec447a886d8711db0d5f4cbf1f61956cf227c82c5594ee195bb179e86faa910100000000ffffffff0138c70000000000001976a91472a2a94468e42593656cc9803c7a48c1863fc3e588ac00000000";

(function partialSignMultisig(window) {
    var coinjs = window.coinjs;
    var wifkey = "<WIFKEYHERE>";
    var script = rawtx2;
    var redeemScript = "5221020150ce6954f0cdcc2c5d57cf249f25eab0eed23e39549c4f06bcb42a37f308ce2102224aca2849ddad9c663c0bcfdac5ce3ca06f784ac8eca83404a4ea4ac61dbe7d52ae";

    var tx = coinjs.transaction();
    var t = tx.deserialize(script);

        // Manually specify scripts for inputs ..
    for (var i = 0; i < t.ins.length; i++) {
        t.ins[i].script = coinjs.script(redeemScript);
    }

    var signed = t.sign(wifkey);
    console.log( signed );

})(window);


Missing Bitcoin Transaction Earlier this month I requested 2 payouts from BTCGuild for .25 each.

Neither one ever showed up in my wallet, and I just figured I messed up somehow and lost it.  But today I started sniffing around after requesting another payout (which I have received) and found this:

With the "Request Payment" button, is this still something I can retrieve?
And if so, how do I do it?
Thanks in advance for any and all info, good or bad.  Either way it will be a lesson learned.

"Request Payment" is just a nifty little tool that generates a QR code that points to the address on the page, so it won't help you unless you want a QR code for the address.

Check to see if the address you've sent to is in a wallet you own. If you have lost the private keys to the address, the only thing you can do is try to find them. It's nearly impossible to regain control of addresses you've lost or forgotten.


Where can I see the code of how the UTXO set is updated in case of a fork in Bitcoin Core? I am looking for a filename and a line, or multiple ones if necessary. My goal is to maintain an index of addresses to UTXOs.

In the case of a fork, you have to Disconnect the blocks that are on the losing side of the fork, and then Connect the blocks on the winning side of the fork, in order. If you look at the CCoinsViewCache input into the function, you can see how the UTXO set is updated.

Essentially, though, you have to reverse the effects of all of the transactions in the losing blocks and apply the effects of the transactions in the new blocks. Reversing means processing inputs to mark STXOs as UTXOs and removing UTXOs created in the block. Processing new transactions into the UTXO set means, in addition to verifying the transactions are valid, you mark UTXOs spent by the inputs of transactions as STXOs (or remove them, depending on how your system works), and you create new UTXOs for the outputs in the block.

Keep in mind that you have apply these processes for each transaction in the block in order (or reverse order if Disconnecting a block), because transaction B can spend from outputs created in transaction A, where A & B are in the same block.

  My goal is to maintain an index of addresses to UTXOs.

If I were you, I would keep an index of the scriptPubKey and then convert an address to the scriptPubKey you need when you need to do a lookup.


How to generate transaction history from all addresses that are part of common xpub/ypub without having the xpub/ypub? I have 20 addresses generated  which are part of a common xpub/ypub. I want to create a combined transaction history of all addresses similar to that of how trezor has the export CSV function. I understand that trezor generates it from the xpub, but in my case I have the addresses but not the xpub.

Create a watch-only wallet in bitcoin core

Add the addresses using importaddress or importmulti. I imported one address for testing: importaddres tb1qpax3dzmat0qffp3pgkmnmue4tps0xglru65crt "test1" false

Rescan blockchain. I did rescanblockchain 1810000 1896271 for testing

List Transactions for the addresses.

I get the below results:

[
  {
    "involvesWatchonly": true,
    "address": "tb1qpax3dzmat0qffp3pgkmnmue4tps0xglru65crt",
    "category": "receive",
    "amount": 0.01200000,
    "label": "test1",
    "vout": 1,
    "confirmations": 57879,
    "blockhash": "000000006ff7a6de9ddedfa8f3dec502e0740b4e19bf9d60091711f442a383fd",
    "blockheight": 1838397,
    "blockindex": 16,
    "blocktime": 1602028580,
    "txid": "98fe1985b800b87a5196c2d1d01980a9930532b0f9b8c5488bfde273cf9b1b01",
    "walletconflicts": [
    ],
    "time": 1602028580,
    "timereceived": 1607228610,
    "bip125-replaceable": "no"
  },
  {
    "involvesWatchonly": true,
    "address": "tb1qj5q83vcsldetj6krhv0jgwexff2vj6xfmd8az6",
    "category": "send",
    "amount": -0.01000000,
    "vout": 1,
    "fee": -0.00000282,
    "confirmations": 4,
    "blockhash": "0000000097539dce940bacac2da89704645862ab878bbb1aa832d5fd3b65c91f",
    "blockheight": 1896272,
    "blockindex": 69,
    "blocktime": 1607229053,
    "txid": "06ff26b56ac6636326cb2f25b6434243a755e2fd2574808271a88ca23fc05b54",
    "walletconflicts": [
    ],
    "time": 1607228776,
    "timereceived": 1607228776,
    "bip125-replaceable": "no",
    "abandoned": false
  },
  {
    "involvesWatchonly": true,
    "address": "tb1qjd4cnkp0zz4dhl2383tugl54dd9eryteya7yjv",
    "category": "send",
    "amount": -0.00199718,
    "vout": 0,
    "fee": -0.00000282,
    "confirmations": 4,
    "blockhash": "0000000097539dce940bacac2da89704645862ab878bbb1aa832d5fd3b65c91f",
    "blockheight": 1896272,
    "blockindex": 69,
    "blocktime": 1607229053,
    "txid": "06ff26b56ac6636326cb2f25b6434243a755e2fd2574808271a88ca23fc05b54",
    "walletconflicts": [
    ],
    "time": 1607228776,
    "timereceived": 1607228776,
    "bip125-replaceable": "no",
    "abandoned": false
  }
]

Results are in JSON format according to my understanding, you can convert them to CSV using one of the available options depending on OS or programming language you prefer to use. Related question: https://unix.stackexchange.com/questions/507615/parse-json-data-using-jq-and-convert-into-csv


My BTC was stolen using my Blockchain pairing code I was having a issue with my blockchain account, so I searched for help on Facebook. Then I got a message from some obviously not related to Blockchain (I didn't know this at the time) but acted as their support team and wanting to help resolve my issue. This person requested my blockchain pairing code so he could fix the problem. After providing it to him, all my BTC was sent out of my account. How did he access my account with just my pairing code?

Blockchain.info pairing code allows you to sync wallets. For example, it's for when you have coins on your phone and you want to be able to spend them from your computer. So, they synced their wallet with your account, including the private keys, and stole your coins.

From their website:

  As with your wallet ID, you should never share your pairing code with anyone. The pairing code grants full access to your wallet and its funds. It should be used only by you, when you want to access your wallet on your mobile device.


Multibit transactions unconformed since august. Where is my money? I heard last summer that Multibit wouldn't be supported any more. So I set up a Blockchain-wallet account and tried to receive the btc to my Blockchainwallet.

4 transactions seem to be stuck somewhere. 2 are unconfirmed and seen by 26 peers and 2 others are also unconfirmed and seen by 21 peers. I've also tried one of those accelerators but apart from increasing it with one seen peer its helping me not at all.

Back in august I googled a bit about this and saw in similar discussions people advising to just 'wait it out'. However, we're december now and my BTC still seem stuck. I'm getting a bit nervous now.

1) What should I do to either get the transaction done or get my btc returned?

2) I have other BTC in my multibit wallet left: how do I move them to blockchain wallet?

Probably it's due to a low fee. If you see the TX in blockchain.info or similar, you can view the satoshis per byte you paid for fee. Today (12Dec17), it's recommended to pay at least 100 satoshis per byte.

To try to fix your problem, you can reset multibit by clicking on Tools > Reset Blockchain and transactions, and wait to re-sync, as seen here

Hope it helps you


How to reclaim unclaimed Bitcoins sent via Blockchain.info to Facebook/Email friends? The FAQ says

What happens if the transaction is not claimed?

The private key the funds were sent to is saved in the senders archived addresses. The sender can reclaim the amount at anytime by sweeping that address, it's up to you how long you wait for the amount to be claimed. The address will be labeled "username (Sent Via XX)"

How is this done specifically?

Under Receive Money, Archived, find the address in question ("username (Sent Via XX"). Click this button to bring it back to active addresses:

Under Send Money, Custom, send all the money from that address to another address in your wallet. You can now archive the address again.


When did merged Namecoin-Bitcoin mining start? (This question was originally asked before merged mining began)

When exactly did merged mining of Bitcoin and Namecoin chains start?

The switch to merged mining is scheduled for Namecoin block 19200.  At the time of this writing, the Namecoin network is on block 18805, so 395 more blocks need to be solved.

The last 29 blocks on the Namecoin block explorer were solved in an average of 108.79 minutes each.  Extrapolating from this, 395 blocks should be solved in just under 30 days, so sometime around September 29th.


is there a litecoin wallet website that does NOT store your private key serverside? blockchain.info encrypts and hashes everything clientside, as well as doing all of the signing of transactions clientside. It only sends already encrypted and signed data to the server, where the server then plugs that data into their RPC to transmit it to the network.

Does a service like this exist for Litecoin or another scrypt based alt-coin?

Not at the moment. The quickest way to set one up would probably be to work with coinpunk or fork their code and get it working for Litecoin.


At which point and how does the miner who successfully solved hash get coins? When miner creates a valid block he broadcasts that to the network.

It can happen that someone else did the same. So we have half nodes think that chain+A is correct, and other half that it is chain+B. This gets resolved when next block is solved.

When are the coins given to the miner, or are they given to both miners?
How do the coins get sent to the miner?
Does the solved block contain the identity (public address) of the solver so the protocol can send him money?
https://en.bitcoin.it/wiki/Block_hashing_algorithm - can't find that address here

EDIT: Now it seems to me that both are rewarded, each inside his respective fork. Something like the reward transaction is put inside that chain-head. When one fork wins the respective reward stays as valid and the other fork is dropped by community. Am I correct?

The block subsidy isn't awarded by anyone. It is taken by the miner, by virtue of creating a block that gives himself money.

The system's role in this is restricted to permitting blocks to indeed contain such an (otherwise unbalanced) payment.

If you have a fork with two branches, then within each branch there will be a payment to some miner. Which one is eventually treated as valuable by the world depends on which of the two gets built on. As far as the system is concerned, there are two possible versions of history, and both are valid. In one of them A gets paid, in the other one B gets paid. At some point, one of the two chains gets longer, and everyone switches to accepting that one.

In order to avoid random forks for flipflopping people's balancea (if they got paid by a block subsidy), bitcoin transaction outputs from coinbase (the type of transaction that credits the subsidy and fees to the mimer), they must be buried by 100 additional blocks before being spent. That is a special rule, called the maturity rule, which only applies to coinbase transactions.


Can Bitcoin incorporate the scripting protocols of Ethereum without a fork? I am curious if the Bitcoin protocol can incorporate Turing complete scripting capabilities without forking the block chain. I ask this because I understand the ability to create contracts digitally is as significant an development as bitcoin.

I am trying to judge the efficacy of new altcoins like Ethereum to assess the future viability of Bitcoin.

Thanks for your comments!  Also if you are curious as to why I think contracts are so important here is my blog about why contracts are important.

Peer to Peer Government: Guarding the Guardians
http://statisticaleconomics.org/2014/01/10/peer-to-peer-government-guarding-the-guardians/

Bitcoin has a scripting engine already. At this time only a limited number of features in it are used, such as those for standard transactions. Other features are unused but can be developed upon and some, disabled (though could be reintegrated later).

Solutions are already present which build on top of Bitcoin or other such coins to provide smart contracts, m of n transactions, programmable features and more for those who want to use more advanced scripting features which bitcoin would be unable to support.

The currently most fully featured example of this is Open Transactions (http://opentransactions.org/). It is also token-less in the sense there are no "coins" being minted in the use of the application keeping it pure.


Could a Proof of Burn function be implemented into Bitcoin Core to help prove loss of private keys? Is there a list of self reported BTC addresses with lost private keys? Of course such a list would never be conclusive as we would have to trust the people who report that the keys were lost.

Could this trust issue be eliminated going forward by creating a Bitcoin proof of burn function (forcing BTC to be sent to a random address where it is extremely unlikely nobody holds the private key).

Such a function could not include the ability for the user to send BTC to an address of their choosing. It would need to be separate from the private key system already in place. It can also not be retroactive.

Assuming that the Private Key and "Proof of Burn Key" are stored separately, the purpose of this idea would be to allow:

Those who have lost their private key to prove their loss of ability to find it (this could have an impact on insurance, tax, inheritance claims or more)
You could use a multi-sig Proof of Burn system to help minority claimants (of blockchain businesses, heirs to a bitcoin estate, etc) the ability to call the bluff of a rogue partner or other beneficiary from making a "lost key" claim.

There's already a way to burn bitcoins. You simply assign the bitcoins to an OP_RETURN. No need for the complex machinery.


Bitcoin difficulty re targeting in case of catastrophic hashrate drop? I do understand that the mining difficulty changes every 2016 blocks :

next_difficulty = (previous_difficulty * 2016 * 10 minutes) / (time to mine last 2016 blocks)

But how is difficulty changes if suddenly 90% of hash rate disappears* ?
I would be very grateful if someone could kindly point me to the class in sources.

*recent BCH fork had difficulty adjusted quicker than 2016 blocks.

P.S.
Should I be looking at

unsigned int CalculateNextWorkRequired(const CBlockIndex* pindexLast, int64_t nFirstBlockTime, const Consensus::Params& params)

in pow.cpp ?

But how is difficulty changes if suddenly 90% of hash rate disappears* ?

It will change as it normally does, after 2016 blocks. There is no provision for adjusting the difficulty if the hashrate suddenly drops.

  *recent BCH fork had difficulty adjusted quicker than 2016 blocks.

As part of their hard fork, they added a provision for cases where blocks are taking too long (i.e. sudden hashrate drop). This extra difficulty changing rule is not present in Bitcoin.


How to change the displayed denomination in GreenBits Android wallet? I just installed GreenBits, the native Java wallet from GreenAddress.it, on my Android device and transferred 0.1 BTC to the wallet. I like it so far.

However, it displays my balance as 100,000 bits. That's cool, but I would like to stick to a more commonly used display like 0.1 BTC. All the news items say you can chose:

  All bitcoin denominations (BTC, mBTC, uBTC and Bits)

But I can't find anyway to change it. Anyone?

On the top right corner of GreenBits there's a menu with a number of entries: the first one is named "Settings" and we should select that, then "Info & settings" and then you can change the fiat currency, the bitcoin denomination as well as your preferred exchange if available.


Synchronising with network I'm completely new to Bitcoin but finding it all very interesting so far! My Bitcoin-qt wallet has been synchronising for literally days now (2 days actually) but it is getting closer, on 91% now. My question is, if I was to buy a Bitcoin from MtGox or somewhere, would I have to wait for the synchronisation to complete before I could see my coins? My transfer would have to be confirmed on the block chain through mining and would be the latest on the chain meaning I'd have to wait until it came through right? Would you wait it out?

Thanks,

If you were to purchase bitcoin and send it to an address in your wallet, then yes, you would have to wait until your wallet synchronized in order to spend the bitcoins.

However, in the meantime, consider spending it directly from your exchange account, especially if you're going to buy bitcoin and spend it right away.

Alternatively, consider using an online wallet. I recommend Blockchain.info or InstaWallet.


What services let you trace the history of Bitcoins? What services let you trace the history of Bitcoins? For instance, if the goal is  to trace all transactions associated with Bitcoins owned by a certain individual or company, what's the best way to accomplish this?

WalletExplorer.com can associate addresses and Txs with ~100 services, including:

LocalBitcoins
Silk Road, Agora, other DNMs
Defunct services like Vaultofsatoshi, Bitcoinica, Inputs.io, Mt. Gox etc
Strongcoin, other wallet providers
Lending platforms like BTCJam
BTC-E, Coinbase, Bitstamp and other popular exchanges
Gambling sites like Just-Dice, SealsWithClubs Poker
Mixers/tumblers like BTCFog

I'm extremely curious how this is done, to be honest. I suppose it's just tracking UTXOs of known addresses and identifying associated Txs, but it's quite fascinating how accurate the data is.

The service doesn't identify newer addresses, of course, since fresh addresses need x blocks / UTXOs to deduce the associated account/marketplace/exchange.


How are parts of Bitcoins traded? I understand how whole Bitcoins are traded (each coin has its own identifier, this identifier is associated with a wallet), though I do not understand how it is possible to trade parts of a Bitcoin (e.g. I can buy 0.7 BTC from Mt. Gox). How are the Bitcoins tracked once they are split into parts, and associated with different wallets?

It is not true that individual bitcoins have an identifier. In fact, individual bitcoins do not exist.

What your wallet holds are addresses. These addresses can occur in the Bitcoin block chain, which can - at its simplest - be seen as a big database of balances for each Bitcoin address. Your wallet also holds a private key for each address, which can be seen as the password needed to spend the balance that is accredited to the corresponding address.

When you spend some bitcoins, you send them from one of your addresses to another address. Only the person that owns the private key corresponding to the address, can spend the bitcoins on its balance.

Now, that still not explains how bitcoins can be divided into smaller fractions. In fact, the Bitcoin protocol does not really work with the unit bitcoin, but with a smaller unit, called satoshi. 1 bitcoin equals 100,000,000 (= 10^8) satoshi. So 1 satoshi (=10^-8 BTC) is the smallest amount you can send.

This means that when you send 0.7 BTC, you actually send 70,000,000 satoshis.


How do I use bitcoind to spend from private key but not store it I understand that I need to import a private key in order to spend bitcoins, would it be possible to generate/use an address without storing or the server having the private keys in the server
Ive seen many crypto wallets claim to do this but how would I go about this process
Thank you!

For advanced users it is possible to build a raw transaction and sign it in the debug console without having the key imported into your wallet HOWEVER your node needs to be sync'ed at least up to the inputs you intend on spending.


Bitcoin Transaction Stuck, Attempt to double spend with higher fees I made a BTC transaction a few days ago, where I set the fee amount way too low. It seemed that the transaction was lost in limbo.

I did some research, and apparently you are able to double spend your btc, if the transaction hasn't been confirmed yet.

So I imported my wallet into Bitcoin Core, where the unconfirmed transaction wasn't shown, and I was able to initiate another transaction with higher fees.

Now it seems that Blockchain.info doesn't show my transaction, and pushing it manually results in a mempool conflict. The same happened with this service: https://coinb.in/#broadcast.

But I was able to push the transaction through https://localbitcoinschain.com/. Now the transaction ID is unconfirmed on localbitcoinschain, but can't be found anywhere else (Blockchain.info, coinb.in).

Can this second transaction be approved, or is it impossible, if its only recognized by localbitcoinschain.com?
How should I proceed? At this rate, my transaction seems to be lost for a long time.

Kind regards

The problem has been resolved.

My second transaction, although only listed on LocalBitcoinschain and nowhere else has been approved.


Is -blocknotify triggered during catch-up? My node is way behind and I noticed the -blocknoitfy action specified in bitcoin.conf is not being triggered. Which is OK for now, because the node has so much catching up to do, the script wouldn't do any good anyway.

Is this correct behavior? At what point does blocknotify start triggering again? My experience is that after a few hours or even a day of downtime, it gets triggered for every block during catch-up (so it could be a dozen triggers all at once, for example)

Yes, this is by design.

The notify action is run in the function BlockNotifyCallback (init.cpp), and you can see:

static void BlockNotifyCallback(bool initialSync, const CBlockIndex *pBlockIndex)
{
    if (initialSync || !pBlockIndex)
        return;
    // ...
}

The initialSync argument comes from the return value of IsInitialBlockDownload() (in validate.cpp).  It checks several things to determine if the initial block download is ongoing.  Probably the operative one here is a check whether the most recent known block has a timestamp that is more than 24 hours earlier than the current system time.

So it appears you will start getting notifications when you are 24 hours behind or less.


MtGox's secondary market? I remember back in the day when MtGox halted its BTC withdrawals, someone put together a secondary market exchange for trading MtGoxBTC for actual BTC. You could deposit MtGox BTC to it since the exchange still allowed you to move coins between accounts even though you couldn't withdraw the coins into external addresses. I tried searching for it, but the amount of articles on MtGox collapsing and so on seems to have buried that old titbit of information.

Does anyone have any information about MtGox's secondary market, what it was, how long did it operate, what were the prices and so on?

It looks like Bitcoin Builder was the website. While the main focus of their site has shifted, the front page still refers to goxbtc.


Electron Cash Wallet now suddenly not accepting password? So, i installed this software yesterday. Set up everything, created a password, TESTED the password, wrote down the generation seed.

I logged in this morning to check that the coin i sent to this wallet was actually there. I puchased this last night. Fair enough, the transaction was showing, so it had taken.

Went back twenty minutes later just to double check the amount; and now, Electron Cash Wallet will not accept the password.

I have tried numerous checks - keybaord configuration error, mistyped keys - but i noted down and tested the password twice yesterday on setup. There is either something wrong with this wallet software, or something has gone wrong in the interm twenty minutes.

Checked that i downloaded the correct executable file, and this was downloaded from https://www.electroncash.org/.

Has anybody out there had issues like this with the Electron Cash Wallet? I have looked for some form of support but the website offers nothing. Don't believe that the generation seed will help either as this would only regenerate a new wallet unless I am wrong? Can't actually help me get into my own wallet, the password for which is now no longer functioning.

I have not used Electron Cash myself, so I can't speak to that effect, but actually, the generation seed is exactly what would help you here. The seed words are a human readable representation of the master private key. This allows them to function as a backup of your wallet. When you use the same seed words, you'll regenerate the same wallet.


How do I transfer BTC from my Coinbase account to my Android wallet? When sending BTC (funds) from the Coinbase website, it asks for a bitcoin address to which to send it. What is one supposed to do, type it in?

What I would like to do is display a QR code in my Coinbase account that I scan using the wallet on my phone. My phone then sends a funds request to Coinbase which is displayed in my account. Then I simply send the funds.

I prefer using the Android Bitcoin Wallet instead of Coinbase wallet.

It seems like Coinbase at one time displayed a QR code for requesting funds from your account. I can't imagine how this might be implemented. Is it even possible?

Yes, type it in. Or you can copy the address and email it to yourself and copy and paste it from the email.

There really isn't any easy mechanism in Bitcoin for the person receiving the funds (i.e. your phone) to request the money from the person sending the funds (i.e. Coinbase). There is the BIP 70 payment protocol but that requires both a compatible wallet on the sender's side and some webserver setup stuff on the receiver side. Even with that, there isn't anything for the sender to initiate the transaction at all, only the receiver.


Bitcoin core: boostrap.dat trade-off with "Synchronizing with network..." Being, now, aware that users of Bitcoin Core (v0.12.1.0-g9779e1e) are no longer to use a torrent download of a bootstrap.dat and, instead, are admonished to simply launch Bitcoin Core and permit "Synchronizing with network...", I nevertheless have a situation that may require a more nuanced decision:

I'm recovering from a backup and it says "50 weeks behind..."
By the time I discovered boostrap.dat was no longer faster I had already torrent downloaded most of boostrat.dat.

Number 1 leads me to believe my use case may be an exceptional use case that may download everything for the last year before becoming operational again -- rather than the minimum amount(?) necessary to begin secure operation.

Number 2 means I may be able to complete the download in about 12 hours to SATA SSD and then be able to load from that file only the minimum amount(?) necessary in a total amount of time much faster than downloading "50 weeks behind" of blockchain.

Should I go ahead with the torrent of bootstrap.dat and load it or should I stop the torrent and just let Bitcoin Core complete "Synchronizing with network..." even though it says "50 weeks behind"?

the minimum amount(?) necessary to begin secure operation

Letting Bitcoin Core synchronize on its own will do the following:

Download block headers in packages of 2,000 and quickly rebuild the chain of headers for a total less than 50 MiB
Request multiple block bodies in parallel from several peer nodes
Validate blocks in order as they finish downloading including all transactions they contain

For the last 50 weeks that would cause Bitcoin Core to download and validate about 35 GiB of data.

Synchronizing from the bootstrap.dat you download the complete blockchain first, then rebuild the blockchain from scratch.
This means that you have to

download more data (78 GiB instead of 35 GiB)
have to validate blocks of more than four years instead of 50 weeks
and delay the validation until after the download is complete instead of validating while downloading already.

It seems to me that unless the download speed from the peers is the bottleneck for you, letting Bitcoin Core synchronize on its own will be quicker. On my fairly new computer the bottleneck is the validation and not the download.


Is there something in a debug.log from 2011 that would tell me if there are BTC in an old wallet.dat? I took an old laptop out of storage today because I recalled trying to mine BTC years ago. I remember giving up quickly because, whatever the UI was, it showed that I had mined 0. I'd like to confirm that.
Is there anything in any of these files that would confirm that there's 0 BTC in these? debug.log seems to be the only plaintext file.
Date modified on these files are in the range of 05/2011 ~ 06/2011
/user/AppData/Roaming/Bitcoin
-database/    (9MB)
-.lock        (0KB)
-__db.001
-__db.002
-__db.003
-__db.004
-__db.005
-__db.006
-addr.dat    (18MB)
-blk0001.dat (279MB)
-blkindex.dat(133MB)
-db.log      (0KB)
-debug.log   (3MB)
-wallet.dat  (104KB)

What I would do in this case (the easiest approach):

Copy wallet.dat to a new directory called Bitcoin in %appdata%
Run latest Bitcoin core
Open the console and do
dumpwallet C:\Users\yourusername\Desktop\wallet.txt
Quit Core and delete your new Bitcoin directory. (Don't forget to delete it, it might become larger than 100 MB, to save space)
Save my script with Ctrl + S and name it dumpwallet.html. Open it in your browser. Copy the wallet.txt output here so that only the private keys are listed.
Import wallet to Electrum: "New wallet > Import private keys > Copy from the webpage output"

Then you can see your balance or spend from it.
The tedious approach is to use db_dump of db-util to dump all the transactions and calculate the final balance by yourself. I would not bother doing it this way.


Problem In Creating Genesis Block Twister-Core using Ubuntu and (Qt Creator IDE) I am trying to create a genesis block in twister-core using Ubuntu and IDE Qt Creator. I have compiled the twister-core successfully, I have changed the these parameters for creating the genesis block pszTimestamp, genesis.nTime   and  genesis.nNonce. Then I re-compiled it successfully. When I am executing twisterd in the terminal using this command

./twisterd -rpcuser=user -rpcpassword=pwd -rpcallowip=127.0.0.1

this error occured:

  Terminal Error :
  Assertion `hashGenesisBlock == uint256("b24b7a9c568b4ae288c0be34699c4c79fc22848e7c346afd5f63901e41ed8640")' failed.
  Aborted (core dumped)

When I run it On Qt-Creator same error occur Error:

  twisterd: ../twister/src/chainparams.cpp:216: CMainParams::CMainParams(): Assertion `hashGenesisBlock == uint256("b24b7a9c568b4ae288c0be34699c4c79fc22848e7c346afd5f63901e41ed8640")' failed.
  The program has unexpectedly finished.
  ../twister-qt-Output/twisterd exited with code 0

Please help me to resolve this problem.

chainparams.cpp contains a line of code that checks whether the chain’s genesis block is equal to a specified hash. Since you created a new genesis block, you will have to update the value to your own hash.

You can see an example for the line here:

 hashGenesisBlock = genesis.GetHash();
 assert(hashGenesisBlock == uint256("9915158279673d101912be80f25c20627f1dd8bf5231e7c46bfec5ed19737f44"));

Which I took from miguelfreitas/twister-core/…/chainparams.cpp

To figure out what to put there, you can print genesis.GetHash() and replace the old hash in the assertion.

To print it the hash of the genesis block, you can use

printf("genesis.GetHash = %s\n", genesis.GetHash().ToString().c_str());

just above the line with the assertion, which will write to the ~/.bitcoin/debug.log.


Are there any linux distros that have the bitcoin client pre-included? Ideally would be able to make a bootable usb with a lightweight linux os which already included the bitcoin client.

LinuxCoin is such a distro (based on Debian).


Where can I find Crypto Coin data? I'm looking for sources of crypto currency data, preferably historical, which I can use to back-test my bots and/or analyze the market.

Is there a reliable source for this online ? Do exchanges offer historical data by any chance?

If not, how do I go about acquiring this data?

Acquiring Data

You have two options here:

Check out one of the data providers online. Quandl offers (mostly) free historical data for a variety of pairs and exchanges. Alternatively, if you have bucks to spare, Coinigy offers high-quality data sets on a per-month pricing model.
Roll your own data crawler, using a programming language of your choice and the various APIs available for exchanges.

I'll discuss the two options further below.

Acquiring Data from a Data Provider

Obviously, this option is the most convenient, however also possibly most expensive, depending on your required quality of the data.
there is also no guarantee that the exchange, pair and/or time range you're looking for is present in the data base.

To Sum up:

Pro:

Least time-consuming
Data is likely to be cleaned and formatted
Many data providers offer a unified layout of data across several data sets, making it easy to compare them.

Cons:

Paid data is expensive for hobbyists (Market data at coinigy is at 30$ / Month, as of the time of writing)
Free data is often provided as is, leaving you with clean-up duty and post-processing tasks
If data is cleaned, artifacts can occur without you knowing, tempering with your research results.

Rolling your own Data Crawler

With just a little experience in programming and basic understanding of how an API works, you can quickly set up your own data acquisition tool. There's varying degrees of difficulty, of course, but at the very heart of it, the matter is quite simple:

Choose an Exchange
Choose an API
Hook into API using code wizardry
Start downloading data

I'll walk you through the necessary steps (sans the code - I feel like this is a topic for another StackExchange; I will, however, link you to libraries that will help you get started).

1. Choose an Exchange

I'm guessing you've done your research and thusly, will only point out a few things when considering the exchanges you want to fetch data for:

Make sure they have stable servers and connections (Exchanges in Asia, accessed from, for example, Europe, have notoriously unstable connections). Otherwise you'll have pot holes all over your data, perhaps even rendering it useless.

if you absolutely require the data, consider renting a server closer to the exchange server center's physical location.

Make sure they have meaningful volume. If there's only little volume changing owners over the course of a set time frame (usually, the 24h volume metric is always available), the exchange is likely not a very good choice. It skew the picture of the market.
Test their customer support first. If you happen to require their assistance some time later during crawling, a great support staff can make all the difference. Besides, it gives you a small indication of the exchange infrastructure's quality.

2. Choose an API

Choosing the right Application Programming Interface (API) depends on 2 things:

How granular you need your data to be,

and

what APIs the exchange has to offer (obviously).

REST APIs

If you're fine with, say, 1-Minute snapshots of data (i.e. tickers, order_books, trades etc), requesting data via a Representational State Transfer (REST) API is sufficient. This allows you to send a http request to a specified URL, and receive a response containing the data requested (usually in JSON-format).

The convenient thing about REST APIs is that they function mostly the same across exchanges - requests are sent, responses received and data evaluated by you. Some exchanges require you to use different request methods (such as POST) instead of the usual GET requests; however, this is usually only required for private endpoints (private meaning that you need to authenticate yourself first, before receiving data like your account's balance, etc), so if you're just after market data you shouldn't encounter them often.

A limitation of REST APIs is that they usually feature a request limit. The most commonly seen limit is 60 requests per minute, but can be more strict (or more loose - Bitfinex allows unlimited requests per minute). Some exchanges also employ a request counter - this means that certain requests increase your IP-connected counter by a certain value. Depending on your status with the exchange this counter decreases over time by a pre-determined value.

In addition to this (if you're thinking 'Well, hey! Why not fetch data every second then?'), market data is often cached. A snapshot of an API endpoint is stored for a set interval, before actually being updated on the server side. Hence, you might send a request every second, but nonetheless receive identical data until the server cache is refreshed.

WS APIs

WebSocket (WS) and WebSocketSecure (WSS) APIs are full-duplex connections, which allow the user to receive close-to-real-time updates of one or several API endpoints to which they've subscribed.
Full-duplex simply means that you can not only receive, but also send data to the WebSocket connection. This is predominantly useful when running a bot that is supposed to trade on your behalf, as the feedback is usually faster.

In principle, you open a connection to the WS API, and subscribe to the endpoints you want data on. Typically, this is separated by endpoint and pair, but make sure to consult the API documentation - some exchanges do not employ a channel subscription model, and data comes flooding right in without further configuration.

The implementation of WebSockets ranges from trivial to complex, so expect to do some reasearch on how to access some of the exchanges' WS APIs. While the principle system remains identical across all of them, many exchanges use different protocols and/or services to provide their data - for example the WAMP protocol and Pusher, which add an additional layer of complexity, since they require a specific client to connect.

However, if you require tick-by-tick data, such as for real-time order book building, this is what you want to go with.

FIX APIs

The Financial Information eXchange (FIX) Protocol is a standard started in 1992, and now commonly used by institutions and brokers in the financial markets. It is by far the least available API at exchanges, with even fewer actually sending market data. It is most commonly used to place or cancel orders (for example at CoinbasePro). However, some exchanges offer real-time market data via FIX.

Keep in mind that you'll need extensive knowledge of the FIX protocol, such as setting up a FIX engine and proxies to connect to the exchange. This may, in some cases, incur monthly-recurring charges.

3. Hook into API using Code

Depending on what API you chose, as well as which programming language you intend to use, you have a wide variety of options.

Many exchanges provide client libraries for their APIs, some developed by the exchange dev team themselves, others are contributed by users (which are usually revised by the developer team before being quoted on the exchange's website).

There are many other libraries out there, for likely any language (for example BitEx for Python 3.x (to indulge in some shame-less self-promotion), which unifies core methods across a variety of REST APIs, as well as some WebSocket APIs).

Being a Python developer myself, I can only recommend using it. Especially if you're not bound to an environment.
Using the requests library, for example, you can query an exchange with ease:

import requests

# Get a list of all asset pairs at Kraken.com
print(requests.get('https://api.kraken.com/0/public/AssetPairs').json())

4.Start downloading data

Once you've set up your data crawlers, you need to release them! I personally run the REST crawler via cron jobs, and Websocket crawlers as daemons. But this is up to you.

It will of course take some time to acquire a meaningful set of data, but alas, you either pay with money or with time for the data you want.

Useful Links

API References

REST
WebSockets
REST vs. WebSocket
FIX Protocol

Data Sources

Quandl.com
Coinigy.com
CoinDesk.com
Investing.com
Bitcoinchain.com
Cryptodatasets.com
CoinMarketCap.com
Crypto Archive

Feel free to add, correct or update any of this content in the comments below! Thanks.


What cryptocurrency systems predate Bitcoin, and how do they differ from it? Although Bitcoin is certainly making strides as the first cryptocurrency to enter (comparatively) widespread use, cryptocurrency has long been a topic of discussion in fiction and academia.  What cryptocurrency systems were in existence prior to Bitcoin, and in what specific respects do they differ from it?

The closest predecessor to Bitcoin is generally agreed to be Wei Dei's b-money proposal.

The proposal had a lot of holes. For example, it assumed that money could be created simply by solving hard computational problems. But it contained no mechanism to control currency inflation, so currency would inflate as computing power increased.

He actually offered a way around this, auctioning off the currency. But this still creates huge problems without a centralized authority -- who confirms the bids were paid and issues the currency? On what authority?

It also hand-waves over major issues. It requires servers to be partially trusted and argued that to be a server, you could be required to deposit some money in a fund that would be debited in the event misconduct was discovered. But who would debit the account? And who would get credited? And by what authority would they do this?

But this got the ball rolling on the idea of a completely decentralized crypto-currency. The amazing thing about Bitcoin is that it solved all the remaining problems at once.


Which notable Bitcoin-related sites offer referral rewards? TradeHill used to offer a referral bonus when you got other people to sign up with your link, and there are a couple other sites that offer similar rewards for referrals. Which notable Bitcoin-related websites offer such rewards?

Between TradeHill, Bitcoin7 and a couple others the offering of affiliate rewards ended up spawning a spamfest.  Fortunately, TradeHill added terms and conditions that included no spamming and withheld commissions to spammers and the problem mostly went away.

Camp BX apparently is one that offers a referral.  10% discount on trading fees for them and 10% commission for you.
After login, click on "My Profile" (or https://campbx.com/in/userinfo.php )
then scroll down to Affiliate Program Link.

Others:

http://clients.microtronix-tech.com/aff.php


Bitcoin QR code on a product sold in stores How and which company do i turn to implement a QR code for bitcoin on a product sold within stores.

Putting a bitcoin payment address (in QR code format, or otherwise) is generally not the way to accept bitcoin for a sale. There would be very basic vulnerabilities, such as having someone swap the payment address displayed on your product, etc. Attempting to use the same address on every product is bad for privacy/fungibility, and it makes backend accounting difficult.

Accepting Bitcoin for payments is best done using a bitcoin payment processor such as BTCPayServer (an open source project), or for small scale you could even process payments manually at the till. In either case, customers would be presented with a payment address during checkout, not a payment address per product.


Create a transaction spendable in a specific block height I am new in Bitcoin and I try to create an address in Bitcoind and send a transaction that the amount will be spendable in a specific height of the blockchain.

Here is what I have done:

privateKey = 'cS5bZo8D1PBXwLbpGwYpb3CPvev5FYA7zPpftXAc6vzvbXt3aAa4'

absolute_time = 150

addr = getAddressFromPriv(privateKey) #customFunction

seq = Sequence(TYPE_ABSOLUTE_TIMELOCK, absolute_time)

script = Script([seq.for_script(),
                        'OP_CHECKLOCKTIMEVERIFY',
                        'OP_DROP',
                        'OP_DUP',
                        'OP_HASH160',
                        p2pkh_addr.to_hash160(),
                        'OP_EQUALVERIFY',
                        'OP_CHECKSIG'])

addr2 = convertScriptToAddress(script)

Then in bitcoin-cli I use that addr2 to bitcoin-cli sendtoaddress <addr2> 10

However, when I inspect the transaction it says that it is spendable in the current block height. Any idea?

You have to add the absolute time/blockheight before OP_CHECKLOCKTIMEVERIFY in the script to depict how long you want to lock the transaction. Also you are using 150 as the CLTV parameter. Anything that is below 500M is dubbed as block height. Given you are using 150, that means that transaction is not spendable until 150 blocks, which should mean it is spendable immediately.


How is 10% transaction fee possible for a bitcoin transfer from coinbase to another exchange? I moved 0.01BTC from coinbase to another exchange and i got charged 0.001BTC for it. This is 10%!!. I understand concept of dynamic pricing depending on network crowding etc. However, how is 10% fee possible when many websites show that median transaction fee is still around 0.2-0.4%. Is it due a small size that i used (0.01BTC) in transfer. Is there anything i can do to avoid such high and conform with median?

Also, is there a way to avoid such high transfer fee on coinbase?

This is normal.  You can see on https://bitcoinfees.earn.com/ that BTC 0.001 is a pretty average fee right now.

You should not think of it as a percentage, since the fee for a transaction is not related to the amount of coins transacted.  Instead, it has to do with the size of the transaction in bytes, which is more a matter of its complexity (e.g. number of input transactions spent, number of addresses paid).  You'd have paid the same fee whether the amount you sent was BTC 0.0001 (in which case it would be a 1000% fee) or BTC 1 (an 0.1% fee).

  Also, is there a way to avoid such high transfer fee on coinbase?

No.  If you want the percent fee to look smaller, send larger amounts.  Or you could wait and see if fees go down in the future (they might or might not).


Error polling getblocktemplate {"code":-4,"message":"Failed to parse wallet address"} I am trying to setup a cryptonote pool on my VPS. I am running the coin daemon and configured the wallet rpc.

The config is the same as here
https://github.com/fancoder/cryptonote-universal-pool except the daemon which runs on port 26968. This is my netstat output :

PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN                 1086/mysqld
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN       25062/redis-server
tcp        0      0 127.0.0.1:8082          0.0.0.0:*               LISTEN      28390/electroneum-w
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1017/sshd
tcp        0      0 0.0.0.0:26967           0.0.0.0:*               LISTEN       26867/electroneumd
tcp        0      0 127.0.0.1:26968         0.0.0.0:*               LISTEN      26867/electroneumd
tcp6       0      0 :::443                  :::*                    LISTEN      1176/apache2
tcp6       0      0 :::6379                 :::*                    LISTEN      5641/redis-server *
tcp6       0      0 :::80                   :::*                    LISTEN      1176/apache2
tcp6       0      0 :::22                   :::*                    LISTEN      1017/sshd
udp        0      0 0.0.0.0:68              0.0.0.0:*                           782/dhclient

Nevertheless I get error

  Error polling getblocktemplate {"code":-4,"message":"Failed to parse wallet address"}

when i run

node init.js

Any Ideas how to fix this ? I couldn't find anything useful in the net.

So the fix was that the address was cut in the config.json file due nano not displaying all the line.

So if you run into this problem check if the address is correct :)


Mining Zcash using cluster of GPU's I have a basic knowledge about an idea of cryptocurriencies. Recently I have read articles about Zcash. Rumours has it that it's the most profitable cryptocurrency on the scene. Me and my co-worker want to mine Zcash. I know that we need high hashing power. I was thinking about cluster of high-end graphical cards. With our budget we can afford more or less 15 GPU's. My very basic calculation says that we should have something around 300.000 MH/s. Will it be profitable and feasible assuming we want perform solo mining? Is there a good piece of software for Zcash solo mining?

Profitability will all depend on the cards you buy, your electricity cost, and your overclocking configurations. I haven’t mined zcash in a few weeks, but when I was mining I was getting about $12ish dollars a day with 3 Nvidia 1070 Ti’s. My hash power was about 1560 sols/s(zcash’s version of a h/s). Each card was running at 85% power and getting around 520 sols/s.

I would say at 15 cards, and the hashing power you mentioned, you should be more than profitable. If you want to get a good idea of how much you will make, checkout whattomine.com, it’s a great resource for measuring profitability.


Is it possible to determine the total amount of timelocked Bitcoin? Now that is possible to lock funds until a certain date (https://coinb.in/#newTimeLocked). How to calculate how many of all bitcoin in existence is locked until a certain date? Any service that does this?

No, it is not possible. Tools like this use P2SH, which means the script which locks the output isn't visible until it has been spent. You can determine how much might be locked (total P2SH outputs for which no script is known) and how much isn't (total non-P2SH outputs), but you can't tell much more than that.


Is there a way to tell that our bitcoin is safe after we put it in a hardware wallet for cold storage after 3 or 5 years? If I consolidated 1 bitcoin into an address using a hardware wallet, and put it in cold storage. Can I know after 3 to 5 years that the bitcoin is safe?
So far the research I have is: can I go to https://www.blockchain.com/btc/blocks and search for that address, and see that it was still used once (for the time I put the bitcoin in), and therefore know that the bitcoin is safe?

Yes, you can use, for example, two or three different blockchain explorers to check the balance for your Bitcoin address(es).
Or you can set up a watch-only wallet on any PC or phone - import the Bitcoin-addresses but not the private keys and the wallet cannot spend the money, only monitor. The money will be shown by the wallet as "watch-only" or "non-spendable" (depending on the wallet). It will show you any transactions involving money at that bitcoin-address.


Colored coin with stealth addresses Is it possible to use colored coins with stealth addresses?

My main consideration being that coloring a unit of cryptocurrency requires being able to keep track of its exact location at all times with a public blockchain

Yes, this should be possible.

A "stealth" transaction still sends the colored coin to a specific ordinary address, and anyone can see on the block chain that this address owns that coin.

The only difference with stealth transactions is that this ordinary address, rather than being generated from a private key by the recipient in the usual way, is generated by the sender using the recipient's stealth address.  This is done in such a way that the recipient, using additional data included in the transaction, can compute the private key.  They can then redeem the transaction like any other ordinary transaction.

In this writeup in the example in Sections 9.1-9.2, the "ordinary address" in question is 1BjqrpQqr4tY5YPQkL8aG7NGkFbTbiuVu.

See also my answer here.


Coin Exchange Profits I've seen plenty of people looking into setting up coin exchanges.  I'm also interested in the development of cyptocurrencies and think it might be a good idea to get involved in the business environment as well.

I'm wondering, however, if starting one is a worthwhile investment, considering one must balance server costs, development, etc.  I'm an intermediate software developer yet understand creating an exchange is beyond my limits, so I would certainly need a team to help me realize this goal.

If the only profits of the coin exchange are a small fee for every transaction, I can't imagine an exchange would be highly profitable and certainly wouldn't be able to pay off development/server fees?

You are right that you will need significant volume to make substantial profits.

Which country are you located in? Some countries will also have very high regulatory startup costs, which is why you will see some exchanges deciding to block all users from some jurisdictions.

What would make your exchange different from the rest? Without a substantial marketing budget it is hard to attract a lot of volume. People like to trade on the exchanges with the highest liquidity and as a new exchange you would not have that.

Try to focus on building something unique. When you launch an exchange focus on building volume at first (a maker taker model fee model and a referral system may help with that). Profits should be your long term concern (not short term) assuming you have enough capital to run at a loss for a while.

Most importantly make sure you exchange is secure! Trustless decentralized exchanges should gain in popularity over time. Too many exchanges have absconded with funds or been hacked already


Almost a month, transaction still not confirmed... help? I sent a transaction of 0.12 BTC with a fee of 11 sat/b. I expected the transaction to take a while to send, like a week, but it's already been almost a month. Is there something I can do to boost the transaction? A month ago I also sent a transaction of 0.03 BTC with a 15 sat/b fee and it took 4 hours to confirm. I didn't expected the 11 sat/b fee to take so much longer...

You can enable in Copay/BitPay Wallet the option for use unconfirmed spents... So you can re-send it with a fee greater than the last you used


What motivates nodes (or miners) to relay transactions? Miners want to include as many transactions as possible in their block to get the (optional) transaction fee. But what motivates them to relay a transaction further to the network? Is this done solely for the greater good?

Nothing. That's why you send your TXs to several nodes.

Non mining nodes do it "to keep the whole thing working" as long as it is very cheap.

Because of this miners can't keep TXs for themselves and thus do not even bother to try and keep TXs secret. Maybe they also have a better conscience that way. :)


USD to BTC conversion code So, I have looked everywhere and no one seems to have this specific problem.

I have set up a e-commerce store that is accepting BTC, So far the users can only see the price of the product in USD, however, I want the user to be able to click the USD price and convert it to BTC instantly. Like you can on a blockchain.info transaction.

For example:

Blockchain transaction conversion

So far, I have only been able to display the BTC price using Blockchain API.

I want the same effect as Blockchain on my price, or atleast under it.

(Snapshots of site below to give an idea of what I want)

My images

The code I have to display the BTC price (If it helps, im a noob sorry)

<?php

  $url = "https://blockchain.info/stats?format=json";
  $stats = json_decode(file_get_contents($url), true);

  echo $stats['market_price_usd'];

  ?>

Price display:

$200.50

Your question is a bit confusing but it sounds like you are asking how to get a currency amount worth of bitcoin.

  I want the user to be able to click the USD price and convert it to BTC instantly.

The answer is simple, division.

<?php
$url = "https://blockchain.info/stats?format=json";
$stats = json_decode(file_get_contents($url), true);
$btcValue = $stats['market_price_usd'];
$usdCost = 200;

$convertedCost = $usdCost / $btcValue;

echo $convertedCost;
?>

http://phpfiddle.org/lite/code/cxsk-b62m

  (If it helps, im a noob sorry)

That's okay. If you're looking to learn more beginner related Bitcoin coding stuff check out this mega-thread at bitcointalk https://bitcointalk.org/index.php?topic=990348.0  It's mostly PHP and JavaScript examples.