Does Bitcoin rely on the internet? Is it possible to run Bitcoin mining and transaction distribution without using the internet?

For example, how would Bitcoin continue in the event of a total clampdown by a telco?

You can technically run appropriately modified Bitcoin on any sort of network of communication, be it LAN, mesh, or otherwise. One could imagine making a mesh network on Zigbee or Bluetooth and allow anyone to connect to those without the Internet, although then the network latency would be way bigger and the Bitcoin network could easily become forked. Preferably there would be at least one proxy server running both on the internet (be it through wires or cellular) and on the distributed network.

If you want to make payments without using the internet, use physical coins, simple as that. It is far safer than making a new internet-less network. The only way you can lose in this way is if the Bitcoin value would plummet.


How to connect to RPCPORT=9332 via LAN I edited litecoin.conf file...

To this:

testnet=0
rcpuser=user
rpcpassowrd=pass
rpcport=9332
server=1

I use minerd with litecoind and when I try to connect to the local machine 127.0.0.1:9332 everything work fine. When I try to connect another workers from the LAN it cant connect to litecoind.

When I scan the port of the machine running litecoind, the port 9332 is closed.

How can I remote connect to the litecoind daemon via LAN?

If you want to allow connections from any machine, use:

rpcallowip=*

If you want to allow connections from one specific IP address, put that IP address instead of *:

rpcallowip=192.168.0.101

You can have as many of these lines as you like.  Use one for each IP address you want to allow.  And wildcards are also allowed:

rpcallowip=192.168.0.*
rcpallowip=10.*
rcpallowip=192.168.*.100


How thoroughly has Segregated Witness been tested? I've encountered claims that Segregated Witness was "not really tested" and is being "rushed".

It is my understanding that SegWit had been running on Elements for more than half a year already, and that it is currently being run on its own testnet.

Has development of SegWit been rushed?
What level of testing has been performed on Segregated Witness?
Is it reasonable to expect SegWit to be sufficiently tested and ready for deployment in April?

I'd suggest starting here: https://bitcoincore.org/en/2015/12/23/capacity-increases-faq/. There's also a SegWit adoption page on the site somewhere.

Finally, this article has some details on recent testing: http://www.coindesk.com/bitcoin-scaling-segregated-witness-expected-launch/


I have unspent bitcoin in the blockchain I made a transaction from a multibit wallet. It arrived in the blockchain and was confirmed thousands of times. However, the transaction is set to 'unspent'.

Can I retreive this from the blockchain when I have the private key of multibit, or is it lost?

This is the transaction:
https://blockchain.info/tx-index/b2a861b053125b5be9e7ba1b88e655b0e1184973038e3a528b8deb446336ec24

Can anyone help with this?

In short, bitcoin transactions are made up of inputs and outputs. When you sent funds, an input was spent, and the output went to the receiving bitcoin wallet. The unspent tag simply means that the funds that you sent have not yet been used as an input, and the funds are therefore still at the address to which you sent them.


How fast is the Bitcoin (mining) network? How fast is the Bitcoin mining network compared to other distributed computing networks? ;)

According to Bitcoin Charts, it is equivalent to 127.25 PetaFLOPS currently. This would make it faster than 500 fastest supercomputers in the world (58.9 PetaFLOPS), or Folding@home (4.1 petaFLOPS) [reference]. However, this is only equivalent computation speed, if you would measure actual amount of FLOPS of Bitcoin mining it would be... 0, as Bitcoin does not use floating point operations. Moreover, I'm not exactly sure how Bitcoin Charts computed that figure.

However, objective measure of how fast Bitcoin is in computational sense, would be it's current hashrate - 9.738 Thash/s. At peak rate it was estimated to be over 15Thash/s.

As a side note, one might also be interested in the speed of propagation of blocks in Bitcoin network, which is estimated to be close to 2 seconds.


What are the DER signature and SEC format I often see those 2 elements in bitcoin documentations and tutorials but I have not yet find a proper definition on the internet for DER signature and SEC format.

DER

The Distinguished Encoding Rules (DER) format is used to encode ECDSA signatures in Bitcoin. An ECDSA signature is generated using a private key and a hash of the signed message. It consists of two 32-byte numbers (r,s). As described by Pieter here the DER signature format has the following components:

0x30 byte: header byte to indicate compound structure
one byte to encode the length of the following data
0x02: header byte indicating an integer
one byte to encode the length of the following r value
the r value as a big-endian integer
0x02: header byte indicating an integer
one byte to encode the length of the following s value
the s value as a big-endian integer

Note that the r and s value must be prepended with 0x00 if their first byte is greater than 0x7F. This causes variable signature lengths in the case that the r value is in the upper half of the range (referred to as "high r"). Signatures with high s values are non-standard and usually don't appear in the wild.
Also note that in rare cases r or s can be shorter than 32 bytes which is legal and leads to shorter signatures.
Note that in bitcoin transactions a byte is added at the end of a DER signature denoting the SigHash type used.

SEC

The Standards of Efficient Cryptography (SEC) encoding is used to serialize ECDSA public keys. Public keys in Bitcoin are ECDSA points consisting of two coordinates (x,y). x and y may be smaller than 32 bytes in which case they must be padded with zeros to 32 bytes (H/T Coding Enthusiast). Bitcoin uses two formats, uncompressed and compressed:

Uncompressed:

0x04 byte: header byte to indicate ECDSA point
the x coordinate as a 32-byte big-endian integer
the y coordinate as a 32-byte big-endian integer

Compressed:

As the coordinates (x,y) must satisfy the secp256k1 curve equation y² = x³ + 7, the two possible values for y can be calculated from the x value. Thus, we can express a public key just as the x coordinate in combination with an indicator which of the two y values to use.

0x02/0x03 byte: header byte to indicate compressed ECDSA point, 0x02 for even y, 0x03 for odd y
the x coordinate as a 32-byte big-endian integer

The above is more comprehensively explained e.g. in Jimmy Song's Programming Bitcoin: Ch4. Serialization.


Can I spend utxos from various bip32 subwallets in only one transaction? I want to redeem bitcoin received into several bip32 subwallets in only one transaction. Is that possible?

I've tried using pycoin's ku utility to generate a tpub and a wif from a tprv. I'm using the tpub to generate the subwallets and the wif to sign the transaction, but pycoin says the signing fails.

Is that conceptually wrong, or am I just handling the keys in the wrong way?

a Bitcoin transaction can have between 1 and (realistically) several hundred inputs, each of which can redeem completely unrelated UTXOs. Whether or not the keys for those UTXOs are related through BIP32 or some other scheme is not relevant, and even not observable by the network (it is not possible to correlate different BIP32 keys unless you know their master key).


How would you give away free bitcoins by letting the user just scan a qr code? I'm currently trying to build a game where if the user reaches a certain amount of points they get rewarded with btc at the end of the game. But the thing is I would like the QR code to show up on the screen and the user would just have to scan it and they would receive the btc. Is there an application that can do such a thing? I'm guessing it would show the private key of the qr code. But is there a better method of doing this?

You would have to do this in a couple of steps, the first of which doesn't involve Bitcoin at all.

User scans QR code using an app you provide.
Your provided app sends a request to your server. This request contains something that identifies the user (say, the user's Bitcoin address).
Your server sends Bitcoin to the user's address.

Having said that, if you already have the user's Bitcoin address, then you should consider skipping the QR code entirely and proceed directly to step 3.


Bitcoin-qt getnewaddress returns address starting with 2 I am expecting it starts with '3' the the results below:
getnewaddress "" "p2sh-segwit"
2NFcKJTPZs1syYhwaBkXty6Vt6FEKxD3HTC

Is this because I am running on a private block chain?

You are using testnet. Addresses starting with "M", "N", "2" and "tb1" are testnet addresses.


Import Multibit HD Wallets I have 4 wallets in Multibit HD.

I have password, secret words and time stamps for each wallet.

I want to move to a new computer, I know that I can use RESTORE button in Multibit HD. but I am afraid of losing my money.

My question is: I know that Multibit HD stores all data in:
C:\Users\username\Appdata\Roaming\MultibitHD

If i copy that folder to the new computer, can I open my wallets without need to restoring?

MultiBit HD developer here.

There is a lot of information about restoring wallets in the Help within the wallet and on the website:

https://multibit.org/en/help/hd0.1/restore-wallet.html

https://multibit.org/en/help/hd0.1/files.html

The cloud backup folders are there to allow full restoration of a wallet if you know the wallet words. They will restore contacts, notes, exchange rates - all of it.

If you are confident in copying files around on your machine (many users have trouble with this so we guide them away from it) then it is safe to perform a blanket copy of the Roaming files to the other machine. Make sure to re-create the cloud backup directory and populate it as well.

As is always the case, make sure you keep your wallet words safe so that if it goes wrong (lightning strike right in the middle of the copy?) you can always recover your private keys.


Is Mt.Gox currently accepting Dwolla deposits or withdrawals? I know that Dwolla stopped depositing/withdrawing funds in Mt.Gox due to a court order, but does anyone know if this is still in place?
Related
Why can't Dwolla send to Mt Gox?

As of this writing, Dwolla is not sending money to MtGox

This is verified by accessing their deposit link here


find out total balance on MainAccount I don't understand receiving address usage at https://blockchain.info/api/api_receive
As I understand it it should work like this:

MainAccount
|--generatedReceivingAddress1 (then someone send btc and it will obtain e.g. 0.1btc)
|--generatedReceivingAddress2 (then someone send btc and it will obtain e.g. 0.2btc)
|--generatedReceivingAddress3 (then someone send btc and it will obtain e.g. 0.4btc)

Is in bitcoin ledger ability to find out:

which receiving addresses belong to MainAccount?
total balance of MainAccount (in this case 0.7btc)?

Many thanks

Blockchain.info is implementing bip32 and bip39, to understand how they're work you should read more about them.

https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki

Simple Explanation:

When you create a wallet they create a mnemonic phrase (Bip39) and then they create your bitcoin seed using that mnemonic phrase.

that seed has a private key (xprv,zprv) and public key (xpub,zpub) for each derivation path, changing the path giving you more keys that belong to the same mnemonic phrase.

for example "MainAccount" in here has the following path:

m/44'/0'/0'/

When you create another "account" in your blockchain.info wallet they increase the last 0 to get new keys for the same mnemonic phrase.

Now we can derive addresses using public key (xpub,zpub) or private key (xprv,zprv).

which receiving addresses belong to MainAccount?

Every address has been derived from your "MainAccount" keys is belongs to that account.

total balance of MainAccount (in this case 0.7btc)?

They check each address balance belongs to MainAccount to get total balance.


You can find a full explanation of OPRETURN here: https://en.bitcoin.it/wiki/OP_RETURN

TLDR; OPRETURN is a "data push" output, it allows for putting up to 80 bytes of data into the transaction that have effect on the transaction.
And the value for that output can be 0.

It is used for various things, amongst others; publishing "proof of existence" hashes in the blockchain and meta protocols.


My mate received and then sent a Bitcoin transaction before his wallet was synchronised and it worked perfectly His Bitcoin wallet was only 1% synchronized with the network and yet he was able to receive and send bitcoins without any problems?!

What are the implications / ramifications of this?

What does this mean?

You don't have to do anything to receive Bitcoins. That's entirely passive. Your client doesn't have to be running.

To send Bitcoins, you just need enough information to form the transaction. If you have the transaction that sent them to you and you know it was confirmed, that's sufficient.


No Miner can connect to RPC Server I'm new to this BitCoin, as in read about it yesterday started with it today. This technology has intrigued me to the level I cannot explain, its truly genius!

Back to my problem, I have a NVIDIA NVS3100 with approx 48 GFlops speed. I am using it to mine. I have taken part in different pools, but the problem is that miner is not connecting to the RPC server.
This is the error:

Could not retrieve work from RPC Server
CURL Return Value = 1

I'm using rpcminer-cuda made by puddinpop on Windows 8.

Would I have to make rules in firewall? or something like that?

For those who are having the same problem, please note that rpcminers are not supported by many BitCoin Miners, this was my problem.

I started to use GUIMiner and it accepted my first block just yesterday. No more blocks besides those yet, but well I'm just starting.

Regards

Thanks for all the help!


Lightning network smart contract technical explaination (unidirectional payment channel) Let's observe direct unidirectional lightning channel between Alice and Bob.

How does this start technically:

They first create a 2-2 address C.
They agree on the funds Alice will put into C, say 1BTC.
Bob makes a "conditional refund 2-2 transaction" that has 3 conditions:

a) if Alice put 1BTC into address C

b) if nLock time passed between the time she put money in

c) in no transaction was made from C and put on blockchain

then Alice gets 1BTC back from this address.
He signs that transaction and sends to Alice. Alice can sign and broadcast this transaction after nLock time to retrieve her 1BTC if a) b) and c) are fulfilled.
Alice now puts 1BTC into 2-2 address C.

EDIT: Can you confirm each step.

For example: Is step 2 needed, or can Bob in step 3 just say if nLock time passed and no transaction was put on blockchain from C, whoever put money in C gets its money back in full amount.

Yes .
I like this video as well, explaining the u and b directional channel.
The Lightning Network Explained (Litecoin/Bitcoin)


Understanding transactions in orphan blocks This is in regards to Testnet.

I found a transaction that was confirmed in two blocks that were 106 blocks apart (923,255 & 923,149).

Block 923,149 is part of the main chain and 923,255 was orphaned.

My question is, how can a transaction be in two blocks so far apart and the latter being orphaned?

I haven't looked at this particular case, but it sound like a "simple" reorg.

When a 106 or more blocks re-organization happens: in this case block 923,255 was in the main chain, but then someone forked the chain at 923,149 (or earlier) and created new blocks. For whatever reason that fork became longer than what was the main chain and thus the fork became the main chain, leaving 923,255 and neighbouring blocks orphaned.

Note that this can easily happen on the testnet and is probably done on purpose by people to test their sortware's ability to handle (long) re-orgs for example. If such a re-org would happen on the real Bitcoin chain, it would be quite a disaster. In principle all transactions in those 106 blocks could have been double-spent. On the mainnet, it regularly happens with 1 or 2 block forks (just a matter of chance), but anything more is remarkable and luckily rare.


What is the meaning of BCH address? I found one more address link in my zebpay wallet is called bch address. But I don't know what is it.

What is meaning of bch address?
Where to get bch address?
Where to use bch address?

If you have had bitcoin in zebpay wallet on August 1st, You should have an equal amount of BCH(bitcoin cash). Zebpay wants to send this amount to you.

If you want a BCH wallet, You can install electron wallet from https://electroncash.org/ get a public address and submit it to zebpay. They will send your BCH to you.

Note that if you did not have Bitcoin in zebpay wallet as of August 1st , you may not receive anything.


Where can I find bitcoin price charts? I am trying to see some bitcoin charts but looks like all sites are down. Any help?

http://bitcoincharts.com/charts/mtgoxUSD has historical charts.

These 3 all have 'live' charts:

http://btccharts.com/
http://mtgoxlive.com/
http://bitcoin.clarkmoody.com/


Bitcoin RPC: Can I test for standardness? I want to test if a script or is standard or not. Is it possible with Bitcoin Core's RPC?

The top-level type parameter of the decodescript RPC can tell you if a scriptPubKey is standard.  For example:

bitcoin-cli decodescript deadbeef
{
  "asm": "OP_UNKNOWN OP_CHECKSIGVERIFY OP_UNKNOWN OP_UNKNOWN",
  "type": "nonstandard",
  "p2sh": "3PbdV4zdrjtFD4fyYebGR4oxeatrSzb2d1",
  "segwit": {
    "asm": "0 5f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa813953",
    "hex": "00205f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa813953",
    "reqSigs": 1,
    "type": "witness_v0_scripthash",
    "addresses": [
      "bc1qtauvxvn5usl6nhjktyn9c8v30cjuqdezmjct35nahr2la25p89fssxejht"
    ],
    "p2sh-segwit": "37CpdZEgXUB7LS7rvTLsYopRifDf76eZrZ"
  }
}

However, I don't know of a way to test whether a P2SH/segwit redeem script is standard using the RPC.  If, instead, you want to know whether or not a particular spend would be accepted to your node's memory pool, Bitcoin Core's development branch (master) features a new testmempoolaccept RPC; here's it's current help:

testmempoolaccept ["rawtxs"] ( allowhighfees )

Returns if raw transaction (serialized, hex-encoded) would be accepted by mempool.

This checks if the transaction violates the consensus or policy rules.

See sendrawtransaction call.

Arguments:
1. ["rawtxs"]       (array, required) An array of hex strings of raw transactions.
                                        Length must be one for now.                                                                                2. allowhighfees    (boolean, optional, default=false) Allow high fees

Result:
[                   (array) The result of the mempool acceptance test for each raw transaction in the input array.
                            Length is exactly one for now.
 {
  "txid"           (string) The transaction hash in hex
  "allowed"        (boolean) If the mempool allows this tx to be inserted
  "reject-reason"  (string) Rejection string (only present when 'allowed' is false)
 }
]

Examples:

Create a transaction
> bitcoin-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"
Sign the transaction, and get back the hex
> bitcoin-cli signrawtransaction "myhex"

Test acceptance of the transaction (signed hex)
> bitcoin-cli testmempoolaccept "signedhex"

You could also test out the complete script using regtest.  By default regtest has the standardness checks disabled, by you can re-enable them by starting bitcoind with the -acceptnonstdtxn=0 parameter.


How to check the balance of the list of 1 million Bitcoin Addresses? How to check the balance of the list of 1 million Bitcoin Addresses? Is there such a program?

Insight Block Explorer is the program.   It has an API you can query.

You'll need to install the block explorer.  It runs in a nodejs environment.


does Lightning Network can work and solve Bitcoin scalability problem? from what i managed to understand(if i got it right), the lightning network is supposed to work by using "channels" which can be created by some users with some seller and also be used by anyone who have a channel with someone who have a channel open with the seller so there is a network of users connecting each other to other users so when someone have an open channel with someone he doesn't have to open another channel for every seller that sell stuff in exchange for bitcoin. and basically people pay with the lightning network by using bitcoins from other people's channels?.
anyway i readed this article https://medium.com/@jonaldfyookball/mathematical-proof-that-the-lightning-network-cannot-be-a-decentralized-bitcoin-scaling-solution-1b8147650800
i didn't got too much into the details of the article but it claims that the lightning network is "Completely Unworkable System" and won't help with the bitcoin scalability problem. so who is right? the LN developers or the writers of this article?.

as far as predictions into the future can be right or wrong, only future will tell!
When it comes to the author of the article, he is a deep proponent of the idea, that lightning is a bad thing for the future of bitcoin. You can read alot more about his position and corresponding posts on bitcointalk.

There are two things that get repeated over and over again (mostly by proponents of the bcash world): bitcoin cannot scale with lightning, and lightning is centralized ("banking hubs").

The current reality looks a lot different: there are more than 2500 nodes and more than 6000 channels open, and for a beta phase software for micro payments I think this is a huge success. I am convinced it can help to solve bitcoin scaling issues. For sure! It might not solve everything, but there are others activities next to lightning, and that's good. But look, this is only my personal opinion.

Hence I propose to close the question, as it is mostly opinion based, and only time will tell, what becomes true.


Question about pool hashrate Actually I am working with some small academic project right now and I am newbie in crypto currencies. This project is primitive mining pool for cryptocurrency, as a base cryptocurrency I am using dogecoin (don't ask why, i just liked the name). I've read a lot of information, looks through lots of projects and actually I've created it. So I could connect with the mining tool to my pool right now and start to mine. if I made everything correct I am sending difficulty=1 to client via stratum protocol and start to mine. The process looks fine and soon clients begin to submit lots of shares so I get some shares for difficulty 1. I need to calculate (my average hash rate for example for last hour) of the pool according to the shares amount I've get. I take a look to this page: https://en.bitcoin.it/wiki/Difficulty And I got two questions.

1) I've found that I need to calculate avg 4,294,967,296 hashes for difficulty 1 but as I've found my clients generate much less hashes (according to the mining tools info it's about 30khash/s in common) but they still sends lots of valid shares to server. So actually I can't understand - is that ok, that several desktop PC could generate a lot of shares for difficulty 1.

2) I can't understand the hashrate calculating algorithm. My final goal right now is to calculating of pool avg hashrate based on shares count, and difficulty which i send to my clients. I take a look to this What is the correct algorithm to calculate worker & pool hashrate and try to calculate hash rate according to my last hour of testing. Server got 120 new shares from miners its results in 143,165,576/s (143 mHashes) but the minners tools show other numbers.

Thanks in advance.

Most likely, you are considering 2^16 to be difficulty 1, not 2^32. 2^32 is a common base for SHA256d coins like Bitcoin. 2^16 is common for scrypt coins like Dogecoin.


Can I run Trezor Wallet against my own local node on OSX? I want to point Trezor Wallet at my own local node. I'm already running Bitcoin Core, but Trezor Wallet requires Bitcore.
What I have tried:
1. Installing the latest bitcore version according to the guide.
This doesn't install due to a bug, but after working around it I got it running. But unfortunately it then crashes during indexing, so is unusable.
2. Use SatoshiLabs's bitcore fork
SatoshiLabs have made a fork of bitcore for use with Trezor Wallet. This looks very promising, especially as it is designed to work with Trezor Wallet, they have fixed the bug in the Bitpay version, and also added better fee estimates. However it also fails to install on OSX, because the embedded Bitcoin Core build is only packaged for Linux.
Next steps
I can see four options:

Go back to trying to get vanilla bitcore working. Find the cause of the crash and fix / workaround.
Try to get SatoshiLabs' fork working on OSX. Maybe I can use a vanilla Bitcoin Core build instead of the bundled one? Although I'd probably have to spend a lot of time investigating how to set up the dependencies and run the install correctly.
Forget about OSX and set up a simple Linux server and try again.
Give up and just let Trezor Wallet use its defaults.

Can I get a working bitcore node on my OSX machine for use with Trezor Wallet? Preferably I'd like to do it without hacking the default config or source code too much.

Bitcore fork from SatoshiLabs is indeed available only for 64-bit linux.

You can try to build the necessary binaries yourself and then update the npm install scripts in bitcore, but that is very hard.

I would not recommend you to run bitcore on a personal computer, since it adds additional 200GB data, so you will end up with about half a terabyte of data. Also, because of some performance issues in the bitcore code, the address database synchs for days (around a week), where you cannot use the computer for anything else. (Also the disk SHOULD be SSD, or the syncing is even longer.)

If you want your own backend, I would recommend paying for a Linux server (but it's hard to find a reasonably priced VPS/hosted server with 500GB disk).

All in all, it is not easy to use Trezor with your own full node, unfortunately.

I am actually working for SatoshiLabs, on the backends, right now :) and we don't have plans to make the builds on OS X, since we won't be able to test them anyway.


Can ISP intercept network messages to identify the IP of the transaction issuer? Suppose my ISP is intercepting the bitcoin protocol communication. By analyzing traffic in the network, he could be able to determine that some transaction propagates from my IP (as there is no record of it in the rest of the network), and therefore that the computer issuing the transaction is (very likely) in my local network. Is that right?

That is right. If you want to obtain more anonymity you could install Tor and use the -tor command-line option when starting bitcoind to connect to the network through a (safe) Tor circuit. I believe this is discouraged however unless it is absolutely necessary, because Bitcoin will not automatically create a hidden service for node connection. This means that nodes can not connect to you, but you only to nodes and if everybody did this the network would not function. (could someone provide a source in a comment please? I'm pretty sure I read it but the link is dead).

Alternatively you could make use of the local library computer facilities, McDonald's WiFi (keep in mind that government authorities can request this data and that it WILL be given to them, make sure your laptop is anonymized as much as possible, with Tails for example) or establish an encrypted connection to a VPN.

Further reading:

Running Bitcoin - the Bitcoin wiki
Tor - the Bitcoin wiki
Tor design paper


What is the "value" in a Segwit sig hash? The BIP143 docs state that the value is: "value of the output spent by this input (8-byte little endian)"
If I have a single UTXO of value 10,000 sats and I'm using this as an input for a Segwit tx, then when I'm ready to sign the transaction / create the witness section, I use 10,000 as the value? Or is the value the sum of the outputs that I'm sending?
Another example would be this in the BIP example.
Where does the 0046c32300000000 amount (600,000,000 in Decimal) come from?
This would suggest the "value" is the full available amount of that particular input? Or is it the amount of all the inputs combined?

If I have a single UTXO of value 10,000 sats and I'm using this as an input for a Segwit tx, then when I'm ready to sign the transaction / create the witness section, I use 10,000 as the value? Or is the value the sum of the outputs that I'm sending?

You use 10000 as the amount and don't care about what other inputs are or how much their value is.

Where does the 0046c32300000000 amount (600,000,000 in Decimal) come from?

The "amount" that is being used during signing (and pretty much everywhere else) is always in satoshi as a 64-bit integer. Since the second input being signed had a value of 6 BTC that is equal to 600000000 satoshi. Which is the full value of the input (UTXO) that is being spent.


Setting up the bitcoind to run at startup Ubuntu 17.04 I've created a bitcoin.service file as found here:

https://github.com/bitcoin/bitcoin/blob/master/contrib/init/bitcoind.service

However i've modified it as i build bitcoin-core from source to the following:

https://gist.github.com/anonymous/7e1bca97739147d698327d7f3a119992

It is installed to:

/lib/systemd/system

As apparently in this version of Ubuntu it must be there

It runs when i run this command:

bitcoind -daemon -pid=/home/chris/.bitcoin/bitcoind.pid -
conf=/home/chris/.bitcoin/bitcoin.conf -datadir=/home/chris/.bitcoin/
-disablewallet

However trying to run:

systemctl start bitcoind

Gives this error

bitcoind.service - Bitcoin's distributed currency daemon
   Loaded: loaded (/lib/systemd/system/bitcoind.service; enabled;
vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2017-10-15 17:27:38
BST; 2s ago
  Process: 4180 ExecStart=/home/chris/.bitcoin/bitcoind -daemon -
pid=/home/chris/.bitcoin/bitcoind.pid -
conf=/home/chris/.bitcoin/bitcoin.conf -datadir=/home/chris/.bitcoin/
-disablewallet (code=exited, status=203

Oct 15 17:27:38 chris-GE60-2PL systemd[1]: bitcoind.service: Unit
entered failed state.
Oct 15 17:27:38 chris-GE60-2PL systemd[1]: bitcoind.service: Failed
with result 'exit-code'.
Oct 15 17:27:38 chris-GE60-2PL systemd[1]: bitcoind.service: Service
hold-off time over, scheduling restart.
Oct 15 17:27:38 chris-GE60-2PL systemd[1]: Stopped Bitcoin's
distributed currency daemon.
Oct 15 17:27:38 chris-GE60-2PL systemd[1]: bitcoind.service: Start
request repeated too quickly.
Oct 15 17:27:38 chris-GE60-2PL systemd[1]: Failed to start Bitcoin's
distributed currency daemon.
Oct 15 17:27:38 chris-GE60-2PL systemd[1]: bitcoind.service: Unit
entered failed state.
Oct 15 17:27:38 chris-GE60-2PL systemd[1]: bitcoind.service: Failed
with result 'exit-code'.

Does anyone know what i'm doing wrong here ?

I happen to run across this, and I don't know if you ever got this working.  Try using the correct executable in the bitcoind.service file for the ExecStart line (11 of your gist).  My bitcoind is installed in /usr/bin/bitcoind.

I also commented on your gist above with an example.


I forgot what wallet is connected to an address. Is there anyway to figure out at least what wallet i used ? I had to put in an address on a site in case of returns or what not. i use multiple wallets since i have multiple accounts. One of my first accounts received a return and i can not figure out what wallet i used. It is a web wallet which i have narrowed down to three possible sites. I found the address that the money was sent to but is there anyway to figure out what wallet just by using the address attached to the account? i have the public,private, and encrypted keys to each of the 3 wallets that i use. is there anyway to find it using one of those keys? ( no i am not dumb enough to give my private key to anyone)

No, the address doesn't tell you anything about the service or account. The only way to find the payment is by checking each wallet.


How would one extract the list of public keys from Electrum wallet? I am looking for a way to extract all of the public keys associated with my electrum wallet. I am aware that listaddresses() does this for public addresses, such as 1CWX7o1Ppe4JpEpSLmuovU4HFY3D6Ay24C  - however, I am looking to extract the public keys, such as 02b96c2739e9543bdc17bbe58b73a3a9a16aedf2ed554faca9e5acf0b279f5d0e1.

You cannot get all of them in one go. You can call getpubkeys("address") for each address (or do it via the GUI by going to the Addresses tab, right clicking on an address, and selecting "Public Keys")

Alternatively, you can get your master public keys (xpub) and derive from those.


What protocols are built on top of Bitcoin? Mastercoin is described as:

  "both a new type of currency (MSC) and a platform. It is a new protocol layer running on top of Bitcoin like HTTP runs on top of TCP/IP. Its purpose is to build upon the core Bitcoin protocol and add new features".

Are there any other protocols or similar built on top of the Bitcoin protocol in this way?
(As an aside, the way Namecoin uses a Bitcoin-like P2P model to act as an alternative, decentralized DNS is interesting...are there similar things built on top of Bitcoin itself?)

New information:

See David Schwartz's response at examples-of-asset-backed-virtual-currencies for a short description of Ripple.

Older information:

The List of all Cryptocoins  mentions both Mastercoin (MSC) and Ripple (XRP).  This URL is dated, and Ripple is now open sourced. The ripple video is informative.  According to Wikipedia, Ripple is currency agnostic. Ripple has network consensus times of 2 to 5 seconds (which is much less than 2.5 or 10 minutes) and already has 100 billion units of XRP which probably explains why it is not visible at Mining Revenues. I've yet to dig into the Bitcoin Ripple Open Forum.

The Central Banks are scared that an open source architecture is emerging that will be redefining the FIRE Sector, and thus threatening their monopolies.  The FIRE Sector is starting to go through a very disruptive innovation revolution with the genius of Open Source Technologies. If these distributed technologies are implemented properly, we could be on the verge of another 1776. I would love to see the diagram below updated and refined by the Open Source Community so we all have a bigger picture road map to focus our efforts.


BIP Difference between final and active What is the difference in the Bitcoins Improvements Proposals between the final status and the active status?
According to the wiki

An Proposed BIP may progress to Final only when specific criteria reflecting real-world adoption has occurred. This is different for each BIP depending on the nature of its proposed changes, which will be expanded on below. Evaluation of this status change should be objectively verifiable, and/or be discussed on the development mailing list.
A process BIP may change status from Draft to Active when it achieves rough consensus on the mailing list. Such a proposal is said to have rough consensus if it has been open to discussion on the development mailing list for at least one month, and no person maintains any unaddressed substantiated objections to it. Addressed or obstructive objections may be ignored/overruled by general agreement that they have been sufficiently addressed, but clear reasoning must be given in such circumstances.

However they seem to be interchangeable to some sense. I am particularly interested for the BIP 0112 (OP_CHECKSEQUENCEVERIFY), because of the application of the Lightning Network. Its status is final. Should I assume this OPCODE is already usable and will be/is the one used for the implementation of the Lightning Network?

"Active" is used for Process BIPs, it is not used for Standards Track or Informational BIPs, which use "Final".

A quote from BIP 2: "A process BIP may change status from Draft to Active when it achieves rough consensus on the mailing list."


Unix Time, Price, Amount of Value in the Order Book at Corresponding price.

So the first line in your example translates to Thursday, April 23, 2015 GMT time, there was an order for 0.01 bitcoins at the price of $300.


Bitcoin recovery possible from some kind of private key? back in 2012 I've acquired a small amount of bitcoins, which as far as I remember I saved in a wallet on instantwallet. I wasn't following what was happening with the bitcoin until I listened lately about its value. I also found out that instawallet does not exist anymore since it was hacked in 2014.
Apart from a URL on instawallet, I have a Bitcoin address and some kind of a private key. Could somenone please tell me for sure if there is any chance to recover my bitcoins or should I just forget it?

Recovery using a private key
If your private key looks like a proper Bitcoin private key, you can recover control over your money.
A private key is just a large number. There are several different ways of representing that number.

Representation
Example

Hexadecimal
E9873D79C6D87DC0FB6A5778633389F4453213303DA61F20BD67FC233AA33262

Base58 WIF
5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF

Mini private key
SzavMBLoXU6kDrqtUVmffv

(Don't use these values they are just examples)
Note the specific lengths and the specific mixtures of characters. I think WIF normally starts with a "5". Your private key needs to match these characteristics.
Wallet Import Format (WIF) is probably the most useful.
You should be able to choose a wallet and "import" or "sweep" your private key.  Sweeping is considered safer because it works better with normal backups and recovery-phrases of the new wallet.

Instawallet
If you used Instawallet, it seems unlikely that you have a true private key.
See https://en.bitcoin.it/wiki/Instawallet

Instawallet's service learned that its security was compromised and on April 3rd, 2013 closed the service. Those with funds in their Instawallet can file a claim form to get their funds.

This sort of issue is why custodial wallets are inadvisable for long term storage.


How to generate an address for bitcoin? I installed bitcoin core and I am generating an address using getnewaddress. To get the private_key of the address I am using dumpprivkey. To get the unspents I am using listunspent. Till here everything is working perfectly. Now the problem is let's say If I created an address without using bitcoin core then can I get the unspents of the address? I tried using dumpprivkey and it is returning

unspent = host.call('listunspent',0,9999999,['msjK2Az65fzqzUDA6yB6QeNi42ssUAxG93'])

Error:

Exception: Error in RPC call: {'code': -4, 'message': 'Private key for address msjK2Az65fzqzUDA6yB6QeNi42ssUAxG93 is not known'}

I tried listunspent and it is returning empty list. How to get the unspent of the address created without using bitcoin core?

From my experience the bitcoin wallet can only use listunspend with known addresses and keys. One can import keys or addresses, addresses without keys will be watch-only addresses. I am not sure if txindex=1 is required though (with a rescan of the blockchain). See here and for txindex also here.


How can I generate a vanity Bitcoin address? I once found a program that was capable of creating Bitcoin addresses with specific words in them, but can't find it now.  Is there a trusted program, in the Ubuntu repositories for example, that can generate these 'vanity' addresses?

I guess you mean Vanitygen:
https://bitcointalk.org/index.php?topic=25804.0
From that page:

Vanitygen is a command-line vanity bitcoin address generator.
Vanitygen accepts as input a pattern, or list of patterns to search
for, and produces a list of addresses and private keys.  Vanitygen's
search is probabilistic, and the amount of time required to find a
given pattern depends on how complex the pattern is, the speed of your
computer, and whether you get lucky.


How to compute SegWit txid? BIP141 says wtxid is SHA256 of [nVersion][marker][flag][txins][txouts][witness][nLockTime]. Is data that hashed as txid includes witness?

And will txid be presented in block, e.g. be counted when building Merkle tree?

Is data that hashed as txid includes witness?

No, the txid is the hash of just [nVersion][txins][txouts][nLockTime] which is the same as a serialized non-witness transaction. That means the signature is not included in the transaction hash, removing the potential for TXID malleability due to mauling the signature. Only WTXID contains the witness, marker and flag as you wrote in your post.

  And will txid be presented in block, e.g. be counted when building Merkle tree?

Yes, the transaction ID is used in the same way that non-segwit TXIDs are used when building the merkle tree.


A Modern Miner's Software Stack I'm interested in dabbling with mining. I see that there are at least 2 pieces of software that are used when participating in the Bitcoin network:

InstaWallet
BitcoinD (the daemon)

I guess I'm looking for an intro to all the different software I'll need to even get my foot in the door, as well as any other "must haves" for a miner's software stack (for users or developers alike). Thanks in advance!

In fact, you can start mining with only a small piece of mining software.

When you mine for a pool, a mining program will be sufficient to begin mining.

When you want to solo mine, you also need a client that connects you to the network for announcing new blocks you find. bitcoind is an obvious choice for this.

There are plenty of beginner's guides on Bitcoin mining available on the web.

WeUseCoins mining guide
TechCrunch's "How To Mine Bitcoins"
BitcoinMining.com "Getting started"
Google!

A small remark on your question: InstaWallet is absolutely no requirement for participating to the Bitcoin network. A client is absolutelly everything you need. This can be the default Bitcoin-Qt, bitcoind (which you download together with Bitcoin-Qt), the daemon implementation of the default client, or any other client.

InstaWallet is just a web service that allows a very easy and fast way to create a Bitcoin wallet, based on a URL.


Expected value in pool mining vs. solo mining Set aside the fact that pool mining provides a more steady stream of income than solo mining, and the fact that pools charge a fee for their services. Disregarding those facts, I have an argument for why pool mining should carry higher expected value. This topic has been covered before and apparently I'm wrong:

  "...solo mining and pooled mining should, over the long term, produce precisely the same revenue"

Here's my argument, please break it and show me why it's wrong:

Alice, Bob, Cecil and Danny compete to find the next block. They know it's in one of 10 boxes. Alice and Bob are solo miners and randomly search through boxes one by one. Cecil and Danny also search through boxes randomly, but they are in the same pool, so they decide that Cecil will search through boxes 1-5 and Danny will search through boxes 6-10. This way they will never waste computing power searching the same box twice. Alice and Bob on the other hand don't coordinate with each other, so sometimes Alice will search in a box that Bob already knows is empty. How are Alice (solo) and Danny (pool) equally likely to find the block?

You are assuming that Cecil and Danny can collaborate to avoid duplicating work. They can't, at least not in any meaningful way. In your example, there are a small number of boxes for them to search. In Bitcoin, there are trillions of boxes. Any collaboration about keeping track of who searched what would take much more work than everybody searching randomly and accepting the extremely small probability of checking the same thing twice.


How does the blockchain prevent spending money during a "short fork"? I'm currently reading "Mastering Bitcoin" (i haven't finished it tho, but i don't see my answer and it bother me so I prefer asking it here) and there's something i don't understand. So from what I understand the "valid" blockchain is the one which has the most blocks in it. But what happens if :

a "hacker" is lucky with the hash function and manage to add a "wrong" block to the blockchain, in which, let's say that someone gives him 1BTC (even if there is no way to make a false transaction to receive 1BTC, he will at least have the bitcoins from mining a block)
Then the blochain of the "hacker" will have 1 block more than the others, thus it should be, at least for a few minutes, the "valid" blockchain

But what happens if he buy something with this 1BTC during those few minutes ? If for example, he buys a coffee, or some real items ? What prevents him from doing that ?

Is there a rule that makes that you can spend bitcoins from a transaction output only if the transaction is "old enough" (which mean that 3 or 4 blocks has been added after the block that contains the transaction) ?

If so, doesn't it make bitcoin transactions slow to process ? I already know that a transaction can be validated by a full node client and that you don't need to wait 10 minutes for the block to be in the blockchain, but if you need 30 minutes to be able to spend the money, doesn't it make transactions slow ?

Thank you in advance

PS : By the way i'm sorry if the term "short fork" is not the right expression but i didn't know how to call it

Then the blochain of the "hacker" will have 1 block more than the others, thus it should be, at least for a few minutes, the "valid" blockchain

This is incorrect. A block that contains an invalid transaction is invalid, period.

The network's rule is that the longest(*) valid chain is the one to be treated as correct. A chain with any invalid blocks in it is ignored by full nodes on the network.

Now, lightweight nodes on the network do not perform full validation, and thus cannot tell whether the longest chain is in fact valid or not, and thus they'll accept any chain. However, generally lightweight clients are only used by individuals that don't participate in much economic activity. A store that sells real world items for BTC is very much incentivized to use a full node that will never be fooled by this.

Furthermore, since creating a block is expensive, few miners will be willing to produce a block that contains invalid transactions, as such blocks will eventually not be considered acceptable to the network, and thus not result in any income for the miner. This long-term effect that economically-relevant full nodes have on miners through incentives in fact conveys security to lightweight nodes.

  If so, doesn't it make bitcoin transactions slow to process ? I already know that a transaction can be validated by a full node client and that you don't need to wait 10 minutes for the block to be in the blockchain, but if you need 30 minutes to be able to spend the money, doesn't it make transactions slow ?

Unless you trust the sender, you always need to wait for a number of confirmations, as there is always a chance that a (short) non-malicious reorganization of the chain happens, which confirms a conflicting transaction to the one that pays you.

This makes Bitcoin, in adversarial settings, much more appropriate as a settlement layer than as a payment system. And at that, it excels. Compared to say a credit card payment, the receiver knows the transaction is final within hours, compared to maybe months for a credit card payment.

This is an inherent restriction of a public consensus systems: it is inherently hard and slow to get the entire world to agree on an exact state of the ledger. For payment solutions people are building layers on top, which take advantage of the guaranteed settlement, but permit payments in a direct fashion with just knowledge of the involved parties. The Lightning Network is a good example of this.

(*) Technically it is not the longest chain that matters, but the chain with the most work. These definitions are almost always identical, but in the few edge cases where they differ, the difference is important.


Is it computationally feasible to find two transaction IDs with the same first 20 bytes? Transaction hashes uses sha256, so they are 32 bytes long. If I have to store a very large database of transaction hashes, only for the purpose of checking existence later on, is it really necessary to store all 32 bytes? If i store only 20 last bytes and I compare transactions using only those last 20 bytes, would the crypto guys get mad?

Is it computationally feasible to find two transaction IDs with the same first 20 bytes?

20 bytes is still 160 bits of security, which is considered very secure. If you are sure that you only need the IDs to check for existence, 20 bytes of the hashes should be fine.

Hard drive space is pretty cheap, though, and you might need the full TXID someday just for interoperability between other systems. So make sure 20 bytes really does satisfy your use cases. A 20 byte hash is sufficiently secure, though.


Create Pay to Witness Script Hash in Pay to Script Hash Address I'm trying to generate a multisignature, segwit compatible address as a P2WSH nested in BIP16 P2SH as described in BIP141. Basically, I want to construct a P2WSH-nested-in-P2SH address from n public keys and the m required to sign a valid tx.

(m required, n public keys) -> base 58 bitcoin address

I'm trying to follow along with the examples provided in Mastering Bitcoin to check the numbers I'm getting, but I'm definitely missing something. (I'm going to link all of the sections I'm referencing but it shouldn't be necessary to actually go and read them—hopefully the flaw in my process will be evident to someone.)

He defines a standard P2SH 2-of-5 multisig: OP_2 key0 key1 key2 key3 key4 OP_5 OP_CHECKMULTISIG where the keys are

04C16B8698A9ABF84250A7C3EA7EEDEF9897D1C8C6ADF47F06CF73370D74DCCA01CDCA79DCC5C395D7EEC6984D83F1F50C900A24DD47F569FD4193AF5DE762C587
04A2192968D8655D6A935BEAF2CA23E3FB87A3495E7AF308EDF08DAC3C1FCBFC2C75B4B0F4D0B1B70CD2423657738C0C2B1D5CE65C97D78D0E34224858008E8B49
047E63248B75DB7379BE9CDA8CE5751D16485F431E46117B9D0C1837C9D5737812F393DA7D4420D7E1A9162F0279CFC10F1E8E8F3020DECDBC3C0DD389D9977965
0421D65CBD7149B255382ED7F78E946580657EE6FDA162A187543A9D85BAAA93A4AB3A8F044DADA618D087227440645ABE8A35DA8C5B73997AD343BE5C2AFD94A5
043752580AFA1ECED3C68D446BCAB69AC0BA7DF50D56231BE0AABF1FDEEC78A6A45E394BA29A1EDF518C022DD618DA774D207D137AAB59E0B000EB7ED238F4D800

of which the HASH160 is 54c557e07dde5bb6cb791c7a540e0a4796f5e97e. Ok so far so good; I got the same value as the book.

Then he discusses a P2WSH transaction and references the same multisig script

  We saw this type of script in [p2sh]. In that example, P2SH was used
  by Mohammed’s company to express a multisignature script. Payments to
  Mohammed’s company were encoded with a locking script like this:
  Example P2SH output script

HASH160 54c557e07dde5bb6cb791c7a540e0a4796f5e97e EQUAL

and then defines the P2WSH output script

  Example P2WSH output script

0 9592d601848d04b172905e0ddb0adde59f1590f1e553ffc81ddc4b0ed927dd73

  [...] the Segregated Witness program consists of two values pushed to the stack: a witness version (0) and the 32-byte SHA256 hash of the redeem script.

How does he get this P2WSH output script?

If I take the example P2SH script, script.

HASH160(script) = 54c557e07dde5bb6cb791c7a540e0a4796f5e97e
SHA256(script) = a9b7b38d972cabc7961dbfbcb841ad4508d133c47ba87457b4a0e8aae86dbb89
SHA256(HASH160(script)) = 9796557ff06241ca75fdbc09359e9916186cb8398dc01fd58afc72a3ac86ce63

None of which equals the provided:

9592d601848d04b172905e0ddb0adde59f1590f1e553ffc81ddc4b0ed927dd73

I also tried compressing the public keys, and still couldn't get that value. I'm pretty sure it's still talking about the same example, because it continues with

  Mohammed’s company can spend outputs the P2WSH output [...]

If I can figure out the 32-byte SHA256 hash of the redeem script I think I'm good to go, because at that point the address can be calculated

sha256_value = 9592d601848d04b172905e0ddb0adde59f1590f1e553ffc81ddc4b0ed927dd73
p2wsh_output = OP_0 + OP_32 + sha256_value
address = Base58(05 + HASH160(p2wsh_output))

Seems to me that

  ... creating a Pay-to-Witness-Script-Hash (P2WSH) output that would
  look like this:
  0 9592d601848d04b172905e0ddb0adde59f1590f1e553ffc81ddc4b0ed927dd73...

means that this hash is an example not derived from the data above


What do asterisks mean in the ledger? I recently placed an order with Kraken (or tried to anyway, the site was giving me lots of errors and timeouts) Seemingly a trade went through after several attempts.

However, my account balance now has an asterisk in it, for example

Lumen (XLM) *2,038.04006    $0.2002

And the ledger looks like this

12-14-17 22:59:26 -0500 Trade   Lumen (XLM) *1,040.76635    *2.72629    *2,038.04006

What does the asterisk indicate?

Update - I now check the order history, and Kraken claims the order is cancelled - however, the XLM coin are available for Transfer, and the Bitcoins I used to make the purchase are no longer available.  I think Kraken either has something very strange in their user interface or the money was lost somehow?

Asterisk is the currency symbol for XLM, like $ or ฿.


My blockchain.info wallet was hacked. How can I create a double send to foil the attacker? This is the transaction.

https://blockchain.info/address/1F8EP97jgQx8QD6XMRg2bCHHrJrZEMUTRt

Which is still unconfirmed.

I am trying to use https://coinb.in to create a double spend transaction with a higher fee but I am getting several errors such as:

18: txn-mempool-conflict OR
16: mandatory-script-verify-flag-failed (Script failed an OP_EQUALVERIFY operation)

How can I create a double spend transaction using https://coinb.in to block this attack?

In particular what goes in the transaction id field and the script field.

So some background as to what happened here. I wanted to claim my bitcoin diamond air drop. I googled and this video came up first.

The video played this weird music which I think was hypnotic in some way. It instructed me to paste my blockchain.info restore phrase into this website: mybcdwallet.org.

I foolishly followed the instructions and did not realise at the time that I had handed over the restore phrase of my wallet to a hostile hacker. The next morning I woke up to find that a transaction had been initiated to transfer my bitcoins to another address (not owned by me!).

Fortunately the bitcoin mempool is clogged up with lots of transactions and the hacker used a small mining fee. Consequently the transaction had not been confirmed even though it had been initiated 10 hours before.

So what I did was installed Electrum wallet and restored my wallet into it. Electrum correctly assumed that I still had bitcoin in the wallet. I then basically did a "double-spend" i.e. I started another transaction of my own and sent the bitcoins to a paper wallet that I had created. I made sure that I used large mining fee to ensure that my transaction got processed before the fraudulent one.

The next morning I woke up to find that my transaction had been confirmed 13 times which means that I had taken back my bitcoin!

Lesson: Be very careful with your back up phrases. Don't type the phrase into a website you don't absolutely trust!

I'm not not sure if I can say the clogged mempool is a flaw of a design feature. But in this case it did save me a lot of money...


What could be the impact of the distribution of "tainted" Bitcoinica coins? The hacker was distributing them in IRC recently, and sent some to the Bitcoin Faucet. Is this a reliable method for evading the "Bitcoin Police"?

Here's a forum thread discussing the distribution and a pastebin of the IRC conversation. Pasted below is just the beginning of the pastebin content:

<BitcoinicaHacker> Who wants free bitcoins courtesy of bitcoinica?
<grepix> who doesn't!
<BitcoinicaHacker> post your btc addr
<nanotube> i think bitcoinica wants free bitcoins courtesy of bitcoinica
<Phraust> oooh, i'll take some: 18LSrqYfUwt4q52CvSWXkSqNiDMGDADAao
<BitcoinicaHacker> d43282f1ec433cb896ddf7d4a88faa4a202c97ac6e60568eaecfd1df53d82ef6
<Phraust> sweet, many thanks.
<OneMiner> 121VuNzJi7ihM6FTv28oruemfw4fp4rvPZ I'll take a piece of that. :P
<BitcoinicaHacker> f87f87a6e053157140bd509952c999e56344fe4fa90eaf47288bbcdda7689514
<BitcoinicaHacker> 74358a453321026b197549a250c3aa65b60187f8d4ba4578de1b1422eec2937d
<OneMiner> Thank you very much.
<b00bsman> BitcoinicaHacker, wie ist der Kuchen?
<brwyatt> 12KTki1xe5xVoQneEZy2CED8Ep87ifubx7 I'll give it a try.
<brwyatt> He really wasn't kidding. o.O
<BitcoinicaHacker> 8694268cfe0aa51d7ecb3749b8f4bc8ebe7c56cc8e920f1b7b34862f9992e004
<OneMiner> Ya, seems legit.
<grepix> the BTC def showed up, but for all we know this is just a lazy trolling :D
<brwyatt> yeah
<OneMiner> The balance of the account suggests otherwise.

I don't think there's really any need to do this to evade "Bitcoin police". Bitcoins are fungible and one is as good as another. Any attempt to track tainted Bitcoins is, at least in my opinion, doomed to fail.

[Imagine] if the FBI regularly published a list of serial numbers of currency that would no longer be honored. Banks would refuse to accept bills on the list, and soon so would grocery stores and so on. That hundred dollar bill you got from the bank, now sitting in your wallet, could appear on that list at any time because the person who deposited it at the bank right before you withdrew might have stolen it.
Think about what using currency would be like in such a world. Could you even have ATM machines? In fact, it would be the death of cash -- forcing people to use cash only for small amounts of money they could afford to lose. Such "tainting", if it hit the Bitcoin world, would similarly be the death of Bitcoin if it caught on in any significant way. - Tainted coins - Who dictates that a coin is tainted?

This also suggests an interesting way to defeat any attempt to taint Bitcoins, assuming such an attempt wasn't doomed anyway. Just take a chunk of the tainted coins and start transferring them to random, active accounts. The standard client doesn't make it particularly easy to quarantine coins nor does it hold newly-received coins separately from old ones. So when you make your normal payments, you pretty much can't help but spend some of the coins you received unsolicited. Soon lots of innocent users would be spending "tainted" coins and innocent merchants would be redeeming them at exchanges, which have to resell them.


What can I do to track stolen funds? I have mtgox account, and once I changed my android software i forgot to link another google authenticator, so to access mtgox I had to unlink it of OTP.That wwas two weeks ago
Last week, i still didn't linked new OTP, and I had my BTC funds stolen and widthdrawed to another account. I know that transactions canot be undone by can I do anything to find where are my BTCs?

Regards

If you are not able to know the exact date and the address that was used to take the BTC from your MtGox account, I dont think there are any way to know where they went.

And even if you could find where they are (or where you think they are) there are no way to take them back.


How do I find a pubkey and the nbits value to generate a genesis block? I am hoping to create a new cryptocurrency from a Bitcoin fork, mostly for learning, and a little bit of fun. I roughly followed this answer to get as far as I am, but the genesis generator requires a pubkey and an nBits param, and I have no idea how to get these.

Any advice or resources pertaining to those parameters or cryptocurrency creation in general would be great.

The public key doesn't matter, no coins are created in the genesis block.

nBits decides the blocks difficulty, affecting how long it will take to mine. You also have to modify your daemons code to allow this difficulty.


Combine multiple Bitcoin balances into a new wallet? I need $1000 worth of Bitcoin, but I'm going to use an ATM, and without I.D., there is a limit of $250 per transaction. Could I conduct 4 separate transactions back-to-back, tell the ATM to create a different wallet each time, and then later move those 4 balances into one wallet?

You can use new address for each transaction and receive BTC in the same wallet.
Use one of the open source bitcoin wallets.


Unconfirmed Transaction[3] Have problem. Sorry duplicate. and still not understand works

And on Bitcoin-QT

PS im confused how to back that money ~_~(cancel it)

Based on the current fee lever from https://bitcoinfees.21.co/, the fee rate should be 200 satoshi/byte, with you tx, you at least include 0.002 as fees, considering the sending amount. I advise you delete this transaction or wait for the network to forget it. you could have a look this article for more details http://coinour.com/index.php/how-to-do-with-stuck-bitcoin-transaction/


Who owns the newly supplied bitcoins? Central banks create money supply. Who creates bitcoin supply? Is it the miners? The dollars go into someone's pocket when bitcoins are first purchased for dollars. Is it like tulip bulbs?

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

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

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

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

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


Historical Prices Immediately Following Bitcoin Halving I searched here for posts on historical price movements following Bitcoin halving but didn't find much.  I found some old posts that inquired about the anticipated price changes expected for future halvings, but my question is not speculative in nature, but about what has actually happened to the price of bitcoin during past halving events.  Can anyone provide a brief summary of what has happened within a few days or weeks to BTC price (or even of other relevant cryptos) in the past when a having has occured?

First halving happened on 2012-11-28, the price was around $12, after the event the prices started to rally and by April 10th, 2013 it reached over $250, after which it crashed to around $60.

Second halving happened on 2016-07-09, the price was around $575, after the event it fluctuated for a couple of months and then we know what happened next.. $20k top and now it is around $3.5k

The third halving will happen approximately on May 25th 2020
Source and countdown: https://www.bitcoinblockhalf.com/

You can check the dates and see how the price acted on this chart:
https://www.tradingview.com/chart/?symbol=BITSTAMP:BTCUSD


what is the most suitable time interval for updating information on a block while mining the block So, Bitcoin block consists of some static (magic number, version, previous hash...) and dynamic (timestamp, Merkle Root, transaction count and transactions) elements. What I don't understand is if we update active parts, wouldn't we start guessing nonce from the beginning every time and also calculating the new merkle root would be time-consuming for each transaction? I understand that since PoW is memoryless it doesn't effect much if it is updated every seconds or with every transaction but it may be slower to compute new hashes and root. I'm sorry if I'm wrong but, if miners freeze the block at certain time would they have an advantage. I searched a lot, but couldn't find an article or video of what really happens during mining in slo-mo.

Miners do optimize the block construction process internally.

Unfortunately they do not share this information with the community, so we don't know what methods they use, how they choose TX's and how they distribute work to pool participants.

Both mining machines and mining software the big miners use are secret. Modern ASIC machines' hardware are closed source and so is their firmware and operating system.

This is unfortunate considering that Satoshi gave us Bitcoin source code, which is absolutely revolutionary, for free.


Would a professional ASIC-machine holder eventually become a bank-like character? As we know, one of the concepts of Bitcoin is to be "decentralized". When individual miners, even with ASIC miners, become unprofitable, will the system become more centralized to those several superb professional miners?

Would that finally affect the willingness of users to accept Bitcoin and lead to its collapse?

Even if mining becomes more centralized, it would seem unlikely that miners would turn into banks: Their only advantage at shaping payments is that they may delay transactions by not including them in the block, so there doesn't seem a direct incentive to progress to banking.

On the other hand, payment processors and bank-like entities would have an incentive to foster mining efforts, as their business concept directly profits from a secure network.

So, banks should be interesting in paying for mining, but not vice versa.


Does pruning affect a node's security or consensus ability? An SPV node certainly is a compromise of security because the full set of consensus rules are not verified by the node (for example block size or subsidy rules). A pruned node seems like a win-win, except you can't help new nodes bootstrap on to the network.

Are there any other tradeoffs?

Full nodes derive their security from enforcing all of the rules of Bitcoin self-sufficiently on any data they receive, and by validating the complete blockchain from the genesis block to the chain tip. This does not require keeping the data after validating it. Pruning nodes have the same security that archival nodes have. Since following Bitcoin's rules is sufficient to converge to the chain-tip, pruning nodes have full consensus capability.
The only difference is that pruning nodes cannot serve the blocks that they have pruned, and if a pruning node requires a -reindex for any reason, it will need to repeat the full Initial Block Download (IBD).


Requirements for a Bitcoin Miner Data & Bandwidth needs Can someone elaborate on the other aspects of a Bitcoin miner set up / rig's needs, things such as the amount of data in MB's per day it can get through in getting and sending, if your asymmetrical broadband connection is sufficient.

Bandwith usage of a Bitcoin miner is almost negligible, in the order of 0.125 KB/sec source

Connection stability it's more important to keep the miner working 24 hours a day.

Also, some altcoin has block generation every minute, in this case also round trip time to the mining pool is important because otherwise you have high percentage of dead share. This doesn't really apply to Bitcoins because block generation is every 10 minutes.


Compiler optimizations for self-compiled Bitcoin Core If I compile Bitcoin Core using the instructions in the README, does the C++ compiler use compiler optimizations for my current CPU, or will it output a "generic" binary, that can run on almost any CPU? For example if my CPU supports the AVX-512 instructions, will the compiler automatically output a suitable binary or does it not take into account any CPU features at all? If so, how can I make sure I have the optimal binary running on my machine?

By default, yes and no.
No, most of the code is compiled for generic target hardware. If you want something optimized for your actual hardware, you can add -march=native to your compilation flags (e.g. you'd run ./configure CFLAGS="-march=native" CXXFLAGS="-march=native"). This will result in a binary that may not work on other hardware than your own. This likely gives you some performance gains, but is unlikely to have a huge impact, because...
Yes, some code has several variants that are always compiled in, and the optimal one is decided at runtime based on available hardware features. This includes:

SHA256 versions for SSE4, SSE4.1, AVX2, and SHA-NI exist.
CRC32 versions (inside LevelDB) for ARM64 and SSE4.2 exist.
The internal random number generator will use RDRAND/RDSEED if provided by the hardware (in addition to other randomness sources).

Certainly more optimizations are possible for specific hardware or features, but generally this isn't as easy as just turning a compiler flag - it also needs different code to actually make use of it. For example, compiling generic SHA256 code with -march=native will give a modest speedup, but using code that is designed to make use of the 256-bit wide registers AVX2 can be several times faster in some cases than that, by computing multiple hashes in parallel.


Install Bitcoin and Bitcoin cash How can I install on the same Ubuntu server together Bitcoin Core and Bitcoin Cash?

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

Bitcoin Core

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

Bitcoin Cash*

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

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


address in listaddressgroupings and getnewaddress I don't understand the differents between listaddressgroupings and getnewaddress

For example, I have a local blockchain ( regtest ) with 0 Block.
I create 101 block (generate 101)
I can see with listaddressgroupings this output

[
  [
    [
      "mvAH7VsxifvQdEZ46Rdt2oN3nB5BzaPqS8",
      50.00000000
    ]
  ]
]

What address is it?
If dump the priv key dumpprivkey mvAH7VsxifvQdEZ46Rdt2oN3nB5BzaPqS8

I have this result MVA_PRIVATEKEY

ok, If I search this privkey in dumpwallet test.txt that key in associate to this address

MVA_PRIVATEKEY 2019-01-19T10:26:19Z change=1 # addr=2NAoHv7kDBhHND7YHcQKuDS8wCbEz87xLrv hdkeypath=m/0'/0'/0'

Why is not mvAH7VsxifvQdEZ46Rdt2oN3nB5BzaPqS8 ?

Now I want create a new address getnewaddress =>
2NCGuG2v4RbaAKsZp1RQJ2ZpDM6WtW79Mu3

Why this address begin with 2 and not with m or n ? its pk is different from mvAH7VsxifvQdEZ46Rdt2oN3nB5BzaPqS8

If I create another 101 block, I have a new address in listaddressgroupings

anytime I create a new block, I have a new address in listaddressgroupings

I don't understand the difference between listaddressgroupings and getnewaddress

listaddressgroupings is very different from getnewaddress. listaddressgroupings just shows you addresses from your wallet that have been used. getnewaddress gives you a new address for you to receive Bitcoin at.

  What address is it?

That address is an address in your wallet. The reason you see it listed in listaddressgroupings is because you used generate. generate mines blocks and sends the block reward to a newly generated address. So after using generate, you will see a new address in your wallet which has the Bitcoin received from the block that was just mined.

listaddressgroupings is not giving you a new address every time you call it. If you just call it without mining any blocks and without using getnewaddress, then you will see the same addresses there. No new addresses will be created.

  Why this address begin with 2 and not with m or n ?

The address that generate uses is a P2PKH address which begins with m or n. However the wallet will give you, by default, addresses that are P2SH segwit addresses which will begin with 2. This can be changed by setting the -addresstype option to change the address type that getnewaddress will give you. This discrepancy is largely due to legacy reasons; there's no reason that generate couldn't use P2SH segwit addresses (or whatever you have set addresstype to) but no one bothered to change it.

(Note that generate doesn't actually use P2PKH outputs. Rather it uses a P2PK output which does not have an address type. For convenience, this is displayed as a P2PKH address)


Quadratic hashing problem: Why not just create new OP code "CHECKSIG2" to fix? Why can't "we" fix the quadratic hashing problem with OP_CHECKSIG with a soft fork?

Update NO_OPx to OP_CHECKSIG2 with soft fork, where OP_CHECKSIG2 doesn't quadratically hash (uses a single tx hash of all data for each input maybe?). Create a new transaction type for the new process like P2SH and after wide enough network adoption, soft-fork to invalidate any old OP_CHECKSIG transactions the way BIP 66 worked?

Or is there a fundamental problem with my assumption that "uses a single tx hash of all data for each input maybe" is possible at all?

Note: As of 2020 this answer is obsolete, as BIP143 / SegWit has been in use for years which fixes this concern.

You can fix it this way, and someone is in the process of doing so.
The problem with hashing the entire transaction is that in order to create a transaction hash, you must know the signature. However, in order to create the signature, you need to know the transaction hash. To make this work, you need to avoid hashing the scriptSig. This is what Bitcoin does, but the way it's implemented prevents you from taking the hash for one output and using it for another.
BIP143 (part of segregated witness) proposes a system where data is (mostly) hashed once.

A new transaction digest algorithm is defined, but only applicable to
sigops in version 0 witness program:
Double SHA256 of the serialization of:

nVersion of the transaction (4-byte little endian)
hashPrevouts (32-byte hash)
hashSequence (32-byte hash)
outpoint (32-byte hash + 4-byte little endian)
scriptCode of the input (serialized as scripts inside CTxOuts)
value of the output spent by this input (8-byte little endian)
nSequence of the input (4-byte little endian)
hashOutputs (32-byte hash)
nLocktime of the transaction (4-byte little endian)
sighash type of the signature (4-byte little endian)

This gets run for each input. Every part of this is fixed length, except for scriptCode, but there's no way to make one scriptCode be hashed by multiple inputs. There are three inputs based on variable-length information, hashPrevouts, hashSequence, and hashOutputs, but there's limited potential for mischief there. All methods of computing them either hash one input/output, or are shared by the entire transaction, or are all zeroes.
Validating very large BIP143 transactions will take linear time, and be dominated by signature verification. However, BIP143 transactions cannot be made right now, as segregated witness has not been accepted by the miners.


Desperate need of help - Face ID stopped working on blockchain wallet app and I don't remember password First of all, apologies if this is the wrong forum for this.  I've contacted blockchain support and twice all I have gotten was a standard form response that says they cannot reset passwords, which is clearly not what I am asking.  I use the Blockchain wallet app on iphone X (Version 12.0.1).  I have been logged into the app since I downloaded it and set it to log in with FaceID which it has done every time I have used it.  A few days ago, I attempted to login as usual and came to find that when i open the app it says "Password Required".  "You have logged out or there was an error decrypting your wallet file.  Enter your password below to login."

The problem that I am facing is that I do not remember my password, nor do I have my 12 or 24 word seed.  To make matters worse, I do not even have my wallet identifier written down.  There was no email account associated with the account either.  So am I completely screwed?  I ideally need to find a way to get the FaceID to work again while still remembering the account.  Is there a way for me to obtain the wallet identifier from the app?  What should I do and what should I not do to make things worse?  If I guess various passwords that it could be, would it lock me out after a certain number of guesses?  Lastly, do you have any idea what would cause this to have happened in the first place?  Thanks in advance for any help you may be able to offer me.

Most of the issues you're encountering are limited to the proprietary processes used by the blockchain app you are using, and only their support will be able to navigate you through them. Concepts such as face ID, wallet ID, etc. are not standardized by the bitcoin implementations, and vary from provider to provider.

If you're lucky, when Face ID is disabled, whatever scheme they used to decrypt the wallet via Face ID is not deleted, and may be recoverable with someone from the company helping you. However, a well designed wallet would likely remove any secret used to grant access via secondary authentication such as Face ID if the authentication's validity was in question, and fallback to a password based decryption instead.

From a general bitcoin perspective, without the backup seed words, you essentially have no bitcoin, unless you are able to get someone who knows the app's processes to help you recover any information that may remain. Even after that, it is highly likely that the information is encrypted in a manner which prevents anyone from accessing it without the password.


BTC and BCH and paper wallet I have been gifted a paper wallet prior to the BTC/BCH fork. I have set up a Blockchain account and a Coinbase account (both empty at this time) on my computer and my tablet.  Do I need 2 accounts each, one for BTC and o.ne for BCH.
I'm still struggling with the procedure to empty the paper into the Blockchain.  I suppose this goes first into the tablet as an electronic wallet?  Thought I was computer savvy but this is tasking me!!!
Any help will be appreciated.

You don't need 2 accounts on each. CB for example lets your switch between BTC and BCH wallets under one account.

You just import the private key from the paper into say a "electrum" wallet for the bitcoin. Then transfer the bitcoins out. Then you import the same key into a bcash wallet like "Electron Cash"

https://steemit.com/cryptocurrency/@lukestokes/step-by-step-getting-your-bitcoin-cash-out-of-a-bitcoin-paper-wallet


Non-spend Blockchain.com A bitcoin trader opened a blockchain wallet for me and then sent me my profit but it is non-spendable. I know they can no longer get into my account because I changed the password and I have two-step verification. I don't have the private key. How can I get the private key?

I'm sorry to say this is a common scam, I'll give some more info below:

  A bitcoin trader opened a blockchain wallet for me and then sent me my profit but it is non-spendable.

That is called a 'watch-only' address in your wallet, meaning you can only watch it, but not spend the coins held by it. The Bitcoin blockchain is an open database, so anybody can watch any address they want to.

  I know they can no longer get into my account because I changed the password and I have two-step verification.

From this, it sounds like the scammer had access to your account in the past. If this is true, then your account is 100% compromised, there is no way to make it secure again. Make a new wallet, move all funds to it, and do no ever use that account again.

The reason you MUST abandon that wallet is that while logged in, the scammer likely copied down your wallet's mnemonic seed phrase (a series of 12 or 24 words). With that seed phrase, they can recreate your wallet on a different device, or using different software. The seed phrase is the current industry standard for making a wallet backup, it is used to derive your bitcoin private keys and addresses. The password/2FA are just used to unlock your 'blockchain.info' account (which has used that seed phrase to create your wallet), so if you put the same seed phrase into a different device, it will recreate your wallet, without needing a password (since blockchain.info isn't involved at all).

For this reason, it doesn't matter if you change the password, or the 2FA. Once the scammer has your seed phrase, any funds sent to that wallet will also be under their control.

  I don't have the private key. How can I get the private key?

You cannot. The only way, would be to find the person who does own that private key, and ask them for it (but they probably won't give it to you). The scammer is likely trying to 'sell you the private key', or 'unlock it', or some other nonsense. That is the scam, so please beware and do not send any more BTC to them.

In the future, do NOT EVER give your wallet details, login, passphrase, seed phrase, 2FA, private keys, etc, to anyone that you do not trust 100%. If you ignore this warning, you are much more likely to have your bitcoins stolen.


Debug.log : How do I analyze an orphaned transaction? The debug.log for my machine lists the following information while synching

ERROR: FetchInputs() : 5b5e32cc97 mempool Tx prev not found e99babf87a
stored orphan tx 5b5e32cc97 (mapsz 414)
received: tx (227 bytes)
ERROR: FetchInputs() : 93ce7eee97 mempool Tx prev not found 8d56e0b192
stored orphan tx 93ce7eee97 (mapsz 415)
received: tx (259 bytes)
ERROR: FetchInputs() : 7baab3c99a mempool Tx prev not found 2ca8483584
stored orphan tx 7baab3c99a (mapsz 416)
sending: addr (181 bytes)
Flushing wallet.dat
Flushed 12367 addresses to peers.dat  62ms
Flushed wallet.dat 5335ms

Is it correct to say that the orphaned transactions were added to the chain, but was replaced by another block?
Are orphaned transactions replicated to my client when I download the chain?
How can I tell if the orphaned tx ever made it into a block?  (would the # stay the same?)
What is a mapsz and when is it important?

An orphan transaction is a transaction that consumes a coin whose creating transaction is not known to your client. This has nothing to do with orphan blocks (which are blocks whose parent block is not known, or according to another definition, blocks that are no longer part of the best chain).

Orphan transactions are not part of a block (they cannot be verified until their parents are known, and only valid transactions are allowed in blocks), and are kept in memory in the client. When their parents become known, and they are found valid, they are moved to the memory pool (which is - as the name suggests - also kept in memory only). From there, they are considered to be included in new blocks (if you're mining).

This piece of debug.log tells you that there are 3 transactions received (separate transactions, not part of a block) that reference some inputs that aren't known. Because of this, they are stored in the orphan pool, which grows as a result of that. "mapsz" stands for "map size" (as the orphans are stored in a map) - the number is just the number of remembered orphans.


How to Call JSON-RPC SendToAddress when the Wallet is Encrypted? I'm using JSON-RPC to send commands to my bitcoind, and it works fine.

Now I want to encrypt my wallet. When I've done that, I will need to send the passphrase when calling SendToAddress. How do I do that?

Right now I send these parameters:

address
amount
comment
commentTo

which are put into an array in the order above.

Will the passphrase be another parameter that I append as the last element in that array?

Not in the current code. The way it works now, you have to make two RPC calls -- one to unlock the wallet for a period of time (walletpassphrase) and one to do the transaction (sendtoaddress). You can follow up with a command to lock the wallet immediately, if desired (walletlock).

  walletpassphrase <passphrase> <timeout>
  Stores the wallet decryption key in memory for <timeout> seconds.

  walletlock
  Removes the wallet encryption key from memory, locking the wallet.
  After calling this method, you will need to call walletpassphrase again
  before being able to call any methods which require the wallet to be unlocked.


Strange output address Looking in transaction https://blockchain.info/it/tx/ecd1a64432367a1962eadd90ec12cfb6c5f6920075b10a62dbda7488c5688e44 i see strange output address like this: bc1q8r0m7ymhf2smspeqgzwj79e89kvmgwqasg5glskugrrzc7qv57tq2e6sjf

what kind are?

As @pebwindkraft comment, it's the new bitcoin segwit address (bech32), it's supported on bitcoin-core v0.16.

Bech32 is a segwit address format specified by BIP 0173. While this address format has been included in some implementations, as of December 2017.

If you would know more about it watch this


Interoperability of Bitcoin clients Is it possible to operate on the same wallet from multiple devices? If I run, for example Android on a device, and Windows/Linux on another, how do I share the same private key(s) of my wallet between these device so I can send money from any of them?

Are the wallet files someway interoperable between clients? Is there a dedicated import/export tool?

I'm mainly interested in this client

You can use online wallet, like StrongCoin, then it doesn't matter where you access it from.
You need to use an Android client that allows for private key import/export. I'm not sure which Android client does this, but for Windows/Linux you either can look for some tools for altering the wallet.dat for the standard Client, or use an alternative client with import functionality (as far as I remember, MultiBit can do that, but I'm not 100% sure).


Could mining centralization be countered by checking if the node connects to many ASICs instead of one? In a mining pool, many ASICs and GPU/CPU from all around the world connect to the pool's node. Is it possible to force every node's client software to check if a node is connected to just one computing unit, before the node is allowed to mine?
Or am I missing something about how mining pool node works?

If I am right, some would say we cannot know if the client or hardware are tampered in such a way that the client will always say there is just one computing unit.
How about putting the client and hardware in a Trusted Execution Environment (TEE) so that it cannot be tampered with?

No, this is not possible. Miners must be allowed to join the network without permission, because otherwise the position of a ‘decision-maker’ becomes necessary. This doesn’t necessarily mean the decision maker is just a single individual (or group of individuals, etc), but in any case it presents an additional barrier of entry to the network.

Consider: if I were a miner, why would I allow my node to ‘give permission’ to any other miner to join the network? By not allowing anyone else to join, I would have less competition when mining. So I would be smart to do anything I could to prevent others from joining.

Further, how does the network come to consensus on which nodes are allowed to mine? This is a non-trivial problem, in fact it is mining itself which allows the network to maintain consensus. You would need to create a whole new system and layer of consensus which would precede the act of mining.

Also worth mentioning: even if it were possible, running a node is inexpensive, so there is no stopping a single entity from just running many nodes in order to run many mining hardware devices.

As you mentioned, there is also no way to force a user to use a specific software implementation. A trusted execution environment is not a solution in this case: forcing something like that would centralize the decision of what runs inside the TEE, which is in stark contrast to the permissionless and open source nature cryptocurrencies. Without these properties, the value proposition of a cryptocurrency like bitcoin is destroyed. What if the decision maker or hardware manufacturer is compromised? Situations like that present huge existential risks to the network.


How to add additional information to transaction? I want to add some additional information to my specific transaction, so that I can send the additional information to blockchain.

Note that you should only do this, putting extra data into the block chain, if it is really necessary. The block chain has to be stored by every full node, so try not to take up all our hard drive space with unnecessary stuff whenever possible.

With that said, if you do want to add extra data to your transaction, then add an additional output to the transaction, for which the scriptPubKey has the following form:

OP_RETURN {80 bytes of whatever data you want}

This transaction output is automatically un-spendable, and so will not be kept in the UTXO set. The other UTXOs from your transaction will still be safe.

For more info:

https://bitcointalk.org/index.php?topic=414886.0
https://bitcoinfoundation.org/2013/10/core-development-update-5/

This will embed extra information into your transaction. Be aware, though, that the software that made the transaction and the software that reads the transaction have to be compatible in order for the user to be able to read the given information when the transaction is received.

You can see an example of a transaction that used OP_RETURN to encode extra information here: https://blockchain.info/tx/6dfb16dd580698242bcfd8e433d557ed8c642272a368894de27292a8844a4e75?show_adv=true.


Recommended Transaction Size I know the maximum transaction size for a BLOCK is 250,000 bytes. My question is a little different.

What is a recommended transaction size for best selection of the transaction by pools? For example say I have 500,000 bytes of transaction to send over the network. How should I chunk those transactions? 50,000 byte transactions? 10,000 byte transactions?

It's not about size, it's about fee. If you can have a high enough fee to make a massively sized transaction be incentived to miners, your good. See transaction priority for what I mean.


Lightning - a lost transaction I would like to understand if there is a way to loose a transaction received over the payment channel.

What is a mechanism for keeping track of all the transactions occurred in a channel?

Only the parties in the channel need to keep track of what transactions happened in the channel; they are not broadcast publicly. They keep track of this by using a database local to the wallet only.


What incentives do Crypto 2.0 systems provide for IOU Gateways? I am wondering what inventives do various Crypto 2.0 systems provide for IOU Gateways (ones that create currencies backed by other currencies or commodities, like USD, BTC or the like)?

Just to be clear, by "Gateway" I mean a business that takes currency external of the Crypto 2.0 system, issues IOUs in the system for that currency and is responsible for converting the IOUs back to that currency. For example, Bitstamp is a Gateway for USD and BTC in Ripple. By "IOU" I mean a token in the Crypto 2.0 system that can be created easily and is not native to the system (for example, USD and BTC in Ripple are IOUs, XRP is not. BTC is not an IOU in the Bitcoin network).

Universal

In most if not all Crypto 2.0 systems, a Gateway can:

Charge the users for IOU deposits
Charge the users for IOU withdrawals

Ripple

In Ripple, a Gateway can set a percentage fee for whenever their IOU is transferred from one user to another. Say, at 1% fee, to send someone $100, one needs to spend $101. The recipient receives $100, while the Gateway's liabilities decrease by $1, giving them that much in profit.

Ethereum

In Ethereum, a Gateway can create an arbitrary contract for how its currency will be used. This contract can include any fee for currency being transferred or exchanged, demurrage, or anything else that can be coded in a smart contract.


How do I get to the value in the 'scriptPubKey' part of the transaction ? How do I get to the value in the 'scriptPubKey' part of the transaction ?

The sender knows only the address (1A3XjcuZmcszX2tGoVn1TrMNchuHwdAxZV) so how did he get into 63339ebf4914d964fbc729b0dc4c1a44c4fb8f80 ?
I've tried ripemd160(sha256(address)) didn't work .
I've tried sha256(sha256(address)) didn't work.

Addresses are kept in Base58Check format. Here's how you decode it.

Decode the base58 encoding (similar to Base64). You should have 25 bytes.
Check that the 1st byte is 0x00 (the version byte of Bitcoin)
Check that the last 4 bytes are a correct checksum of the rest. This is done (in Python) by:

sha256(sha256(data[0:21]))[:4] == data[-4:]

(Or, "take the first 4 bytes of a double-SHA256 of the first 21 bytes of the decoded data, then compare to the last 4 bytes of the decoded data.")
Take the middle 20 bytes (data[1:21]) and insert it into the following scriptPubKey.

OP_DUP OP_HASH160 <x> OP_EQUALVERIFY OP_CHECKSIG

Here are some libraries that will do steps 1-3:

libbasse58 (C)
base58perl (Perl)
python-bitcoinlib (Python)
bitcoinj (Java)

byte[] hash160 = new Address(NetworkParameters.prodNet(),
    <addr>).getHash160();

coinstring.js (node.js)

require('coinstring').decode(<addr>)

Various examples on rosetta code


What are the main technical hurdles to implementing UTXO commitments? Commits of the UTXO set in the block header would enable more secure lightweight clients and caps on the number of blocks that need to be downloaded and validated in the Initial Blockchain Download, which is vitally important for Bitcoin's longevity and scalability, but I have been told UTXO commits are a very technically challenging change in Bitcoin's design.

What are main technical challenges in implementation of UTXO commitments, and what are the proposed solutions for them?

The main bottleneck of committing to a UTXO merkle root is that it's I/O and CPU heavy to create and verify. As of today the serialized UTXO set is around 1GB and it contains almost 34000000 entries and it keeps growing. This means that a naive implementation would have to hash at least that amount of data per block plus the intermediate nodes to construct a merkle tree. This is O(n) complexity and it is generally considered poor performance. It is possible to use caching optimizations but that would use more RAM.

One possible alternative are UTXO differences that each block introduces. It works by committing a merkle root with all the UTXOs that were spent in the current block and another root that lists all the added UTXOs. For an SPV client this could work as a fraud proof, where it is possible to show that a specific output was spent on a specific height (although it is already possible to show it using ordinary transactions).

So to sum up, a full UTXO merkle root commitments are really useful but cannot be used due to poor scaling.


Bitcoin for local network Is there are any way to use bitcoin or alternative crypto-currency in local network?
I have small home network without internet and have an idea to have a local currency to encourage the children.

You can set up a local Bitcoin testnet with the Bitcoin-Qt client and some relatively simple configuration. Note that you will need a miner to be processing transactions when the the testnet is in use. More information is available at: https://en.bitcoin.it/wiki/Testnet


Segwit address creation I'm unable to create a segwit address in Bitcoin Core 15.0.1 64-bit Windows
I have tried multiple times but keep getting the same error.  The following is the output from the console

$ getnewaddress
1KxN5zBSMqCiMfaXpbgpbDipo3fdrWmWnF
$ addwitnessaddress 1KxN5zBSMqCiMfaXpbgpbDipo3fdrWmWnF
Public key or redeemscript not known to wallet, or the key is uncompressed (code -4)

I have also tried changing my encryption password but it did not help.  I do not want to create a whole new wallet.  What else can I do?  Thanks

Your wallet is probably old enough that uncompressed public keys are used instead of compressed public keys. Segwit only works with compressed public keys so you cannot currently use segwit with your addresses.

However you can upgrade your wallet to using compressed keys. To do so, first start Bitcoin Core with the -upgradewallet option. That will upgrade your wallet to use compressed keys by default. Then you will need to call getnewaddress ~1000 times in order to get to addresses using compressed public keys keys. I don't believe that there is a way to regenerate the keypool without emptying it by requesting all of the addresses from the keypool.


Where can I get the export format for exchanges? I am trying to get the format that a large number of exchanges use to export their data.

So when a user clicks export my trades, there is usually a csv file which has a specific format to it.

I would like to get a large number of these formats, as they do vary depending on the exchange. Without signing up for each exchange.

The suggestion is to contact each exchange (technical support/development/API support?) directly (without signing up) to request a template. Hopefully, they will be happy to be of assistance once you explain why you need them.


How much internet traffic does a 3.5GH/sec pooled miner use? The question is clear I think. I used 3.5GH/s because that's what the upcoming ButterflyLabs Jalapeno will run. Assume it's mining for an average mining pool with 3.5GH/s (only bitcoins).

I'm interested in maintaining one on a spot where I can get electricity for free, but I have limited internet access.

The internet traffic for any miner is generally minimal and in most cases the miner speed is irrelevant. The Getwork protocol would at most make a small request every second, but with extensions such as rollntime, one can make the request less frequently. You can roughly see how much data is being sent from the examples provided here. Generally, you shouldn't worry about the internet speed or bandwidth.