jsonRPCClient.php not working I got bitcoind working in the cmd prompt;
Then I closed it and opened bitcoin-qt and that is now running in server mode; (bitcoinf server=1)

Then I run some simple .php on my localhost (using xampp apache engine) and this line of code is not working :

  $bitcoin = new
  jsonRPCClient('https://user:password@192.168.0.2:8333/');

I get this error :

>  Notice:  fopen(): send of 24 bytes failed with errno=10053 An
> established connection was aborted by the software in your host
> machine.  in C:\xampp\htdocs\xampp\jsonRPCClient.php on line 132
>
> Fatal error:  Uncaught exception 'Exception' with message 'Incorrect
> response id (request id: 1, response id: )' in
> C:\xampp\htdocs\xampp\jsonRPCClient.php:152 Stack trace:
> #0 C:\xampp\htdocs\xampp\hello.php(14): jsonRPCClient->__call('getinfo', Array)
> #1 C:\xampp\htdocs\xampp\hello.php(14): jsonRPCClient->getinfo()
> #2 {main}   thrown in C:\xampp\htdocs\xampp\jsonRPCClient.php on line 152

and here is my port status :

I am running bitcoin-qt in server mode (=1) and the port status for 8333 is "sent"

my XAMPP Netstat also shows that the port is properly open :

I also tried this line

  jsonRPCClient('https://bitcoinrpc:12345@192.168.0.2:8333/');

because my bitcoin.conf is

  server=1 rpcuser=bitcoinrpc rpcpassword=12345 listen=1 rpcssl=1

still no joy - get the same error !

WHAT MORE CAN I DO to get it to work !!!!

Any help much appreciated !

RPC port is 8332 by default for mainnet, 8333 is the Bitcoin network protocol port.

Also, be sure to set the rpcallowip variable if you are connecting to the node from another host on the network (non-localhost connections are blocked by default).


How can I find out who sent me bitcoins? I had a very unusual situation. I received the bitcoins in my wallet, how can I find out who sent them?

Maybe it was the Creator of bitcoin ? :)

how can I find out who sent them?

Realistically, you cannot. You could see which inputs were used in the transaction that sent you the bitcoins, and attempt to find their owner. But there is no information encoded into the transaction that states who sent it.

If you met someone that claimed they were the one to send the coins to you, then you could ask them to sign a specific message of your choosing, with the private key of one of the transaction's inputs. Whoever sent the coins to you will have access to at least one of those private keys, so they would be able to prove themselves in this way.


Does Bitcoin Core accepts uncompressed address generation? So one priv key express uncompressed and compressed pub key.

Does the latest Bitcoin Core client accepts importing it to express uncompressed address? or it automatically express compressed address?

I have not noticed related parameter for compression options in getnewaddress and importprivkey.

Is this because compressed addresses helps reduce transaction size?

You can import an old uncompressed key. It'll work fine.  Getnewaddress always uses scripts with 'compressed' keys now.  BIP-143 (segwit) style inputs also require compression.

The smaller key format results in smaller transactions, and where it's required and not just optional also simpler code.


Is there a way to blacklist or track ransomware bitcoin addresses? Bitcoin ransoms seem to be on the rise.
Do exchanges or some organization attempt to put comprehensive lists or tracking of bitcoin addresses used for nefarious purposes that are available to the public?

There are two parts to your question:

Blocking: Blocking would entail either nodes refusing to relay transactions paying the crooks, or miners not confirming such transactions. Even if the criminal's address is public and unchanging, which is unlikely due to most wallets generating a new address for each payment, it would require a change to Bitcoin's source code.

If such a thing were to actually get implemented, miners would not update, as choosing transactions based upon anything else than fee per kB would cause them to lose money. In theory, governments could force more than 51% of hash power to not mine blocks that confirm transactions to known ransomware authors, but if a government can launch such a 51% attack, we have bigger problems.
Tracking: Transactions are public, so anyone who downloads the blockchain can map all the transactions in a graph and follow which coins went where.

Companies like Elliptic and Chainalysis are doing exactly that, and given that ransomware identification sites run by the police, such as No More Ransom, collect the ransom notes including the payment addresses, it is expected that malware authors are being actively tracked through the blockchain.

These bitcoins are still valid despite the taint, meaning they will be accepted by wallet software, transferrable to anyone, and spendable anywhere they accept bitcoins. Except, of course, for the police attention they attract when spent.


Does the `HTLC fail` routed back to sender using same path if intermediate node does not have enough capacity? In the Lightning Network, the intermediate hop between the sender and receiver checks for possible errors(like if it has enough balance). And if there is, it sends an HTLCFail message back to the sender.

I was wondering if the HTLCFail message is sent back to the sender via the path it comes from, or it's routed by some new random path as long as it can go back and let the sender know this path cannot route?

  Payment relay (intermediate hop). H checks for possible errors (e.g., it checks whether it has enough
  balance to forward the payment). If there are errors, it sends an HTLCFail message back to S , failing
  the HTLC; otherwise, it sends an HTLCAdd message to R . (This step occurs multiple times in the general
  case of a payment going through multiple intermediate hops.)

The failure message must go along the same route it came, because any intermediate step does not know where the payment was originally sent from. Every hop only knows the previous and next hops in the sequence, and so the only option it has is to return the information to the previous hop on the route.


Would it be possible for miners to discriminate Lightning Network transactions? What do transactions creating LN payment channels and resolving them look like? Are Lightning Network transactions distinguishable from other multisignature transactions? Would it be possible for miners to discriminate against LN transactions?

The most distinguishing feature of a LN channel-opening transaction would be an OP_OR in the scriptPubKey of the channel-funding UTXO, where one side of the OP_OR requires two signatures, and the other side a single signature with an OP_CHECKLOCKTIMEVERIFY.

A closing transaction can be recognized simply based on the fact that it spends a channel-funding UTXO.  If miners were attempting to detect lightning channels, they would need to detect funding transactions.  Once detected, they could either choose to block the funding transaction, itself, or transactions that attempt to spend the funding transactions and close the channel.

Remember, however, that lightning channels will not be the only smart contract that will use UTXOs like described above.  Miners would have to boycott all kinds of smart contracts in order to keep lightning channels off the blockchain.  Also, P2SH would be used, so that miners would not know what the scriptPubKey contains until after the closing transaction is published.  This means they would lose the ability to prevent opening a channel.  In addition, MAST could be used to hide the complexity of a smart contract, even after the contract is fully executed.  This would prevent miners from being able to stop a channel from closing as well.

On the whole, lightning channels would be difficult for miners to discriminate against.


Why the block's order in blockxxxxx.dat is different from blockchain.info I parsed the block00000.dat using python code:

class BlockFile:
  def __init__(self, block_filename):
    self.block_filename = block_filename
    self.blockchain = open(block_filename, 'rb', buffering=16*1024*1024)

  def get_next_block(self):
    while True:
      block = Block(self.blockchain)
      if block.is_ready:
        yield block
      else:
        break

The full code is
https://github.com/keviny/bitcoin-block-parser/blob/master/block.py

It is very strange that the order of block in block00000 in different from the number in blockchain.info.

For example:
....
258 00000000613da6433c0f6c61d8bcb17c39603dd4a8595142359905b18b84edcd
259 000000007964a0e8b97bbea93e937c63d4097c42ccb4db464b1ab3047c62869c
260 000000001a748e1c97226c59b9ddf79a54e0857116808a1b5610a52aef4ed5b5
261 0000000025f2bb2ee58597083e13079899ecc6f2bb7e8bfd57e66b324b05d654
262 00000000d80530efa37319e4b4508b0759fdab8ea8a81272cbe8986881489507
....

The # in blockchain.info is:
258->block #257 (it is ok, because we use different start)
259->block #281
260->block #258
261->block #282
262->block #297

Is this by design, and I need to iterate all the blocks in block0000.dat, then sort by the time in blockheader to get the right block order?

The blkxxxx.dat files contain the blocks in the order that they were downloaded from peers.  Since the client requests blocks from many different peers in parallel, and different peers may respond at different speeds, it is quite possible for blocks to be downloaded out of order.  (Headers are downloaded first, as a separate step, so the client knows what hashes to request before it gets the full blocks.)

Sorting by timestamp isn't safe either.  See Why are the blocks out of order?  The protocol does not enforce accuracy of the timestamps, and a later block can legally have an earlier timestamp.  At last check there were almost 14000 examples of this in the blockchain.

The only correct way to sort them is to actually reconstruct the chain, using the "previous" field of each block's header to identify the block that should come before it.  This will also help you identify and remove orphan branches and disconnected blocks.


Are desktop wallets transferable? I know you can make a transaction across the blockchain to move your Bitcoins from say Bitcoin-QT to Multibit, but is it possible to import my wallet.dat file from Bitcoin-QT to another desktop wallet without preforming a transaction?

You can simply copy .bitcoin/wallet.dat to another place, and use it like HOME dir for bitcoind/bitcoin-qt.

It is like a copy the whole bitcoind data.

Other files in .bitcoin/ directory are just a logs and configs with database, which will be downloaded from network automatically by your new client program.


How would the network respond to an ability to crack the private keys? I'm wondering how future-proof the BTC network security is.

Suppose some technological advancement (e.g. quantum computing and/or some ingenious algorithm) were to allow easily cracking the private keys.

How would the BTC network respond to such an ability if it was anticipated at least a year or so in advance? What would the response be if one morning such an ability was discovered/announced?

This would be a global issue, not just Bitcoin related

If someone discovered how to extract the private key from an arbitrary ECDSA public key in an economically viable timeframe, then there would be serious ramifications for many other economies that depend upon that branch of mathematics. For example, international banking, secure data transmission and many other users of cryptography would need to manage the change so it would not just lie on the Bitcoin community to save it.

That said, the response would depend on the nature of the attack. It may be that the attack could be easily mitigated by constantly changing private keys in which case a fairly minor update could be built into the various clients to support this.

If the problem was with the choice of cryptographic algorithm then work would have to take place to find an appropriate replacement that was not subject to the given attack vector, and then to apply that to protecting the integrity of the transactions taking place through the blockchain.

From a community point of view, there is already a process in place to manage these kinds of responses (see BIP) which has had several successful uses when critical bugs or attacks have been uncovered.


Why is the nonce bruteforced from 0 to n while mining? bitcoin noob here.

I was wondering why is the nonce increased from 0 to n while searching for a blockhash?

Why not start at some other integer > 0 for example?

My background is in ethereum-dev, so I know why the nonce needs to change, but I don't get why from 0 to n?

Thanks in advance.

It doesn't matter which nonces you test or in what order that other than you need to avoid testing the exact same block header twice (since that would obviously be a waste of time).

It's useful to test all the nonce values since if you don't test them all you will need to update extranonce more often, though not critical.

Even though miners increment their nonces in similar ways this doesn't result in the duplication of work between miners: there are a myriad number of differences between the candidate blocks miners attempt, foremost being where their reward is paid. (And pooled miners that happen to pay to the same place get different extranonce ranges assigned by the pool).  As a result there is never any work duplication across miners unless something is embarrassingly broken.

Starting at 0 and incrementing until the maximum value is simply a convenient way to change the nonce that cannot duplicate and minimizes extranonce updates. Many devices assign distinct ranges to different chips, and so don't simply increment in a simple 0 to 2^32-1 manner.

A mining device could save a negligible amount of power by changing using a linear feedback shift register instead of an adder, but no one seems to have bothered with that optimization.


Lost wallet problem: I have a 240 byte file from a 2013 wallet. Can I access bitcoin with this? I lost the device with my Android Bitcoin Wallet late 2013. At the time, I had stored a 'wallet backup' file. It has no extension, is 240 bytes, and begins with 'U'.
With only that file, is it possible to recover the value of the Bitcoin?
Please explain what the 240-byte string is, and what else would be necessary to recover the Bitcoin value.

That is very likely to be the "Bitcoin Wallet for Android" by "Bitcoin Wallet Developers" also sometimes known as the Schildbach wallet.
Other people on Reddit discuss having a file of that size created by this wallet.
Apparently the backup format changed from text-based Base-58 encoded private keys to a binary Protobuf wallet file.
It seems likely that the backup was encrypted and that you will therefore need to know the wallet password. I've no idea if encrypting the backup was optional in that software in 2013.
The process for either form is described here:

GitHub: Bitcoin Wallet - Recovering Bitcoins

This document describes how you can use a backup file on a standard PC to recover your Bitcoins. Normally, this shouldn't be needed. It is much preferred to just use Options > Safety > Restore wallet from within the Bitcoin Wallet app if you can.

i.e. first try installing the Bitcoin Wallet app and using its recovery menu.

Other discussion:

Bitcoin Wallet for Android - Issues decrypting the wallet backup BIN file using OpenSSL
How to restore from backup of Android Bitcoin Wallet
Reddit: Found Bitcoin wallet keys in my phone from 2013


How can I use Bitcoind on Ubuntu if I installed from PPA? I have two transactions that won't go through. The first one I  I sent with a zero transaction fee by accident and the second one I  I sent with a fee of .00022324. Neither is going through. I read this question and one of the answers said that

  What can I do to speed-up the transaction’s confirmation?

  Nothing. The next best thing is to cancel and resend the transaction.

  Make a note of the individual bitcoin address(es) that the unconfirmed transaction was sent from.
      Wait a few days until your wallet stops broadcasting the transaction (or for immediate results, run Bitcoin Core with the -zapwallettxes option)
      Send all your bitcoins from the addresses recorded in step 1 to a new address with the recommended or higher than recommended fee.
      Make original transaction again using the recommended fee.

I wanted to try the -zapwallettxes option but when I try to run bitcoind from terminal it doesn't work. And since I installed from PPA I can't find where the binary was put.

You probably installed bitcoin-qt only.
You should install it first.

sudo apt-get install bitcoind


Problem with Bitcoin Core’s regression test mode I have started bitcoin daemon with -regtest flag. The output was

  Bitcoin server starting

But, when I run

bitcoin-cli -regtest generate 101

command, it shows

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

How this happens?

Try changing port number in bitcoin.conf.
open file

nano ~/.bitcoin/bitcoin.conf

add new line

  rpcport=18332;

save the file and restart bitcoind


Solo mining on created altcoin: not able to create block I have forked the code of an altcoin to play with the param and understand the process Source here.

Now I want to solo mine to create the blocks. The miner is on my PC and the server on a Ubuntu 16.04 VM.
 RPC connection seems to work:

http://MyUser:MyPassword@192.168.1.13:25553/    return
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}

but I'm not able to generate block (with NSG).
Mycoind is launched with :

rpcallowip=*
rpcuser=MyUser
rpcpassword=MyPassword
rpcport=25553
port=25552
server=1
listen=1
gen=1
daemon=1
externalip=192.168.1.13

But nsgminer does not generate me the blocks, I do something wrong ?

From the PC:

nsgminer -o http://192.168.1.13:25553 -u MyUser -p MyPassword

Give me the return:

 [12:34:12] Probing for an alive pool
 [12:34:12] blktmpl error: Unrecognized block version, and not allowed to reduce or force it
 [12:34:12] The network difficulty has been set to 0
 [12:34:12] No suitable long-poll found for http://192.168.1.13:25553
 [12:34:16] Found block for pool 0!
 [12:34:16] Found block for pool 0!
 [12:34:16] Pool 0 communication failure, caching submissions
 [12:34:18] Found block for pool 0!
 [12:36:13] Pool 0 share became stale during submission failure, will retry as user requested
 [12:36:13] Pool 0 share became stale during submission failure, will retry as user requested
 [12:41:10] Started at [2018-03-21 12:34:12]
 [12:41:10] Pool: http://192.168.1.13:25553
 [12:41:10] Run time: 0 hrs 6 mins 58 secs
 [12:41:10] Average hash rate: 0.0069 MH/s
 [12:41:10] Solved blocks: 44
 [12:41:10] Best share difficulty: 0
 [12:41:10] Queued work requests: 13
 [12:41:10] Share submissions: 0
 [12:41:10] Accepted shares: 0
 [12:41:10] Rejected shares: 0
 [12:41:10] Accepted diff1 shares: 0
 [12:41:10] Rejected diff1 shares: 0
 [12:41:10] Hardware errors: 0
 [12:41:10] Efficiency (accepted shares * difficulty / 2 KB): 0.00
 [12:41:10] Utility (accepted shares / min): 0.00/min
 [12:41:10] Work Utility (diff1 shares accepted / min): 0.00/min

 [12:41:10] Discarded work due to new blocks: 3
 [12:41:10] Stale submissions discarded due to new blocks: 0
 [12:41:10] Unable to get work from server occasions: 0
 [12:41:10] Work items generated locally: 0
 [12:41:10] Submitting work remotely delay occasions: 1
 [12:41:10] New blocks detected on network: 1

Thanks for your help and time.

You should run instance of node in atlest two diffrent machine and both of the need to get connected via blockchain.The reason behind need of atlest two diffrent machine is consensus protocol.
To add another node,

  Run same instance of code on second machine add following line in conf
  file:

addnode=*ipOfSecondMachine*

  To check if node is conneceted

getpeerinfo

is what you need

Then go with normal  steps of minning,

ps: if you are trying to mine srypt based coins like ltc then i recommend sgminer


Why doesn't the Bitcoin blockchain truncate past data? AFAIK, verification of transactions on the blockchain doesn't require the full chain data and six to ten verification will be enough (which makes uses of a Merkle tree). Thus, why cannot it abridge the data for a future complete node?

The idea of Bitcoin is that you can obtain the current state of the network without having to trust anyone. You essentially rely on the fact that the state that has most work put into it, is the valid state, and that all transactions are chained together up until the genesys block, after which there are no more transactions.

Now if you were to truncate this state (the block chain) in half, you could hard code this information into the software and it could reach some form of consensus among the nodes of the network. However this opens the door for attacks, because a dishonest node could easily fake and send you a wrong block height information, perhaps making you believe that a different history happened before the truncation of the block chain. And it could do this by simply broadcasting chunks of the history that was truncated, because lots of work has been put in that chunk and your client is programmed to accept longest worked on chains.

You would really have no way of knowing unless you read the entire history yourself.


Fees higher than block reward I know this would not be possible but in-case someone just decided to try it out or accidentally put a high transaction fees (more than 12 bitcoin), so what will it happen?

Will the block reward increase or the remaining fees removed or will it not even send to the block?

What happens to the fees in Bitcoin?

In Bitcoin, the transaction fees paid are added to the block reward so, if a miner solves a block they currently get 12.5BTC block reward plus the sum total of all fees. If the fees add up to 12.5BTC also then, the miner gets 25BTC in total.


Check how much money there is in my Bitcoin address/wallet Is there a website or service that can quickly lookup how much bitcoins are there in a given wallet/address, so I can look up my own wallet from a friend's computer which doesn't have the Bitcoin client installed?

You can use Blockchain.info.

Just paste the address you want to check into the Search inputbox and the website will show you all the transactions where that address was involved, as well as the balance.


What is the difference between a wallet and paired keys? So I've read that a wallet is basically a public address key paired with a private key.

But is it more than that?   Does the physical wallet file contain transaction and balance information as well or does that get pulled from the cloud?

For example, let's assume I have just the public and private keys written down on a piece of paper...

If I import those keys into a wallet client, will the wallet client download my balance and transaction history associated with my address from the cloud?

Yes. The cloud you're referring to is actually the block chain. A bitcoin wallet has various different meanings, such as web-wallet, brain wallet, or various others, but in my opinion the best representation of a wallet is actually a file, commonly a wallet.dat file. Then you use a bitcoin client to open this wallet file.

Inside this file there's various key pairs that you can use to make bitcoins transactions. No balance information is kept in this file otherwise it would be extremely large in size.

The important part is that a bitcoin wallet's format is not standardized. This means that each bitcoin client implements its own wallet file format. You can't import Bitcoin-QT's wallet file in Multibit for example.

But again, a wallet can be represented in a variety of different ways: as files, on the web managed by third parties, as a piece of paper, etc.


Why does Bitcoin use ECDSA, instead of plain old hashing, to secure transaction outputs? For example, let’s say I pick a random secret and hash it. Now, in the hypothetical hash-based scheme, my hash effectively replaces my public-key hash, and my random secret effectively replaces my private key. As far as I can tell, the only additional benefit of ECDSA is authentication of some identity. Is identity authentication really something Bitcoin needs to care about?

You must reveal the secret in order to spend the output, else there is no way other users could verify that your hash is indeed the correct one. Once you reveal that secret, anybody could attempt to create a competing transaction which spends to a different output - miners in particular would be able to confirm this transaction into a block and ignore your own.
The purpose of using ECDSA is so that a transaction which spends some output is signed by the private key corresponding to a public key, but without ever needing to reveal the private key. Nobody can attempt to create a competing transaction to spend this because they require the private key to do so. You cannot create a digital signature with only knowledge of the public key, but you can verify that the signature is correct using only the transaction and the public key.


How can I look up how much ASIC Miner has mined in the last week? I can see a list of their most recent blocks here: http://blockchain.info/blocks/ASICMiner, but is it possible to get aggregate numbers over a given time?

http://www.asicminercharts.com/live/ keeps track of the total amount stored in the mining wallet, as well as hashing power over time (Take the /live off to see historical charts).


Auto load all wallets when start up Every time I restart my bitcoind, all the wallets will need to be reloaded:

$ bitcoin-cli listwallets
[
  ""
]
$ bitcoin-cli loadwallet test01
$ bitcoin-cli listwallets
[
  "",
  "test01"
]

So I was wondering that is there any ways to auto load all the wallet under path /home/ubuntu/.bitcoin/testnet3/wallets when startup? I have tried adding some config in bitcoin.config, but all didn't work for me:

wallet=/home/ubuntu/.bitcoin/testnet3/wallets
wallet=/home/ubuntu/.bitcoin/testnet3/wallets/test01
wallet=1

bitcoin core version: v0.18.1

You can specify the wallet options multiple times.

I.e. specifying:

wallet=/home/ubuntu/.bitcoin/testnet3/wallets/wallet01
wallet=/home/ubuntu/.bitcoin/testnet3/wallets/wallet02
wallet=/home/ubuntu/.bitcoin/testnet3/wallets/wallet03

in your bitcoin.conf will load wallet01, wallet02, wallet03.


The second parameter of the RPC call is a boolean for decoding the results or not.

Setting this to False will return the hex encoded block.

hash = "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048"
print rpc_connection.getblock(hash, False)


Is it Possible to Program AntMiner S9 or Other ASIC Miners? Is it possible to program the AntMiner S9 or other ASIC miners?

For example, let's say I only want it to try nonces from 1 to 1 million (instead of all 4 billion possibilities) would it be possible to somehow modify the software on the machine to do this? (please don't ask me why I want to do this, I just want to know if something like this is possible)

If it's possible, what programming language would I use?

Finally, would doing this (significantly) reduce the hash rate of the miner?

Yes it is possible. To do so, you will need to modify the firmware and install your own firmware onto the S9. The source code for the firmware is available on Github. The firmware is really a lightweight operating system and includes software such as CGMiner preinstalled. Those preinstalled software are probably what you will need to modify, and those are likely written in C/C++.

Since what you want to modify effects the data that is hashed, it should not effect the hashrate at all.


Where can I view my HD wallet seed in bitcoin core 13.2 Where/how do I view my seed in core 13.2? I understand that as of 13.0, the hd wallets are used by default.

To get the extended private masterkey itself (not a seed), you can use the dumpwallet command and provide it with a filename to dump your keys to. The extended master key will be at the top of the file, and then it will list all addresses along with their keypaths underneath that, line by line.

Note that the dumped file is not encrypted, so be careful with what you do with it :)


Force Inbound Connections to IPV6 only Is it possible to restrict all connections to an IPV6 address?
I've set
onlynet=ipv6
bind=::

But it seems that nodes are still attempting to connect to an IPV4 address (in addition to the IPV6 address).  Is there any way to prevent this?  I am seeing discover and addlocal both being set to the IPV6 address on startup.
Thanks!

onlynet only affects outbound connections.
If you only want inbound IPv4 connections (why?), you'll need to either:

Patch Bitcoin Core to bind to IPv6 addresses in IPV6_V6ONLY mode (see CConnman::BindListenPort in src/net.cpp)
Use some firewall rule on your system to prevent incoming IPv4 connections to it
Make sure you only have a publicly-reachable IPv6 address


How to fork Bitcoin and build own cryptocurrency Is there any step-by-step tutorial about how to build own cryptocurrency based on Bitcoin code?

To start a new chain, use a genesis generator, apply the new genesis to the source, and remove the checkpoints.

If you want to apply new/different rules, be prepared for a difficult task.  Changing even the slightest protocol rule will most likely affect all other rules because of the complexity of PoW.

If the only thing you want to alter is the maximum coins, this should be relatively easy to alter in the source.


What are the most popular crypto currencies after Bitcoin? I am trying to determine which crypto currencies are the most popular with the assumption that Bitcoin is the most popular one.

This question is up to different interpretations because "most popular" can be viewed many different ways and that is why I am here asking this question.  Most popular could be based on the most real world use, the most media interest, the most valuable, or the most number of people mining or the most processing power used in mining.

I want to know your opinion based on solid facts of the current state of crypto currencies.  It could be that another crypto currency is more popular than Bitcoin based on your rank, and I doubt that, but that is why I want the help from experts here.

If an online store accepts another crypto-currency appart from Bitcoin, you can be sure 90% of the time it'll be Litecoin (most accept just Bitcoin as of now). It's the one that has the 2nd biggest market capitalization and market depth as well. As to what could be the 3rd most popular, that's difficult.

"Popularity" is difficult to measure directly, but you can use value in fiat as a proxy. Right now, several crypto-coins are valuable about 1 US dollar or more: just go to cryptsy or to coinwarzand check the market prices (given in bitcoins). Given current prices of bitcoin in USD anything more valuable than one milli-bitcoin is worth aprox. a dollar, a lot of coins are worth more.

Another proxy you can take is how frequently you see ads of people asking for donations or offering their services in exchange of that currency - that way, you'll see humble dogecoin being asked/offered a lot, where as protoshares/quarks are almost never asked for in spite of their value. Other coins worth more than a dollar (like prime, name or PPC) would take the lead here based on this metric.


How do you export or save your wallet information for litecoin-qt on ubuntu linux? I just installed and finally synced up litecoin-qt on ubuntu linux. But how do i backup this wallet and password protect it?

File -> Backup wallet

Save your wallet file securely in at least two locations.

Settings -> Encrypt wallet

Ensure that you use a secure password, backup after you encrypt your wallet file if there are no coins in it to ensure its security.


How do nodes communicate over Lightning network? I read the following article and watched below video.

https://medium.com/@melik_87377/lightning-network-enables-unicast-transactions-in-bitcoin-lightning-is-bitcoins-tcp-ip-stack-8ec1d42c14f5

https://www.youtube.com/watch?v=Ug8NH67_EfE

On those media, they say that payment channels are based on just TCP/IP connection (unicast) not p2p.

In Lightning network's white paper, there is no explanation of what method is used to establish payment channel between two nodes.

What method is used for establishing payment channels ? traditional TCP/IP way or p2p ?

You are confusing two things here: payment channels and network communication. A payment channel is really the set of commitment transactions and their revocations. It is unrelated to network communications and the participants in a payment channel do not need to communicate via one specific way.

The network communications that nodes use to talk to each other (e.g. to update payment channel states) use TCP in a P2P manner. Like Bitcoin, a node establishes a TCP connection to other nodes, and those nodes have connections to other nodes. P2P is not a communication standard like TCP and UDP, rather it is a model of the network's structure and is a concept.


Mining Theory: GPU/ASIC Computation vs Co-processor Computation I am very new to bitcoin and I am trying to understand a bit about mining theory. I do not dispute the convention of using ASIC based computation for bitcoin mining, but rather I'm curious about why they outperform co-processors like this for mining. Maybe a nuanced discussion of a few of the various trade-offs would be the easiest and clearest way to understand things. Let me break it down like this:

Parallelism: Co-processors are mostly used for task parallel code (non-vectorized code) whereas GPUs are adept at data parallel (vectorized) code. Two questions come to mind:

Are all mining codes in vectorized languages?
Can there ever be a benefit to mine in task parallel code? It seems like with bitcoin mining, there is only 1 task: crunching numbers. Am I oversimplifying it though? Perhaps with task parallelism one could run other algorithms to assist with the number crunching (such as compression, flush to zero, ect).

Calculations: Speaking of flush to zero, GPU's tend to perform better than co-processors with floating point calculations. However, co-processors perform better in logical as well as arithmetic calculations.

Is floating point calculation more important than logical/arithmetic in bitcoin mining?

Latency:

Since GPUs run in sync, the whole dataset has to be transferred at the beginning and end of each task, but co-processors can move all the data from RAM to Host RAM in a fraction of a second. I'm not sure if this is true of ASIC processors, maybe it's different.

Would the issue of latency ever warrant the use of co-processors for mining, or is latency not a big issue?

Main Question Could there ever be a pure co-processor mining machine? What about a hybrid system using an array of co-processors and GPUs for the best of both worlds? Or would GPUs beat co-processors every time? Why or why not?

You may approach this question from any angle as per the content above. The answer doesn't have to answer all questions, I thought I would just include a few interrelated questions for robustness/comparison purposes.

I want to stipulate some assumptions to make sure the answer is mostly from a theoretical standpoint. I want to make the logistics of it all mostly out of scope.

Assumptions

Power consumption is out of scope
Unit price of GPUs and co-processors is out of scope (obviously
co-processors are ungodly expensive)
Cost of electricity is out of scope

This and a followup were going around recently.

"Last week I posted on my latest toy, a rig that used eight Xeon Phi 7220 cards in a single 4u-server to achieve a total of roughly 24kH/s for cryptonote coins"


won't show my balance by "getbalance myaddress" but show balance by "getbalance". what is the reason? i send btc in my-server created btc address.

which is created by "getnewaddress".

get the payment also and it's shown by "getbalance".

but i want to see the balance by "getbalance myaddress".

it's not showing. what is the reason?
 you anyone help me about it?
how a account will associated server created btc address?

Try this:

getnewaddress;
getaccount <result from 1>
getbalance <result from 2>

For your information:

  The getbalance RPC gets the balance in decimal bitcoins across all accounts or for a particular account.

This question should be also helpful for you.


The Ethereum gas limit seems prohibitively low. Will it ever be raised? If so, when and how? I'm having trouble publishing contracts and executing transactions due to the low gas limit (3.14 million gas ~0.15 ETH). How and when will the gas limit rise?

The block gas limit is determined by miners. According to the Ethereum protocol, they can raise/lower it by 1/1024 of the previous block.

Currently (11/20/2015), geth is set up to automatically increase the gas limit if the previous block used more than ⅔ of the previous block gas limit and automatically decrease it if it’s below the threshold. In practice, an increase (probably) never happens, and even if it does, most blocks are well below the ⅔ threshold, so the limit would fall back to pi million quickly. Gas usage is very spikey like that. See http://stats.ethdev.com

Furthermore, for miners to amend the ⅔ logic, they’d need to alter geth’s code and build from source which is not going to happen en masse.

There are ongoing discussions about what to do about this on https://gitter.im/ethereum/research. Vitalik floated the idea of making the limit 4x its current limit and leaving the ⅔ logic the way it is. I support the 4x increase, but I think the ⅔ logic needs to be rethought.

UPDATE: I asked Vitalik about the low gas limit during DEVCON1. The reason there is no rush to raise the gas limit has to do with block propagation times. Every node in the ethereum network has to execute every transaction. If the gas limit were increased substantially, there might be delays in block times which would cause the network to go from 17 (current average) up north of 20 seconds. That's not the direction we want to be heading in.

I'll also say that one benefit of a low gas price is that it forces contract authors to create efficient code which, in turn, reduces blockchain bloat.


generate HD addresses using publicKey Bip44 I'm just wondering if it's possible to generate HD address using xPub?

I tried to create HD address using BitWASP-PHP with the following path:

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

m/44/0'/0'/0/1

but the response is:

  Can't derive a hardened key without the private key

I know that I can do it with Bip32 with the following path: 0/addressIndex

but I would like to use bip44.

Any derivation path with an apostrophe (') signifies that that index should use hardened derivation. Hardened derivation means that you can only use the master private key. So with just an xpub, you cannot derive the full path.

Usually what happens with BIP 44 is that you generate a master private key, derive the keys for the hardened parts of the path, and then use the public key of the last hardened part to derive the addresses using non-hardened derivation.

So you would derive the private key for m/44'/0'/0' using the master private key. Then take the xpub of that derived private key and derive the remaining keys with path m/0/i.


How to extract raw script from tx messages when the output script starts with 0xA9? I'm working on extracting output addresses from tx messages in BITCOIN packets.

Currently, I extract address from output scripts which starts with 0x76(OP_DUP)
like this :

76 a9 14 6d 1d 74 58 95 6e 80 cd b4 c3 3f 1e d5 8e 91 c4 92 1a 85 d0 88

but i don't have any idea about some output scripts which start with 0xA9(OP_HASH160).

As an example, i don't know in below example, what is the raw script, which is used to generate output address?

a9 14 16 52 33 02 f2 ee d0 e0 aa 6a 4c 1d 0a 41 39 6f c2 6f 53 6e 87

How i can extract output address from output scripts which start with -xA9?

This seems to be a classical P2PKH script which start with op_dup flowed by op_hash160 if you look at the next byte there is the hex value 14 which is 20 in decimal and means read 20 byte of data and push it to the stack.

I have created a video in the past showing step by step how to dissect a P2PKH tx. Look: https://youtu.be/1n4g3eYX1UI


For US Tax purposes, is Bitcoin mining more like property, "work to solve a puzzle" or "winning a lottery"? From a taxation perspective, I think it's important to clarify if running a Bitcoin mining operation is more like property exchange, labor to solve a puzzle, vs winning a lottery that runs every 10 minutes.

I'm looking from someone to answer who is familiar with accounting rules regarding lotteries, gambling, and similar operations.  As it stands, lottery earnings are taxed at enormous rates.  (50%)

Although I'm interested in US based operations, anyone with experience in other countries would be of interest as well.

In the USA, Bitcoin earnings are treated like property.  The full announcement is here:

Virtual Currency Is Treated as Property for U.S. Federal Tax Purposes; General Rules for Property Transactions Apply IR-2014-36,
March. 25, 2014 WASHINGTON —
The Internal Revenue Service today issued
a notice providing answers to frequently asked questions (FAQs) on
virtual currency, such as bitcoin. These FAQs provide basic
information on the U.S. federal tax implications of transactions in,
or transactions that use, virtual currency.
In some environments,
virtual currency operates like “real” currency -- i.e., the coin and
paper money of the United States or of any other country that is
designated as legal tender, circulates, and is customarily used and
accepted as a medium of exchange in the country of issuance -- but it
does not have legal tender status in any jurisdiction.
The notice
provides that virtual currency is treated as property for U.S. federal
tax purposes.  General tax principles that apply to property
transactions apply to transactions using virtual currency.  Among
other things, this means that:

Wages paid to employees using virtual currency are taxable to the employee, must be reported by an employer  on a Form W-2, and are subject to federal income tax withholding and
payroll taxes.

Payments using virtual currency made to independent contractors and other service providers are taxable and
self-employment tax rules generally apply.  Normally, payers must
issue Form 1099.

The character of gain or loss from the sale or
exchange of virtual currency depends on whether the virtual currency
is a capital asset in the hands of the taxpayer.

A payment made using
virtual currency is subject to information reporting to the same
extent as any other payment made in property.
Further details,
including a set of 16 questions and answers, are in Notice 2014-21,
posted today on IRS.gov.


How can I enable more GPUs in Ubuntu for poclbm? I have an Ubuntu set up (11.10) and 2 ATI Radeon HD 6870 cards. It detects one, but not the other for some reason when I try to run poclbm.

When I run lspci, it finds both cards.

Any help?

lspci lists PCI devices. ./poclbm.py lists OpenCL devices. If the former finds the device but the latter does not, your second GPU must not be registering as an OpenCL device.

Ubuntu 11.10 has a notorious reputation for multiple-GPU bugs. (See here and here.) I personally have had issues with 11.10 mining that were resolved simply by switching to another release. I would suggest you instead use Ubuntu 11.04 (Natty Narwhal); it is generally regarded to be the most reliable Ubuntu version for mining.

If that is not an option, or installing 11.04 doesn't fix the problem, try the following steps:

Uninstall whatever version of Catalyst/SDK you have (make sure to remove all configuration files) and install
Catalyst 11.6 and SDK 2.4.
Run aticonfig -f --initial --adapter=all again. Make sure it runs without errors.
Run aticonfig --list-adapters. You should see two.

Those steps should fix any configuration issues. If your problem persists, it's either a hardware issue (or an Ubuntu 11.10 issue).


How to raise the bad-txns-vout-negative error? I wanted to replicate the bad-txns-vout-negative error scenario. I tried the following but getting 'Amount out of range' only:
Here is the command i tried:
bitcoin-cli -named createrawtransaction inputs="[{\"txid\":\"af7cc9204d0ab7d52f66a5dacb79b77c34c90013e3288a391557ee8e07c3c307\",\"vout\":"0"}]" outputs="{\"data\": \"6e636861696e20626974636f696e207361746f73686920766973696f6e\",\"myTmAe67rCuJU5X1fqKiEYohb53TEQrxP3\": 6.249996,\"mt8QSx6m6Fwqt8zMVcji16UiVYS8xYRwFi\": -0.001000}"
error code: -3
error message:
Amount out of range

The createrawtransaction command will do a sanity check of the arguments and return the Amount out of range error if the value is not >= 0 and <= 21000000 * 10e7, so that you don't shoot yourself in the foot.
You need to craft the invalid on your own, you can see an example of precisely what you are trying to achieve in the functional test suite (which uses python-bitcoinlib).


What is `modifiedfee` in mempool dump, how is it related to actual fee? In mempool dump through getrawmempool true, I see something called modifiedfee.

It seems to be the same in all cases (just by looking at the dump). What exactly is it, how does it relate to fee (that is also present)?

The help says

  (numeric) transaction fee with fee deltas used for mining priority

but that is not very helpful; that just seems like normal fee.

edit: I went trough the file by iterating over the dump, and modifiedfee and fee are indeed the same on all the transactions.

It is related to the prioritisetransaction RPC, which changes what fee a transaction has for the purpose of inclusion in blocks.

If you never use prioritisetransaction, the modified fee will always be equal to the real fee.


Appeared to have lost funds after recovering Blockchain wallet For the past six months I have been logging onto my Blockchain wallet through Touch ID without any problems .
However recently my iPhone crashed/restarted and the Blockchain app asked me for my password which I was unable to find / remember . But I had written down my 12 seed string . After going through the recovery phase (although I didn't verify email?) I was directed to what appeared a new wallet ? Which had a new wallet ID and had a completely empty balance . It appeared as though all my funds had disappeared .This "new" wallet (or maybe wallet ID) with an empty account seems to match my 12 string code? which is what I most worried about .
Am I doing something wrong or is there a solution to this ?

Would really appreciate any response
Thanks

This happened to me yesterday as well but under slightly different circumstances.

I set up my account through the app, logged my seed and everything else I needed and continued with purchases etc. Couple of days later I decided to run this on my Mac and spent ages trying to figure out the pairing process, it wouldn't work at all seemed to only want to pair I'm the other direction. So I decided to delete the app reinstall it and pair how it asked. When I did this both online and app balances were zero. A bit worried, but happy knowing I had the seed I ran through the account recovery and when I came up the balance was still zero!

I logged into Coinify separate and the transaction is still there! So strange.


Can mining with lots of laptops make money? I have lots of laptops that are idle nearly all the time. Some of those laptops are new, some of them are old. Sometimes a word processor is opened and that's it.

Is it possible to use these laptops for mining in order to make money?

To mine most crypto-currencies you'd need a good graphics card, preferably AMD than nVidia. Graphics chips integrated with the mother-board are typically bad for this, if they can be used at all.

There are some cryptocurrencies you do can mine with CPU only, like Protoshares, Quarkcoin, Primecoin and a few others. To avoid affecting the normal usage of a computer, mining program can run with a very low priority so it's only running when computer's not really used.

However, mining on a laptop is strongly discouraged for they're typically not designed to be run with their processors at 100% the whole time, so you're going to wear down the components earlier due to overheating - capacitors, battery, even hard-drive or microprocessor could die earlier because of that (e.g. Apple Airs wear down very fast if you put them to mine, a friend of mine experienced it).

If you can somehow ensure they'll have VERY good ventilation, or if you limit the mining to 4 or 5 hours a day, with several "rest" hours between each, you might make some money off them. But then, you ought to measure carefully the cost of the extra power they eat (plus the extra refrigeration's consumption) vs. what they would take if idle, vs. what you earn after a while - it might be profitable, or it might not.


Can larger transactions have a lesser fee per byte than smaller ones and still get equally treated? Is the term "volume discounting" applicable in bitcoin transactions, meaning can a user pay less satoshi/Byte if a few transactions are bundled into one?
In other words, would a fee for a single bundled transaction be less than the sum of fees for several small-sized (in bytes) transactions?

No. There is no unit price discount for making larger transactions. Such transactions consume similar resources to multiple transactions which sum to the same size. They consume the same amount of block space, so they will cost the same in transaction fees.


How to restore locally a MyWallet backup? The website blockchain.info has an online wallet system MyWallet which creates backups with a .aes.json extension. While I understand it's a json file encrypted with AES using my passphrase, I'm still confused about what am I supposed to do to decrypt it and load it into a local client.

I have OSX 10.6, but for portability sake let's just talk about command line, hoping at least that one stays the same on multiple platforms.

I wrote a small Python script which can be used to decrypt your encrypted MyWallet.  It does the same as the MyWallet JavaScript, only in Python.

Edit: the code below seems to be outdated, here's a working version as of May 2012.

Copy the following into a file, make it executable, then run it:

#!/usr/bin/env python
import base64, hashlib, hmac, json, sys, getpass
from Crypto.Cipher import AES
from Crypto.Hash import RIPEMD, SHA256

base58_chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'

def prompt(p):
    return getpass.getpass(p + ": ")

def decrypt(encrypted, password):
    encrypted = base64.b64decode(encrypted)
    iv, encrypted = encrypted[:16], encrypted[16:]
    length = len(encrypted)
    encrypted += ' ' * (15 - (length-1)%16)
    hash = (hmac.new(password, iv + "\x00\x00\x00\x01", hashlib.sha1).digest() +
            hmac.new(password, iv + "\x00\x00\x00\x02", hashlib.sha1).digest())[:32]
    clear = AES.new(hash, AES.MODE_OFB, iv).decrypt(encrypted)[:length]
    return clear

def base58_decode(v):
  value = 0; ret = ''
  for c in v: value = value*58 + base58_chars.find(c)
  for i in range(32):
      ret = "%c"%(value%256) + ret; value /= 256
  return ret

def base58_encode(v):
    value = 0; ret = ''
    for c in v: value = value*256 + ord(c)
    while value > 0:
        ret = base58_chars[value%58] + ret; value /= 58
    return ret

def to_sipa(s):
    version = 128 # or 239 for testnet
    key = chr(version) + base58_decode(s)
    return base58_encode(key + SHA256.new(SHA256.new(key).digest()).digest()[:4])

clear = decrypt(prompt("encrypted wallet"), prompt("password"))
obj = json.loads(clear)

if (obj.has_key('double_encryption')):
    print("wallet uses double encryption")
    password = obj['sharedKey'].encode('ascii') + prompt("2nd password")
    for key in obj['keys']: key['priv'] = decrypt(key['priv'], password)
for key in obj['keys']: key['priv_sipa'] = to_sipa(key['priv'])
print(json.dumps(obj, indent=4, sort_keys = True))

It will prompt for the wallet backup and one or two passwords, depending on whether the wallet is single or double encrypted.  Paste the wallet backup in rather than saving it to a file.

You'll probably need Python 2.x.  I've been unable to find a package of the pycrypto stuff for Python 3.  Apparently it will be available in the upcoming 'precise' Ubuntu release.

Edit: It seems the backup format has been changed and so this script doesn't work on recent backups.


Proof of work - does the equipment matter? It technically doesn’t matter whether I am using a super computer or a laptop to do the proof of work, it’s simply that with a super computer I can go through the attempts much faster, which means I have a higher chance of solving the problem before anyone else and therefore claiming the reward, right?

Right.

The proof of work is computing 2 SHA256 of a sequence of bytes that represent the block header to find a value lower than a target. It doesn't matter if the 2 hashes are computed by an ASIC, a CPU, a GPU or a HP-48. What matters is the number of hashes you can compute per unit of time.

That's why the power of mining hardware is measure in MH/s, GH/s or TH/s (mega, giga and terahashes per second).


Should I send the remaining balance from a paper wallet to a new paper wallet? If I withdraw all my money from a paper wallet, but don't end up spending the whole balance, should I create a new paper wallet and send that remaining balance to it as opposed to the old wallet?

For security and privacy reasons I would advise you create a new paper wallet and send that remaining balance to it. For privacy so that you don't reuse the address and for security so that you don't reveal your public key on the blockchain when spending the first transaction. Until funds in a wallet are spent, only the hash of the public key is visible on the blockchain. Afterward funds are spent, the public key gets revealed. It is not such a big issue but more secure not to reveal the public key especially in terms of quantum security.


How to update a COPAY wallet? I want to update my Copay wallet but not sure if I'm supposed to install the new (updated) version of the wallet or what? Will it not mess with the old version or do I have to remove it first? Or do I transfer my btc afterwards?

You can just remove the current version and install the newer version since they are storing your details on your pc, not in the application itself.

What you can do as an extra action, is storing your backup phrase somewhere.


Missing bitcoin... over 6 confirmations! Ok, so I sent a vendor 0.0046531 bitcoins using Muun wallet. The address I sent it to is 3LTJzNzbXDBDdzHPxDSQk6sucLDKPW3zmN. The blockchain explorers I have used to track the money says they were received and “spent”, leaving the wallet with a balance of zero. Therefore I still owe the vendor money, but what happened? Is it fraud? I’ve used this vendor for years and something like this has never happened before.

Missing bitcoin

Nothing seems to have gone missing.

Therefore I still owe the vendor money

If you sent the money to the correct address, you do not owe the vendor any money.
About 25 minutes later the money was spent in a transaction with about 55 inputs and 15 outputs, maybe the recipient has a custodial wallet whose custodian reorganised some of their holdings or maybe the recipient ran the money through a mixer for privacy.
However, it doesn't matter what they did with their money after they were paid, the blockchain shows they were paid.

leaving the wallet with a balance of zero

You have no way of telling the balance of someone else's wallet. A wallet can hold many addresses. One or more of the output addresses in the second transaction could well be in the vendor's wallet.
If you are referring to your own wallet I don't see how your remaining balance is zero since there seems to be change going to it from the first transaction.


How do I buy bitcoins with South African Rands? I have South African Rands that I would like to purchase bitcoins with. No Websites I know of accept Rands (ZAR). How do I get around this?

https://www.luno.com (previously known as BitX) trades BTC for ZAR via EFT to South African banks. They have accounts at FNB and Standard Bank. If you have an account at one of those, it will clear faster.


What scenario could a lack of bitcoin full-node cause problems in the network? Let's say the only full-nodes in the network were the mining nodes. If you joined the network as a full-node, what problems or attacks could happen in such a scenario? Also, what problems or attacks could happen to SPV clients that aren't already likely in the current network environment?

At what point are these problems or attacks likely to start happening in terms of number or percentage of the network's full nodes run by independent people/entities?

By running a full node, you ensure that your bitcoin transactions are valid and received by the network, and that your bitcoins are 'playing by the rules you want' (you implicitly agree to the rules of the code by running the node).

So if you are not running a node, you are depending on other nodes in the network to relay this information to you.

The less nodes that exist, the easier it would be for a majority of nodes to coordinate and change some rules, and so users that are not running their own nodes may then unknowingly have the rules changed on them.


Purpose of a BlockChain in local wallet application I have installed the BitCoin wallet application on my PC, so that I can cold store my BitCoin. It's "Synchronizing with the network" and has 272 weeks of BC left to download (painfully slow!!)

What I want to know is, why do I need to download the BC in order to send/receive funds from my wallet. Is this absolutely necessary?

The blockchain is the full record of all Bitcoin transactions. Without it, we wouldn't know how much each address is able to spend.

There are some clients (called lightweight clients) that rely on their peers' blockchains while others like Bitcoin Core (sometimes called a full client/node) store the blockchain themselves. If you choose a full client, you should expect to download and store the blockchain (~21 GB currently). You can speed up the initial sync by download bootstrap.dat from a torrent, as instructed here.

What you're describing, though, is not cold storage! Cold storage means that the keys are only accessible via offline means, like a piece of paper, or a computer that is never connected to the Internet.


Link my bitcoin address with multiple wallets I created a CoinBase bitcoin wallet address, can I share this address with Electrum desktop software instead of having different addresses and paying the transfer fees. Or is there another wallet like coinbase that has less fees and good security. Bear with me, I am new.

I created a CoinBase bitcoin wallet address, can I share this address with Electrum desktop software instead of having different addresses and paying the transfer fees.

No, because afaik Coinbase does not provide access to the private keys for this address, and so you will not be able to control this address from any other wallet software. In order to send a transaction from your Coinbase wallet, you will have to submit a request to Coinbase to initiate a transaction, and then their service will (hopefully) craft and publish the transaction for you. The point here is that you can contrast this custodial wallet model with a self-sovereign wallet model, in which the user is fully responsible for maintaining their own private keys (funds). (disclaimer: I have never used Coinbase, but it is my understanding they are a custodial service, and in that case the above is true).

In order to spend some bitcoin, you need the private key for the bitcoin address in question. If you use some wallet software that is non-custodial, the software will create and manage these private keys for you in the background (a bitcoin address will be presented to you). If you so desire, you can import the keys to another wallet, so that you can spend your funds from one of several wallet instances. Many wallets these days are 'hierarchical deterministic' (HD) wallets, which will provide you with a 12 or 24 word 'seed phrase', this seed phrase can similarly be used to recreate an entire wallet on a separate device.

However, in general, having multiple instances of the same wallet is not the most secure method of using Bitcoin, as you would now have a larger possible attack surface. If any one of your wallet instances is compromised, then your funds could be stolen. Additionally, entering private keys into software is a moment of vulnerability, as a keylogger could be present on your machine, waiting to grab any bitcoin private keys, etc.

Many users will instead create several wallets, using various software and with varying levels of security between them. Maybe one wallet holds the majority of your funds in a super-secure manner, while another wallet is easily accessible through your mobiles phone, with a small amount of BTC on it for day-to-day spending, etc.

If you use good wallet software and are cognizant of the mempool backlog, you can send non-time-sensitive bitcoin transactions for extremely cheap. If Coinbase is offering cheaper fees than what you would actually pay to miners otherwise, then that probably just means they are making money off your use of their service otherwise. Generally I would not recommend using them as your wallet, it is a better idea to educate yourself on how to use bitcoin to regain monetary sovereignty, not sacrifice it to some corporation.


Loyalty programs for Bitcoin transactions Since it is possible to track the transactions in Bitcoin, is it possible to devise loyalty schemes?

The difficulty with such a scheme would be identifying the customer.

Certainly, the loyalty program operator can monitor incoming transactions to addresses registered by participating merchants.  But the public blockchain shows only the address from which the payment was made.  The question is how to use that address to identify the customer who should be given points.

If the customer made all their payments from a single address, they could simply register this address with the loyalty program in advance.  However, most wallet clients don't work that way; users hold their coins in many different addresses, and new addresses are created (for change) every time another transaction is made.  (The thought is that this makes it harder to tell who a given address actually belongs to, and improves anonymity.)

So a customer would either have to register a large and constantly changing set of addresses (awkward) or would have to take steps to ensure that payments to the merchant were always made from one particular address that they had registered (not easy to do in most clients, and might require extra transactions and fees to move the coins to the proper address before making a payment).

There is a similar issue in that merchants should also want to use a large number of different addresses for incoming payments.  If all incoming payments go to the same address, it makes it easy for a competitor to see how much business they are doing.  Also, for safety they may not want to hold all their coins in a single address, so if all incoming payments go to a single address, they would need to make extra transactions later to spread them across other address.  So ideally, each customer makes their payment to a unique address.  Thus, it's not as easy as having each merchant register a single payment address.  They would probably want to pre-generate a large number of addresses and register all of them.


How can a 24 word seed know when I added or removed wallets at a later point? Since I do not have 50 Rep points I had to post my question this way!

This is an answer by "https://bitcoin.stackexchange.com/users/56917/rstack" to the question "How do Ledger Backups get stored?"

"Using words to back up wallets is a process described in BIP 39.

Basically, the mnemonic is converted into a seed. This seed is then used as the seed to a Heirarchical Deterministic (HD) wallet, as laid out in BIP 32. The seed is used to generate a Master Extended Private Key, from which all other private keys can be generated. The child key generation follows the standard of BIP 44 so it is compatible with other wallets too.

Thus, by backing up your mnemonic words, any time you enter them in a wallet, it can recreate the seed, then the master private key, then all your other keys, so your wallet is back."

When I start my Ledger for the first time I get a generated 24 word seed. At this point my Ledger has the default wallets (BTC, ETH, LTC) if any. From Rstack's answer I get how this works or could work so far, BUT how does my 24 word seed know the future when I add or remove wallets? The 24 word seed does not change after I add or remove wallets. Randomly generated public and private keys that are created in the future can no way have ties to a previously generated 24 word seed. Does not make sense!

Unless this can be explained I am going to have to assume that my public and private keys are stored somewhere and retrieved by the 24 word seed.

Can anyone shed light on this?
Thanks in advance and cheers everyone.

I don't know about Ledger specifically, but for HD wallets in general, private and public keys are not generated randomly.  Rather, they are generated by a deterministic algorithm from the seed (in this case, the 24 words).  So they are absolutely "tied" to the seed.

When you add a wallet for another coin, keys for that wallet would presumably be generated from the same seed (using different parameters so that you don't end up with the same keys in all your wallets).    The seed itself stays the same and doesn't have to change to reflect the creation of the new wallet.

Should you ever need to restore, I assume you would need to tell the device which coins you had wallets for.  It will then regenerate all the keys for those wallets from the master seed, using the same algorithm as it used originally, and you'll have all the same keys you had before.  (If you try to restore some wallets that you weren't using or had removed, all that will happen is you'll find no coins in that wallet.)

Your public and private keys are not stored anywhere except within the device itself.


How secure is it to upgrade bitcoind? The release notes of bitcoin-core suggest to just copy the bitcoind file, which appears on my system (Raspbian Butch) in /usr/local/bin.

Since I built from source using ./configure I wonder how this will influence my node. Is bitcoind really the only thing that gets changed with a new release?

Although certain releases perform database upgrades, the upgrade is handled by the bitcoind binary - updating a node only requires changing the binary, regardless of whether you downloaded a prebuilt one or compiled it from source.

If any additional changes to the bitcoin data are required, the updated bitcoind will perform them when it starts.

If you are downloading a prebuilt binary, make sure you get it from a reliable source (such as bitcoin.org) and verify the signatures to make sure it has not been tampered with.


P2pool Crashing after a few minutes This start today I have reboot the server etc. but doesn't seem to have helped.

Basically it will work for a while then I get a long list of request parent share items.

then the process crashes totally and just loops with

2014-07-09 09:37:33.050000 > ---  ---
2014-07-09 09:37:33.051000 >   File "p2pool\data.pyc", line 431, in attempt_veri
fy
2014-07-09 09:37:33.052000 >
2014-07-09 09:37:33.053000 >   File "p2pool\data.pyc", line 320, in check
2014-07-09 09:37:33.054000 >
2014-07-09 09:37:33.054000 > exceptions.ValueError: share_info invalid
2014-07-09 09:37:33.068000 > Share check failed:
2014-07-09 09:37:33.069000 > Traceback (most recent call last):
2014-07-09 09:37:33.070000 >   File "p2pool\util\deferral.pyc", line 233, in it
2014-07-09 09:37:33.071000 >
2014-07-09 09:37:33.072000 >   File "p2pool\util\deferral.pyc", line 284, in _wo
rker
2014-07-09 09:37:33.072000 >
2014-07-09 09:37:33.073000 >   File "p2pool\node.pyc", line 304, in clean_tracke
r
2014-07-09 09:37:33.075000 >
2014-07-09 09:37:33.076000 >   File "p2pool\data.pyc", line 452, in think
2014-07-09 09:37:33.076000 >
2014-07-09 09:37:33.077000 > ---  ---

I restart p2ool and a few minutes later it is doing it again, I've redownloaded the p2pool files and still happens. am on version 13.4

resolved now, it was the web interface causing a mass of errors that crashed the system.


How Often Is "Contributors" Section Updated on Bitcoin.Org Believe I have a screenshot of contributors organized by number of commits that can be found here. Does anyone know how often this list is updated? Currently I count 361 contributors on that list bit the github repo here list 786 contributors, leading me to believe it has been a while.

It seems that the list of contributors is automatically generated by this script:
https://github.com/bitcoin-dot-org/Bitcoin.org/blob/master/_plugins/contributors.rb
and is refreshed every 24h (as stated in a comment in the script itself).
I suppose that the difference in the counts depends on the fact that anonymous contributions are excluded in the github API request (you should add anon=1 to have all contributors).


Can pruned nodes perform fee estimation? The fee estimation in Bitcoin Core is based on the previous blocks. Since the minimum pruning size for pruned nodes is 550 MB, a pruned node may actually not have the last 1,000 blocks, which is the largest fee estimation interval. Can a pruned node perform its own fee estimation? Does it only have estimates for smaller block targets when it has less history?

Yes, if it has a mempool (no -blocksonly).
No matter the number of blocks stored, what matters is how many blocks it has been watching (ie received at the time of generation, with transactions that were part of its mempool).


How to setup bitcoind 10.2 for solo mining on LAN with Bitmain S3 Hy there,
i do not exactly know if i am right with my setup, so please be patient with my questions as a noob.
I have a Bitmain S3 with latest Firmware on the ASIC, and i do not exactly know how to configure the ASIC for solo mining in my LAN.

1.) I have a linux bitcoind server in my lan with the IP 192.168.1.1

2.) I have an ASIC bitmain S3 with the IP 192.168.2.2

3.) I have a bitcoin.conf as follows

server=1
daemon=1
listen=1
rpcuser=USER
rpcpassword=SOMEWILDDIGITS
rpcallowip=127.0.0.1
rpcallowip=192.168.2.2
rpcport=8332

4.) What statements do i need in the S3 configuration field? Do i need the rpcsuser+rpcpwd+btcaaddress or do i just need the btcaddress?

Thanks in advance for your awnsers!!!

Bitcoin Core doesn't directly allow for stratum miners to connect, you need a middleman proxy to translate the two mining methods used by Bitcoin Core and cgminer on the Antminer S3. This is simplest with bfgminer.

Run BFGminer on the same computer as Bitcoin Core with the following configuation, it won't need any further settings altered or configured (it gets the RPC password automatically on launch).

bfgminer --stratum-port=3333

BFGminer will launch, and retrieve the information needed for solo mining.

Now using coinbase address 1PkNBPBGEmvoMFbwRT5ky3XXVNstJnJ4c1, provided by pool 0
Network difficulty changed to 49.4G (353.6P)
Pool 0 http://localhost:8332/#getcbaddr#allblocks alive
Long-polling activated for http://localhost:8332/#getcbaddr#allblocks (getblocktemplate)
Added local bitcoin RPC server on port 8332 as pool 0
Probing for an alive pool
Pool 0 http://localhost:8332/#getcbaddr#allblocks alive

You're now ready to solo mine against Bitcoin Core, you just have to point your antminer at the IP address of the computer running BFGminer, and the miner should show up in the top section of BFGminer with its hashrate showing as "PXY" (stratum proxy). Any blocks will be paid out to the coinbase address shown in BFGminer, which is a new one generated from your wallet.


What is the problem that mining solves? Of course, the function of mining is to secure the blockchain, but I'm looking for a more abstract summary of what the exact problem is that mining tries to solve? I believe its called the Byzantine Generals problem, but can it be described in a couple of sentences?

The network needs to select one random stranger out of a large group at a fixed schedule, and uses a 'hashing-lottery' as a reasonably fair method to do so. Is that a good definition of the reason why POW is needed?

In other words: Suppose I developed an alternative method to select a random p2p node every few minutes, who gets to publish the next block, could that replace cpu-based proof of work?

In my opinion, it is one of the greatest misconceptions about Bitcoin that miners solve a "hard problem". Many news sources explain it like that, but in fact it's not true.

All a miner does is guessing until he got something right. A miners takes his block of transactions (including the coinbase transaction that sends the fees and block reward to himself) and calculates the hash of it. Hash calculation is a very common procedure and is not at all "hard". The hash he gets needs to match a certain condition. This condition gets harder as more miners try it (see Difficulty). When the miner got a hash that fits the condition, he can publish it to all other Bitcoin clients and the block is added to the block chain.

The reason that miners with more computer power have a larger chance of winning the block is because they can simply guess faster. They can calculate more hashes per second to test against the condition, (Mining power is expressed in Hashes/second.)

The need for proof-of-work is there because the Bitcoin protocol wants that a block is found only once every 10 minutes approximately. So, as more miners enter the game, it has to become harder to do. The POW makes sure that finding a block is not easy and takes the some time. That's also the reason that the difficulty raises as more people mine. Every 2 weeks, the algorithms adjusts the difficulty so that again one block is found every 10 minutes at the average hashpower of the previous two weeks.

So, to answer your second question: If you could find an alternative method for achieving exactly the same thing as currently is done in Bitcoin mining, it could replace it. But Bitcoin is programmed as it is and won't probably ever change this method. But there are alt-coins that use different methods for distributing the coins and securing the block chain.


Why don't bitcoin miners use the padding as extra-nonce? The bitcoin block header is 80 bytes, but the SHA-256 input is required to be a multiple of 64 bytes; as a result, the block header needs 48 bytes of additional padding.

Therefore, why doesn't the miner use the 48 bytes of padding as extra-nonce? Instead of changing the timestamp and Merkle root, why don't miners opt to change the padding instead?

Changing the padding would result in a completely different digest. Other validating clients do not have access to this "extra nonce" in the padding to validate it, and modifying their clients to implement it would be a hard-fork of the protocol.

The extra-nonce as implemented currently, placed inside the input of the coinbase transaction, was a backward-compatible change which utilized an unused area of the block to place random information. Existing validating clients would still validate the block as valid because the normal process of calculating the merkle root for the block was unchanged.


what is good starter for trading with bitcoin I would like to try trading with bitcoin, but I am new at trading so I am asking for advise which market pick to get started.

what do I require:
fast market with lot of trades
no need of huge money input
reliable bitcoin market

I don't know where to start. this will be my bachelor's paper, I am good at math but have no clue how to get started in bitcoin :)

thank you

Trading or day-trading BTC is not as easy as it seems. I'd recommend paper trading or trading with a small amount of money until you can develop a profitable strategy.

Use Whaleclub for demo trading and trading using BTC only (no dollars or banks).

If you need to buy BTC, look up an exchange in your country at Bitcoin.com's Buy Page.


bitcoind API rpc calls to encrypt an arbitrary message and create a script In the latest bitcoind what RPC calls can I use to:

Create a script with multiple 3 IFs and 1 checklocktimeverify. What are the arguments required here and what is the way to do it via rpc calls?
Encrypt an arbitrary message using a bitcoin pubbkey. The arguments required here will be the plaintext message obviously and the pubkey for the recipient to encrypt the message with (I know address / pubkey hash160 will not work, and whole pubkey is required).

I would recommend that you use a purpose designed encryption tool like GPG to encrypt messages. If you need to bind it to a Bitcoin address for some reason, the recipient can signmessage their PGP public key using the signmessage functionality.

Secure general encryption is a complex subject area, and any "bitcoin encryption" would almost certainly be half baked and insecure in some applications compared to a real encryption tool.  Because of this there is no support in Bitcoind for message encryption and I don't expect any to be planned.


How can I track transactions in a way that is not affected by their malleability? All the recent problems caused by transaction malleability have brought to the center stage the fact that tracking a transaction id is not good enough.

So here is my question, what is good enough?

The best I can come up with, is to create my own hash of the transaction I want to track before sending it to the network. Let's call that hash "tracking id". That hash would cover only signed portions of the transaction. The elements hashed would be

for all inputs: txid, vout
for all outputs: amount, address

Given the fact that the transaction must still be declared valid by the official client, would this "tracking id" be robust enough to track a transaction no matter how it may have been covertly "adjusted" through transaction malleability?

If this scheme does not work, do you know of any way that would allow me to safely track the transaction?

Since none of the answers that were given were fully fleshed enough to properly answer my question, I'm posting my own answer which synthesizes everything that has been said:

The best way to track a transaction in a way that will be resistant to transaction malleability, is to actually track only the data that has been signed. To do so, I suggest using a double SHA256 of the signed data. The documentation of the OP_CHECKSIG script operation (and it's very useful diagram form hints at which procedure should be followed.

A transaction malleability invariant "Tracking Hash" can be obtained from a pay-to-pubkey-hash transaction by:

Verify the technical validity of the transaction, as is done the reference bitcoin client. This includes verifying the signatures of the transaction. This is a crucial step, if you don't do that, the tracking hash is useless.
double SHA-256 hashing all of the following things:

the version number
the number of inputs
for each input :

the transaction ID of the output to spend
the index of the output to spend
the sequence number
(Note: We intentionally do not hash the input script or the length of the input script)

the number of outputs
for each output:

the amount
the length of the output script
the whole output script

the lockTime

Doing this should give you a nice tracking hash, that will be the same for all equivalent transactions, no matter how it may have been modified by taking advantage of transaction malleability.

Note that this tracking hash is not part of the bitcoin protocol, so you will not find it in the blockchain, and you won't be able to look it up using blockchain.info.


Can I use current Bitcoin protocol and Bitcoin client to create my own controlled currency? Since Bitcoin network and Bitcoin currency are not so reliable and can't be controlled.
Also, they are open source. How difficult it is to use the current client and protocol to create a new, independent currency controlled by me?

I will use such currency as a medium for money transfer. Much like a website money or credit.
If I used the current Bitcoin as it is, I would be responsible for all Bitcoins in the world. I want to be responsible for the Bitcoins created by me only. So even if the project will end or the value of Bitcoins goes down, I can then compensate my clients for their loss.

What experience and knowledge needed to accomplish this?(Hardware and Software).

Bitcoin is a decentralised cryptocurrency, meaning there is no central authority to control it. What you need to look into are centralized currencies. If you want to go for the easiest route, all you need is knowledge of programming websites and databases and you can easily make some database storing arbitrary numbers representing an amount of your currency belonging to someone. This, however, would be like Facebook credits, Microsoft Points or the like, not really a cryptocurrency. You could look into centralised cryptocurrencies, like loom.cc . Also worth noting are Open Transactions.

One could, however, create an alternative decentralised cryptocurrency, like SolidCoin, LiteCoin and dozen of others, but that doesn't create as much solutions as it causes problems. If you'd modify the source code you could make it so that only one address is allowed to create coins, but the whole system would be vulnerable to numerous attacks as your computing power might not be enough to secure the system.

All in all, it is not hard to create a centralised currency, but Bitcoin model might not be the best to use for this problem.


Why does my withdrawal fee not match the transaction fee I'm seeing on a block explorer website? Sent ~$7 worth of BTC from a Coinbase wallet, to a cold wallet. Coinbase charged a ~$2 "network fee".
Make sense so far, but the transaction listed on blockchain.com shows a magnitudes larger fee: ~$80
The receiving cold wallet app shows the $7 received and also displays the ~$80 fee, in its confirmed transaction history.

Who paid that fee ?
Why would they do that and how does it make sense on a small transaction ?
Where did the $2 fee go and why is it not listed anywhere on the blockchain transaction ?

As an aside, Bitcoin transaction fees are paid in BTC, not in dollars. To understand how and why bitcoin transaction fees work, you need to consider them in this way.
From what you have written, it sounds like Coinbase batches withdrawals, which means they will pay many of their customers at once, in a single bitcoin transaction. A transaction can have 1 or more inputs, and 1 or more outputs, so if you have to pay many people, you can save costs by sending one transaction, which pays all of those people at once, rather than individual transactions witch pay them one at a time.
When Coinbase processes your withdrawal, they can charge you whatever they would like ($2 in this case). But the actual transaction fee that Coinbase paid to make that bitcoin transaction was apparently around ~$80 worth of BTC. Whether the sum of all fees they charged their customers would be equal to this amount, or more, or less, is all just a matter of Coinbase's company policy.


Armory client shows transaction unconfirmed I am new to btc and am using the Armory client. Yesterday I transferred some btc to wallet from my MtGox account. The wallet showed the btc received within minutes, but, after 12 hours it still shows as 'unconfirmed' in my Armory wallet, so my spendable funds is 0. Also, the status shows as not yet in the blockchain. So there is no block number assigned.

However, looking at the referenced transaction block on blockchain, I see my amount with another transaction, the block has 109 confirmations, and a block number. So I have two questions.

1) So it appears my Armory client isn't reflecting the block chain? What should I do? Will restarting the client cause me to lose anything? Will it update?

2) I am under the impression that it's the recipient who pays the transfer fees. I didn't set a fee when I sent the money, but my home wallet has a default fee built in, is that all I need? Can I lose transactions if the go unconfirmed?

3) What recourse do I have. I basically sent myself the bitcoin, but it appears I cannot spend them.

Thank you

You should launch it with the -rescan option, to rescan the blockchain for missed transactions and confirmations.


What parallel, distributed computational techniques can be used for Bitcoin mining? As far as I have read, I haven’t found a parallel algorithm to speed up Bitcoin mining. Are there any techniques that involve parallel or distributed algorithms, architectures that speed up Bitcoin mining ?

The atomic operation of Bitcoin mining is determining if a block candidate resolves to a hash that fulfils the required difficulty. This operation is so simple, that it is being performed about 700 quadrillion times per second.

Since mining is a random process, there is no progress towards a block. It just succeeds whenever a block candidate turns out to be a valid block. Therefore, beyond making sure that every participant in a mining pool is checking different block candidates, there is no collaboration on mining.


What is the risk of waiting for just one confirmation to validate a transaction, assuming the counterparty is not a miner? I am trying to determine how many confirmations would be reasonably safe to wait before accepting a Bitcoin transaction from an attacker that is not a miner and hence cannot rely on Finney attacks, but that could try to freely double spend based on his observation of the state of the blockchain.

I understand that at 0-confirmation, attempting a double spend may well work if for example the transaction fee of the second transaction is higher, and the first transaction has not been widely disseminated yet (so nodes would not reject it as a double spend).

At 1-confirmation, any double-spend would automatically be rejected by all nodes accepting the first confirmed block. However, should (i) the blockchain be "reorganized" with a minor fork taking over, as I understand happens regularly (are there statistics on this?), and (ii) the initial transaction not be included in the fork, the attacker could immediately retry double-spending in the hope it gets included in the next block.

Should I be worried of such blockchain reorganizations when accepting n-confirmation transactions? Am I right to say that any successful 6-block fork would open the risk of free riding the double spending of ALL transactions not included in the fork, not just those targeted by the rogue miner? Or would most nodes (including the rogue miner) most likely reject the free-riding double spend attempts anyway (even if its transaction fees are set way higher), as the first transaction would by that time be fully disseminated?

Should I be worried of such blockchain reorganizations when accepting n-confirmation transactions?

Forks do occur quite frequently, and if you're only requiring a single confirmation the counterparty will have the opportunity to double spend each time these orphaned blocks occur.

  Am I right to say that any successful 6-block fork would open the risk of free riding the double spending of ALL transactions not included in the fork, not just those targeted by the rogue miner?

Yes, a successful 6-block fork would allow double spending for all n-confirmation transactions not included in the fork, where n ≤ 6.

  Would most nodes (including the rogue miner) most likely reject the free-riding double spend attempts anyway (even if its transaction fees are set way higher), as the first transaction would by that time be fully disseminated?

Hard to say. The bitcoin protocol doesn't explicitly have a rule for n-confirmations (this is just an accepted number of confirmations after which the receiver of a transaction can be reasonably sure double spending will not occur), so according to the protocol, the transactions would be valid. I doubt there are many miners with logic built in to deal with this scenario since when it becomes anything more than close to impossible (an entity having about half the computing power of the network) the currency probably won't have legitimacy left (therefore no value in them acting as miners).


How can I import my public key from a mnemonic seed phrase to receive a payment? I installed Trust Wallet on my Android smartphone. I carefully wrote down the reminder words in the proper order and hid them. I know where they are.  How do I use the words to get the key (public or private) for receiving bitcoins into the wallet from, say, Coinbase?

The idea behind a seed mnemonic phrase is to provide a readable format for the seed. It is mostly used for backup purposes. Let's say you lost your phone. You'll be able to recover your bitcoin wallet based on the word list you have saved in a secure place. Also the Trust Wallet may stop being available as an app at some point, and the seed will allow you to restore the backup in another software wallet if you know your derivation paths.

How do I use the words to get the key (public or private) for
receiving bitcoins?

First of all, you don't need the private key to receive bitcoin. If someone asks you for your seed or private key - be aware it is probably a scam. There are ways of using the seed to set up a watch-only wallet - based on xpub derivation which Trust Wallet doesn't provide (it's an extremely basic bitcoin wallet).
But you'll see your bitcoin address when clicking on the bitcoin logo in the Trust Wallet app and then going into the "receive" tab. Trust Wallet will create a set of keys automatically based on the seed and will show you just the one address for deposit.


Is bitcoin vulnerable to a DOS/spam attack? What happens if someone maliciously decides to make squillions of transactions on the Bitcoin network?

I see there being two vulnerabilities. Firstly - computation resources used, though this doesn't seem to be a problem, at this stage, given the size of the mining pool.

But also - blowing out the size of the block chain. What if someone were to persist over a year of spamming transactions?

That's what transaction fees are for. You have to pay a fee for every transaction you want to have included in the block chain, especially if your transaction is for a small amount or if there are many transactions already waiting in the transaction pool.

Also, the size of Bitcoin blocks is limited. There is also a limit on the number of signature operations in a block. The most an attacker can do is to raise transaction fees.


How to reference different wallets with curl JSONRPC requests Bitcoin core I have a headless Bitcoin core 0.17.1 running on Debian 10, and have created a second wallet "johns-wallet".
I'd like to get the walletinfo (or any wallet request) of that specific wallet via curl, not the cli.
The Bitcoin core API reference doesn't offer an example of how to target different wallets when not using the CLI (and neither did my Google search).
I've tried:
curl --user johnsmith --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' bitcoind:18332/wallets/johns-wallet/

and also
curl --user johnsmith --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": ["/wallets/johns-wallet/"] }' -H 'content-type: text/plain;' bitcoind:18332

And also variations on the path itself to the wallet - none of them return a result, let alone an error.
Running without trying to specify a wallet returns:
{"result":null,"error":{"code":-19,"message":"Wallet file not specified (must request wallet RPC through /wallet/<filename> uri-path)."},"id":"curltest"}

(In case it matters, the Bitcoind is running in a docker container, with a named volume)

This is the command I use - the http address is the address of the docker container that the Bitcoin daemon is running in
curl --user johnsmith --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": ["*", 6] }' -H 'content-type: text/plain;' http://10.0.0.1:18332/


How out of block chain transactions work, and is there any API for that? i wonder how out of block chain transactions work, because till i know it happens but "is not recommended" (it is what i read on the internet), i want to manage some micro transactions but as it is well known  that the fees of each transaction would eat them up so it would be better out of block chain transactions to deal with them?, is there any API that would help me on this?

Thanks in advanced for your time.

Off-chain transactions are transactions on any system that's not the blockchain. Micropayment transactions, lightning network transactions and even coinbase-to-coinbase or changetip would count as off-chain transactions.

There are API's to the various services. Lightning network is not live yet and micropayment transactions still need settlement on the blockchain.


Fee selection for transaction I have an application where I pay users in bitcoins (microtransactions). I am also starting to use Bitcoin core.

What I want:
Pay the minimum possible as fee of a custom transaction (1 input and x outputs). I need to pay the minimum because this difference is very important to make my app viable.

I saw that here are different costs/byte. And I see that 0 fee transactions can take forever. But my doubt is that if I pay a minimum of 1 to 10 Satoshis/byte, could the transaction be stucked for ever? or it will spent as maximum 240 min (as the page shows right now I know it can vary).

I also "don't care" about the transaction time spends to reach its destination (to be confirmed) as much I would like 5 days more or less to confirm.

Questions:

Can it take forever if I pay the minimum or it will also be but in some days.
What minimum of fee / byte do you recommend me?

Thank you for reading!
If you don't understand something, please make me know and I'll try to explain better.

10 satoshis/byte would have gotten you a confirmation in five days for big parts of the past three months:

 [via https://core.jochen-hoenicke.de/queue/#3m, filter by 10-20 sats/byte]

Yet, I'm afraid that you cannot rely on getting a confirmation within five days at 10 satoshis/byte.

In the past three months, there were e.g. two weeks in August, where only a few blocks had transactions with <10 sats/byte. It's very likely that you would have gone without confirmations for sixteen days. Earlier this year from early May to mid of June, you would not have gotten any confirmation at all for six weeks.

Also, please think about your users' experience. When they end up with a large number of very small unspents, it will be uneconomic for them to spend them: a big portion would get eaten up by fees, at higher fees they would be unable to make any payments at all.

Unfortunately, since the cost of transactions is in relation to the blockchain space transactions require to get confirmed, the relative cost is significantly higher for micropayments than for larger sums. I would highly recommend looking either at off-chain solutions or other blockchains.


Are Tor .onion-addresses IP address independent? Is it possible to move the node to a different IP address and keep the existing (=preciously open and funded) channels functional?

Yes. The channels are announced with the node ID. If the ip Address changes we get a new node announcement message so it takes some time until the information is through the gossip protocol. But moving a node to a new server is no problem


What is encrypto password in copay? I have never set up an encrypto password in copay.   I want to send BTC but copay asks for encrypto password and cannot go any further.  Please let me know what to do.

Regardless of how the password got enabled, once it is set, there is no way to access your coins without it, except by restoring the wallet using your backup phrase.  So if you have your backup phrase, you can create a new wallet to access your coins.  Choose the + button to create a new wallet and select "Import Wallet", and use the "Recovery Phrase" tab.

If you don't have the backup phrase, you are out of luck unless you can find the password.  You might try to figure out how it got set:

Perhaps you set it and then forgot?  Think about what password you might have chosen, or how you usually choose passwords.
Perhaps someone got access to your phone or computer, and set a password?  Try to figure out who that might be, and ask them.  Of course, it's possible they already spent all your coins.
Perhaps there's a bug in the Copay software that set a password without asking you.  If you've ruled out all other possibilities, you could report it as a bug.  But if so, it's hard to guess what the password might be, and I suspect you won't be able to recover your funds in this case.

Reference: https://support.bitpay.com/hc/en-us/articles/115003004403-I-forgot-my-wallet-spending-password-What-can-I-do-


How is the security of Mastercoin different than that of Bitcoin? Mastercoin is based on Bitcoin, and has a very similar security model. However various parameters make the security different (some better, some maybe worse).

How exactly do they differ, security wise?

Mastercoin Founder here.

Mastercoin inherits its security model from bitcoin, with some minor changes. To undo a Mastercoin transaction, you'd have to undo the bitcoin transactions containing the Mastercoin transaction data, so we have almost as much security as bitcoin itself. I say "almost" because the order of Mastercoin transactions in a bitcoin block matters, and a block-chain reorg can affect that ordering, because bitcoin miners don't pre-validate mastercoin transactions before including them in a block (bitcoin transactions must be valid before they will be included by a miner). Consequently, in the event of a blockchain reordering event, a Mastercoin transaction which was previously invalid can become valid due to reordering.

The end result is that a Mastercoin transaction with 3 confirmations is less secure than a bitcoin transaction with 3 confirmations, but more secure than a bitcoin transaction with 2 confirmations. I typically say that Mastercoin transactions are "half a confirmation less secure" than bitcoin transactions against double-spend attacks.

In the future, Mastercoin will be MORE secure than bitcoin - specifically against theft and loss. Mastercoin features include the ability to put restrictions on a "savings" address such as temporary reversibility and spending limits. These limits directly prevent theft, and indirectly prevent loss (since it is safer to have more backups of a wallet which can't be stolen).