Bitcoin Core V 0.10.0: Is there a way to force send when not synchronized? My Bitcoin Core is not yet synchronized, but I already attempted sending a transaction, so now it is 'conflicted'.
I can see this conflicted transaction is not being propagated.
Is there a way to force the sending of that transaction?
I know for sure that whatever input it will use, that transaction will be valid.

Thanks!

No, you can not force a transaction.

Your bitcoin core wallet will only trust receiving and sending transactions once you are synchronised. Your wallet is currently doing something similar to time travelling. It is synchronising all transaction from the genenis block to the current block.

The blockchain is a numerical sequence of the proof of existance of every transaction recorded on Bitcoins world wide ledger. Your Tx will be propagated as soon as you have downloaded this chain of truth.

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


How does difficulty get rebalanced in Digitalcoin's Multialgorithm mining? It appears that Digitalcoin has switched to mining with the three algorithms Scrypt, SHA256, and X11. I assume this means that the network will accept a block mined with either of the three algorithms, as long as fulfills an algorithm specific difficulty.

However, how does the difficulty get balanced among the three different mining algorithms? For example, if blocks are found too quickly, but mainly with one mining algorithm, which difficulties get adjusted and how?

I assume this means that the network will accept a block mined with either of the three algorithms, as long as fulfills an algorithm specific difficulty.

Yes, this is true.

  However, how does the difficulty get balanced among the three different mining algorithms?

The difficulty for each algorithm is tracked independently. Essentially, each algo is retargeted to be 2 minutes between block solves of the same algo. Since there are 3 algos, 3 blocks will be solved every two minutes, which means 40 second confirmation times on average.

  For example, if blocks are found too quickly, but mainly with one mining algorithm, which difficulties get adjusted and how?

Only the mining algorithm that has seen an increase in hash rate will be adjusted. In addition, no more than three blocks of the same algorithm may be solved consecutively.

The difficulty retargeting algorithm code is here: https://github.com/DGCDev/digitalcoin/blob/master/src/main.cpp#L1429.

I should also note that Myriadcoin was the first to implement this type of Multi-Algo-Pow.


can I improve LTC mining on this GPU? I use CGMiner(unless there's a better one) on an AMD Radeon HD 8570D. it gets 22-23kh/s but most times I see people mentioning their graphics producing multiple megahashes. do I just have the wrong configuration or do I have to buy something more powerful(and expensive)

If you have the HD8570 dedicated card around 86kh/s is what I was getting as well before any tweaks. But it sounds like you have the HD8570D GPU in an APU (Looks like they are in A8-6500 and A8-6600K CPUs) then you will definitely will be getting much lower kh/s than the dedicated card from looking at the specs. Since the GPU in the APU is sharing the system memory you will have to overclock your RAM in your motherboard BIOS settings.

Just in case you are talking about the dedicated card or someone else finds this thread I was able to get 127Kh/s with these settings.

SGminer 4.0.0 settings:
"--gpu-platform 0 -d 0 -w 256 -I 16 --lookup-gap 2 --thread-concurrency 3200"

This tweaked OpenCL file got me about 1% more kh/s and works for many cards. There are also others out there to try.

System:
Windows 8.1 with AMD 13.9 drivers

GPU Overclock:
Core clock from 780mhz to 990mhz
Memory clock from 900mhz to 1155mhz


Bitcoin wiki docs, account or address? listtransactions   [account] [count=10] [from=0]
  Returns up to [count] most recent transactions skipping the first [from] transactions for account [account]. If [account] not provided it'll return recent transactions from all accounts.

The above is pasted from https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

My question: The page refers to both account(s) and address(es). The wallet can easily generate additional addresses to receive coins but, how can a wallet have more than one account?

This documentation does not look correct to me.

Shouldn't it read

  If [address] not provided it'll return recent transactions from all addresses.

It is correct as written.  Accounts are just a grouping of addresses.  You generally create accounts with the getaccountaddress call.

This wiki page provides more detail on what accounts are all about.


Bitcoind live wallet backup (by copying wallet.dat) Is it safe to copy wallet.dat while the daemon is running, or should the daemon be stopped before doing so?

I'd imagine it would be safe unless addresses are being generated exactly at the same time.

In some cases, bitcoin-qt/bitcoind may regularly (and even gratuitously) flush the wallet [1], so it's possible that wallet.dat could be in an inconsistent state at the time you make your own copy.

The backupwallet RPC call should be a safe way to accomplish this.

[1] https://github.com/bitcoin/bitcoin/issues/10236


How to disassemble a bitcoin script? There are many explorers which allows to dissamble a transaction back into opcodes.

But what about scripts which aren’t broadcasted yet like this redeem script :512102974ffd58d960908d6f2930fbcc4aa288580d05b35a70869e9a8ada3d080acf392103ef884166c7bd20324fd7f959dc680989a6a8b0d62c348defa900fcd4d31200f152ae ?

bitcoind has a decodescript method.

$ bitcoin-cli decodescript "512102974ffd58d960908d6f2930fbcc4aa288580d05b35a70869e9a8ada3d080acf392103ef884166c7bd20324fd7f959dc680989a6a8b0d62c348defa900fcd4d31200f152ae"
{
  "asm": "1 02974ffd58d960908d6f2930fbcc4aa288580d05b35a70869e9a8ada3d080acf39 03ef884166c7bd20324fd7f959dc680989a6a8b0d62c348defa900fcd4d31200f1 2 OP_CHECKMULTISIG",
  "reqSigs": 1,
  "type": "multisig",
  "addresses": [
    "1CmMoanE9uahYETLahBTGZSFZSQGV8ADrR",
    "12z2brRNYFkqJe3zP58uoiGcLqDxfk6J7r"
  ],
  "p2sh": "34EJTjAmEPbPGXAPQWU7sn4beoZyGTTxBw",
  "segwit": {
    "asm": "0 a45407120f912ef91ecd7e66a27cb4dc106f962172470b1b39c1bb5008898277",
    "hex": "0020a45407120f912ef91ecd7e66a27cb4dc106f962172470b1b39c1bb5008898277",
    "reqSigs": 1,
    "type": "witness_v0_scripthash",
    "addresses": [
      "bc1q532qwys0jyh0j8kd0en2yl95msgxl93pwfrskxeecxa4qzyfsfmsfgd3m5"
    ],
    "p2sh-segwit": "32KAK2XxwcYPc5iu3tNoXv3ksu4Gf3NsH3"
  }
}


How can I calculate/estimate how quickly a machine can verify transactions on the blockchain? If I have some machine with particular specs in mind (processor/memory/bandwidth), how can I estimate how quickly that node can download and verify transactions? In a quick search I wasn't able to find any numbers for verification speeds run on different machines, so that would be helpful too.

I have seen this question, but my question is more focused.

Update:

I found one bit of data about this: a lower bound of verification of last year's blockchain in about 20 days (projected, not tested). This amounts to about 170 transactions per second of verification.

More:
* [https://twitter.com/erickuhn19/status/1095553655086804993](Eric Kuhn) saying transaction verification is the main bottleneck.

You can enable logging of benchmarks for block validation. If you add debug=bench to your bitcoin.conf file, the time it took to verify each block will be written to the debug.log file and you can look in there.

There aren't any benchmarks for individual transaction verification time.


Bitcoin/Dogecoin Daemon RPC authentication - 401 status error I'm trying to connect to a local dogecoin server with jsonRPC.

The dogecoin daemon is launched with the following parameters:

dogecoin-qt -server -testnet -gen -debug -debugnet -printtoconsole -rpcuser=user -rpcpassword=user

The following Java code is used to connect to the server:

I'm using com.googlecode.jsonrpc4j.JsonRpcHttpClient

            JsonRpcHttpClient client = new JsonRpcHttpClient(new URL("http://user:user@localhost:22555"));

        String response = "";
        client.invoke("getinfo()", response);
        System.out.println(response);

It just won't accept any credentials at all, I've tried setting them on the conf file, command-line, etc.

Server returned HTTP response code: 401 for URL: http://user:user@localhost:22555

Any ideas ?

Ok, it seems that for some reason I didn't read this essential part:

  The easiest way to tell Java to use HTTP Basic authentication is to set a default Authenticator:

    final String rpcuser ="...";
  final String rpcpassword ="...";

  Authenticator.setDefault(new Authenticator() {
      protected PasswordAuthentication getPasswordAuthentication() {
          return new PasswordAuthentication (rpcuser, rpcpassword.toCharArray());
      }
  });


How do I cancel my blockchain transaction (still unconfirmed)? I am using blockchain.info.

I have made a bitcoin transaction of 22.00883562 BTC to the address 1A9eUAc78tGx65X3CuC9WfSKXXgxjU8ccC.

You can see the transaction at https://blockchain.info/tx/97c1af82111cdcf17f878eb6df20c17c59c1b1fc04e8cdce36b8ac6c6d1c969a

I have paid a 0.001 fee but it has been almost 30 hours and it still shows "Unconfirmed".

What could be the error? Also, more importantly, how do I cancel the unconfirmed transaction and get back my coins?

Cancelling unconfirmed transactions is easy.   Just submit a higher fee double-spend transaction.   For example: if you sent a 0-fee transaction, it could take a day before it gets mined onto a block.   You can send another transaction with the same inputs that just sends the money back to yourself.   On this transaction you put a higher fee.   This becomes more likely to be mined and will get included in the blockchain - invalidating the slower-to-confirm original.
Some tools to help out: https://github.com/petertodd/replace-by-fee-tools


Are these Addresses Invalid ones? I saw some addresses in blockchain that the format look "too pretty" to be valid:
- 1fuLL1xxxx1power1xxxxxxxxxxzatvCK
- 1xxxxxxxxxxxxxxxxxxxxxxxxxy1kmdGr

I assume these addresses are actually valid ones, but must never and will never get the private keys from which they are generated (i.e. No one can get the coins on these addresses). Am I right?
If I'm correct, why this guys even send (very little) coins to these "invalid addresses"? For Ad purpose? For fun?

You're correct, they're valid addresses, just that nobody will ever have the private key that corresponds to them.
As for why people send money to them... sometimes just for fun, and sometimes to encode data on the blockchain. This particular transaction might be a dust attack, of which the goal is to uncover which addresses are owned by the same owner, in case the owner attempts to spend the dust along with other coins in their wallet together.


Multiple spending transactions from a single Bitcoin address? Supposing I am having 100 BTC in a single Bitcoin address and I send 1BTC to each individual ( total 100 individuals) and I have instantiated all of these transactions in one go( assuming that they will be running parallely).
Also, assuming that it takes 10 minutes to validate a transaction, How much time will it take for the 100th transaction to be validated? Will the time depends on the previous unconfirmed transactions? ( Consider that there is no double spending here)

Assuming that by "validate" you mean "confirm" then a chain of 100 transactions sent from the same wallet should, theoretically, all confirm in the next block or two - assuming that each transaction's included fee is sufficient.

However, the outcome described above is only theoretical, because many clients place a relay limit on unconfirmed transactions in a single chain. The Core client, for example, does not accept more than 24 unconfirmed transactions from a single chain into its mempool.

In the case of your example chain of 100 transactions there could, therefore, be a best-outcome delay of at least 5 blocks before all the transactions are confirmed.

Further to your question, it is not a case that the 100th transaction is dependent on the 1st or the 99th transaction to have to confirm first. If each of the simultaneous 100 transactions being sent from a wallet is valid and has sufficient fees, then they will each be mined as individual valid transactions by miners, regardless of their wallet of origin. If a miner happens to be running the Core client, then there will be a batch limit of 24 transactions (from the single chain) that can be mined per block.

As pointed out in the comments, a transaction can have more than one output, so your example's 100 recipients can each be sent bitcoin via a single transaction.


Transfer incoming funds from Bitcoin Core to another wallet before blockchain sync is completed This is my situation:

I have a Bitcoin-QT wallet on my Mac (Qt version 4.7.4.- yes I know its very old). only recently I've been working out how to operate and exchange bitcoins. well to cut a long story short i went to bitbargain.co.uk and bought an mbtc, managed to completed the transaction with relative ease and saw the bitcoin in my Bitbargain.co.uk account.

I then decided to transfer this purchase to my wallet on my Mac and did so but entering a received address on the bitbargain account page. I waited and waited and have not seen the bitcoin come through on my Bitcoin-qt wallet.

It looks like there is a lot of syncing to do! only 45.65% complete, needs to catch up around 1720 days, this I estimate will be around 2 months if not more? that is if it actually completes?

My question is this, is there a way to move this purchase to another wallet I have, without having to let this wallet sync 100%? as the time frame required is very uncertain?

Can i transfer a bitcoin from bitcoin-qt to another wallet even though it is not showing up in my wallet becuase it is 1720 days out of sync?

Thanks for the help with this guys!

Best
FT

After watching more than 100 videos, because I couldn't find a solution here, I was able to regain access to my BTC successfully from my old QT wallet without synchronizing the 310GB of blocks.  The solution is to import the private key of your old bitcoin-QT into a new Electrum wallet (this happens without fee):

Install from Electrum.org and create a new Electrum wallet  choosing the option "Import Bitcoin address or private keys"
Install from Bitcoin.org and create a new Bitcoin-Core wallet.
If Bitcoin Core is already open, stop the main sync in the lower right corner.
Turn off Bitcoin Core. Go to C:\User\yourname\AppData\Roaming\Bitcoin\wallets\your new wallet\wallet.dat
Obviously, this new Bitcoin Core wallet was never used, so delete the wallet.dat file
Paste your  old-wallet.dat file (the one you backed up years ago from your bitcoin QT), rename the pasted old-wallet.dat to wallet.dat
Open Bitcoin Core again --> hide --> stop synchronization (bottom right) --> Window --> Console --> Type below the command dumpprivkey and the old public address --> Enter.
When your private key appears, copy it. (In my case it didn't ask for my old passphrase.) Now go to your new Electrum wallet and paste the private key in the "Import Bitcoin address" box -> Next.
(do it in private and without cell phone cameras).
Now enter a new password twice and accept the wallet encryption.
Ready, now you have access to your BTC (with the same old public address) to spend or send them wherever you want,   but since your private key is exposed, I recommend you send them as soon as possible to a new destination that is safer (even if you have to pay a fee this time).


What's the advantage of bitpay over coinbase for a merchant solution? I'm trying to figure out why a merchant would ever choose bitpay over coinbase as an integration solution.  It seems they offer very similar services (accept bitcoin payments, exchange for dollars automatically daily and deposit into your bank account), yet BitPay charges 1% and Coinbase nothing.

I would encourage you to look at the customer reviews of each service.  BitPay is definitely a stronger and more reliable platform, and is fully "on-blockchain" and compatible with all of the bitcoin wallets.  For a low-volume use case, like a few orders per day, probably either service will work.  For higher volumes, BitPay is more business-grade, with features like Quickbooks import.


imported non spendable btc Good day.

I have a slight issue! A friend of mine has imported a few wallets to his main wallet. All the imported wallets has "Non Spendable Bitcoin" in them ranging from $2-$45k respectively. Is there any way i can retrieve them via finding the private keys for them to make the btc coins spendable again? Any help or advice will be highly appreciated.

Impossible unless you have the private key belonging to the adress.

Your friend didn't import a few "wallets", he imported a few adresses, which makes his wallet a "Watch-Only wallet" (for the adresses that were imported.)

  Is there any way i can retrieve them via finding the private keys for them to make the btc coins spendable again?

Again, if you only have a public key, master public key, or adress format, the answer is no.

If you have a seed / private key from which the (imported) address xpub/public key was originally derived from, then yes, you could recover his funds.

Edit: I feel like we're missing a whole lot of context here: Did your friend buy these "wallets"? If so- he most likely got scammed.


Mining Pool hub support cpu miner? I have a simple/old CPU (like dual-core/Quad-Core) with unlimited electricity and all the other stuff.
I would like to run 10 PCs with CPU mining.
It's better to mine solo or the join mining pool hub?
I know the profit of the mining will be very very low (I don't care :D)
Thanks for the help, Roee!

You are about 10 generations of mining hardware too late to mine bitcoin with CPUs, mining pool or not.
2009: Bitcoin launched with CPU mining. I've been told that some people mined 50 or 100 bitcoins per day with an old laptop.
2010: GPU (graphics card) mining made CPU mining hard, so mining pools were invented. This way people could still mine with CPUs.
2011: GPUs had to get on mining pools, and CPUs were next to useless. Some hardcore CPU miners kept going but earned little. Gaming PCs made a good profit.
2011-2012: The first specialized bitcoin mining hardware based on FPGA chips. FPGAs gave GPUs a hard time. Some GPU miners kept going, but in 2012 earnings were slim.
2013: The earliest ASIC miners shipped to customers in january. ASIC mining completely destroyed CPUs, GPUs and FPGAs for mining.
Since 2013 there have been many generations of ASIC miners, each making the older ones obsolete.


Problems with deterministic ECDSA based on RFC6979 in Bitcoin Generating random number k in elliptic curve is crucial and in any transactions signature in Bitcoin, random number k is required to compute a point k*G. If this k is chosen not randomly, it instantly leaks the private key.
Therefore, they came up with an idea of deterministic generation of ECDSA which is described in RFC6979. Basically they concatenate the private key with the hashed message and use an HMAC function and generate a pseudo random k.
This method seems simple and easy.

Does it introduce any overhead?
If yes, is this overhead negligible?

Or generally is there any inefficiencies or problem with this method and why do we still see non-deterministic implementation of ECDSA?

Not any serious efficiency concerns. Signing is done fairly infrequently for any particular client (only a few signatures per transaction usually). While possible that the signing might take slightly longer to generate the k value, it would not be noticeable, especially considering how infrequently it is used by any one particular client. It's the verification of all the signatures that is the CPU bottleneck for block verification in bitcoin, because all full nodes have to verify the signatures of all the transactions on the network, and this takes the same time regardless of how the k parameter was chosen.

Gregory Maxwell made a comment about the use of deterministic k values here:

  The primary arguments in most spaces against derandomizing DSA are
  FIPS conformance (irrelevant for us) and reasonable concerns about the
  risks of using a (less) reviewed cryptographic construct. With
  widespread motion towards derandomized DSA this latter concern is less
  of an issue.

The new libsecp256k1 library by Pieter Wuille actually uses deterministic generation of k.

Also note that one of the key benefits of using this construction is that you need not worry about a weakness in your PRNG being exploited in the signing process. For example, signing different pieces of data with the same k value instantly leaks your private key. A similar attack can also be exploited if the PRNG is weak enough to determine the relationship between different k values used when signing the same piece of data. Since the k is deterministically generated from the data you are signing (and the private key), these concerns about the PRNG are no longer as relevant, as you will always produce the same signature for the same piece of data. This also makes writing ECDSA unit tests easier.


Does a new private key is generated at each transaction? So, imagine I bought 1 BTC, so I have my private key generated by my online wallet and also my public key that I can give to people/friends.
My question is, if I spend 0.5 to buy Apples on a website?

How does that work?

1) Only 0.5 BTC is sent to the website, I still have 0.5 BTC on private key A

2) 1 BTC total is sent through the protocol, thus the change is sent back to me.
On which key?
Key A where I had 1 BTC ? Or a new one generated? (Key B)

Thank you :)

Every private key has exactly one corresponding public key, and every public key has one address. Whenever a new address is generated, internally that means a new private key and public key are generated. Note that with BIP32 and BIP44, private keys can be generated deterministically from a master key or a seed, in which case these new private keys do not necessary need to be saved - they can just be regenerated from the seed or master whenever needed.

A new keypair is used for each change in most wallets, but that's done internally - it won't show you the address for those, as there is no need for anyone else to send you money to that.

Creating addresses is very cheap. A modern CPU can generate 1000s per second. It also does not require any interaction with the network. All that is needed is generating 32 bytes of random data, and computing its corresponding elliptic curve point.


How is the real world value of bitcoins generated? I do not understand where the value of the bitcoin comes from.

In old times people were trading in gold or silver. They began to deposit the gold coins in banks and started to trade with these deposit certificates. The deposit certificates became paper money. Then the convertibility of paper money for gold was abandoned, but the paper money had its momentum so it remains in use today.

But how did bitcoin get its momentum? I understand that to get bitcoins, you need to compute some cryptographical puzzles, so the amount of bitcoins is proportional to the computational time spent. But is this computaitonal time spent usefully as in industry, or is it just spent for the sake of gathering the bitcoins?

BTC works as any currency. As long as people see value in it, it has value.

The momentum was just the curiosity the users had... Also the whole "Make free money with your computer"- thing which was started.

A big influence was the famous "How does bitcoins work" video I saw on vimeo. That got ME started at least. (Link to updated version)

The algorithms your computer solves when "mining" isn't used for anything no.
There are also other kinds of crypto currencies on the rise. The most notable is Litecoin. It uses a different algorithm. (Scrypt, instead of BTC's double sha256). The point of Litecoin was to make users able to "mine" more efficiently on their CPU's.

I hope this somewhat answered your question.


How do I import my 12 Breadwallet seed words into Electrum? When I write them into Electrum during the restore from seed box, the Next button is disabled.

Breadwallet uses BIP 39, but Electrum no longer does. However, Electrum does have a compatibility option for BIP 39 seeds. Just click the "Options" button and check the box labeled "BIP 39 Seed".


How to trigger port for Bitcoin client (e.g. 8333) According to this it's possible to have incoming connections to Bitcoin client by forwarding port 8333 on the router. I was wondering if there is some specific port range Bitcoin Core uses for making outgoing connections which could be used as a triggering rule? This way when the client is not running, port would be closed, plus it could be used by different machines behind the router without configuration changes (I know I could forward different ports to different machines and then change the incoming port in client configs)

EDIT:

@NateEldredge is right.

My current setup is as follow:

Rule name: Bitcoin
Triggered range: 8333-8333
Forwarded range: 8333-8333

If Bitcoin Core is running the port is open (according to http://www.canyouseeme.org/). If it's closed the port is closed too.

The only catch is it won't work if all 8 outgoing connections will use non default port but it shouldn't happen too often if ever.

Bitcoin Core doesn't seem to have an option to specify the source port for outgoing connections, so you probably can't assume anything about the source port.

However, if possible, you could configure your router to look for outgoing connections with destination port 8333, which will probably be the port used by most peers.


Can not decode transaction. Script was manually verified successfull I can not decode transaction in Bitcoin-QT.

The error is: TX decode failed (code -22). But blockexplorer site decode it.

Then I try to send transaction from blockcypher.com site, and the error is:
Error validating transaction: Error running script for input 0 referencing c806c9ae2ac9c71fad307c9fedeca2133edb195cae9e924424885f57a63ba9a9 at 0: Script was NOT verified successfully..

Please help what is wrong. I check transaction structure by hand and check signatures. It's all ok.

I upload signed and unsigned transactions on pastebin.

Unsigned transaction: https://pastebin.com/XfE73U57

Decoded unsigned transaction: https://pastebin.com/RH2tNrNn

Signed transaction: https://pastebin.com/K15c29tK

Decoded signed transaction: https://pastebin.com/Mfs0bXgR

I check signatures and structure of transaction by hand, and they are all correct. Inputs are unspent. So what is the problem? Please help me.

Your transaction has 4 extra bytes at the end.
Just remove the 01000000 and it should be fine then.


How does proof of work inspire trust when the work is just guessing? I'm struggling to understand the value added by machines guessing at inputs to create a hash below a target value in order to produce a proof of work. I understand the proof of work is somehow supposed to inspire trust in the distributed record of transactions. How? Why should someone winning a lottery cause me to have trust in a blockchain?

Forget PoW for a second: lets instead imagine that you have a box, and you've placed a lock on it, in order to secure its contents.

Now, if someone asks you how secure the contents are, then the size and type of lock is fairly important. Tying the box closed with a bit of string isn't very good security, at least compared to a heavy-duty padlock. For an attacker to get into the box and alter its contents, they will need to work much harder to get past the padlock, compared to the string. We can use the word 'work' here in the thermodynamic sense: energy being used to perform an action. In order to break into the box, there is a minimum amount of work we would expect the assailant to have done. The minimum amount of work to break the padlock is obviously higher than the string, so we consider the padlock more secure.

Keep that point in mind: breaking into a more secure box requires more work. You cannot fake the work, you either have the resources to cut the lock, or not.

So let's go back to Bitcoin mining: when a miner is hashing to find a valid PoW, they are doing work by expending energy as computational cycles. The PoW function is devised such that we can expect a certain amount of work to be done (on average), in order for the miner to find a valid block. You can think of this PoW as the 'lock' that has been put on the block: in order for an attacker to alter the history of transactions, they will have to perform (on average) this same amount of work (spending energy, a real resource) in order to find a new, valid PoW and replace the block ('breaking the lock', as in our example from above).

Thus, the history of transactions is secured by miners spending energy to create the PoW that is required for a block to be valid. More energy spent mining creates a 'more secure lock', since a malicious miner would be expected to spend an equal amount of energy in order to break it. Miners are incentivized to continue building upon old blocks, thus piling one lock on top of another lock, on top of another lock... and it is this mechanism which allows the history of Bitcoin transactions to be considered secure.


Bitcoin Core Wallet - Really Anonymous? how does one remain truly anonymous on bitcoin network? Say, for example, if one use the bitcoin core as its wallet, while sending one's first transaction, will his/her IP be somehow revealed at that instance? Has anyone tried to run bitcoin core in a VPN/TOR setting or environment?

Nathan Aw

Say, for example, if one use the bitcoin core as its wallet, while sending one's first transaction, will his/her IP be somehow revealed at that instance?

In theory, it is possible, but in practice, no. IP addresses are not in transactions or blocks in any way.

  Has anyone tried to run bitcoin core in a VPN/TOR setting or environment?

Yes. Bitcoin Core has options for using the TOR SOCKS5 proxy and has had this capability for a long time.


Is selfish mining still an option with compact blocks and FIBRE? The selfish mining strategy relies on withholding a block to build on it in private. When the honest chain publishes a block, the attacker immediately broadcasts its own withheld block in order to try to replace it.

Today, most miners are connected via FIBRE and the general network has compact blocks to exchange compressed blocks. The delay until a block is known to the complete miner community is thus much smaller than in 2013. It seems that under the "first seen paradigm"  selfish mining becomes a losing strategy for blocks with such short relay times.

Is it correct to conclude that selfish mining is a theoretical attack now?

While FIBRE has done an incredible job in reducing relay times for blocks which are new, many miners additionally have systems by which they relay their own blocks in a single packet and have them queued up to relay on when they start mining the template, not when they find the block. Ultimately, FIBRE's few milliseconds of delay will lose to a single UDP packet that just relays the winning nonce around. Further, selfish mining attacks are very non-linear in the advantage you gain from a relay advantage - if you're 1ms faster to most hashpower, you have an advantage to that hashpower, period.


Bitcoin full node sharing blockchain Does anyone know how one might run two bitcoin full nodes on the same machine with both these nodes sharing the same blocks and chainstate files, is a symlink to these files enough or must something else be done?

This is not possible beyond providing both nodes identical own copy of the chain before initial sync. Both nodes will attempt to acquire their Bitcoin data resources via the P2P network independently, and index these accordingly, so they cannot share the same store.

What is possible though is to configure the nodes to be permanently maintain a peer connection to each other. TX and Blocks organized by one peer will be seen and then organized by the other.


Keep getting non base-58 character error when trying to recover my old wallet. Any ideas on how to troubleshoot this? Basically I made a purchase with bitcoins back in ~2014 and I remember that I had a little bit leftover. However all documentation I have is a file labelled wallet with a huge string of characters. But when I try and access it on any application I get the non base-58 character error. There are a bunch of +'s and /'s. Does anyone have any idea what I could try to see if this is it? Sorry for not having more advance knowledge.

There are a bunch of +'s and /'s.

That strongly suggests it is data in Base64 encoding. Note that, in this case encoding does not mean encryption, just a specific printable representation of binary data.

Does anyone have any idea what I could try to see if this is it?

It seems several different wallets might use Base64 encoding, including:

Blockchain.info backup using AES encrypted JSON

Bitcoin Wallet for Android (Schildbach wallet)

Print wallet.dat with base64

Of those, I'd guess the first is most likely. But that's just a guess. There are probably numerous other possibilities.
I think I'd try the Blockchain.info recovery process first then, if that didn't work, try decoding the file from Base64 into binary and using a hex editor to look for patterns that might give some clues to the software that produced it. If the file is encrypted using a wallet password this probably would not be fruitful.


"Failed to read Block" I encountered a error whilst downloading Bitcoin-Qt on my Macbook version 10.6.8; it says "Failed to read block"
How do I fix this error without losing the bitcoins currently in my wallet?
Your assistance will be greatly appreciated.

Start the client with the -reindex command-line option.


do you know why this block is so unusually small? i just stumbled upon this block in the blockchain:
https://blockchain.info/block/00000000000000000052fca516261b65a8a455f35f4c2f867acfb08069def3ec
why is it so small with so few transactions?

Miners can include as many (under the block size limit of course) or as few transactions as they like in a block. There may not be any particular reason for a lower number of transactions, thats just up to whatever algorithm the miners used to select transactions to mine in that block


Will all UTXOs eventually be worth 1 Satoshi? If I want to spend 0.4BTC and I only have a UTXO for 1.0BTC, I will send 0.4BTC to the seller's address and 0.6BTC to my address. The seller has one UTXO and I have the other.

One UTXO has become two.

As time passes and more transactions occur, the number of UTXOs increases monotonically and the value of each will fall monotonically. (Right?)

If we extrapolate, the value of the individual UTXOs will tend to 1 Satoshi.

Or to ask the question differently, can two UTXOs ever be combined into one UTXO?

Thanks

Can two UTXOs ever be combined into one UTXO?

Yes, absolutely.  Each transaction can have any number of inputs and outputs; it can certainly have fewer outputs than inputs.

Here for example is a transaction with four inputs and one output, leading to a net decrease of three UTXOs.


Has anyone tried arbitrage between exchahges? Has anyone ever tried this? I've read up on the difficulties of doing it manually, but some of the spreads I've seen are insane. I think it would be worth a try but I don't know where to start.

Yes and still at it full time. I have created a monitor that calculates the spread in % between several exchanges. Sometimes we see 25% spread! Those are the moments and getting fiat back from one exchange to another is bottleneck.


How can I transfer my Bitcoin Android wallet to another platform? I have the wallet backup and I was able to decrypt it using these instructions: https://github.com/bitcoin-wallet/bitcoin-wallet/blob/master/wallet/README.recover

When I went to do the withdrawal the system hung and I now recieve an error telling me the wallet is empty (CouldNotAdjustDownwards did not occur first try). I don't see any record of the transaction on any block explorer.

Is there some other way I use my decrypted wallet? Can anyone suggest a desktop wallet that would likely support this?

I tried replacing wallet.dat in Bitcoin core with no luck.

If your wallet was created with Bitcoin Wallet for Android 4.0 or later, you can extract the mnemonic (seed) with this, and then restore that seed into a wallet which supports a BIP-39 mnemonic with a BIP-32 path to gain access to the same funds, such as MultiBit HD or breadwallet.


Ripple: a strange send I don't quite understand A few days ago I've sent Bitstamp through Ripple 0.3168 BTC.

I had 0.4168 Bitstamp BTC before, and 0 BTC balance with everyone else.

Now strangely I noticed that instead of Bitstamp owing me 0.1 BTC as expected, it owes me 0.2022 BTC, while I owe to a friend of mine 0.1022 BTC.

While it sums up, I wonder what's the deal:

why didn't it send entirely Bitstamp BTC to Bitstamp?
how are us supposed to settle that? i.e. should I explicitly send BTC through Ripple to my friend, or simply when he tries to spend them he'll tap from my pool (hence no explicit action is needed)?

The short answer: using the info you and your friend provided, Ripple did what was best for everyone.

I don't know how to pull up the details of the transaction number you link to (I have no affiliation with Ripple other than as a user). But using the Ripple Live Graph I can infer the account of your friend and I note that currently your friend has no trust line to Bitstamp.

  why didn't it send entirely Bitstamp BTC to Bitstamp?

So I'm guessing that what happened was that your friend had 0.1022 BTC IOU from Bitstamp but had the trust set to zero indicating they don't want more and would like to get rid of what they have (i.e. your friend told Ripple they don't trust Bitstamp). Your friend had specified that they trust you to pay them back BTC by opening a trust line to you

It's in your friends best interests to hold an IOU from a trusted source (you) rather than an untrusted source (Bitstamp). It's in your interest to have Bitstamp get the funds you asked to send in the cheapest way possible.

The way Ripple found to achieve both those results at once was to route part of your payment through your friend. Both directly sending back Bitstamp's IOU and routing through your friend had no transfer fee, only the 0.000010 XRP transaction fee) so either should be equally good to you.

  how are [we] supposed to settle that?

As with any loan between friends it's up to you. With some friends I've made my repayment policies very clear, with others I'm more informal. [As an asside, I'll note that previous ripple implementations like classic.ripplepay.com wouldn't let your friend trust you without you agreeing.]

  i.e. should I explicitly send BTC through Ripple to my friend

No, that would add to the debt, giving your friend more of your IOUs.

  or simply when he tries to spend them he'll tap from my pool (hence no explicit action is needed)?

That is most likely the best option, and certainly the simplest. When they next send a payment, Ripple will consider going through you. If the recipient trusts you then they may end up with your IOU (by the way your IOUs have no trasfer fee, Bitstamp IOUs have a 0.2% transfer fee).

If the recipient trusts Bitstamp (and you still hold the Bitstamp IOU) then the recipient may get Bitstamp IOUs and your IOU will decrease or zero.

If before this, you were to use your Bitstamp IOU in payments (e.g. to Bitstamp for withdraw) then you'd have a negative balance and your friend would be unable to use (spend) your IOU except to others that accept it (trust you).

If your friend wants to explicitly redeem your IOU (i.e. asks you to pay him back) you could send him actual bitcoin outside of Ripple and at the same time he'd pay you the matching amount in Ripple to zero/decrease your debt. If you hold Bitstamp IOUs (perhaps you get some more via a deposit just so you have enough to cover your debt because you were asked to) you can just tell your friend to simply pay himself via his Bitstamp account.


Does Bitcoin Core support HD wallet? Does Bitcoin Core (bitcoind or bitcoin-cli) support HD wallet?

Can Bitcoin Core ...

Q1. create HD wallets?
Q2. import HD wallets from other wallet software?
Q3. watch HD wallet? (watch transaction or notify changes)

create HD wallets?

No, but this is something being worked on.

  import HD wallets from other wallet software?

No, HD wallets being transportable between software like this is unlikely due to the wide range of implementations. An Electrum seed is unlike an Armory seed is unlike a Bread wallet seed.

  watch HD wallet? (watch transaction or notify changes)

Only if you importaddress for a large number of future addresses which is cumbersome.


Version bits: Why did BitcoinXT choose to set THREE bits to 1 (0x20000007) to flag BIP101? I understand the BIP9 version bits base is 0x20000000 because the BIP specifies that the first three bits must be 001

Bitcoin Classic adds one more "on" bit 0011... to make 0x30000000

Why did BitcoinXT add THREE bits to the end to make 0x20000007 instead of just flagging-on one single bit like classic? Or simply use 0x20000001?

Bitcoin XT versions 0.11A through 0.11D supported the withdrawn BIP101, which set version = 0x20000007 as a best-guess nod toward the developing versionbits standard, while trying to maximize backward compatibility with the ways nodes might check for compatible versions.

Bitcoin XT version 0.11E supports BIP109, identical to Bitcoin Classic.


How to sign raw transaction given a private key and SHA hash (in java) I have followed the instructions here to build my own bitcoin transaction.

Redeeming a raw transaction step by step example required

Currently my code can create a transaction and compute the SHA hash but I am struggling to sign it using ECDSA.

I have written so code to do it using bitcoinj but it is not working. I need some help signing a transaction using a java library or an API.

Here is what I have so far. Any help you be super appreciated :).

import org.apache.commons.codec.binary.Hex;
import org.bitcoinj.core.*;
import org.bitcoinj.core.ECKey.*;

public class Test3 {
    public static void main(String[] args) {

        //Given private key and SHA 256 Hash, sign a transaction

        String shaHash = "15953935a135031bfec37d36a9d662aea43e1deb0ea463d6932ac6e537cb3e81";
        String privateKey = "private key for the address";

        byte[] priv = Base58.decode(privateKey);
        // Generate ecsda key
        ECKey ecdsa = ECKey.fromPrivate(priv);
        Sha256Hash hash = new Sha256Hash(shaHash);
        // Sign the transaction
        ECDSASignature sig = ecdsa.sign(hash);
        byte[] res = sig.encodeToDER();
        String res2 = Hex.encodeHexString(res);

        System.out.println(res2);

    }
}

This answer does not attempt to sign a transaction, but simply focuses on successfully calling the sign method of the ECKey class, i.e. making your code work. I am not yet familiar with the Transaction API of bitcoinj so I cannot go further than that. Your post suggests that your private key is given as a WiF so I have taken this as an assumption. The main difficulty is to instantiate an ECKey object from the WiF which I have added to your code. I have also replaced the deprecated new Sha256Hash(...) by the wrap method. I am using a different function to encode as an hexadecimal string, but you can easily change that. The code successfully compiles on runs.

import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.Base58;
import org.bitcoinj.core.Sha256Hash;
import org.bitcoinj.core.DumpedPrivateKey;
import org.bitcoinj.params.MainNetParams;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.ECKey.ECDSASignature;
import javax.xml.bind.DatatypeConverter;

public class Test {

  public static void main(String[] args){

    // message (hash) to be signed with private key
    String msg = "15953935a135031bfec37d36a9d662aea43e1deb0ea463d6932ac6e537cb3e81";

    // an example of WiF for private key (taken from 'Mastering Bitcoin')
    String wif ="KxFC1jmwwCoACiCAWZ3eXa96mBM6tb3TYzGmf6YwgdGWZgawvrtJ";

    // creating a key object from WiF
    DumpedPrivateKey dpk = DumpedPrivateKey.fromBase58(null, wif);
    ECKey key = dpk.getKey();

    // checking our key object
    NetworkParameters main =  MainNetParams.get();
    String check = key.getPrivateKeyAsWiF(main);
    System.out.println(wif.equals(check));  // true

    // creating Sha object from string
    Sha256Hash hash = Sha256Hash.wrap(msg);

    // creating signature
    ECDSASignature sig = key.sign(hash);

    // encoding
    byte[] res = sig.encodeToDER();

    // converting to hex
    String hex = DatatypeConverter.printHexBinary(res);

    System.out.println(hex);  // 304502210081B528....

  }
}


How to Curl into Bitcoin node with Swift? I am running a full node which accepts incoming connections.

Here is my config file:

rpcuser=bitcoinrpc
rpcpassword=somePassword
server=1
rest=1
daemon=1

Here is my swift code to curl to the node:

let url = URL(string: "http://bitcoinrpc:somePassword@192.168.1.8:8333")
    var request = URLRequest(url: url!)
    request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
    request.httpMethod = "GET"
    request.httpBody = "{\"jsonrpc\":\"1.0\",\"id\":\"curltext\",\"method\":\"getinfo\",\"params\":[]}".data(using: .utf8)

        let task = URLSession.shared.dataTask(with: request) { (data, response, error) -> Void in

            do {

                if error != nil {

                    print(error)

                } else {

                    if let urlContent = data {

                        do {

                            let jsonAddressResult = try JSONSerialization.jsonObject(with: urlContent, options: JSONSerialization.ReadingOptions.mutableLeaves) as! NSDictionary

                            print("jsonAddressResult = \(jsonAddressResult)")

                        } catch {

                        }
                    }
                }
            }
        }

    task.resume()

}

I am using port 8333 and the static IP I set is 192.168.1.8

I get the following error when executing the code:

2018-08-02 12:04:53.659293+0800 BitSense[5596:568091] Task <47A80E16-F0FE-4508-9C5D-3EFDD82B55FB>.<1> HTTP load failed (error code: -1005 [4:-4])
2018-08-02 12:04:53.660223+0800 BitSense[5596:568092] Task <47A80E16-F0FE-4508-9C5D-3EFDD82B55FB>.<1> finished with error - code: -1005
Optional(Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSUnderlyingError=0x600000244650 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x600000280460 [0x107f6ac80]>{length = 16, capacity = 16, bytes = 0x1002208dc0a801080000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=http://bitcoinrpc:5bKc4zYHX6qvB9HjKK89Ms2h@192.168.1.8:8333/, NSErrorFailingURLKey=http://bitcoinrpc:5bKc4zYHX6qvB9HjKK89Ms2h@192.168.1.8:8333/, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-4, NSLocalizedDescription=The network connection was lost.})enter preformatted text here

8333 is the node connection port. Since you didn't change the RPC port in the config file, the port you should connect to is 8332.


What happens if I lose Bitcoin Investment, is there Bitcoin insurance? If fiat bank money is stolen, or bank is fire/damaged, we have banking insurance. If hard money gold is stolen, it can always be replenished with Lloyds of London insurance, or with a mining annual growth rate of 2% per year.
If Bitcoin money is hacked (as it was in past), USB Drive destroyed, or the bitcoin is missing, how can a person recoup their losses?
Some of us agree, slight inflation 1-2% helps insure against losses (just like FDIC insurance, or gold insurance). Of course large inflation, where governments finance war, pointless government programs with inflation of 20-30% year is too much.
The question is, How will Bitcoin solve the insurance issue? Can be it a good storage of value to families if its lost?
Note: I'm aware fiat or gold insurance, will not work if 3rd party insurance is lacking funds. It can work however, last time, someone stole money from friend's bank account. Does bitcoin offer any level of insurance?

So far as I am aware, no currency, whether fiat or cryptocurrency offers intrinsic insurance against accidental loss of cash.
For example is a shopkeeper takes dollar bills from their cash register and drops it unnoticed in the street on the way to the bank, they will not be covered for that loss by the US treasury. The shopkeeper will only be covered by any relevant insurance whose cover includes that kind of loss.
Bitcoin insurance exists in the same way that dollar insurance exists for cash.
Bitcoin was designed to do away with trusted third parties such as banks therefore there is no need for government organised recompense for bank failure.


how to avoid deposit fees / transaction fees when buying bitcoin I've looked at Coinbase and CEX.io, and both have a deposit limit of $300.

For Coinbase it is $11.51 deposit transaction fee on a deposit of $300, or 3.84%, which is huuge.

For CEX.io, it is a $11.14 deposit transaction fee on a deposit of $300, or 3.71%, which is still huge.

Can anyone recommend a service which allows me to:

deposit more than $300 at a time (ideally up to $3300 for the price of 1 bitcoin)
receive a deposit transaction fee far less than 3%?

Thanks.

Coinbase has a much larger limit if you verify yourself.  For instance, on Coinbase I have $5000/week limit.  And I belive you can get up to $1M limit with enough paperwork.

Bitfinex offers a .1% fee or $20 (whichever is higher) so for $3300 that would be .6% fee with the $20 minimum.  For $300 though, that's 6.6%

I'm not sure where you get $11.51 for $300 at CB.  I just attempted to buy $300 and it was only going to charge me $304.47, which is a 1.49% fee.  There's the same 1.49% on a $5000 purchase.  They do have a minimum, which appears to be $0.99 < $50, $1.99 < $100, $2.99 < $202, and after that it's 1.49%

EDIT: Oh, I see.. You're talking AUD, not USD.  Not sure what the rate is there.  FYI, in the future it's best to specify currency symbol if you're talking about Dollars and not USD.

According to this page:

https://support.coinbase.com/customer/portal/articles/2109597-buy-sell-bank-transfer-fees

3.99% is the base, but in the US they wave some fees depending on the payment type.  It appears that in AU they only allow Credit Card purchases, and not wire or EFT.  That kind of sucks for you.


With Ripple, can I send IOU without setting a trust? I have a simple question. User A wants to send to user B some IOU. There is no trust between A and B. There is no possible risk for user B. Can this be done without establishing a trust line? If no, why this is not allowed?

To pay someone, say, $10, you must deliver to them an asset that they have decided is worth $10. A person can never be made to hold an asset they did not agree to hold. These are core Ripple design rules that apply to all IOUs. The main reason for not allowing the "harmless" payment is that it might not be clear to the recipient that the payment is one he is free to ignore and this can create complexity for the recipient who may be legally obligated, for example, to refund it.

This was a close call though. We could have allowed this kind of payment with a special flag and designed the client to show those payments in a special way, and we could have added an account flag to indicate that you refuse these kinds of payments The added complexity and risk of confusion didn't seem to be justified by any significant benefit.


BTC/USD price on BTC-e Can you explain me in detail, what affect the price on BTC-e ? I understand the mechanic, like if there is strong demand and limited supply the price goes up. But how does it work on BTC-e? Because to me it looks like the website is setting the price itself. There are lowest and highest ask prices.

Thanks

This is exactly how a normal stock exchange works.

The quoted rate and the Buy and Ask prices are just driven by the supply and demand of people wanting to trade on that exchange.

BTC-e operates an order book. Sellers add Sell orders with an Ask price which they are happy to sell at (This is called a Limit order)
Buyers places Buy orders with a buy (or bid) price they are willing to pay.

The difference between the two prices is called a spread.

So if you place a Limit Buy order, but it is below the lowest Sell order then your order gets placed in the order book. If it was higher than the highest order, already in the order book, then the quoted Bid price will increase to the price you Bid at. Now if later someone else places a sell order at or below your bid price, then the order book will match your order and it will become a trade. (and vice versa).

When this happens. your orders are taken off the order book* and the next lower Buy order and next higher Sell order will become the new Bid and Ask prices.

Now if you want to make a Buy (or Sell) Trade right now:
You can place a Market order which you say you want to Buy (or Sell) X number of coins (or shares on a stock market) i.e., you don't give a price.
When you do that, the BTC-e order book software will match the lowest sell limit order (or highest buy order when you are selling) and create a trade right away.

Which is the right order type to place, that depend on your trading strategy and is a whole other topic.

The rate quoted is normally the last price that a pair of orders that was matched at.

*It is slightly more complex than that, because you have partial fills, but you get the idea.


BFGMiner + CGMiner solo mining, how to specify payout address I am currently trying my luck at solo mining a few types of crypto-currencies. My question is why does BFGMiner require a --coinbase-addr- argument for solo mining to know where to payout rewards to and CGMiner does not?

I am because today I found a block with BFGMiner in Terracoin mining and it seemed to not have payed me even though I specified a coinbase address. I want to make sure that if I am so lucky to find a block again that I actually get paid.

https://bitcointalk.org/index.php?topic=309486.new#new

It depends upon the parent's support of the coinbasetxn capability. When your (getwork or getblocktemplate) request includes the coinbasetxn flag, the response may (should) contain an address for the payout to go to. Some blockchain implementations support this flag and some don't. A number of miners allow you to specify the address manually. Some don't. Most pool software uses the username instead of the coinbasetxn return as the coinbase address.

You can see this changeset here were local mining support was added to lbrycrd. (Disclaimer: I work for them). https://github.com/lbryio/lbrycrd/commit/24269e177f002eb6975abe077bd727992381a95d


How long does multi-sig take? If I use a multi-sig wallet for Bitcoin, and require a total of 2/3 keys to sign a transaction, does that mean that the total time would be limited to the time to confirm 2 signatures ie ~ 20 minutes if done simultaneously?  And would it cost the same as a regular Bitcoin transaction?

If I use a multi-sig wallet for Bitcoin, and require a total of 2/3 keys to sign a transaction, does that mean that the total time would be limited to the time to confirm 2 signatures ie ~ 20 minutes if done simultaneously?

No, not at all. That is not what a confirmation means or how Bitcoin works at all.

A confirmation means that a transaction has been included in a valid block. It has nothing to do with the number of signatures. A multisig transaction just means that the transaction requires more signatures in order to be valid. The signatures are contained within the transaction itself.

The time to confirm a multisig transaction is the same as the time it takes to confirm a non-multisig transaction assuming everything else is the same (i.e. same fee rate).

  And would it cost the same as a regular Bitcoin transaction?

It costs more because the transaction contains more data. Thus the absolute fee will be higher, although the fee rate will still be the same.


Ardor Transaction was generated on a fork error I tried to sign a transaction and then broadcast it, but I get the following error:

Error! Failed to broadcast transaction: ecBlockHeight 221000 does not match ecBlockId 932...., transaction was generated on a fork.

What could be the cause of this?

If i sign the transaction and broadcast it manually via the ardor desktop gui wallet via "broadcast", it works. I'm just not sure how this error is occurring or what does it mean?

I got this same exact error when I tried to sign a mainnet transaction using a testnet API, so, make sure you are using the same network..


Do you receive interest on Peercoin if you use an online wallet? I know Peercoin is proof-of-stake, but if I use an online wallet, will I receive any of the coins generated for my stake? Or do I have to have to download a desktop wallet?

If it is a web wallet that holds your private keys, then it is certainly possible that the service is staking your coins for you, but this may or may not be a feature that the developers of the particular web wallet have implemented. It is also possible that the web wallet creators take the stake as a payment for their service, which I hope the service would be transparent about.

If the web wallet is a watch-only wallet, then it cannot stake for you. [1]


Is there any synchronized software update mechanism in Bitcoin-Blockchain? My question is regarding the update of Bitcoin software. Is there any mechanism for a synchronized software update in the Bitcoin network?

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


Coins with memory-intensive mining Are there coins that demand system memory rather than computing power? Which coin brings me the most mining profit if I have a lot of system DDR3 RAM (say 64 GB or more) in my personal computer?

There are memory intensive mining algorithms, but usually the "memory" being discussed is not of the DDR3 variety. That 64 GB of DDR3 RAM you have is an excellent resource for many computing tasks (and enough to make me jealous), but is also dramatically slower than the L1 and L2 cache physically on the chip with your CPU. This is the memory we're talking about.

Memory intensive mining algorithms came about in reaction to GPU (and later FPGA and ASIC) acceleration. Because GPUs have so many cores, each core has access to only a miniscule amount of RAM, often an amount measured in kilobytes. Because Bitcoin's SHA256 mining algorithm has a tiny memory footprint, it runs quite nicely on such hardware. Some say this is a problem, others disagree.

CPUs, on the other hand, have relatively few cores sharing access to, on average, 64 to 128 kB of L1 cache and 2 to 4 MB of L2 cache. By virtue of being on the same die as the CPU cores, this RAM is extraordinarily fast and has amazingly low latency. This, it turns out, is an exploitable difference that memory intensive algorithms take advantage of.

An ideal implementation of one of these "memory intensive" algorithms (for mining) will be tuned such that the RAM footprint required is higher than the few kilobytes available to GPU cores, but lower than the few megabytes typically available in L1/L2. In this way, the mining algorithm can be run at high efficiency on standard CPUs, thus maximizing the hashrate available to secure the network, but is still resistant to GPU/FPGA/ASIC acceleration. The CryptoNote algorithm used by Monero is a good example.

Sadly, few altcoins take such care with their implementation. Most either use so little memory that they are freely accelerated with GPUs or use so much that all mining processes eat into your good old DDR3 and lose efficiency. In short, there is almost certainly a coin out there that can make use of such an obscene amount of system memory, but that's almost certainly a sign that they did it wrong since the goal of such an algorithm should be to maximize hashrate on the target device (CPUs) for the sake of network security while preventing acceleration from non-target devices (GPUs, FPGAs, ASICs).

In any event, all proof-of-work systems currently in use are mathematical in nature. This makes the memory requirements somewhat secondary in nature - you will still require a lot of computing power to mine and it is this computing power that will largely determine your results. In a few cases the extra RAM may help, but your CPU will still be doing the heavy lifting.

Special note: In certain non-mining implementations of such memory intensive algorithms (like the scrypt implementation used in BIP38 encrypted keys) the poor efficiency caused by exceeding available on-chip cache can actually be a positive effect and is often used intentionally. By forcing the process to use slower memory we can throttle the number of decryption attempts an attacker is able to make in a given timeframe, which dramatically reduces the effectiveness of brute force attacks. This is why decrypting your BIP38 key on a phone often takes 30+ seconds - it's a feature, not a bug.


how can i get rid of a zombie channel in LND? My LN-Node: 023bf99414b3e93ab7463ce60f44cd691f8be3c1ae33a2015fe784c85c36e770cf
bitcoind 0.17.1 // LND 0.5.2-beta commit=v0.5.2-beta-rc7

Channel: 598078250466476032

Problem: lncli feereport returns:
 rpc error: code = Unknown desc = no policy for outgoing channel

edit:
more of the same?
lncli fwdinghistory returns:

{
    "forwarding_events": [
    ],
    "last_offset_index": 0
}

related?
trying to edit a recent channels policy..

"channel_id": "620981077780267008",
    "chan_point": "e388cce2698c0406985af2fce27ee47c5f02b04e8fbda0523975b71246e66d77:0",
    "last_update": 1551629972,
    "node1_pub": "023bf99414b3e93ab7463ce60f44cd691f8be3c1ae33a2015fe784c85c36e770cf",
    "node2_pub":
 "03efccf2c383d7bf340da9a3f02e2c23104a0e4fe8ac1a880c8e2dc92fbdacd9df",
    "capacity": "500000",
    "node1_policy": {
        "time_lock_delta": 144,
        "min_htlc": "0",
        "fee_base_msat": "1000",
        "fee_rate_milli_msat": "1",
        "disabled": false
    },
    "node2_policy": {
        "time_lock_delta": 14,
        "min_htlc": "1000",
        "fee_base_msat": "485",
        "fee_rate_milli_msat": "1",
        "disabled": false

lncli updatechanpolicy --base_fee_msat 419 --fee_rate 0.000001 --time_lock_delta 14 --chan_point e388cce2698c0406985af2fce27ee47c5f02b04e8fbda0523975b71246e66d77:0

[lncli] rpc error: code = Unknown desc = Channel from self node has no policy


Is performance really important when choosing a language for a trading bot? The C programming language outperforms interpreted languages such as Python or Ruby, but when it comes down to programming productivity, it is much easier/faster to write a Python program than a C program.

Considering that I want to write a trading bot, what would be the most appropriate language? If I use C, will I see a noticeable performance difference, or would the latency from HTTP calls make my decision time irrelevant?

The latency for gathering information and executing decisions will swamp the performance difference between languages. That assumes you don't write horribly awful code, but you can do that in any language. You should use whatever language you are most proficient in or whichever one you find easiest for the task.


I cannot send btc before my last transaction get confirmed I store all of my btc in one address (say from_address), and when I want to send any btc to any address (say to_address) I get a transaction like this:

INPUTS: from_address
OUTPUTS: to_address and from_address

See and example here: https://blockchain.info/tx/e0bcd29288deae6611337c75b8236a548926887796501486ffa3c486707d28c6

Now, I cannot send any BTC before this transaction is confirmed! and says "Insufficient Funds Available" (as I have all of my BTC in my from_address and it is unconfirmed!!)

Is there any tip to send BTC except this?

This will happen sometimes, and there's not much you can do about it. Much the same thing happens with cash. Say you have a $100 bill, and you want to pay me $10. In our transaction, the $100 will be split -- you'll get $90 back and I'll get $10. But while that's unfinished, you can't spend your $90 change from the transaction with me because it's not fully yours yet.

The exact mechanics will depend on what unspent outputs you have. If you only have a single output, then you will have no funds available until the transaction confirms. If you have multiple outputs and not all of them are needed for the transaction, then some of them will still be available before the transaction confirms.

Cash behaves the same way. If you have a $10 bill, a $50 bill, and a $100 bill, you can send someone $60 and still have the $100 bill available. Or you can send someone $65 out of the $100 bill and still have the $10 and the $50 available while that transaction is finalizing.


What OpenCL video cards (or FPGAs) are best for multiplication? I'm benchmarking some Bitcoin related software and am looking for cards that are better at parallel multiplication vs parallel addition.

Is there any prior work that may have this information? Perhaps for mining?
What GPU features should I look for?
I read that FPGAs may offer this ability, are any available?

The simple answer is to compare the results of 2 sites for an answer.  Both are coin mining hardware comparison pages, one for script, the other is for sha256.  Unfortunately, there is little information for the older Nvidia cards on the scrypt mining.

SHA-256: https://en.bitcoin.it/wiki/Mining_hardware_comparison
Scrypt: http://litecoin.info/Mining_Hardware_Comparison

they also include a few other CPUs and Arm processors as well as FPGAs.  With FPGA multiplication and parallel addition, the more core segments, the more likely it can do it and do it fast with out having to buffer a sum then use the sum as input back in to the equation.  Spartan 6 FPGAs are a good example of fast units, and depending which one, possibly able to do multiplication as a low level logic function rather than use a math processor due to the logic cells available.

As far as GPU features go, the newer, faster and the more shader cores ( or equivalent ) the better at math the card will be.


Why is mining which seems to be a software activity create bitcoins which is actually equal to currency? I cant get around the fact that bitcoins are "created" by "mining", which seems to be software/computation activity.
In the non-bit world, we always convert one form of value into another, like wood, gold, oil, effort to make things out of these ... looks like mining is creating bitcoins,  why is a value in hard currency attached to mining which translates to bitcoin ? but if no one wanted  the mined bitcoin, wouldnt it become useless

Isnt it like saying , dollars are hidden in a packet , if you can open the packet you get dollars .... but such dollars cant come out of thin air, someone used something to create the dollars that he put inside the packet. What is the source of truth of bitcoin, how did bitcoin come into existence without backing from hard currency ???

The purpose of mining is not the creation of new bitcoin, this is the incentive system. Mining secures the bitcoin system and enables the emergence of network wide consensus without a central authority. Miners receive two types of rewards in return for the security provided by mining: new coins created with each new block and transaction fees from all the transactions in the block. There is an exchange of value because in exchange for the security they provide and the computing power they expend, miners get bitcoins which is a valid trade. Similarly in the early days of bitcoin Satoshi Nakomoto sent bitcoin to his peers in exchange for them testing or developing bitcoin core, this again is an exchange of value. Once the darknet got involved in bitcoin they used it because of its anonymity and security, it was valuable to them because of these reasons and this is where demand for bitcoin started and because of this the value of it increased. So the fact the people are willing to exchange valuable things like electricity, computing power, software and testing skills for bitcoin gives it value.


How transaction fees are calculated when buying from exchange and transferring to wallet? If I buy bitcoin from a exchange and later want to transfer to my wallet for storing purpose (e.g. Jaxx or other), how the transaction fee will be calculated? I thought I can buy some amount of BTC and transfer the equal amount of BTC to wallet. How this works?

Thanks

Whenever ownership of bitcoins is transferred by means of a transaction on the blockchain, this transaction takes up space in a block and therefore incurs a transaction fee. Essentially, each sender that requests confirmation of their transaction attaches a bid for blockchain space to their transaction which a miner can collect when they include the transaction in their block.

Since the Bitcoin exchange controls the funds when you withdraw to your own wallet, the Bitcoin exchange is the sender of the transaction and decides what fee to attach to the transaction. Additionally, a withdrawal from an exchange may incur a withdrawal fee depending on the specific exchange's policy. Please check the corresponding exchange's FAQ or user guidance for more information on their fee policies.


International Bitcoin Payment Platform I need to integrate bitcoins payments in my web application.

I was about to use Stripe platform for accepting bitcoins (works exactly the same than for accepting credit cards) but I realized they need me to have a US bank account which I don't have.

Is there a similar service that offers an API (java preferrably) to easily accept bitcoin payments or do I have to write down the code myself?

(By the way, I'm new to bitcoin but have a good dev exp.)

Answer is here, question already asked (sorry about that):

How to integrate a Bitcoin payment service in my auction site

my choice: https://bitpay.com/


paytxfee vs maxtxfee which one overrides the other In wallet options section it shows these two settings

-paytxfee=<amt>  Fee (in BTC/kB) to add to transactions you send (default: 0.00)
-maxtxfee=<amt>  Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: 0.10)

If I set these two settings in the bitcoin.conf which one will override the other ? or how does in work ?

One is per kilobyte, the other is a limit on the total.

The second will prevent a transaction from happening if it, following the first, has a too large fee.


bitcoin-cli not stopping bitcoind I tried stopping bitcoind using bitcoin-cli stop and got the following error.

bitcoin-cli stop
error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set.  See -rpcpassword and -stdinrpcpass.  Configuration file: (/home/user/.bitcoin/bitcoin.conf)

I confirmed that bitcoind is running (using ps -A).

ps -A | grep bitcoind
643 pts/0    00:17:23 bitcoind

bitcoind was started in a datadir on the usb storage. I can kill the process but i want to shut it down in a correct way.

As @Raghav Sood mentioned, you can stop bitcoin for a different datadir (the location of .bitcoin folder) using:

$ bitcoin-cli -datadir=<dir> stop


Why can't coins be sent from testnet to mainnet? Why prevents bitcoins from being sent from the testnet to mainnet?

Testnet and mainnet are two different blockchains, and their coins are incompatible.

A transaction takes outputs that already exist on the blockchain, and re-assign them as outputs to different addresses.  Think of a blockchain as a database.  Let's say testnet has outputs A, B, and C.  They are in the testnet database.  However, mainnet has never heard of these outputs.  They simply don't exist in the mainnet database.  Any transaction that is submitted to mainnet using A, B, or C will be immediately rejected.  Likewise, if you submit the same transaction to testnet, then the transaction goes through...but it goes through on testnet.  Mainnet is still none the wiser.


Listening for changes to my own wallet in the blockchain I would like to be notified of changes to any of my many wallet address as soon as they happen and then programmatically take action. I have been using wallet notify but this has been giving me really inconsistent behavior and I have found that I cannot rely on it.

I'm in search of another solution, and was thinking that I could monitor the blockchain for any changes to addresses I own. Is there some known way to do this?

Other suggestions on how to solve this problem are also appreciated.

You could also use our own Websockets API. More specifically, you need to check the addresses event in order to subscribe to one or multiple address and receive balance updates for them.

An example request command would be:

{
    "event": "addresses:update",
    "filters": {
        "addresses": ["1Biteasym3p5E4soZq8So6NjkjYugEnz2X"]
    }
}

And when the balance is updated you will receive the following response:

{
    "event": "addresses:update",
    "data": {
        "balance": 1746000,
        "total_sent": 0,
        "total_received": 1746000,
        "address": "1Biteasym3p5E4soZq8So6NjkjYugEnz2X"
    }
}


GDAX: Balance and placing a limit order I had some money on balance in my GDAX account.
I placed a limit order on a price below market price for the whole amount I had, and ... my balance now shows 0.00

The limit order I placed is still open, but my balance decreased. This is different to for example Kraken, where your balance remains intact until order is executed.

Is that how GDAX work, and as soon as I cancel my order, my balance will be restored to original value? Is this typically normal for exchanges? (I only used Kraken until now)

Every exchanges have that in place.
This is to prevent abuse. If they don't reserve the funds when people place orders, anyone could have placed infinite amount of orders, especially stop-loss orders.
Perhaps in Kraken the "balance" doesn't reflect that, but you can try to place double orders and see for yourself.


How does SegWit reduce transaction size, when the signature is simply moved to another part of the transaction? This video explains that the signature is moved out of the input section and moved to the new one called the witness. From what I can tell, the witness signature is still contained in this transaction - how would a simple reordering of information magically create more space?

I've perused other articles and videos and none of them seem to address this "magic".

TL;DR:
SegWit does not reduce the transaction size, if you're referring to the raw byte length of transactions. Instead it introduces block weight as a new metric that does not directly correspond to the raw byte length of transactions, but treats witness data as having less weight than other parts of the transaction.

The limit for Bitcoin blocks has been changed with the activation of segwit. Blocks used to be limited to 1,000,000 bytes (1MB). Since segwit they are limited to 4,000,000 weight units.

In calculating the weight of a transaction, bytes are weighed differenty depending on whether they are part of the witness or not:

A non-witness byte weighs four weight units.
A witness byte weighs one weight unit.

This has the effect that a non-segwit transaction contributes exactly the same portion of the limit as before. E.g. the raw bytelength of a P2PKH transaction with one input und two outputs is 222 bytes, and it therefore weighs 888 WU, i.e. 222B / 1,000,000 B = 888 WU / 4,000,000 WU. This means that for non-segwit transactions, the block weight limit has exactly the same effect as the blocksize limit had before, and it is backwards compatible.

However, for segwit transactions the weight is not a quadruple of the raw transaction size. E.g. the raw bytelength of a P2SH-P2WSH 2-of-3 multisig transaction with one input and two outputs is 409 bytes, but its weight 868 WU as a large portion of the transaction input is witness data. A segwit transaction will therefore take a smaller portion of the weight limit than its raw bytelength would suggest.

To allow easier comparison to legacy fee rates, the block weight is often expressed as "virtual size" in "virtual bytes" or "vbytes". The virtual size is calculated by dividing the weight of a transaction by four and rounding up to the full integer. For non-segwit transactions, the raw bytelength and virtual size are equal.

In conclusion, the raw byte length of blocks can now exceed 1,000,000B, but the virtual size cannot exceed 1,000,000vB.


How to get the Bitcoin address from the bitcoin Public key? I am working in js and I need a library that helps me get an address from a public key stored in a buffer format.

Try bitcoinjs-lib

The following will generate a P2SH(P2WPKH) address

const bitcoin = require('bitcoinjs-lib')
let pubkey = Buffer.from('027a2c8c567a5bb7777580d31d1fd8d9910d4b1bb398570e3a36e81d7522cf828a', 'hex')
let address = bitcoin.payments.p2sh({redeem: bitcoin.payments.p2wpkh({ pubkey })}).address
console.log('address: ', address)

address:  3F1JMjuxgNFuK4kBxv4JXMEdQ2yvjuz939


Where/How does Bitcoin-qt check for receives to it's addresses? How does Bitcoin-qt technically check for receives to it's own addresses. I know it has a list of addresses loaded in from the wallet.dat, but when a new block or new transaction arrives, what logic increments the wallet balance you see and how? I've been told that it uses some merkle tree stuff.

the Blockchain contains all necessary info to know the balance of every address, including "it's own". When it downloads the next block, it updates all known balances by adjusting them based on every transaction in the block. This repeats.


Is it possible to decode the private key from a signed input?

No. Signatures and public keys are meant to be public. In typical use, using a correct implementation of the signing code, it is currently not possible to determine the private key for a signature and pubkey pair.

Signed inputs are not encrypted or obfuscated in any way, so when you broadcast your transaction, everything in the input, including the signature, will be publicly available for anyone to see.

There are some cases where it is possible to determine the private key for a signature and pubkey pair. However these all involve faulty implementations of the signing code. They usually revolve around the use of bad randomness and otherwise failing to produce a random enough number. For the most part though, these failures are rare.


Long term cost of using cryptocurrencies I'm not an economist but....

What are some way of determining whether cryptocurrencies will be a cost effective way of trading compared to some established fiat currency like USD?

In other words, might the cost of computing power and other costs necessary to trade cryptocurrency exceed the overhead costs of trading in say dollars?

What are some economics vocab words that are useful in this question?

I see what you are trying to convey. What is the cost of doing business in the Bitcoin compared to doing business with say the US Dollar? The Dollar was never designed to be ported into an international digital spectrum. It requires a massive support network of banks, regulations, payment processors and international agreements to permit Online commerce, but even then it suffers from fraud and sovereign manipulation.

The Bitcoin resolves a huge set of issues the dollar suffers from at the cost of global transaction verification and the risk of a deflationary spiral. In short, no one can legitimately assert to fully understand the impact of the Bitcoin and its long term use. It's an experiment.

I would encourage you to take my course on Bitcoins on Udemy when I finish it at the end of this week. Send me an email at Charles.Hoskinson@gmail.com if you're interested.


Why transactions' average confirmation times becoming more chaotic? According to this chart, Bitcoin's transactions' average confirmation times are varying much more widely than they were a year ago. Why would this be? Is it because the daily transaction rate has been increasing?

Bitcoin has been in the news a lot, recently. There have been talks about a Bitcoin ETF: http://www.cnbc.com/2017/02/24/bitcoin-hits-record-high-above-1200-on-talk-of-etf-approval.html

There haven have been articles (e.g. http://www.pantagraph.com/business/investment/markets-and-stocks/is-bitcoin-finally-a-serious-currency----or/article_2c5e9474-e135-5e85-906b-308149fac218.html) about Bitcoin becoming a means of investment, a lot of them saying that Bitcoin is digital gold (e.g. https://www.cryptocoinsnews.com/german-tv-calls-bitcoin-digital-gold/).

Every time this happens, 2 things happen:

The price of Bitcoin goes up.
The transaction rate go up.

The transactions rate goes up as people buy Bitcoin and others move their money in Bitcoin to exchanges to sell their funds as Bitcoin's price went up.

Usually, this is canceled out fairly quickly by China banning Bitcoin for about the 10'000th time (and them then soon after declaring that they won't do it). However, this time, it didn't happen, so Bitcoin's price and the transaction rate both went as high as never before.

Bitcoin has a very limiting block size of just 1 MB, meaning that a block can at most take 1 MB of storage space. Because every transaction has a certain size and virtually no transaction is smaller than 226 Byte (because almost all transactions have at least 2 outputs), this limits the number of useful transactions to 7.37 per second, even if they all just have 1 input and 2 outputs (in reality, there are a lot which are bigger, of course).

If the transaction rate exceeds the rate at which the transactions can be added to the blockchain, there is a lot of competition between people who want to get transactions through fast, meaning that transactions fees go up and the transactions which only pay usual fee are unattractive to miners so they won't include them.

It then can take quite a few days for those transactions to go through as the transaction rate goes down and the backlog of transactions which accumulated during the peak slowly is processed.


BTC full node very slow block downloads I have a server with 32 Gigs of ram and running the node on a docker container using Bitcoin Core Daemon version v0.15  with 8333 ports mapped

Nodes been running for 2.5 weeks still 300k blocks and most of the time connectioncount is 0, only once I saw it jumped up to 60
I even increased the dhcache

why is it taking so long ? How do I speed things up ? for most of the guys it took only 1-2 weeks

Update
01- This is my setup

02- It was working fine and when I checked weather ports are open from outside network before 300k sync
I - https://www.yougetsignal.com/tools/open-ports/
Two weeks before 8333 OPEN
Now 8333 OPEN

II - https://bitnodes.earn.com/#join-the-network
Two weeks before 8333 OPEN and Reachable
NOW unreachable

III- Connection speed 10 MB

You won't be able to sync without having any connections. The problem is that you have 0 connections; make sure that you don't have any firewalls (either in your docker container, the host, your router, or your ISP) that is blocking Bitcoin traffic.


.indexes & .tesnet3 not located on my Bitcoin dir started fresh a new lightning node using the raspiblitz guide but while synching the client from my desktop pc (MAC) i wasnt able to locate these files ( “.indexes .testnet3” ) required by the guide to properly synch the client on the pi. It’s weird those files arent anywhere in ~/library/Application Support/Bitcoin/

I’m running the latest bitcoin core version .17.1 and one of the most requirements of the guide when copying the blockchain from the latest version is ( txindex=1 in the bitcoin.conf) but i didnt modify the .conf at all since it should be by default with the latest version...

Any ideas where to locate those files in Mac?

but i didnt modify the .conf at all since it should be by default with the latest version...

There is no default bitcoin.conf file nor is txindex enabled by default.

Without enabling txindex in the bitcoin.conf file, the indexes folder will not be created as the txindex is not being created.

There won't be a testnet3 folder if you are not running it in testnet mode.

  Well, tbh im not using it either on testnet nor mainet,

The default is mainnet. Mainnet is not a different special mode. Furthermore, "the blockchain" is tied to a network. It is not a shared blockchain between testnet and mainnet.

If you have not modified the bitcoin.conf file or started bitcoind with special options, you are using mainnet without the transaction index, so neither the testnet3 folder nor the indexes folder will appear.


More decimals to Bitcoin Bitcoin USD price is increasing continuously; it is not impossible to imagine a day where we get 1 satoshi = 1 USD cent or even more, 1 satoshi = 1 USD.
In that scenario we have a problem, bitcoin micropayments will be impossible, even with Lightning Network.

I know it is possible to increase the decimal places of bitcoin, e.g. 1 BTC = 1 00000000 00000000 units. My question is, how it can be done?

The Bitcoin developers would have to hard fork the chain to allow it.
I also don't think Bitcoin can get that expensive. Your talking 1 BTC = $100,000,000. If that's the case, the Bitcoin market cap would be $1,670,673,700,000,000 (1.6 quadrillion dollars). There is no such figure of money similar to that in circulation.


What is the difference between listpeers vs listnodes commands? In c-lightning implementation, what is the difference between the listpeers and listnodes commands of lightning-cli?

listpeers

listpeers returns data on nodes that you have connected with OR the nodes with which you have an open channel. If you have an open channel with a node, but the connection with that node has been lost, then the node will still appear in the output, with "connected": false. If you are connected with a node but do not have open channels, then it will return the output with "channels": [].

If you want to get information about a particular peer and not all of them, then you can add the node id of the peer like: lightning-cli listpeers <node_id>. You can also query log entries related to the peer by passing the command: lightning-cli listpeers <node_id> <level> where level can be io, debug, info, and unusual. Log levels can only be queried if a node id is supplied.

listnodes

listnodes will return the information of all the nodes in your local network view. This information is collected via the gossip network. If you pass the listnodes command without a node id, then the RPC will return information of ALL the nodes in your view. If you are interested in the information of a particular node id, then you can do so by passing the command: lightning-cli listnodes <nodeid>.


How can I view the current blockchain size? How can I view the current size, preferably in bytes, of the blockchain? Is there a CLI command for bitcoind? Or a website that displays the size?

If you have the bitcoin client running in server mode, you can pass it the getblockchaininfo command. This is the current output:

{
  "chain": "main",
  "blocks": 525329,
  "headers": 525329,
  "bestblockhash": "000000000000000000192cf4d557fb2265855713b0fd208a6490bca81137bce4",
  "difficulty": 4306949573981.513,
  "mediantime": 1527792344,
  "verificationprogress": 0.9999976722383654,
  "chainwork": "000000000000000000000000000000000000000001e6cf0d64537cc800fc54f8",
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": true
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "active",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 419328
    },
    "segwit": {
      "status": "active",
      "startTime": 1479168000,
      "timeout": 1510704000,
      "since": 481824
    }
  }
}

The blocks field is the current number of blocks in the block chain. You can also get this information from BlockExplorer or use the Direct Link to the block count.

If you want the size in bytes, look at the size of your blk0001.dat file, currently 528Mb.


Will any of the proposed Scripts (OP_XXX) allow subscription/recurring type payments? Is it possible to implement a subscription/recurring payment type using Bitcoin scripts?

For example, you could send a payment for a service where there is a monthly subscription say, and each month if there was enough bitcoin in the paying address the required amount would be sent to the service provider. The time could be based on block number, which should correlate well with time, i.e. a monthly payment could be a payment every 4320 blocks.

In order to send someone Bitcoins, you need to sign a transaction with your private key.
Each transaction on your set of coins refers to the previous transaction. It is possible to create a daisy chain of transactions like this, but if you'd perform any operation in between the start and the finish of such sets of payments, the remaining transactions would be invalidated.

This makes it impossible under current model of transactions to perform such an operation. You could define a new OP that would allow one to redeem coins only after a certain amount of time, but then you'd be paying the full amount up front anyway.

You could, however, create a client that would be scheduling payments. But there is a problem - it is generally advised to keep your private keys encrypted, so nobody could steal your coins. A client can't sign a transaction with an encrypted key, so you'd have to be prompted for passwords every time. On the other hand, one could imagine a single address in a wallet to be kept unencrypted for such transactions. In the end though, it is not a matter of creating a new OP in the protocol, but new functionality in a client.


What is BitInstant's "spot" price when sending to BitCoin Address? Bitinstant hasn't replied to my "contact us" and customer service emails - does anyone know why they do not post a current exchange rate on their page? Has anyone used BitInstant, funding from Dwolla and paying out to a bitcoin address?

I've seen the claim that they convert at the last trade at Mt. Gox as-of the time that ZipZap notifies them of the transaction.

Due to the Moneygram --> ZipZap interface, and then the ZipZap --> BitInstant, followed by the BitInstant --> Coinapult (which does the exchange) there isn't any strictly followed timeline as far as how long after you've handed over the cash before your coins are sent to you.


Is a loss of trust in USD necessary for the success and mainstream adoption of Bitcoin? Considering that Bitcoin will succeed if it gets to become a widely adopted store of value and means of payment, current fiat currencies' role would be taken by BTC and the value of those fiat currencies will be much lower than today's, if BTC succeeded..

And if that USD crises ends up happening, wouldn't a collapse of global economy probably come next?

Am I missing something? I don't think I like my conclusions as much as I'd like BTC to actually success...

There is not black and white answer here I guess, but here is my logic.

Let's say that trust is a proxy of security and stability and satisfaction is a proxy of liquidity, usability etc.
If we look at the extremes: if people had 100% trust in the USD, then they are less likely to look elsewhere for alternatives (holding everything else constant). Therefore less trust in the USD is more likely to increase BTC adoption and hence value.
However an improved usability, liquidity and other functionalities may be good enough reasons to increase BTC adoption as well.
Therefore, we can conclude that a loss of trust in not necessary, but it will help.


Why was the target block time chosen to be 10 minutes? According to the wiki, 10 minutes was chosen as a 'tradeoff'.

Why ten minutes specifically? It is a tradeoff chosen by Satoshi between propagation time of new blocks in large networks and the amount of work wasted due to chain splits.

However in the original Satoshi paper, 10 minutes is merely assumed for the purposes of calculating disk space requirements.

A block header with no transactions would be about 80 bytes. If we suppose blocks are
generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year.

Is there a discussion elsewhere that explains how the 10 minute block time was arrived at?

10 minute blocks is simply a compromise.

Shorter block time:

PRO - Faster 1 confirmation time (to protect from 0-confirm double spend)
PRO - Less payout variance for miners (less reliance on large pools)
CON - Requires increased bandwidth (inter node communication)
CON - More forks, longer forks, and longer re-org time
CON - A greater portion of the raw hashpower is wasted, resulting in lower effective security.

With a longer block interval target of longer than 10 minutes, the pros and cons would be reversed.

The major benefit of a shorter block time is the reduced 1 confirm time.  While a quicker block's 1 confirm transaction has less strength than a longer block's 1 confirm transaction it is still better than any block's 0 confirm transaction.

The speed of 1st confirm may seem to be a huge benefit but in reality for most low value and time sensitive transactions such as the buying a cup of coffee, paying for a taxi, or using a vending machine, the risk of double spends is very low. Keep in mind that accepting credit cards is not without risk however merchants have long accepted they will face some losses however if those losses are minimal then it can just be seen as a cost of doing business.  So many merchants could simply accept 0-confirm transactions without exposing themselves to more risk than they do from credit card fraud.

The other factor that diminishes the real world potential of shorter target block intervals is that for many merchants, even  "faster" confirmation times still isn't fast enough. For a Point of Sale transaction, an average confirmation time of 2 minutes is still significantly longer than what most merchants would consider to be workable. The average credit card transaction takes about 20 seconds (including delays by customer).  The entire industry has spent significant resources to shave even a few seconds off.  Changes like enabling customer to swipe card, swiping before all items have been rung up, and not requiring signatures on low value are all about shaving a couple seconds off an already quick process and the cost of those changes is considered acceptable in order to slightly improve the efficiency of a checkout.

The other factor is that reducing the target interval only reduces the average confirmation time but half of them will be longer and the tail can be very long. Due to the random nature of blocks solutions about 15% of blocks will take longer than 2x the target, 3% longer than 3x the target and >7.5 minutes and about 0.5% will take longer than 4x the target.  That uncertainty makes it difficult for a time sensitive business to as a matter of policy wait for confirmations.  Having most transactions confirm in 30 seconds but some take minutes is going to lead to customer frustration at the point of sale.

If the BTC economy grows large enough we could see expanded use of "green addresses" to fill the need for instant acceptance without confirmations.  Such services could be provided by major corporations, and backed by insurance against fraud (for a small per transaction fee).  This would be a more viable 0-confirm solution than a simple reduction of the block interval.

That being said the 10 minute target was probably overly conservative and there are some advantages to a shorter block time.


Some questions about Lightning and Tor Currently there is a wave of articles claiming the Lightning Network is shrinking. If you look at official statistics, like on p2sh.info, this seems true.

I was told that some of it might be an effect of more and more Lightning nodes using Tor. Imho it is insane to run a LN node at home without Tor, so this might be a good explanation.

But there are some questions left ...

Why do tor nodes don't show up in the statistics? I failed to find a good answer to this.
If tor nodes don't show up in statistics - can non tor nodes route payments over them? Someone mentioned you need bridge nodes for it. Why? And what do bridge nodes do? Are they publicly known, do they have a special setup?

Thanks everybody. Looking forward for your answers.

Generally if you read BOLT 07 you will see that lightning nodes and channels can either be private or public.

This is independent of the fact if they run on tor or not.

The node announcment message explicitly supports announcing that it runs on tor as written in the BOLT 07

  The following address descriptor types are defined:

  1: ipv4; data = [4:ipv4_addr][2:port] (length 6)
  2: ipv6; data = [16:ipv6_addr][2:port] (length 18)

  3: Tor v2 onion service; data = [10:onion_addr][2:port] (length 12)

  version 2 onion service addresses; Encodes an 80-bit, truncated SHA-1
  hash of a 1024-bit RSA public key for the onion service (a.k.a. Tor
  hidden service).

  4: Tor v3 onion service; data = [35:onion_addr][2:port] (length 37)

  version 3 (prop224)
  onion service addresses; Encodes:
  [32:32_byte_ed25519_pubkey] || [2:checksum] || [1:version], where
  checksum = sha3(".onion checksum" | pubkey || version)[:2].

However I think most users running on tor like their privacy and don't announce their node.

Generally nodes can only be announced if they have at least one public channel. This is to prevent spam and DoS attacks on the gossip protocol. As some people only have private channels the nodes will not be announced.

Also most mobile nodes like eclair by default open private channels because it might not be so useful for a user that their mobile phone consumes all the data from their carriers data plan to become a routing node.