Does the unique ID of an Armory wallet give any information about it? I want to create an encrypted paper backup, and to do so I'm thinking about encrypting only the root key and the chain code, so that when I have to recover it, I don't have to type a lot.

But I'm wondering if leaving the unique ID unencrypted can give any sort of information about the wallet to the person who finds it, like what kind of pattern to look for, or how much bitcoin there is in the wallet.

For example, it's been said that for extra security, you shouldn't have your savings in a address if its public key is known, because in the future the private key could be found by using quantum computing or whatever. I know the unique ID is a different thing, but still I want to know what it is, how it is generated, etc.

Another way to ask the question: What do I need the unique ID for in the paper backup, if all I need to recover it is the root key and the chain code? Can't I just remove the unique ID from the paper backup? Would that be theoretically more secure?

According to the source code the wallet ID is an address byte and the last 5 bytes of the first address, encoded as base 58. The last 4 bytes of the address are part of a SHA-256 hash of the first part of the address. The address itself is the private key hashed once with SHA-256 and once with RIPEMD-160. So the only information contained in the Wallet ID is checksum information, which is also contained in your publicly available address. The address is available since it is the one you transferred your coins to.

I'm pretty certain that having the wallet ID visible isn't going to leak any information.


Why is the Block Header txn_count field always zero? According to the Protocol Specification, the txn_count field of a Block Header is always set to 0, why is that? What are the intended future uses of this field?

The headers message is sent in response to a getheaders message.

The txn_count is always 0 simply to make the parsing of this packet compatible with the parsing of the block message.

getheaders is designed to be used by a simplified client, however since there is no way to get partial merkle branches using the standard protocol this cannot actually be done.


Practical way to split a bip39 seed into a 2 out of 3 factor auth? I want to keep off-site paper-backups of my seed, but that increases the risk of a physical attack. Can I somehow split my Mnemonic Code into three parts that I only need two of to recover my trezor?

I see Shamir Secret Sharing recommended; yet One Time Pad or XOR is an elegant way to split a BIP39 seed. It's a method simple to describe (apt for a will), easy to verify (trust only yourself) and like SSS is information-theoretic secure [1]. It can be computed entirely with paper and pencil eliminating risks from malware and best of all the resulting shares are themselves mnemonics thus convenient to record (cryptosteel). The method does not scale efficiently for "n of m" when m is large, but works well for "n of n", "2 of 3" and "3 of 5".

Consider an example of a three word mnemonic from the 2048 word BIP-0039 dictionary:

S = "night love grit"

We will split the seed S into two parts, A and B, such that A + B = S (where + is element wise addition mod 2048). First generate a random key A of the same length, say A = "steel siren layer". To find the second key B, go word by word subtracting the dictionary indexes mod 2048 of A from S:

1st: (night - steel) mod 2048 = (1197 - 1706) mod 2048 = 1539 = scare

2nd: (love - siren) mod 2048 = (1060 - 1612) mod 2048 = 1496 = road

3rd: (grit - layer) mod 2048 = (822 - 1011) mod 2048 = 1859 = tribe

Thus B = S - A = "scare road tribe". To retrieve S add the two keys together:

1st: (steel + scare) mod 2048 = (1539 + 1706) mod 2048 = 1197 = night

2nd: (siren + road) mod 2048 = (1496 + 1612) mod 2048 = 1060 = love

3rd: (layer + tribe) mod 2048 = (1859 + 1011) mod 2048 = 822 = grit

Thus as promised, S = A + B. Even with infinite computing power A and B reveal zero information about S. Individually they are nothing but random numbers. "3 of 3" can be achieved by generating two random keys, say A and B. Then the third key C is found as:

C = S - A - B; giving S = A + B + C. This can be extended to "n of n".

For "2 of 3" repeat the method three times. Each time use a different random key A; say A1, A2 and A3. This generates three keys B1, B2 and B3. So now we have:

A1 + B1 = S

A2 + B2 = S

A3 + B3 = S

Divide the keys like this:

Switzerland: A1, A2

Canada: A3, B1

New Zealand: B2, B3

Vires in Numeris!


What was the last life sign of Satoshi Nakamoto? I heard that the name may be a pseudonym and that very little is known about the initiator of bitcoin. Also it seems that he has stopped working on the main client.

When was his last verifiable life sign? Did he ever mention or announce his retirement?

This was his last post on the Bitcoin Forums, December 12th, 2010. The day after he wrote this to the mailing list. As far as I know he did not (publicly) announce his retirement.


How do I claim bitcoin from an old wallet? at my Blockchain "Bitcoin Address" page, it shows "Unspent Outputs":
Summary:
Address, Hash 160, Tools and
Transactions:
No. Transactions, Total Received and Final Balance. (I HAVE 0.4 FINAL BALANCE OF BITCOIN).

Then a REQUEST PAYMENT button.

I have some Bitcoins (0.4) in the Final Balance of "Unspent Outputs".
I used this back in 2016.
Today, 9th November, 2017 i opened a Blockchain Wallet for the first time.
It says i have a $0 balance.

My question is, how do i transfer this balance (0.4) to my Blockchain Wallet.

Any help would be greatly appreciated.

regards
Kel.

From your earlier (now deleted) comment, I think this is your address: https://blockchain.info/address/176T2BxKAraEnusvuuK48RPA5yVYQRhMdc.

You need access to the original wallet with which you received the bitcoin. Which wallet did you use back in 2015 and 2016? Can you still access it? The "Request Payment" button is for sending more bitcoins to that address, not for spending the coins that are already there.


Which exchanges offer stop-loss functionality? In case of a sudden price drop, I want to sell my coins automatically. MtGox doesn't have an option for this, which exchanges do?

BTX Trader will let you create stop-loss orders on top of your account on Bitstamp, BTC-E, Mt. Gox, BTC China and CampBX.

It's not same as an exchange-hosted stop-loss order but a close second.

Disclosure: I'm one of the founders of BTX Trader.


Why doesn't BTC depreciate in value as its supply increases? The popular intuition is that that greater supply = less demand. I've looked around and haven't found a counter-argument. Why is the BTC gaining value as its quantity increases?

The popular intuition is typically correct in well-saturated markets, but Bitcoin is not yet a well-saturated market. Though the supply of Bitcoin is currently increasing the demand is increasing dramatically faster. This is because we are during the initial adoption curve of a new technology and new demand is created as individuals discover the new tech.

In short, there is absolutely some downward pressure on Bitcoin's price exerted by the inflating supply, but it has been completely overwhelmed by upward pressure from new adoption.


How to import private key of a P2SH-P2PKH address to Bitcoincore 0.18.0? I have a privkey of a P2SH-P2PKH address, how to import it to Bitcoin core 0.18.0? In previous versions, I could call importprivatekey and then addwitnessaddress but the addwitnessaddress was removed.

Edit: seems like Bitcoin core 0.18.0 auto calls addwitnessaddress when I use 'importprivatekey' but I found no official documentation of that.

Since Bitcoin Core 0.16, every private key gives rise to a supported P2PKH (1...), P2SH-P2WPKH (3...), and P2WPKH (bc1...) address.

All you need to do is import the private key with importprivkey; the corresponding segwit address will automatically be supported.

A more reliable method is using importmulti, where you specify the address you want together with the private key; if they mismatch, or information is missing, it will complain (since 0.18).


Not able to install coinpunk on centos and ubuntu server I have tried to install the coinpunk after following the instructions given on github about coinpunk installation. Bitcoind installed successfully but when i try to run the npm install command, it starts processing and does not stop. Though i tried the same process on two different servers(centos,ubuntu) but it gives same error.

If you want a detailed tutorial on how to install coinpunk on centos from scratch then please refer here:

themerkle - how to install coinpunk on centos 6.5


One more question about scripting Is it possible to write a script that would allow withdrawal of money only to a specific address?
Is it possible to write a script that would allow withdrawal only specific amount?

Any examples ? Thanks!

Bitcoin script has no way to get information about the outputs of a transaction spending it, so no, neither of those things are possible. If you want withdrawal only to a specific address, why not just send to that address the desired amount in the first place and save yourself a transaction fee?


Recovering funds after I lost my wallet.dat I have received the bitcoin way back in 2013 in Bitcoin Core.
At that time I don't know about the importance of wallet.dat - I have formatted my hard disk and install Bitcoin Core again in 2017 but there it didn't show my Bitcoin in my balance. I have my Bitcoin Key.

How can I get my bitcoin back? Please help me!

If you have your private key, you can add it to your wallet with the command
bitcoin-cli importprivkey "<YOUR_PRIVATE_KEY>" "" false

(The false at the end is to cancel rescan at the moment of adding. It could take some time.)

If you do not have the private key associated with the address the coins were sent to back then, they are lost.


Why did Bitcoin first start to gain economic value? I am really having difficulty answering this:

  Why does a bitcoin have an economic value, such that there are people willing to
  trade US$ (or any other traditional currency) for these virtual numbers?

What did the creator of Bitcoin do at the start to give it economic value?

Satoshi created a system that:

Allowed users to trust transactions without having to trust any single entity.
Opened it up so that anyone could participate and exchange computation power for Bitcoins.
Is designing with a fixed size (21 million Bitcoins), he created an incentive for users to get involved early while Bitcoins are relatively cheap to generate; there is less risk of future inflation reducing the value of early adopters.


How can I limit who connects inbound to my bitcoind How can I setup a bitcoind such that friends and family will always get a free slot on my trusted node, without having to configure a VPN or something, to back Schildbach's wallet for example.

I experience very poor performance if any at all from my "open" full node and figure the --rpcuser setting is not what I need, right?

figure the --rpcuser setting is not what I need, right?

That is correct, -rpcuser is completely unrelated to what you want to do.

You can start bitcoind with the -maxconnections=<n> option where  is the maximum number of connections that you want to allow (or add the option to the bitcoin.conf file).

Then you can setup an external firewall to manage your connections. With that firewall, you allow through n-8-1 external connections on port 8333. This means that you are allowing other nodes to connect to you, but still keep one unused connection less than your maxconnections setting for your SPV wallet. Then you add another rule to the firewall to allow 1 connection on a different port which just forwards traffic to port 8333. You connect your SPV wallet to that other port.


I can't access my wallet at Bitknock cloud mining anymore I was doing mining with Bitknock but they closed the website without informing us.

I can't access my wallet. Here is my wallet address

fnwg643zjnfwsqks

What must I do now? Should I acknowledge that I lost my Bitcoins?

Unfortunately, most of the "cloud mining" websites are ponzi schemes trying to disguise themselves as a cloud mining contract provider.

This site catagorizes Bitknock as a ponzi/scam dated back to November 2015. A little bit research could have made you aware of the dangers.

I personally lost dozens of bitcoin in such projects, even if I joined only the most secure looking. General rule of thumb: If it looks too good to be true, don't buy it.


Broadcast a signed transaction I sent money from 4 inputs to 2 outputs, one of which I don't control. The transaction's fee is too small (didn't change my settings and the transaction fees got a lot higher, recently) and will not confirm anytime soon.

I then created a new transaction spending 2 of the 4 inputs of the original transaction to 1 output. This transaction is obviously doubple-spending.

After trying to breadcast the second transaction via Electrum and with several online services, still not a single one broadcasted it. They all know it's a double-spend and won't broadcast double-spends.

Subsequently, I installed bitcoin-qt, hoping to be able to send the transaction directly to my peers.

I never used the bitcoin-qt console before, so I hope this is correct:

sendrawtransaction 010000000189

I cut the string off after 12 characters. The entire signed transaction is 382 hexadecimal digits long. Do I need to use quotes, some kind of brackets, a semicolon, something else?

The error message it returned is this:

  Missing inputs (code -25)

I don't know what this error message means exactly but in case it means that the inputs were not found in the UTXO set generated from the part of the blockchain that was already downloaded:

bitcoin-qt doesn't know my inputs as they are only between a few months and a few weeks old but it shouldn't have to to send a signed transaction.

It doesn't know my private keys either, but again, it shouldn't have to.

Can I force it to do so even if it can't check whether the inputs exist? The reason is that I'm on a super slow internet connection and downloading the blockchain would take several days, even if nothing else went over the connection during that time.

It doesn't seems to be a better solution than waiting. The original transaction (the 4 inputs 2 outputs one) has been relayed by the Electrum node that received it and spread over the network, therefore, it's in the mempool of the network nodes. Every transaction that tries to spend the same UTXO referred by the first transaction will be marked as double-spending until the first transaction is pruned from the mempool. Hence, waiting is unfortunately the only solution that comes to my mind.

Edit: Answering another question I came across a thing that could also be useful for you. You can use a CPFP approach. To do so, try to spend from the transaction that is pending to be confirmed with a new one with high fee. This new transaction will be like a candy for miners, and in order to include it in a block, they must include the previous also.

Edit2: Regarding the error message provided, there is a problem in how the transaction that the author wants to send (T1 from now on) has been build. The scriptSig of the transaction is not properly set.

The serialised T1 is:

01000000018964907116f6245417b9d9aea1d226e46486c5d485d6b947c95c794e032df612010000001976a9140043be27e16b93c275413e9b4411f08f2cd8bef088acffffffff0120082f08000000001976a9140b01599fd09ef602d71827601871e5a1081459f688ac00000000

Is we decode T1 we will get something like:

version: 01000000
number of inputs: 01 (1)
input 0
     previous txid (little endian): 8964907116f6245417b9d9aea1d226e46486c5d485d6b947c95c794e032df612 (12f62d034e795cc947b9d685d4c58664e426d2a1aed9b9175424f61671906489)
     previous tx output (little endian): 01000000 (1)
     input script (scriptSig) length: 19 (25)
     input script (scriptSig): 76a9140043be27e16b93c275413e9b4411f08f2cd8bef088ac
     nSequence: ffffffff
number of outputs: 01 (1)
output 0
     Satoshis to be spent (little endian): 20082f0800000000 (137300000)
     output script (scriptPubKey) length: 19 (25)
     output script (scriptPubKey): 76a9140b01599fd09ef602d71827601871e5a1081459f688ac
nLockTime: 00000000

At this point, we can notice that the scriptSig is incorrect. Analysing it carefully, we can notice that it has the structure of a P2PKH scriptPubKey instead of the corresponding signature that should complement the scriptPubKey of the previous transaction (T0 from now on):

76a9140043be27e16b93c275413e9b4411f08f2cd8bef088ac =
OP_DUP OP_HASH160 0043be27e16b93c275413e9b4411f08f2cd8bef0 OP_EQUALVERIFY OP_CHECKSIG

If we want to be definitely sure about this, we can check the scriptPubKey of the UTXO from T0 we are trying to spend, and analyse both scripts.

The UTXO from T0 we are interested in can be identified by (id:index):

12f62d034e795cc947b9d685d4c58664e426d2a1aed9b9175424f61671906489:1

If we look for the specific scriptPubKey that contains that UTXO, we will find:

OP_DUP OP_HASH160 0043be27e16b93c275413e9b4411f08f2cd8bef0 OP_EQUALVERIFY OP_CHECKSIG

That curiously matches with the scriptSig that we have found in T1.

Conclusion

T1 scriptSig (input 0) and T0 scriptPubKey (output 1) shared the sames script. T1 scriptSig must provide the signature required in T0 scriptPubKey in order to pass the validation:

scriptSig:  [signature]
sciptPubKey: OP_DUP OP_HASH160 0043be27e16b93c275413e9b4411f08f2cd8bef0 OP_EQUALVERIFY OP_CHECKSIG


Given a Bip38 encoded private key, Can you derive the address without knowing the password? The title says it all. I have a private key that is BIP38 encrypted:

6PYVdYvBaMXD7bFNJwMh8DCTxcBQjzyPmqWDQDp2PBKYyFUACph7vzjeaN

Is there a way to derive the address from just that information?

This doesn't appear to be possible from reading the BIP38 draft specification. However in this specific case, the key you have posted is a example from the moneywagon python module documentation. The password is 123 and the address is 1BrUfC75qyLQxxp7qcisfaMmwRMECo4ETC.


coin selection - why selecting transactions with confirmations first better I know that selecting transactions with confirmations first are much better than spending transactions with 0 confirmations direct.

But why is that?

Many wallet implementations prefer spending confirmed inputs over unconfirmed inputs. There are multiple reasons for this preference:

Bitcoin Core (and perhaps other software as well) does not propagate chains of unconfirmed transactions beyond a certain depth. If you continuously reuse unconfirmed UTXOs, eventually your transactions will not be seen on the network until some predecessors confirm.
Transactions using unconfirmed inputs are susceptible to become invalid due to a parent transaction being replaced or doublespent.
A transaction building on top of an unconfirmed change cannot be confirmed until the parent transaction is confirmed. This dependency is used by child-pays-for-parent transactions positively to increase the priority of the parent transaction, but can also be a handicap, when a low fee transaction essentially puts the onus on the recipient to bump the transaction in order to gain access to their funds.


Why does some transactions have an excessive number of receiving addresses? Such as this transaction: 92088fe6b9d9c9db84d26481b80104f8ca566649a656b7aa3e67432b346cbf1c, which has over 5000 receiving addresses.

It is unlikely that someone would send money to that many business partners at once, let along each individual output is quite small. If that is done for privacy protection purpose, over 5000 receiving addresses is too excessive.

It is unlikely that someone would send money to that many business
  partners at once

Why? It's a mass payment for "shareholders". In this instance, the transaction you mentioned is a known payment from a pool to their miners.


Why is BTC transfer on coinbase taking 30+ hours? I'm really frustrated from the really bad service of coinbase.com.
I'm waiting for a transfer of 0.14 BTC for 30+ hours which is ridiculous! Customer support is totally missing, service is really bad. I bet that once the market goes up, the transfer will  be suddenly completed. WHY THEN?

What is taking you so long to complete a simple transaction for 30+ hours?

Because they're not a real Bitcoin wallet, I guess they're sending it manually after they confirm it.

A real Bitcoin wallet is a wallet that gives you the full access to your coins and they are just managing your wallet controls and usually its called non-custodial bitcoin wallet, unlike Coinbase.


How are double spends and "dropped" transactions represented in BlockChain.info API I am currently using BlockChain.info's API to do payment verification with, but have a few questions.

How I am using it (I think I am using it in the right way....):

I am issuing a new/clean address to for each sale.
I am then checking the balance of the address and the transactions (tx->out) to get the time of the transaction, the value and the block height (of which I am using to get the confirmed count from)
I then add the transaction details to my database/System and display the relevant message to the user.
An automated script then runs to collect/update the confirmed count (and updates this info into my database).

I have been building this by making bitcoin transactions to myself, but of course all my test transactions are genuine, so I don't know how "bad" transactions will be represented!

What I am unsure on, is how will double spends (or dropped transactions/spends/fraud) be represented?
Will the transaction simply disappear? And will this then effect the balance shown against the address? Or will the block height simply change to 0/NULL?

Any advice on this would be greatly welcomed!

Double spend transaction (transaction that lost the competition) have no block height. So you can check this field.

Also you review other approach using callback or webhooks to get update that new transaction arrived. Most blockchain API provide this service.

You can check also our API https://bitaps.com/api/#Create_payment_address

Your task in this approach is only create callback handler.


How to scan QR code with multibit wallet application? I downloaded the multibit application for windows and was wondering if there was a way to scan a QR code with my webcam? If so where do I click because I dont see an option and no way am I going to type out an address everytime.

Webcams aren't supported in MultiBit.

You can however paste a QR code using the 'paste' button in the side bar. You can also drag and drop an image onto the existing QR code in the side bar.


How can I generate thousands of receiving addresses from a Bitcoin wallet? I want to generate thousands of receiving addresses without sending any BTC to another wallet. Is it possible and how?

Yes, once you have an HD wallet which is free you can generate an unlimited amount of receiving addresses.

There is lots of services offering HD wallet, hardware, mobile or desktop, electrum is a common one, you just have to download and install it, choose and save your secret phrase then you can begin generating your addresses from your seed: https://electrum.org/#download


How to install minergate-cli in centos 6.6 How to install minergate-cli in centos 6.6.

To solve this, it is necessary install the missing dependencies, in my case I have installed the epel repository too:

~$ sudo yum install -y libXrender mtdev libproxy xcb-util-wm xcb-util-image xcb-util-keysyms mesa-libEGL mesa-libGL compat-libxcb

or

~# yum install -y libXrender mtdev libproxy xcb-util-wm xcb-util-image xcb-util-keysyms mesa-libEGL mesa-libGL compat-libxcb


Why do first bitcoin transactions receive most confirmations? My very first Bitcoin transaction has 740 confirmations, the next have 239, 212, 70, 43, 5, and 5, respectively. Is this just because my first transaction has had more time to get more confirmations, or do first transactions always receive the most confirmations, even if the subsequent transactions follow immediately thereafter?

Viz., does the first bitcoin transaction need the most confirmations, such as to verify the legitimacy of a new user?

thanks

Once a transaction has one confirmation, it gets a confirmation whenever the network creates a new block (roughly every 10 minutes). If one of your transactions gets a confirmation, the rest will also get a confirmation if they have at least one confirmation already. So the difference in non-zero confirmations between your transactions will always remain the same (except in very rare cases when the block chain gets reorganized).

Going from 0 confirmations to 1 works differently.

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


Unable to execute getwork logic in java I was going through this post in stack exchange How can I code a Bitcoin JSON-RPC “getwork” request in Java?

I tried to write a simple snippet for just the getwork json rpc.

public static void main(String[] args) throws Exception {

    String request = "{\"method\": \"getwork\", \"params\": [], \"id\":0}";
    URL url = new URL("http://de01.supportxmr.com:7777");

    HttpURLConnection conn = (HttpURLConnection) url.openConnection();
    if (conn .getConnectTimeout() == 0)
        conn.setConnectTimeout(1000);
    if (conn.getReadTimeout() == 0)
        conn.setReadTimeout(1000);
    conn.setRequestMethod("POST");
    String encoded = Base64.getEncoder().encodeToString(("<my_wallet_addr>:x").getBytes(StandardCharsets.UTF_8));  //Java 8
    conn.setRequestProperty("Authorization", "Basic "+encoded);
    conn.setRequestProperty("Accept", "application/json");
    conn.setRequestProperty("Content-Type", "application/json");
    conn.setRequestProperty("Content-Length", Integer.toString(request.getBytes().length));
    conn.setRequestProperty("X-Mining-Extensions", "midstate");
    conn.setAllowUserInteraction(false);
    conn.setUseCaches(false);
    conn.setDoOutput(true);

    DataOutputStream wr = new DataOutputStream(conn.getOutputStream());
    wr.writeBytes(request);
    wr.close();

    InputStream is = conn.getInputStream();
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    int len;
    byte[] buffer = new byte[4096];
    while ((len = is.read(buffer)) != -1) {
        bos.write(buffer, 0, len);
    }
    String content = bos.toString();
    is.close();

    System.out.println(content);

}

when I run this code, I get an error

Exception in thread "main" java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:792)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:789)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1536)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at org.litecoinpool.miner.Test.main(Test.java:42)

What am I missing here? Is stratum proxy necessary to be running on the machine? If so how do I specify the parameters to run in the java code?

I tried a direct TCP connection also to the server.

public static void main(String[] args) throws Exception {
    String message1 = "{\"id\":1,\"method\":\"mining.subscribe\",\"params\":[]}";
    String authorizemessage = "{\"params\": [\"<wallet_address>\", \"x\"], \"id\": 2, \"method\": \"mining.authorize\"}";

    Socket soc = new Socket("de01.supportxmr.com", 7777);
    System.out.println("connected");
    OutputStream outputStream = soc.getOutputStream();
    outputStream.write(authorizemessage.getBytes());
    outputStream.flush();

    BufferedReader in = new BufferedReader(new InputStreamReader(soc.getInputStream()));
    JSONObject json = new JSONObject(in.readLine());

    System.out.println("json response: " + json.toString());

    outputStream.write(message1.getBytes());
    outputStream.flush();

    in = new BufferedReader(new InputStreamReader(soc.getInputStream()));
    json = new JSONObject(in.readLine());

    System.out.println("json response: " + json.toString());

}

but no luck again :(

The getwork RPC call was removed from Bitcoin Core. It was deprecated and then superceded by the getblocktemplate RPC call.

It looks like the pool that you are using uses an unspecified protocol. It's just a tcp connection where you are sending JSON formatted strings and receiving JSON formatted strings from the pool server. I figured this out by digging through this mining software's source code.


Can BitML encode Lightning? I have been reading the BitML paper.  The language compiles to another language (Balzac [which in turn compiles to Bitcoin Script]), which can do relative and absolute timelocks. Balzac can also do something that looks like an HTLC. So it looks like Balzac could encode Lightning. Can BitML also do this?

In short, yes (kinda).

More in detail, Balzac can perform the operations required for HTLC transactions. The following transaction is redeemable by Alice providing the premimage of h, or by Bob after the timelock block 1550000 expires.

transaction T_BtoA {
    input = B_funds: sig(kA)
    output = 1 BTC:
        fun(x,s:string) . sha256(s) == h && versig(kApub;x)
            || checkBlock 1550000 : versig(kBpub;x)
}

So, Balzac can be used to express the transactions of an HTLC, or any payment channel.

BitML is designed to express contracts, and compiles to a set of Balzac transactions.
Thereby, it cannot be used to express arbitrary transactions.
Nonetheless, we can express a similar logic in BitML with the following contract (full code):

(choice
  (reveal (h) (withdraw "Alice"))
  (after 1550000 (withdraw "Bob")))

This contract compiles to three transactions, one similar to T_BtoA above, and other two to move the bitcoin from the first transaction to either Alice or Bob.
Note that all transactions need to be signed by both participants when stipulating the contract, so they cannot be changed unilaterally.

While BitML can be used to express such transactions, at the moment it cannot express payment channels. With BitML you cannot design contract where the values of transactions are not known at compile time, or that require an unbound number of iterations. However, there is ongoing research to extend BitML with these features.


Good resource for understanding the peer to peer protocol sequence I'm looking for a good  explanation or reference on the peer to peer aspects of the two main bitcoin actors- the clients(wallets) and miners.

Satoshi's white paper, in section 5. Network, gives a very high level overview of the steps to run on the network, yet what I'm looking for is a description of the handshake sequences, how the peers broadcast, collects new transactions, and how they request missed blocks.

I've read and somewhat understand the protocol at https://en.bitcoin.it/wiki/Protocol_specification
I also have a solid understanding of the crypto, ECDSA, SHA-256,  RIPEMD-160, Merkle trees, and Hashcash (and a bit of RPOW) so no need to cover that in particular.

What would be really helpful is a sequence diagram, if anyone knows of one, and a paper or article that goes into more detail than the whitepaper.

Any help, beyond "read the **'ing source code' would be great ;-)

Your question is rather vague, what do you really want to know?

Bitcoins peer-to-peer nature comes from the fact that no single entity holds the database (the block chain), but every client in the network does.

You misstate that Bitcoin has two main actors. In fact, miners are just like other clients. Every client in the network has the possibility to broadcast a new block it has found. The difference with miners is that they are actually trying to find such a block to publish.

Since the block chain is peer-to-peer, all updates to it will have to be broadcast to all clients as well. These update consist of blocks and transactions.

Whenever someone built a valid block to append to the current block chain, it broadcasts it so that every other client can verify it. If these clients accept the block, it will be added to their block chain. New blocks always refer to their previous block so that clients that did not receive one, or mistakenly accepted a malicious block, can always get the right blocks from the network.

Transactions, as well, are broadcast to all clients where they are validated. Most clients do not have to do anything with these transaction, only those that mine do. Clients that mine bundle all the valid transactions they received into the next block they are trying to build. When they succeed in building the block, these transactions are stored in the block and broadcast to be included in other clients' block chain.

One essential property of Bitcoins peer-to-peer nature is that you can only stop it from existing if you can stop all the nodes. As long as one node exists, "Bitcoin" exists.


MtGox socket.io streaming problem MtGox Streaming API is down or is something wrong with the code.

I used this example https:// bitbucket.org/nitrous/mtgox-api/src/004c254993963baeb239ac7ac7f676b5024fc93f/socket/ws.client.html?at=master

You can see the example here http://atc.leadsoft.eu/test.html

I entered the server url (https://socketio.mtgox.com/mtgox) and click connect, but most of the time it writes only Connected or Connection timeout and freezes.

Basically Mtgox's api sucks. It's not your fault, its theirs. It's almost impossible to programmatically get a good reading of their order book. socket.io only works about 20% of the time and the http api often gives just wrong information.

To get around this I have several server instances constantly reconnecting an disconnecting until a successful steam is established and then it reports back to me until it fails. The idea is to always have at least one working stream.

I realize this can be incredibly impractical so you may want to use a service like bitcoin charts which has their own api, but if you need data more then every 15 min you will either have to pay or come up with some round about solution.

Here's some other people complaining about the same thing. One suggests using websockets and claims that he's had more success.


Could ASICs be used to mine a "BitcoinX4" blockchain? Bitcoin, on average, has a block every 10 minute. There are advantages (pdf) to having a higher "clock rate", e.g. Litecoin's block every 2.5 minutes. I call "BitcoinX4" the theoretical blockchain that is achieved by speeding up block creation time (hardfork), without affecting the total number of coins (block reward reduced by a factor of 4).

It is conceivable that at some point in the future, a "split" or "hard fork" will be made in Bitcoin, such that its blocks will be generated with a different (higher?) frequency, possibly while keeping a mining majority. For this to happen (hash power majority), ASICs need to be able to crunch the new "BitcoinX4" chain.

So, my question - are the known ASICs today compatible with changing the block speed?

Any mining device can be used without alteration for mining a specific alt-chain, as long as the chain's proof of work is the same (double-SHA), and the size, encoding and position of the timestamp and nonce fields is the same in a block. The latter ensures that devices that increment those fields internally would not be altering other parts of the block header. As block speed is not a part of the header but an external constraint put on the specific cryptocoin, ASICs and other devices should be able to mine such blocks without a problem.


An "Almost" decentralised currency I've been interested in Bitcoin for a while. I've been thinking I'd like to give it a go and see if I can make my own cryptocurrency, just to see if I can.

I run my own small web hosting company, the main reason why I don't want to accept Bitcoin is its price volatility. I mean, at one point it was worth $1000 and now its worth $315.

I was wondering, from purely an economics standpoint, would a currency in which all payments, transactions etc ... where decentralised work if one key part was centralised.

I'd like to make all clients download a text file once a week. In the text file would a number, and that number would tell all of the transaction verifiers how many new currency units can be created in any 24 hour period.

I would like to use this file to control the rate at which new currency units are created, there would be no overall limit like Bitcoins 21M. The value would be controlled by controlling the number of currency units that can be created in any 24 hour period.

So since I know nothing about economics I was wondering, would this work?

This is the proverbial veggie burger with bacon. There are plenty of people who like veggie burgers. And there are plenty of people who like bacon. But there are very few people who like both.

You have a cryptocurrency that's not run by a government. But it also has a central authority that can inflate it and regulate it at their whim. There are people who like these revolutionary cryptocurrency systems that are not run by governments. And there are people who fear deflation and like  currencies that can inflated as deemed suitable by a responsible steward. There are just very, very few people who like both of these things.

You will have to answer this very hard question -- "Why would I want to use a store of value that lets you tax my stored value as you wish?" And "Why should I use a currency that's not backed by a government and not subject to political controls when I can use currencies that are?"


What does cloud instance owned means? I am using this website for cloud mining cryptocurrency for free. I was reading about How the Cloud Mining/Hashing Works when I came to this point in which says

(Cloud SHA-256) SHA-256 algorithm, 1.0 GHS per 1.0 cloud instance owned.
(Cloud Scrypt) Scrypt algorithm, 1.0 MHS per 1.0 cloud instance owned.

Could you explain these points in an easy way so I can understand it?

It means that for each cloud instance you own, you will get exactly 1 GHS or exactly 1 MHS, depending which type of cloud instance you own (sha256 or scrypt).


Is there a way for me observe network traffic of bitcoin exchange? I was wondering if there is a way to observe a network traffic/packet of bitcoin exchange. I want to know what's in the packet when I send a bitcoin from one wallet to another.

Thanks.

You can use a "network sniffer" to observe data packets on your local network which are sent from or received by your computer.

It will be helpful to study the Bitcoin network protocol documentation so that you can define a filter that will only show the Bitcoin related traffic.

A popular choice for Windows is Wireshark, but there are many other options. If Wireshark does not have a decoder (dissector) for your protocol of interest you may have to manually decode from hex.

See https://www.google.com/search?q=wireshark+bitcoin+dissector --  there seem to be several bitcoin dissectors you can add to Wireshark.


How to open a Butterflylabs miner? How to open a Butterfly 5GH/s miner and replace the fan? I don't see any screws at the outside.

Remove the paddings from bottom and open screws under them.


Bitcoin price synchronized between exchanges how the different exchanges manage to have the price of Bitcoin synchronized (or at least very close)?

The exchanges don't need to synchronize.  It's just traders keeping the prices close.  If the price is $6500 on one exchange and $6700 on another for BTC.  Traders will sell on the $6700 exchange and buy on $6500 exchange until they are close.  They now own more BTC then before without spending any money


Inbound connection merchant risk I was recently looking at the safest way to set up an online bitcoin service. When looking for security concerns I ran across this post on stackexchange What are the risks of running an online store via a bitcoind connection using less than the minimum of 8 connections? under the main question Stephen Gornick talks about how allowing inbound connections on 0 conf could open you up to huge double spends. I looked all over for the reason for this but was hoping someone could explain this vulnerability to me.

The attack is this simple:

You connect to both the merchant and every major mining pool.
At the same time, you send a transaction paying the merchant to the merchant and a conflicting transaction that pays yourself to every major mining pool.
The merchant sees the transaction paying them, and accepts it with zero confirmations.
The mining pools see the transaction paying yourself first, so they try to work that transaction into blocks. Eventually, one of them succeeds and the merchant will never get paid.

If you accept payments with zero confirmations, you should connect directly to multiple points in the Bitcoin network as close to major mining pools as possible and monitor for any conflicting transactions -- even if seen later. (There are other things you must do too. It's not trivial.)


Strange transaction (block 71036) What happened to this transaction?

Can someone explain it?

http://blockexplorer.com/t/9eHTFRi3Qq

On July 29 2010, it was discovered that block 71036 contained several transactions with a ton of OP_CHECKSIG commands. There should only ever be one such command. This caused every node to do extra unnecessary work, and it could have been used as a denial-of-service attack. A new version of Bitcoin was quickly released. The new version did not cause a fork on the main network, though it did cause one on the test network (where someone had played around with the attack more).

https://en.bitcoin.it/wiki/Incidents#OP_CHECKSIG_abuse


Sending bitcoins to a "Sending address" in Bitcoin Core I'm trying to understand some basic concepts in the Bitcoin Core (v.0.15.1) and in the bitcoin "world".

I'm using a testnet, and used https://testnet.coinfaucet.eu/en/ to send some bitcoins to a "Receiving address". it worked fine, and I can see the transaction/balance changed in Bitcoin core.

However if I send bitcoins from coinfaucet to a "Sending address" (Which is a public key as I understand) then I can't see any bitcoins in that address and the balance is not changed and no transaction is reported, although coinfaucet shows me a verified transaction.

What am I missing? Can't the sending address hold/receive bitcoins? what are the "Sending address" used for if I can't send bitcoins to it?

I assumed that when I want to send funds from my wallet to someone, I first move funds from the Receiving address to the Sending address and use that address. but I'm totally unsure of this assumption.

Any help will be appreciated.

EDIT: After dinging some more, I came to realize that the Sending address is just addresses you have sent or planing to send to. It has nothing to do with the Change address as described in the answer. That is why after I sent money from coinfaucet to a made up sending address I did not see any change in balance because that address is not mine. and after a re-scan I see it a watch-only.

In Bitcoin Core, the sending address refers to the address that you have saved as a "contact" in the client. You can save the address with a nickname eg. Coinbase address.
The receiving address refers to the address which you can use to receive coins. The way Bitcoin works is that a transaction spends the unspent output from the receiving addresses. Hence, it depends on which receiving address you received coins from, your coin control and amount.

E.g.
1. If you receive 1BTC on 1AddressA and spend 1BTC in the client, the blockexplorer will identify the origin as 1AddressA.
2. If you receive 0.5BTC and 1 BTC on 1AddressA and 1AddressB respectively and you spend 0.5BTC, the blockexplorer will identify the sending address is 1AddressA.
3. If the scenario is the same as 2, and you spend 0.6BTC, the sending address will appear as from both and there will be another output going to another address in your client. It is called the change and the address isn't showed within the client. However, you can spend it in your next transaction, I don't know why there's no balance but what I know that the transaction to these addresses shouldn't appear as they are change addresses.

Why are they not on transactions list?

Because Bitcoin core using bip32
and change addresses transactions have different derive path.

Example

m / purpose' / coin_type' / account' / change / address_index
Normal addresses path:

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

Change addresses path:

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


Are time, timereceived and blocktime in UTC? I read around about the differences between time, blocktime and timereceived, but one question remains. Although I assume all times are UTC, I haven't seen that mentioning specifically anywhere.

Does anybody know which timezone the times in the bitcoin blockchain are formatted in? And does this also account for timereceived, or is that local?

All timestamps are in UNIX format, that is: the number of seconds since januari 1st 1970, 0:00 UTC.


Sharing the Master Keys in BIP32 What is the Best way to share the Master Public Key and Master Chain code generated using BIP32 in Bicoins with a user that I don't trust ?

I just want the second user to monitor my wallet and not spend coins. What will be the best way to share my Master Keys ?

This depends on the wallet (keypath) you are using.

If your wallet is based on BIP44 (most wallets are), sharing the extended master public key will not allow the other party deriving pubkeys to monitor incoming funds (because of hardened key derivation). You need to share the specific account extended public key. Your fist account is at keypath m / 44' / 0' / 0', second at m / 44' / 0' / 1', etc.

Instead of sharing the pure pubkey together with the chaincode, we use "extended public keys". You can identify a such base58check encoded string by the first 4 chars "xpub".

As far as I know there are only a few wallets in the wilde who can do such exports/imports.


Other server wallets than bitcoind recommended for a ubuntu server I currently run bitcoind on my server that is hosting an online browser game where bitcoin is integrated. The problem I have right now is that we are running out of diskspace with the increasing size of the blockchain and upgrading hardware is not an option at this point.

Is there a server wallet that is not downloading the entire blockchain like bitcond does? If so which ones?
Our current integration is through PHP so it would be good if there is support for that.

The easiest solution would be to upgrade to the recently released version 0.12.0 which allows running a wallet while in pruning mode (which was not possible with 0.11.2). That way you can limit the required diskspace, still have a fully validating node, and don't need to do update your integration.

After the upgrade to 0.12.0 you just start bitcoind with -prune=<n> where <n> gives the amount of MiB of blockchain data you want to store. Be sure to leave some more diskspace for other data, the other files in the bitcoin directory don't count toward the limit.


How to generate SegWit address How do I generate a SegWit address using Bitcoin Core CLI? Also will I be able to redeem those outputs and send them to a "legacy" address? If so, will this second transaction be accepted by older, non-SegWit clients?

How do I generate a SegWit address using Bitcoin Core CLI?

You can use addwitnessaddress addr, where addr is an existing P2PKH or P2SH address of yours. It will construct a P2SH-P2WPKH or P2SH-P2WSH address with the same key/script, if known to be valid.

Note that this command is not available until SegWit is active on the network, as before that time, such outputs would be spendable by everyone.

Since Bitcoin Core v0.16.0, P2SH-P2WPKH addresses are the default, and the addwitnessaddress RPC is deprecated.

  Also will I be able to redeem those outputs and send them to a "legacy" address?

Yes.

  If so, will this second transaction be accepted by older, non-SegWit clients?

Yes, it is a softfork. Every new transaction is valid according to the old rule. If not, a chain split would occur. Older clients may not see the transaction until it is confirmed, however.


ASIC Miner Block Erupter & bfgminer: "no devices found" Bit of an experiment.

I have 2 x ASIC Miner Block Erupter 333Mh/s Rev. 3.00 plugged into powered USB ports.

I've downloaded and installed CP210x_Universal_Windows_Driver from https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers.

I see:

If I run bfgminer, I receive an error "no devices found. Press 'M' and '+' to add". I press M, then +, but no devices are detected.

Help appreciated.

This is the tutorial I was following.

Try following the ASIC instructions provided with BFGMiner

  These will autodetect if supported by the device; otherwise, you need to use
  the '--scan-serial erupter:' option to tell BFGMiner what device to
  probe; if you know you have no other serial devices, or only ones that can
  tolerate garbage, you can use '--scan-serial erupter:all' to probe all serial
  ports. They communicate with the Icarus protocol, which has some additional
  options in README.FPGA

Try adding --scan-serial-erupter:all to the command for starting BFGMiner.


What was the longest held UTXO ever spent? What output had the longest period between when it was created and eventually spent?

As of June 19 2019, using the following query:

bitcoin-indexer=> select reverse_bytes(output_tx.hash_id || output_tx.hash_rest),
 output.tx_idx,
 output_tx.current_height,
 input_tx.current_height,
 input_tx.current_height - output_tx.current_height from output
 inner join input on input.output_tx_hash_id = output.tx_hash_id AND input.output_tx_idx = output.tx_idx
 join tx as output_tx on output.tx_hash_id = output_tx.hash_id
 join tx as input_tx on input.tx_hash_id = input_tx.hash_id
order by (input_tx.current_height - output_tx.current_height) desc limit 40;

against fully indexed blockchain (using rust-bitcoin-indexer), I was able to identify the coinbase of d5a045c9d8a5bf7619c52968945c494d49333b80d51f1d0e2747b9e8bb2c6709 as the longest held UTXO ever spent (so far).

It was created in block 45697 and spent in block 559367, which lasted 8 years 10 months and 3 days.

The full set of results:

                           reverse_bytes                            | tx_idx | current_height | current_height | ?column?
--------------------------------------------------------------------+--------+----------------+----------------+----------
 \xd5a045c9d8a5bf7619c52968945c494d49333b80d51f1d0e2747b9e8bb2c6709 |      0 |          45697 |         559367 |   513670
 \x67e8d773078b75fb5680089b8d2d380be93943a1dcf9c37e309d517a98e5d40c |      0 |          66188 |         570705 |   504517
 \x9c90d07be3d18c7a3612cd971934ed89c0d07fa302d4922481d1114dfaedc93d |      0 |          73303 |         577470 |   504167
 \x7a8a36f68d265ff49e4df5215a2a6dd922dbfbb6cc695399d2b10efd4a75c47d |      0 |          52632 |         553012 |   500380
 \x08ca56db26ad6d171e7fbcb24e592590bf369d70fc5931eb3790278681f35768 |      0 |          52644 |         551281 |   498637
 \x5fba526502ee887bc1e6beb0255cfcdfaaf41e0d25e233e447e585458ed37ac5 |      0 |          52652 |         551281 |   498629
 \x9596d84e671daea6ee965244ca75e204dfa72a471db3cb51dc406fbfeacc2e92 |      0 |          69951 |         567828 |   497877
 \x82b6f02c86fd3afb5ca23b7bf88d509e92516129dc36ceb4864114ed5ec710f5 |      0 |          66446 |         563621 |   497175
 \x31a67bf1f3cf01351b76cb16931ceb45c670b50af850181ab586d97040d90a1b |      0 |          82729 |         579816 |   497087
 \x463b0f7c96214418af0f50836047ce0e9cbc5940b739d7d67eed1842e2edf768 |      0 |          82944 |         579816 |   496872
 \x508d7a4ff36cda617aecd02da86fd5449176b0c75d3e398242253dbce6d54eeb |      1 |          83477 |         579817 |   496340
 \x4e0584a90c9dce50ecd9ed1b2d79a3a8af0f690041dccc035fd81f06ac200571 |      0 |          56710 |         551275 |   494565
 \xc6c9e4be37ea843fe50df740b5acba5d23c894a4b68191b1c157b281a8a985c5 |      0 |          74897 |         568169 |   493272
 \x9296baa58de452d15763079e71861f5580863c462ce855a41e485e92f28f6e98 |      1 |          68586 |         560782 |   492196
 \x404116e265c3717b403697ea226f6d839a24f88009b1802b978b692edca95cf4 |      0 |          59137 |         551279 |   492142
 \xf6a0cc22d749a299c83c86df3406b9d6d9e6a70215978363ef5e884812112461 |      0 |          60717 |         551279 |   490562
 \xa28a27378b3499997d1c990813adddbd25e470e0b44510896435b9a918968a0b |      0 |          61047 |         551272 |   490225
 \x36a230b30815e40d238f27f2654ff3681f6c1931076e90c4c05065002b9d91e6 |      0 |          73788 |         562598 |   488810
 \xdcc71895e1baf0abb83ff27348211662b517105b18789f4410a55a51dc50a156 |      0 |          66637 |         555282 |   488645
 \x899ee05d5c4e91b3ee49958a9d0333ff9b1987c352d946ecdb1fd91588f667ac |      0 |          66336 |         554738 |   488402
 \x6284dc97c5c923308675e9b0db88210ad61a42815caaf024b07cc0eb9e262c67 |      0 |          33538 |         521167 |   487629
 \x56102337f6f10161a2286fe1ffb91e353b13a17db6a41c6149574d6dae476528 |      0 |          33590 |         521167 |   487577
 \xf398b7e93220747aa2f45f36284606b2ae802741160f28f2fd3f2afa40bfd346 |      0 |          66627 |         553372 |   486745
 \x708d840ea0041386b4376896b14e510d0cad3cdaeb707fe93ab2d33372723503 |      0 |          68283 |         554738 |   486455
 \x452e2d312a18d907f2ef1ec976b1ed18ef2f5a079ee47037a346f260bad339e2 |      0 |          33784 |         519776 |   485992
 \x0c1739923133af9f52a5764227f2da487f5f4520b5d0127c0867062a311cfeca |      0 |          65671 |         551393 |   485722
 \x6f69ff89b936ac2120cbdc824138022de749977202153680b199bfb1d8afba75 |      1 |          89869 |         575308 |   485439
 \xfcc26559921b51b07cf81d858689a4007fc9cf8fad96d4394da89e3e2d1a1299 |      0 |          91948 |         576386 |   484438
 \xd1ff751609b5a74f99573d7d7baa1c1dc493c9bebd586f6bf381ee0877282ed2 |      0 |          97810 |         579234 |   481424
 \x583b6351a67d96fc42c5294ee4282616c5bd1481e464720cb959fa4c3a5ce192 |      0 |          70534 |         551654 |   481120
 \x836f332753244b3eaa6ea80ddcd59d6727de8874abef09f5f5bfa44d05025d05 |      0 |          70541 |         551654 |   481113
 \xee2feeca4e02840b7036e28045a5dfd06ab65af5b1068cd9598ec3b87d4f4b32 |      1 |          70542 |         551654 |   481112
 \xb0d701da413083e89f00f824a8300387ded7671ca3ca967811c758019cfaf3ba |      0 |          93709 |         574785 |   481076
 \x23b140fb832912031596256b184010e52e24cf66da94dabc80770970087d2f82 |      1 |          92499 |         573193 |   480694
 \x7712a8c8752090e8fa9527603ed08f72b00ace2b9a495d91e78523ff50844182 |      0 |          77095 |         555959 |   478864
 \xed151ae3b0d1cd50df1f97cc4b8747d185b56f54f5aef3754079faa089e3e783 |      0 |          83936 |         561411 |   477475
 \x8d432c241971e25172268765b219d6ed82c3868981a85c9189812b57ddd28912 |      0 |          97972 |         574951 |   476979
 \xcfc9154235db58abd3f09bfd277b084a95ccbd03ed2161d0ab4ef4ed36166821 |      0 |          84411 |         561076 |   476665
 \x5ad52480756416f6288be488f14392799c0ea2d050f96d4306b846d516b02f80 |      1 |          82966 |         558812 |   475846
 \x269bbd2cd3dd7f88da4ca7086e75d36f0d2d4a54b1b5f0ed7509f7375cc71715 |      0 |           3607 |         479423 |   475816
(40 rows)


How to import Multibit HD Wallet in bcoin? I created a wallet using Multibit HD and noted the mnemonic. I sent some money to an address that showed up in Multibit HD. Worked fine. Transaktions are displayed and balance is adjusted. Can be verified on blockchain.info for example.

Using the Mnemonic Code Converter I derived the BIP32 Extended Private Key. With the REST-API of bcoin I both created a wallet using the mnemonic and using the private key. After that I did a rescan at height 0.

Now I would expect that my accounts both have the same balance as in Multibit HD, but both have zero balance and zero transaktions.

What did I do wrong?

The bcoin node is fully synced and has progress 1.
Both bcoin and Multibit are using Mainnet.
Both Wallets show the same master key (the one that was derived on the website). Only the one created by the mnemonic also displays that mnemonic.

During research I already found out that the address used for the transaktion only shows up on Mnemonic Code Converter if I choose Multibit HD as the Client under the BIP32-Tab.

MultiBit HD uses a BIP 32 derivation path that is different from basically all other wallet implementations. MultiBit HD's derivation path is m/0'/0/i whereas most wallets use derivation paths set by BIP 44 which is m/44'/0'/0'/0/i. So when getting addresses from a MultiBit HD seed, you will need to use MultiBit HD's derivation path instead of the default BIP 44 one used by most wallet software.


Is there a roadmap to lift the current limit of 220M transactions per year? I've seen that Bitcoin just supports ~3 TPS. This is 220 millions transactions per year. If every US citizen wanted to perform a single transaction on a year, they simply couldn't.
I've also read a lot of "Bitcoin's vision" that is completely incompatible with that fact.
Is there a plan or roadmap? What do you think will happen?

There is a distinction to be made between transactions (ie, transactions recorded on-chain) and payments (ie, a transferring of value between parties). Bitcoin can scale both by increasing the number of transactions per time, but also by increasing the number of payments per transaction.
The lightning network is a very interesting way of increasing the number of payments per transaction, the limit for number of payments is almost unbounded (there are channel liquidity considerations).
In any case, as a user what you should really care about is that you have some guarantee of ownership of your funds. You want control: to be able to spend those funds at your discretion, without any absolute dependance on or trust in a third party. Whether you get these guarantees through ownership of on-chain BTC, lightning-network BTC, or some other higher-layer solution is somewhat irrelevant  (though there are additional security considerations in using higher layer networks like lightning. This is unavoidable: you incur all of the considerations of the base layer, plus the considerations of the higher layer). There is no reason that users cannot be on-boarded straight to lightning network, without any need to ever move their funds off lightning. The infrastructure may not be there quite yet, but development is ongoing at a fast pace, I think it will be very interesting to watch how lightning grows over the next decade.
Additionally, I think it is important to understand that even if bitcoin cannot scale to allow every person on earth to make on-chain transactions each day (or month, or year), that does not mean it is a failure or not useful. It just limits the usefulness of on-chain transactions to be higher-value settlements, and the limit of scaling then starts to depend on how many payments per transaction we can build infrastructure to allow.


Display unconfirmed transactions graph Where can one see a real time graph of current number of unconfirmed transactions (Y axis) over time (X axis)?
Thanks!

Johoe's bitcoin mempool statistics should work for you. It currently shows pending tx count, pending tx fees (btc), and pending mempool size (MB).


Can you combine 2 of 3 brain wallet addresses to form a multi-address? Is there a way to use 2 of 3 brain wallet addresses to create a multi-signature address? How can this be done? I was hoping to do this with warp wallet if that is possible or not.

I'm assuming it would be like this:

3 people create their own brain wallet address via warp wallet tool.
These 3 people put their address through a multi-sig tool?
The tool spits out a 4th address that is the funding address?

FYI, I never did a multi-signature send before so I'm just assuming that's how it would work. If not, please correct my view of how it actually works if you were to use a brain wallet.

I'm not familiar with warp wallet, but this can be done via Armory. First generate the brainwallet addresses. Second import the private keys into 3 different wallets in Armory. Third, create a lockbox using those 3 addresses. Voila, you have a multisig address that can be sent to.


Should a user be notified about "last modified" time of bitcoin.conf while the bitcoin core wallet is loading? I have mentioned details here: https://github.com/bitcoin-core/gui/issues/76
Also what would be the best approach to solve this problem using c++ which works on linux, windows and mac without any issues?
Few solutions are mentioned here: https://stackoverflow.com/questions/40504281/c-how-to-check-the-last-modified-time-of-a-file

No.
If your machine is compromised you can't trust last modified timestamps.
One of the obstacles to Bitcoin adoption is complexity. Developers should keep the user interface as simple and clear as possible. 99.9% of users wouldn't understand the information or how to use it.
A better approach to detecting malicious changes to a configuration file might be to encrypt the configuration file with the wallet password or to store a checksum of the config file in the encrypted wallet file and only alert the user when configuration changes are detected that were not made via the wallet software itself.  But any message should carefully and clearly explain what the situation is without confusing new inexperienced users.
I'm not sure how useful this is since if your wallet config has been maliciously altered the whole computer is untrustworthy.


How to use bitcoin testnet wallet I have a simple use case.

  I want to send some testnet coins to my testnet wallet and be able to
  see it in bitcoin-core in testnet mode

What I did so far: 1. Go to File-->Receiving address. Setup a new reciving address here
2. Go to website providing free testnet coins and send it the address that I set in step 1.
3. Wait until the transaction is confirmed.

Questions:
I expect to see the above transactions in the bitcoin UI. Eg. If I click on 'Overview' button, I expect to see those testnet bitcoins. Similarly, under 'Transactions', I see nothing. Could somebody point out what is going wrong here?

Thanks to Nate, the quite possible reason is that since my bitcoin core is still synchronizing, it would not have seen the transaction.

Will await for this to complete. Thanks again, Nate!


Transaction Rejected, bitcoins not returned to wallet? My transaction is still coming up unconfirmed on my electrum (ver 2.6.4) wallet after 2 days. When I open it on blockchain I get the following message:

"Transaction rejected by our node. Reason: Transaction was previously accepted but has been pruned from our database."

Have I lost my bitcoins or what can I do to recover them?

Transaction can be viewed here:

https://blockchain.info/tx/ec7e3a90d4434e29044a735f12239796d0eb51ad231417dfa61876a3cfc8cc3f

Have I lost my bitcoins

no. unless confirmed the bitcoins are still yours

  or what can I do to recover them?

you can do nothing. you should wait and spend your time for learning


I got a coinbase transaction and I don't know where it comes from I received a small payment from a coinbase transaction, but I haven't been mining nor I have signed up on a mining pool. Does this happen when someone accidentally sets my address instead of theirs when they mine? I think the probability for that to happen is pretty low.

Interestingly, it was a withdrawal from earn.com I made a few months ago which I forgot about. Wondering if they mine on their own.


Do I need to scan the whole blockchain to determine a balance? My understanding of how the blockchain works is that to determine the balance of an address one must find all the transactions that have outputs to that address. So, the only way to be sure you are not missing a transaction is that you have to scan the whole blockchain to determine the balance of an address.

Is that correct?

That is correct. This is what the optional -rescan flag does to the addresses in your wallet when launching bitcoind.

There is no balance property. Balances are just the total values added up on all unspent outputs for a given address, and the only way to determine the unspent outputs of an address is by scanning/tracing/following each output from address to address.


Step by Step - how does sending 1 bitcoin work? I've been reading about how BitCoin works for a few weeks now - and I'm trying to understand under-the-hood how the cryptography works.

So i'll explain what I know at the moment - and if someone could clear it up for me? Or provide links to papers that may explain it a bit better (I've read the original bitcoin.pdf, but it is a bit vague)

Scenario:

I have an address (pk, sk).

I have a previous transaction tx that contains 1 bitcoin.

I create a new address (pk', sk') that I want to send the bitcoin too.

I hash the new public key pk' with the previous transaction tx such that hash(pk', tx) = h1.

I sign the hashed transaction h1 using my secret key and some 'randomness' r. Sign"sk"(h1, r)

Then - this gets broadcasted and gets put inside a block by a Bitcoin miner?

Also, if I was to send two 0.5 bitcoins to pk' I would do the following...

tx1 and tx2 are associated with 0.5 bitcoins.

I then hash tx1 and tx2 with the new public key pk' such that hash(tx1, pk') = h1 and hash(tx2, pk') = h2.

I then sign both of these hashes using the following function... Sign"sk"(h1, h2, r) or would it be Sign"sk"(h1,r), Sign"sk"(h2,r'). (different randomness for each signature)

This may be a silly question.. but I have been finding it difficult to get some clarity on how it works. I also understand that some characters (such as i and 0) are not included in the hash - does this refer to base 58 ?

You probably would find it helpful to peruse the technical articles on the Bitcoin Wiki.  Here are some starting points based on your questions.

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

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

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

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

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

One concept you did not mention but which is crucial to understanding how it works at a low level is the fact that transactions are verified by running Scripts (see link above).


Why are most Bitcoin payment invoices time limited ? Most bitcoin payment gateways issue time-limited payment invoices. Why is that ? AFAIK, the address stays valid even after the timer is out. For instance when sending a transaction from wallet to wallet, even if I send to that address after the 15 minutes, the recipient still gets their money. I have tried this with at least 3 wallets. In this case, what's the timer for in the first place if the address is still linked to that user ?

Thanks.

Most invoices are timed to ensure the price of bitcoin (or any crypto asset) does not move too much.

Although Bitcoin is usable as a currency, it's current volatility is somewhat undesirable. Timed invoices are used to ensure that merchants get a roughly expected $ value.


What is the incentive to use bitcoin due to transaction fees? Apologies for any naivety in the question, as my understanding of the subject is still basic.

My understanding is that once all the coins have been mined, the incentive for miners comes solely from client transaction fees. When that happens, why would someone choose to use bitcoin and pay a transaction fee over fiat currency without a fee?

Does this mean bitcoin is fundamentally infeasible as a general use form of currency? If so, what are the specific use cases that make it more appealing, even with the necessity of transaction fees? If not, what would compel general use adoption?

There are two scenarios we could see as the block subsidy (inflation) halves every ~4 years:

The number of fee-paying transactions increase per block whilst median next-block fee remains low/negligible
The fee per on-chain transaction increases

We are currently seeing scenario 2 play out, where most user transactions are expected to take place off-chain. Transactions that are made on-chain are expected to be settlements of many off-chain transactions, likely collecting a large number of smaller fees within.

Both scenarios are fueled mostly by adoption of the network, and until the subsidy is gone (zero inflation), increases in coin price will help to sustain miner incentive.


How can PayPal merchants accept bitcoin? I've heard PayPal allows merchants to accept bitcoin; however, I can't find any documentation showing how PayPal merchants can do this. How can a PayPal merchant accept bitcoin?

Braintree is owned by PayPal so I believe you would have to integrate with them:
https://www.braintreepayments.com/


How do Javascript-based wallets generate random numbers and is this cryptographically secure? Hybrid wallets and some paper wallet generators create private Bitcoin keys using Javascript inside the browser. Which source of entropy do they use? How do they make sure the PRNG is suitable for long-term security?

Most modern browsers provide a native crypto api accessible through the window.crypto object.

https://developer.mozilla.org/en-US/docs/DOM/window.crypto

It is also possible to seed random values using mouse movements and key presses.


How does bitcoin handle unspent outputs from fresh transactions? I read that Satoshidice uses one of the outputs from the bet transaction to fund the response transaction.

Can anyone provide explanation/reference to how bitcoin handles such transactions.
What is the rationale of allowing such transactions?
If the protocol did not allow unconfirmed unspent outputs to be used, would that make bitcoin unusable?

Bitcoin protocol doesn't care how many confirmations a transaction has. A user can choose any number of blocks that has to be mined on top of the transaction before considering it confirmed, or in case of Satoshidice it simply doesn't care.

Bitcoin protocol does care that source addresses of a transaction has all required coins to transfer to destination addresses, in other words a transaction has to have all it's inputs to be valid and the number of coins those inputs have must be greater or equal to number of coins in outputs. Therefore if an attacker successfully double spends his transaction to Satoshidice it will also invalidate winning transaction from Sathoshidice, because one of the inputs of winning transaction is the original transaction from the attacker to Sathoshidice.

To answer the question why bitcoin protocol allows it, consider two transactions

From address A to address B
From address B to address C

To think about second transaction as confirmed you need to wait a certain number of block to be mined on top of it and it doesn't matter how many block were mined on top of the first transaction because it doesn't make second transaction any more secure. Therefore both transactions can appear in the same block and that's completely fine.


What is the schema of the data stores used by the reference client? I'm interested in seeing the schema (layout and indexes) that is used in the reference client.  Namely wallet.dat, the bk** files and also the in-memory uncommitted tx.

Does this exist anywhere for the 7.x client or the newer BerkleyDB format?

I'd like to see what, if any changes are being made to accommodate BIP 0034.

There are the bitcoin-tools by Gavin Andresen but they will only work up to version 0.7 of Bitcoin-QT. If your goal is to simply check whether the blocks are version 1 or 2 I suggest you do something like this:

MAX_HEIGHT=`bitcoind getinfo | grep blocks | grep -oE '[0-9]+'`
MIN_HEIGHT=210000
for HEIGHT in `seq $MAX_HEIGHT -1 $MIN_HEIGHT`; do
  HASH=`bitcoind getblockhash $HEIGHT`
  VERSION=`bitcoind getblock $HASH | grep version | grep -oE '[0-9]+'`
  echo $HEIGHT,$HASH,$VERSION
done >> block-versions.csv

This will get you a Comma-Separated file with the block's height,its hash and version.


Automated decentralized exchange between bitcoin and similar currency? I want to create a cryptocurrency that's backed by bitcoin, that's running on it's own different blockchain and consensus algorithm.
Is it possible have a decentralized exchange between bitcoin and the new currency so that the only way to get the new coin is to exchange your bitcoin and if you want you can get your bitcoin back by returning your new coin?
And this to be done in a safe way without a central exchange and ANYONE having access to all of the new coin, and without risk for your bitcoin as long as both the bitcoin and new crypto blockchains are both alive and by nodes running the blockchain.
Here's an example:

You send 1 btc to a bitcoin address.
When that's confirmed let's say with 6 confirmations the "decentralized system" sends you 1 coin of the new coin to your "new coin" address of choice.

And if you want you can trade your new coins back for bitcoin.
So the total supply of the new coin = the supply of bitcoin
And no one has access to the total supply of the new coin, the only way to get the new coin is to deposit bitcoin. And you can get your bitcoin back automated and decentralised whenever you want by returning your "new coin" to the system.
Is this possible?
I know about atomic swaps but that relies on 2 parties exchanging coins. What if 1 of the parties is the new blockchain itself? Is this even possible?

No, this is impossible (so far as we know). But the reason is very, very subtle.
The crux of a decentralized system is that nobody gets to decide what the rules are. Otherwise, whoever gets to decide the rules effectively centralizes the system.
Bitcoin is decentralized because anyone who wants to can use whatever rules they want. Those who agree form a useful blockchain.
The problem with this scheme is that there has to be some mechanism to decide what controls the real bitcoins that back the system. For example, bitcoin and bitcoin cash forked off and nobody got to decide which chain was "real". Both chains now compete in the market.
If your system forks, who or what decides which side of the fork gets the actual bitcoins that back your currency? They can't both get all the bitcoins -- that would require the number of bitcoins backing your currency to double.
There is no known decentralized way to make such a choice.
Think it through -- what do you think should happen if two groups of people using your currency disagree over what the system's rules should be? They can't each get what they want because they are arguing over how a fixed amount of bitcoin should be used.


How do I find out what block a transaction is in? I'm trying to do research on the age of transaction outputs at the time they are spent. I'm running bitcoind on my computer. I have transactions indexed with txindex=1. I want to take a given TXIN and get the block of the TXOUT it spends so I can calculate the age.

How do I get the block a given transaction is included in?

./src/bitcoin-cli getrawtransaction 4ef653dc90aa25e1a0cc8a45f0484524010e5cc77b8159df6916466c07036482 1 (mind the 1 at the end which means you wish verbose output)

...
    "blockhash" : "000000000000000009e865d07f75341a5f3dc15f0e149055a241eedd552c3b88",
    "confirmations" : 1,
    "time" : 1433965052,
    "blocktime" : 1433965052
}


Bitcoind JSON-RPC - PHP user handling I asked this question on bitcoin forum too (just for the record):
https://bitcointalk.org/index.php?topic=430972.new#new

I am trying to develop a php web application (a game, and not a gambling site) where users can make in-game purchases. Now if I am understanding it right, The architecture (using bitcoind and Json-rpc api) should be:

When a new user registers - generate a new address for the new user:

  $bitcoin->getnewaddress("username");

Store that wallet address for later use in my DB.

Display that address and let a user send bitcoins to that address.

Check the balance of that address using the

  $bitcoin->getbalance($username,0)

for unonfirmed balance  and

  getbalance($username,6)

confirmed balance.

Now I can let the user buy my in-game items
and use

  $bitcoin->move($useraddress, $myaddress, $amount)

to debit his account and give him the stuff he needs.

Questions:

1. Does this sound about right?  Or am I completely off here!
2. How long does it take for the unconfirmed balance to show up?  [$bitcoin->getbalance($username,0)]
3. $bitcoin->move($useraddress, $myaddress, $amount)  is a change of bitcoins between addresses within my wallet, so this should be
offchain and instantaneous, right?
4.  How can some gambling dice sites like coinroll.it ( https://bitcointalk.org/index.php?topic=191176.0) accept unconfirmed
transactions and lets  people play instantly? are they just taking
the risk or there is something that I am not aware of.
5. How can I test out my bitcoind/php application with testnet? Anyone has any experience of this?
6. Suggestions on Security are welcome...

I am going to make parts of my code open source when I figure this shit out

You are very correct, but:

I would use getaccountaddress instead of getnewaddress. If the user doesn't exist, which is the case for a new user, the wallet will create a new one anyway.
I always would use the user's name to recover from the wallet his address, there's no sense to store it again on a DB. ¿?

The time for a balance to be confirmed depends on the coin and its network.

$bitcoin->move($useraddress, $myaddress, $amount) Yes, it is instantaneous. There's no transaction broadcasted to the net.

How can I test out my bitcoind/php application with testnet? Anyone has any experience of this? ---> Go to the wiki, U have to set a specific parameter on bicoin.conf


How can a person reasonably prove they're running a full node? I mean running themselves in a computer they control and not just fetching blockchain data from a public blockchain API or something like that.

I imagine that may be impossible, but there could at least be some operation that is trivial/fast to do with a local full node that's difficult/slow to do with a blockchain API.

Imagine an interaction/protocol/technique exists you could perform with a node in the network, and at its conclusion, the interaction teaches you whether the other party is a full node.

Now anyone who wants to pretend to be a full node can simply relay all messages related to this interaction to another full node, and relay its responses back to a potential querier.

So this is effectively vulnerable to a man-in-the-middle attack, but you aren't querying for a particular identity, just whether some computation was performed. As there is no secret data involved here, there is no solution to the problem of one entity pretending to be another.

Overall this shouldn't be a problem; you generally don't care whether someone else is performing full validation; if you would, you could be doing so yourself instead and not care about the behavior of other nodes.


Generate Dogecoin Keys Can I use the same method of generating Bitcoin private key and public key for Dogecoin?
After No.1 above is complete, does Dogecoin support compressed public key?
How do I generate Dogecoin address from the result of No.1 public key?
Can I use the same Bitcoin signing method on Dogecoin?

Thank you

Lets assume the private key is 0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff

Both Bitcoin and Doge can share a common private key and use the same Elliptic Curve algorithms to synthesize public keys.

Here is a working example for how one can synthesize an uncompressed public key for Bitcoin or Doge from a common 256-bit hexadecimal encoded integer private key.

% echo "0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff" | bx ec-to-public -u

040d47568a5e517067a2836c3823fbc58169a7662bfae934a4d41da3e23c98d816e7202dd702ffe038147f78aee4973a581972960a1460312ffb6f3f0f13d4a52c
Here is how a compressed public key can be calculated for either Bitcoin or Doge. Notice the public key is half the size.

% echo "0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff" | bx ec-to-public

020d47568a5e517067a2836c3823fbc58169a7662bfae934a4d41da3e23c98d816
Computation of compressed and uncompressed Bitcoin and Doge addresses. One must examine this table to understand the version values [-v flags] that must be different for Bitcoin-based altcoins used such as Doge. Unsure if Doge fully supports compressed addresses, but is very likely to do so if the Doge source code forks are updated when Bitcoin is updated. Compressed addresses have been supported by Bitcoin for over 4 years.

% echo "0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff" | bx ec-to-public | bx ec-to-address -v 0

1PbStXjfDNBU6FZA2iSeisVWwCFN9GK1eQ (is a compressed address)

% echo "0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff" | bx ec-to-public | bx ec-to-address -v 30

DTjYRngJWn5kdFjkmJSDGdf7pKyfUnVnGg (is a compressed address)

% echo "0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff" | bx ec-to-public -u | bx ec-to-address -v 0

1NGoV1EGZrwM7yvUYqRC7TMBMj7ftpjR2B (is an uncompressed address)

% echo "0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff" | bx ec-to-public -u | bx ec-to-address -v 30

DSQu2GAusGqdez75HRQkfDWnErqyEB4Bov (is an uncompressed address)
Believe the answer is yes.


Storing wallet key for automatic transactions Is there any way to do this? For example I don't even want to know what my wallet is, only my server (intranet), so that it can make automatic transactions for me based on thresholds.

Or should I not be looking at this approach at all? How do the big exchanges do it? Can I automate transactions securely without needing to type a password every time?

The context here is a mining network

It depends on the type of wallet you are using in the server.
you can write your own node to publish transactions (very hard)
you can use 3rd party services like blockchain info (easy)
you can use a wallet that has an api (like bitcoin-core has json rpc)
then you write a program that call this wallet to generate tx
it uses the build in security of the wallet


How is a Transaction ID generated & when does it change? (with a new sequence ID?) I'm creating a non-mainstream client that processes and validates Bitcoin transactions and need to track transactions in my database.

How is the TxID generated and when does it change?

Specifically, since sequence is intended to update a transaction, and if the transactions hash were to change I would assume the txid hash would change s well.

When I look at this image of a Tx, it appears that the txid is marked as TxIn (VI)

Is it possible or useful for a script to verify the TxID and signature hash?

TxID is just a SHA256 hash of binary transation data, so it changes upon any modification of transaction.
Therefore, one cannot include verification of TxID in the script in same transaction (if I correctly understood what you want to achieve).


Bitcoin transaction stuck since almost 3 weeks about 3 weeks before (06th December) I have send a bitcoin transaction from my Ledger Nano S to my Bitfinex account and until today (25th December) it still didn't get confirmed.
I have no clue why it takes so long as I am sure that I ticked the high fee.
The transaction is mentioned as an open deposit in my Bitfinex account already, but it had 0/3 confirms after 2 weeks, so I baught a paid accelerator service (https://pushtx.btc.com/) where I paid 80 USD and finally it started to get confirmed, but so far it has 416/3 confirms. How can I need so many confirms?

The TXID is: a3b9d2eef1305a845ebe4e1c0c5fe813f10dfbf7c6f39553a71ca829e885b5c0

I would highly appreciate if you guys could help me. Either it will be received on my Bitfinex account or back to my Ledger does not matter, I just want to have it somewhere since I am worried that I am loosing the BTC in the transaction.

Thank you guys in advance and I wish you a merry Christmas!

Your transaction has 428 confirmations. Some services are satisfied with one confirmation, while some require up to six. Anyway, with over 400 confirmations, it's clear that Bitfinex has received the deposit. If you haven't been credited for it yet, I suggest that you check that you have sent to the correct address, and then if that's the case you reach out to Bitfinex to have them remedy the missing deposit.


Zcash configure in ubuntu I have tried to installed zcash insight ui & api in my local machine (ubuntu OS) and it is completed all the steps but I m facing issue while start services in frontground.

Let me share with you command, config file.

npm install -g zcash-bitcore-node
zcash-bitcore-node create mynode
cd mynode
zcash-bitcore-node install insight-api
zcash-bitcore-node install insight-ui
zcash-bitcore-node start

But getting below error in my terminal:

[2018-01-30T12:33:03.687Z] info: Using config: /home/kiran/zcashnodenew/zcash-bitcore-node.json
[2018-01-30T12:33:03.688Z] info: Using network: testnet
[2018-01-30T12:33:03.688Z] info: Starting bitcoind
[2018-01-30T12:33:03.690Z] info: Using zcash config file: /home/kiran/zcashnodenew/data/zcash.conf
[2018-01-30T12:33:03.691Z] info: Starting zcash process
[2018-01-30T12:33:03.699Z] error: Error: spawn /usr/local/lib/node_modules/zcash-bitcore-node/bin/zcashd ENOENT
at _errnoException (util.js:1003:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
at onErrorNT (internal/child_process.js:389:16)
at process._tickCallback (internal/process/next_tick.js:152:19)

MY Config File  (zcash-bitcore-node.json)

{
  "network": "testnet",
  "port": 3003,
  "services": [
    "bitcoind",
    "insight-api",
    "insight-ui",
    "web"
  ],
  "servicesConfig": {
    "bitcoind": {
      "spawn": {
        "datadir": "./data",
        "exec": "/usr/local/lib/node_modules/zcash-bitcore-node/bin/zcashd"
      }
    }
  }
}

Zcash Config  (zcash.conf)

server=1
whitelist=127.0.0.1
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubrawtx=tcp://127.0.0.1:28332
zmqpubhashblock=tcp://127.0.0.1:28332
rpcallowip=127.0.0.1
rpcuser=bitcoin2
rpcpassword=local321
uacomment=bitcore

Can you please help me with it? What is wrong in which step?

I know it is a bit old but anyway, use this repo to build it for you:

https://github.com/radix42/zcash-block-explorer


How does ring signature help in range proofs in confidential transaction? Based on Maxwell's proposal of confidential transaction, a ring signature can solve the range proof issue. I can totally follow the pedersen commitment and everything. I don't quite get how ring signature helps in range proofs? Like we wanna know if the Bitcoin amount is not negative and we don't want to reveal it. The connection between ring signature and range proof doesn't click for me.

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

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

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

C' = C(1) - 1*H

It would be equal to:

x*G

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

C" = c(2) - 2*H

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


Generating Lightning invoice with an optional parameter I have a question on the command invoice with the optional parameter.

I don't understand how to create the invoice with the optional parameter. The  c-lighitning documentations do not have an example but it says:

  The fallbacks array is one or more fallback addresses to include in the invoice (in order from most-preferred to least): note that these arrays are not currently tracked to fulfill the invoice.

My question is How do I separate the address in the command invoice? As an example:

invoice msatoshi=100 label="I want to understand the invoice command" description="I am vincent" fallbacks=[2NDVm22NNuosAXFbC27Scsn1smMh1QEFZUk,2MymqReM8EaYCQKzv4rhcvafGGcddZacUtV]

The command runs good, but I want to understand if this command is correct.

Below is the command result:

{
   "payment_hash": "9610412eb4f1fa521c76d4194e93f63caae059481cdce6a11dcf369cf94a8aab",
   "expires_at": 1568312884,
   "bolt11": "lntb1n1pwhz5a5pp5jcgyzt4578a9y8rk6sv5aylk8j4wqk2grnwwdggaeumfe722324sdq5fysxzmfqwe5kucm9de6qxqyjw5qcqp2fppjmc3rmhe0wngplqnl3002udz6vj3kzwqsfppjg7ddp2vfds5hgdvsvknhdut0fxpe4z6ndth02e8reukhg4lu39xefwevkknh5r7l2ljugknfutfhhumsfprpxefpqwmjq66nkh5kfsu0esx5a0lnwk7lhhvp8tgvexl9cg8meusqty4ls3",
   "warning_capacity": "No channel with a peer that is not a dead end, has sufficient incoming capacity"
}

You are doing it the correct way. In case you have doubts, you could check if the invoice generated is according to the way you decided by running the command lightning-cli decodepay <invoice> . Below is the result for the invoice that you generated:

lightning-cli decodepay lntb1n1pwhz5a5pp5jcgyzt4578a9y8rk6sv5aylk8j4wqk2grnwwdggaeumfe722324sdq5fysxzmfqwe5kucm9de6qxqyjw5qcqp2fppjmc3rmhe0wngplqnl3002udz6vj3kzwqsfppjg7ddp2vfds5hgdvsvknhdut0fxpe4z6ndth02e8reukhg4lu39xefwevkknh5r7l2ljugknfutfhhumsfprpxefpqwmjq66nkh5kfsu0esx5a0lnwk7lhhvp8tgvexl9cg8meusqty4ls3
{
   "currency": "tb",
   "created_at": 1567708084,
   "expiry": 604800,
   "payee": "023dfbbc3011303a613645671defa34df29934ac19c507c6d42ec88df54a1532df",
   "msatoshi": 100,
   "amount_msat": "100msat",
   "description": "I am vincent",
   "min_final_cltv_expiry": 10,
   "fallbacks": [
      {
         "type": "P2SH",
         "addr": "2NDVm22NNuosAXFbC27Scsn1smMh1QEFZUk",
         "hex": "a914de223ddf2f74d01f827f8bdeae345a64a361381087"
      },
      {
         "type": "P2SH",
         "addr": "2MymqReM8EaYCQKzv4rhcvafGGcddZacUtV",
         "hex": "a914479ad0a9896c2974359065a776f16f49839a8b5387"
      }
   ],
   "payment_hash": "9610412eb4f1fa521c76d4194e93f63caae059481cdce6a11dcf369cf94a8aab",
   "signature": "304402206aeef564e3cf2d7457fc894d94bb2cb5a77a0fdf57e5c45a69e2d37bf3704846022013652103b7206b53b5e964c38fcc0d4ebff375bdfbdd813ad0cc9be5c20fbcf2"
}

However, as the docs point out, the current c-lightning implementation does not use the addresses from these arrays to fulfill the invoice in case no route to the payee is found.  So, if you show your invoice and the payer is using c-lightning, then it won't be able to make an on-chain transaction to you for that particular invoice, if its bolt11 payment fails. This might be especially pertinent in your case as the node that generated your invoice does not have any open channel that is exposed publicly which has an incoming capacity.

Also as a side-note, using fallbacks doesn't make sense for tiny or time-sensitive payments. Since your invoice amount is only 100 milli-satoshi, the payment to fallback addresses will not be routed/accepted on the Bitcoin network as it does not accept dust payments. In your invoice it is a sub-satoshi amount which is also below the smallest unit of Bitcoin.


How do I make my own Hyperstake coin So ive forked the code but seems to be connected to the old coin stuff.

What I am looking to do is fork their code and create my own coin! I know that I need to make a node but I can't find any process that shows me how to create my own coin.

Please help

you may want to disable dns seeds

use connect=<ip_of_other_node>

instead addnode=<ip_of_other_node> in you coin.conf file.


How to Get Unspent Transaction Outputs from Node There is one API called listunspent, however it doesn't return any outputs, and some threads say that it may be because the address is not imported into the node's wallet.

Then how to retrieve the unspent outputs for any address?

listunspent will list all unspent outputs of addresses the wallets controls, it will not work for any arbitrary address.

You can importaddress to add any address as a watch-only address, but this may take some time as your node will need to rescan the blockchain to find all associated transactions. Also note that when you use importaddress, you will not be able to spend any funds held at that address, since your wallet will not hold the private keys for it.


Can I use http command to place order in GDAX? I see that I can read the price of bitcoin using

'https://api.gdax.com/products/BTC-USD/ticker'

Can I place and cancel the order via a http command?

Yes you can.

https://docs.gdax.com/

There are examples there in various languages.


Why is a privacy problem to pay always to the same address? I know as a merchant it is not a good idea to receive all payments to the same address because then people could track our balance.

But I don't understand why it could be a privacy problem if we receive payments from one customer to the same address (but every customer has a different address assigned).
Why will there be a privacy hole for the customer if we always receive their payments to the same address?

Assume you are using a unique common address for each customer and at the end of the day/week/month you make payments to your employees, suppliers or partners.  When making those payments, if those outgoing amounts exceed the amounts received from one customer, you will have to include inputs coming from other customers. If some of your customer addresses are well known (leaks or otherwise) then people can use those addresses to track others when you are batching multiple inputs to make payments. Once they know those addresses belong to you, they will track those to see how they are included in other inputs. So, a determined person can definitely make interconnections thus compromising privacy.

If you are not re-using addresses, then even if some of them get leaked only few of your addresses gets compromised when you are including them in the transaction. However that will be one-off and snooping will end there. However, if you are persistently using the same unique addresses with the consumers, the problem is compounded as that address will be continuously monitored to compromise other addresses which are also being continuously used.

So now the attacker can create a map of all your customer specific addresses. If you reused the same address for all customer, the attacker could only know the volume of traffic and the revenue from those customers. But with unique address to each customer, the attacker can not only map the above but also now can know customer specific metrics like revenue/customer which is one level deeper and can create competitive issues.


Multibit security with regards to "backup" folders I'm using the MultiBit client to manage my wallet (right here on my computer), but I am concerned about the security with regards to the *-backup folders that it creates automatically.

When I inspect the wallet-unenc-backup directory, I find 2 pairs of .info and .wallet.cipher files. Using a text editor, I can see that the .info file only contains my public bitcoin address and a line referring to the rolling-backup directory and some other numbers. The .wallet.cipher file shows weird characters.

Does the .wallet.cipher file contain a private key unencrypted? If so, why does the client not warn me about this? Is it because its users are expected to know this, or am I wrong about this?

The other folders contain .info files as well, and .wallet files (probably and encrypted wallet).

Any clarification on the actual information stored in these files and whether that information is encrypted would be helpful.

I did read the documentation of MultiBit, but their description of these files, found here, isn't very clear and doesn't contain warnings where I expect them to be.

EDIT:
I have put a password on my wallet using the "file" menu in MultiBit.

The files with the .cipher suffix are the regular wallets encrypted with 256 bit AES.

The password used is the one you use to first encrypt your wallet. MultiBit goes through all the unencrypted wallets, creates an encrypted copy and secure deletes the unencrypted one.

You can open the .cipher wallets using File | Open wallet and it asks you for the password.


Village running on bitcoin tech I would like to find out if anybody knows or has experience using Bitcoins to run the internal finances for a community ?

Liberland: Europe’s Newly Formed Country to Use Bitcoin
Read Full article

http://insidebitcoins.com/news/liberland-europes-newly-formed-country-to-use-bitcoin/31979

On April 13, 2015 the Free Republic of Liberland was officially formed by a group of Czech citizens. The newly formed country of Liberland is a three square mile plot of land between Serbia and Croatia. The President of Liberland, Vit Jedlicka, has confirmed that Liberland will not have an official currency nor a printed currency. The country will however, accept all currencies, both bitcoin and other digital currencies.

The Free Republic of Liberland, or “Liberland”, is only the size of three square miles, situated between Serbia and Croatia. The west bank of the Danube river runs alongside its border. This area between Croatia and Serbia had previously been declared terra nullius or a no man’s land. On April 13, 2015 the land was officially claimed and given its name after the Preparatory Committee declared the new state and raised a flag on location.