text:
Is there a way to automatically send bitcoins from one wallet to another?
Say I have 2 wallets, an older non-encrypted one and a fresh new encrypted wallet with all new addresses. If I have an address in the older wallet that may receive some bitcoins in the future is there away to set it up so that these bitcoins will automatically be sent to an address in the new encrypted wallet. Or do I have to keep my old wallet for ever in case an address in it receives some bitcoins and then manually send them on to the new wallet.

Short answer, no you can not make it automatically forward.  You'd have to setup a script that checked the old wallet (bitcoind loaded with that wallet) for a balance and have it transfer to the new one after that.

If you import the private key into Mt. Gox, they will then monitor that address and sweep any payments received into your Mt. Gox exchange account balance.

Mt. Gox ..lol! @stephenGornick, did you lose any?

There is a tool to import/export addresses from one wallet to another called Pywallet. You can use it to export all address from your old wallet and import then into the new one, and then run bitcoin with -rescan option to update balance.
EDIT: Just went through the forum thread, it seems that Pywallet doesn't work yet with 0.4 encrypted wallet, so might have to wait a bit for the update.

PyWallet 1.2 supports AES encryption/decryption now (github).


text:
Where can I get a list of upcoming features for NXT? and whats on the way for 2014?
Where can I get a list of upcoming features for NXT coin? And what are some of the upcoming features for coming 2014.

On the NXT-Wiki you can find a list of planned features which are currently in development. Here some examples:

Voting System
Instant Transactions
Automated Transactions
Multisignature transactions
Shrinking (reduce size of Blockchain)

For a more detailed release plan, I guess you need to check the project sites of specific features.

@duckx, did that helped you?

somewhat.. what about the decentralized marketplace? that does what ebay/silk road/craigslist does?

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
On the upcoming potential Bitcoin fork on Aug 1, 2017. Bitcoin seems to be rising while every other coin is falling. Why?
With the upcoming bitcoin fork on Aug 1, 2017. Why would all other coins be falling while Bitcoin is rising? Wouldn't one want to sell bitcoin to hide their coins in like LTC to weather the storm?

Questions about current market values, and the reasons for them, have been considered off topic here - we can all take guesses, but there is not really any way to know the true motivations of buyers and sellers.

Several possible reasons come to mind:

People are actually confident that everything will go alright: this is the most unlikely scenario considering everything else is dumping which is the expected panic behavior.
Whales are keeping the price up until the deadline to draw people in: this is more likely I think. I still expect the price to drop considerably before the deadline.
People are selling their alts and moving to BTC massively to take advantage of the hard fork and get some Bitcoin Cash when it splits: I think this is also very likely and will explain the current behavior.

I personally contributed to the 3rd option.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
In the NXT register alias dialog pop up, what is the DEADLINE text field for?
What is the deadline text field for in NXT register alias?

The deadline field is the amount of time in minutes/blocks (1440, or one day being the default) for the transaction to complete. If it is not completed in that time period you receive a "refund" from the network and the alias will not be registered to you.
A common mistake is to set the deadline to 10, or an even lower number reducing the odds of your transaction going through.


text:
Unable to receive/preview funds due to un-synced wallet
I bought bitcoins and sent them to the wallet, however the wallet is not synchronized and as a result I cannot see my bitcoins.
Will I be able to see them as soon as the synchronization process finishes or have I lost them?
If I did, is there any way I can recover them?

You will be able to see them as soon as you synch the block that contains the payment.


text:
How to sign a transaction using BitcoinJ
I am having problem signing the transaction using BitcoinJ library without the Wallet instance, I only have the Transaction class instance and the ECKey in order to sign the transaction.
Is there a way to implement it ?

Good day. You shoud have list of unspent outputs, for adding them into inputs of your tx. Also you should generate private keys and use special privKey for every input you have.
Try it out:
TransactionOutPoint outPoint = new TransactionOutPoint(params, utxo.getIndex(), utxo.getHash());
byte[] privKeyBytes = HEX.decode(privKeyAsHex);
ECKey ecKey = ECKey.fromPrivate(privKeyBytes);

transaction.addSignedInput(outPoint, utxo.getScript(), ecKey, Transaction.SigHash.ALL, true);

Start by creating a Java project and adding the BitcoinJ library to your project's dependencies. You can download the BitcoinJ library from the official GitHub repository or use a build tool like Maven or Gradle to include it in your project

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Transaction too large error
I have over 1400 small transactions in my wallet that add up to a little over 0.2 BTC. I am trying to send them, but keep getting a transaction too large error. I have tried to set a custom transaction fee, but am unable to still send. I am using Bitcoin core v0.10 on Windows. I have looked at this thread but am still unable to find a solution.
How can I combine all the tiny amounts I've received to minimise transaction fees, and do I need to?

Does it say 'Transaction too large' or 'Transaction too large for fee policy?' They're different errors.

It says just says "Transaction too large"

Your scriptSig is too big! It is limited to 200 kbytes, and you've got 1400 inputs @ 0.2kbyte (best case scenario): 1400x 200 = 280kbyte.
Try using half the inputs (preferably newer inputs) to cut the scriptSig down in size.

Why newer inputs? Wouldn't older inputs have a higher priority?

@NickODell Yep, just "picking the better half" so to speak

@WizardOfOzzie The older ones are the better ones.

@PieterWuille I personally would try sweeping up the worse (newer) ones to hopefully comprise a fee-free Tx. I'm not disputing the priority being inversely proportional to age; it's more a difference in opinion of how to handle dust, but tbh, I'll defer to you  here!

Priority is proportional to age, not inversely. And every output spent has its own scriptSig in the txin, which is around 105 bytes total per output spent.

Thanks for your help. I have been able to send out various smaller sized amounts (0.0004 BTC). I looks like I will have to slowly transfer out the remaining balance in smaller transactions.

I had over 1600 Transactions and was getting "Transaction too large" message. I cut down the inputs to 600 transactions and was able to send without issue. Your answer above helped me resolve this.


text:
Is it time to move data storage (of things like music, images, virus definitions) out of the block chain?
This is a technical question and I don't have the answer. I would like someone to explain why this data is necessary.
If your answer is receipts or smart contracts, then my question is, "Why not put that in side chains?" I see two problems with this data being in the bitcoin block chain: First, it allows malicious data to be inserted. Second, it takes up more block chain space. Here is the cointelegraph article about music:
http://cointelegraph.com/news/114172/music-copyrights-stored-on-the-bitcoin-blockchain-rock-band-22hertz-leads-the-way
This question is a copy of my post here:
https://www.reddit.com/r/rBitcoin/comments/355pvr/time_to_move_data_storage_of_things_like_music/

It certainly isn't "necessary" for proper functioning of the Bitcoin currency, it's just something that people noticed they could do.  But there isn't any obvious way to stop it, short of a complete overhaul of the Bitcoin protocol.  There are lots of ways to insert small pieces of arbitrary data in a Bitcoin transaction (including even the addresses themselves).  So I don't know how we would go about "moving data storage out of the block chain" even if we wanted to.  We certainly can't do anything about the data that is already there.
The current standard way to achieve this is with the OP_RETURN opcode in a transaction script.  I understand the Bitcoin developers actually took steps to make this feature easier to use: not particularly because they wanted to encourage people adding data to the block chain (as you say it takes up space), but because OP_RETURN is less disruptive than some alternative methods (for one thing, it is limited to fairly small payloads).

More Information: Where are they inserting the virus definitions, images and so forth?  Is it just a hash of those?

@berrtus The data can be anything you want: it can be an image, or the hash of an image, or a recipe for chocolate chip cookies, or whatever.  Any arbitrary string of bytes.  Usually it is inserted as unused data in a transaction output script, but there are other ways as well.  A hash is a small amount of data and will fit in a single transaction.  If you have a lot of data (like an image) you will have to split it over many transactions, and pay a fee for each one, so it can get expensive, but is still possible.

A transaction can only store a very little amount of data, not enough for music or images. What can be stored is the hash of a music/image file, which is of predictable size, and in my opinion does not present an issue.

It is very commonly reported that they are storing images, viruses, and music, If it's just the hash that makes no sense at all.  I mean a hash does not contain the original data and you could not even recover such data from the hash.

@berrtus Can you provide links to these very common reports? The 22hertz article, for example, only talks about "encoding of the copyright" into the blockchain, not the song (and it gives no details about what "encoding a copyright" even means). IMO it looks mostly like a publicity stunt.

Not entirely true. The whitepaper is encoded in outputs as hex here

Here is a CoinTelegraph article: http://cointelegraph.com/news/113806/warning-kaspersky-alerts-users-of-malware-and-blockchain-abuse

I noticed I have two CoinTelegraph Articles no I don't work for them.


text:
What is the best way to monitor non-wallet addresses for new transactions
The main purpose is to have "payment done" confirmation as fast as possible, within  some seconds.
First option is to implement it myself. Now I have the following implementation based on querying Bitoin-qt from .NET API:
I receive all new transaction IDs using getrawmempool and then iterate through each of them to get details using getrawtransaction to find transactions with addresses I want to monitor.
2 years ago it used to work well, but now I see it performs slower and slower.
So, I think bitcoin-qt + .NET API is not the approach which can increase monitor time.
Another option is to use third-party services, like blockchain.info, which can be used in my (commercial) application.

Remember that zero-confirmation is dangerous and it does NOT mean "payment done". Checking transactions using your own node is better than using third parties, as you don't need to trust anyone. ( Using bitcoind running in the background instead of bitcoin-qt GUI might make more sense.) On the other hand, you might want to ALSO use third parties to try to make use of their multiple nodes located in different places around the world and hope that you can detect any double spends that way. But even then: zero-confirmation IS dangerous!

Yes be very carful with zero-confirmations. I'd recommend a third-party service for this, I've personally used both https://www.blockchainwebhooks.com/ and https://www.blockcypher.com/ - Blockcypher has more detail, but BlockchainWebHooks is much more affordable (although both have free plans)

You can use the importaddress functionality to make the Bitcoin Core wallet (bitcoind or bitcoin-qt) treat certain addresses as its own, even though it does not have the key for them.
This will make them appear in the outputs of RPCs like listtransactions, getreceivedbyaddress, listunspent and getbalance. It will also trigger notifications through -walletnotify and the recently added ZMQ mechanism.

I use block.io API to detect zero confirmation incoming transactions on Liberty  Music Store. block.io can monitor transactions for your own wallet or you can subscribe to arbitrary bitcoin addresses.
The trade off is between easy and fast confirmations - block.io has robust webhooks, distributed bitcoin nodes and easy API allowing detecting transactions faster than running a single node yourself. A single node is safer in the point of view you cannot trust third parties with your transactions. Furthermore running a full node is resource intensive as blockchain data is several gigabytes and mempool too.

I think that using Bitcoin Core importaddress may be good solution.
However if you don't want to sync whole blockchain you may use Electrum and it's JSONRPC interface: http://docs.electrum.org/en/latest/merchant.html#jsonrpc-interface


text:
What is the maximum number of output addresses I can send to with one bitcoin transaction?
I'm looking to make a faucet website, but was wondering what is the maximum number of output addresses one can send to with one bitcoin transaction?

https://bitcointalk.org/index.php?topic=248247.0

Today the modern Bitcoin-qt client does not relay transactions with more than 200 outputs. But this is not protocol restriction. You can create transactions up to 100k size, which gives you 2500-3000 outputs (try to count the exact number yourself).
For example, tx https://blockchain.info/tx/0313e6552a5337de92c475c0dbbb0e351a1525b0f202beb9d4c75b3a5b114bf3 has 2501 outputs and was successfuly mined 3 days ago

Remember that the receivers won't be able to do anything economically with a few satoshi. No point in sending dust to people.

You add to size of the transaction as you add more addresses, and eventually increase transaction fee.
If you don't add a minimum transaction fee, and your coins do not have enough confirmations then your transactions would be delayed for a day or more.


text:
i lost access to my bitcoin
I did not have any idea about bitcoin but I wanted to get in, I met this guy who knew about it on facebook asked him if he could help. he sent me the link on blockchain to signup showed me how to buy coin from a merchant, I did as he said. everything was on going, later told me to give him my id and password so he can connect to a miner i asked y he said to make it possible to profit. so i did, which was my biggest mistake but i did not know then. my blockchain was growing close to $10000 trying to withdraw was the only problem. there was always a privatekey for to go ahead but i never got it. when ever i ask him he tills me to invest more to be able to withdraw. i woke up one day and all my profit was gone also when i gain profit it shows on my phone but doesn't appear on my portfolio i knew it was my id and password i gave this guy cause me damage. he doesn't reply my messages any more.
I know i cant get the coins back if any of u can help me redeem my account to show the profit i continue to get . all my profit was $27,830 but i never got a $ out of it.....some address are also on watch with profit close to $800 i just need support so i can support my mum. am out of collage cant get on rent even meal a day i will be grateful with any help.....somethings i feel like doing something to myself all depress everyday coz i have no one to talk to.....i just need a normal life .....will be grateful for help out...thank you.
please do not go no with this guy on facebook and anywhere for help name {DESCOMM OSAS he's a nigerian but says he live in California}, he's heartless

Possible duplicate of Bitcoin Mining as a Newbie (link wallet to another person's miner)

I'm sorry to say that you were scammed. Do not ever give someone your wallet identifier, password, private keys, seed phrase, etc!

later told me to give him my id and password so he can connect to a miner i asked y he said to make it possible to profit

This is not how mining works at all. The scammer enticed you with 'profits', but in reality there were no mining profits. The scammer simply wanted you to think there was, in an effort to get more btc out of you.
What likely happened: When the scammer logged into your wallet, they made a copy of your wallet's seed phrase. With that phrase alone they can re-create your wallet on any other device, and they will have full access to your bitcoin. Your password protects the login to blockchain.info, but if you use the seed phrase to re-create the wallet on another device using different software, the password will not be required.
The second thing the attacker did was add a 'watch-only' bitcoin address to your wallet. Your wallet shows you the balance of that bitcoin address, but your wallet does not have the private key for that address, and thus cannot spend the bitcoin located there.
Once that is set up, the scammer will send some bitcoin to the watch-only address, and tell you it is 'mining profits'. This is a lie, while you thought you were generating profits, the real story is the scammer was just slowly adding bitcoin to that address, while telling you to deposit more btc to your wallet. Once you deposited more bitcoin, the attacker could use the seed phrase to recreate your wallet, and steal your bitcoin.
Sorry for your losses :(
At this point, abandon that wallet, do not ever use it to store bitcoin again. Create a new wallet, and be sure to guard it carefully.

This bad experience teaches you not to give private key to anyone. From wallet we can buy or send only. There is no other minor or bloockchain related settings. Be alert from next time.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How is Bitcoin governed by mathematics?
I keep hearing talks from Bitcoin evangelists that claim Bitcoin isn't governed by any central authority, rather it's governed by mathematics.
What exactly do they mean when they say "governed by mathematics"?
That the network is secure by means of math instead of some central authority (e.g. a bank overseeing everything)? If so, what math?  The math that makes PoW possible?

This question may be opinion based in some ways, but I'm going to attempt to answer it as it is an important concept, and somewhat unlike traditional systems.
Bitcoin is governed by math, in some places. At the end of the day, it's software, and even the math rules can be updated to use different rules, or removed altogether by means of a soft or hard fork (depending on how drastic the change is).
As for the math, there are primarily three sections where it is in play.
The first is mining - the hash function is used to calculate a value, which is compared against the mining target.
The second is signatures - elliptic curve signatures are used to enforce utxo ownership (for standard outputs anyways).
The third is the block reward - The Bitcoin block reward halves every 210,000 blocks, lea
That said, none of these are particularly math-y. As with any computer program, math is used to enforce certain functionality.
It may be more appropriate to say that Bitcoin is governed by code - The code is ultimately what decides things such as block reward halving, signature technicalities, and mining process. As the abundance of altcoins shows, there are many permutations and combinations on all of these parameters that still result in valid and functional networks. Even Bitcoin has gone through a series of network upgrades that have altered some of these rules, such as moving from an infinite supply to a fixed supply.
As chytrik mentioned in the comments, the infinite supply fix was actually a bug fix (the infinite supply was a side effect of C++ behaviour, and would not have occurred for equivalent code in many other languages).
Bitcoin can indeed be looked at as a model of social governance governing the code, and the code governing the network.

Probably worth clarifying: the infinite supply was a bug, not the original intended behaviour. I think that in the context of this topic, it is worth making a distinction between "a fork for a bug fix" and "a fork that represents a change in social consensus". The crux of the question does sorta come down to "governance by code vs by social consensus", after all.

@chytrik Good point, I've clarified in an edit, thanks

+1 for the nearly philosophic closing: "Bitcoin can indeed be looked at as a model of social governance governing the code, and the code governing the network." ;-)

...and even more important to point out and correct that Bitcoin is governed by code!

That the network is secure by means of math instead of some central
  authority (e.g. a bank overseeing everything)? If so, what math? The
  math that makes PoW possible?

The math that makes proof of work possible is a one-way function, specifically the SHA256 algorithm. This combined with public key cryptography secures the ownership of digital assets in a distributed network in a way that makes Bitcoin truly an innovation. @Raghav Sood is right, it isn't the mathematics that's innovative it's the application of the mathematics.
Proof of Work
Proof of work secures the blockchain by making it difficult to compute a solution that satisfies the network requirements for a valid block of transactions, but that is easy for other nodes to verify. This is the property of a one-way function, see what is proof of work.
Cryptography
In order to spend bitcoin, you have to prove that it was sent to you by signing with your private key. Only the private key can sign a bitcoin transaction that was sent to your public address. This is standard public key cryptography, though bitcoin specifically uses the secp256k1 elliptic curve.

Bitcoin consists of several basic elements, the first of which is a hash-function. Hash-function - is a mathematical transformation. But I can be mistaken. Pls, correct me if I’m wrong.


text:
Legal issues / banking issues selling Bitcoins to people OTC?
I'm wondering what the practical / legal limits are on selling Bitcoin as an individual using Craigslist and LocalBitcoins. Will I run into legal issues / frozen bank accounts as I scale this? Right now I'm doing about $1K of selling per month, but I could see that expanding to $1K - $3K per week.
I take all the payments in cash, so this will be 1-3K per week in cash going into my credit union ATM.

Thanks for the feedback I've updated my question title to reflect my concerns

Note: This is a US-centric answer. Other countries may differ. I'll add other countries as people leave comments.

There is an arbitrary limit of $1,000 per person per day that triggers the necessity to register as a money service business. Stay under that FinCEN is unlikely to care about you, although you still may legally need to register for smaller transactions.
As long as a single transaction does not exceed $10,000, your financial institution should not file a Suspicious Activity Report.
You are best opening an account at an institution separate from your personal, general use accounts.
Try to keep cash liquid. Buy local, sell local. If you've got enough volume, use money orders to get fiat into your exchange of choice. It'll cut into your profits a little, but it reduces the number of parties privy to your transactions. Do not fraudulently fill out money orders.
Keep solid books that include the fiat price at the time you purchased your bitcoin and the price of sale. This will help you calculate capital gains taxes.
Pay taxes. Assuming you're in the US, this means paying taxes quarterly instead of yearly, unless you expect to owe less than $1,000.
If you do register with FinCEN, please document the process and broadcast here, on BitcoinTalk, and on /r/bitcoin.
Be truthful, upfront, and, most of all, careful. When in doubt, talk to a lawyer.

Are you aware of the workings of other major countries like England etc?

@Pacerier: I am not, but the basics not involving the government are likely similar. It's safe to assume that every country has some kind of financial crimes watchdog like FinCEN.

You should clarify who your answer applies to.  It seems very specific to the United States.

Sorry, I perhaps erroneously assumed that FinCEN was more well-known than it is.

You should clarify your particular experience/expertise/qualification(s) in the field(s) that you answer applies to.


text:
How to get Bitmain U3 running on Linux?
How do I get the Bitmain U3 running on Linux?
I'm using Ubuntu Server 11.
I have downloaded the bitmain branch of cgminer and compiled it to using CFLAGS="-O2 -Wall -march=native" ./configure --enable-bmsc
I have also downlaoded the official 4.9.0 and used CFLAGS="-O2 -Wall -march=native" ./configure --enable-icarus` as described in the text for U3
I do a lsusb and it shows this:

cgminer just does this

Is there anything that I missed? I read that its supposed to pick up the U3 automatically with default settings, then I can over clock it a bit to get the 63ghs stable.

The original USB cable supplied was faulty?? After I plugged it into another USB port just above it started to kick in but went ZOMBIE after a few seconds with USB Communication error??
I took another USB cable from my old 10xErupter Mega hub. Plugged it direct into the motherboard USB slot and U3 (also shorter cable).  cgminer started to do all kinds of weird settings until it settled down on AU3.
Using the official git, I compiled cgminer (This also works for Raspberry Pi)
CFLAGS="-O2 -Wall -march=native" ./configure --enable-icarus

NOTE: Since version 4.9.0 you should not need to use any au3 switches
After that I set cgminer to --au3-freq 238 --au3-volt 780 Allot of people say that when you go higher than 780 with the stock 6A power supply it melts in about 10 hours.
So when I get round to using my computer PSU I will clock these at 250/800 as recomended for best speed stability.


text:
Mining software and miners verifications and how accept transactions
I'm looking how the mining software works and how miners can verify the transactions and how they can accept transactions or not, and I have some questions:
What software use miners to accept transactions when they find a block, their mining software or the Bitcoin client software?
I'm searching information about Bitcoin and I don't know how miners can verify transactions, but I read here that miners that find a block can accept the transdactions that they want, but if they are "bad" or "malicious" miners, they can accept invalid transactions (double spending transactions). When this "bad" or "malicious" miner accepts the transaction this validation is broadcasted over the network to be confirmated?
Sorry for my english. If someone don't understand something of you need to explain more some questions, please reply me.
Thanks

There are many approaches to mining.
The leading approach nowadays is to use Getblocktemplate.  The wiki page for that includes a relatively easy to understand example.
There is an implementation in Python called python-blkmaker.

Thank you Stephen for your answer.
But I need to know hoy miner accepts transactions practically, because if you are mining in a pool, is the pool that chooses what transactions accept and what no, but if you are a solo miner and you find a block I don't know if you need the API or what is necessary.
I haven't so much knowledge in programming languages and it's complicated for me to understand all of that.


text:
Electrumx protocol
The description states:
A script hash is the hash of the binary bytes of the locking script (ScriptPubKey), expressed as a hexadecimal string. The hash function to use is given by the “hash_function” member of server.features() (currently sha256() only). Like for block and transaction hashes, when converting the big-endian binary hash to a hexadecimal string the least-significant byte appears first, and the most-significant byte last.

For example, the legacy Bitcoin address from the genesis block:

1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
has P2PKH script:

76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac
with SHA256 hash:

6191c3b590bfcfa0475e877c302da1e323497acf3b42c08d8fa28e364edf018b
which is sent to the server reversed as:

8b01df4e368ea28f8dc0423bcf7a4923e3a12d307c875e47a0cfbf90b5c39161
By subscribing to this hash you can find P2PKH payments to that address.

Can anybody explain what these numbers are:
6191c3b590bfcfa0475e877c302da1e323497acf3b42c08d8fa28e364edf018b
8b01df4e368ea28f8dc0423bcf7a4923e3a12d307c875e47a0cfbf90b5c39161
and how to get them?

Using the bx command line tool,
the Satoshi address:
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
looks like this decoded (using bx)
$ bx base58-decode 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa

outputs:
0062e907b15cbf27d5425399ebf6f0fb50ebb88f18c29b7d93

The first 2 digits (00) is the version number, the last 8 digits (c29b7d93) is the checksum. Leaving 62e907b15cbf27d5425399ebf6f0fb50ebb88f18 as your payload (pubkey in this instance).
Now if I were to make a basic P2PKH locking script with the above pubkey it would look like this:
dup hash160 [62e907b15cbf27d5425399ebf6f0fb50ebb88f18] equalverify checksig

and now encode it in base16:
bx script-encode "dup hash160 [62e907b15cbf27d5425399ebf6f0fb50ebb88f18] equalverify checksig"

result:
76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac

sha256 this:
bx sha256 76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac

result is your number:
6191c3b590bfcfa0475e877c302da1e323497acf3b42c08d8fa28e364edf018b

The second number,
8b01df4e368ea28f8dc0423bcf7a4923e3a12d307c875e47a0cfbf90b5c39161

is serialized in the little-endian (least-significant-byte-first) order. As stated in the link:

When transactions are transmitted over the network or exchanged between applications, they are serialized. Serialization is the process of converting the internal representation of a data structure into a format that can be transmitted one byte at a time, also known as a byte stream. Serialization is most commonly used for encoding data structures for transmission over a network or for storage in a file.

so they're the same number, except byte by byte backwards (I exploded the last 3 bytes of the first to make it apparent).
6191c3b590bfcfa0475e877c302da1e323497acf3b42c08d8fa28e364e df 01 8b
8b 01 df ...

Thanks a lot!!!
One more question: we derived this number :
76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac
from P2PKH:
62e907b15cbf27d5425399ebf6f0fb50ebb88f18
by adding a prefix 76a914 and suffix 88ac.
What are these prefix and suffix? Do they depend on currency or something else?

It's not derived from 62e9.. but its making a locking script using that pubkey, then encoding it. So you're seeing the base16 encoding of the script language. For example, bx script-encode "[62e907b15cbf27d5425399ebf6f0fb50ebb88f18]" yields the hash 1462e907b15cbf27d5425399ebf6f0fb50ebb88f18 (14...) and bx script-encode "dup hash160 equalverify checksig" yields 76a988ac. The pubkey is already base16, of course. So there are your numbers.


text:
Open Source Hardware For Air Gapped Computer?
I'm looking for vetted open source computer hardware that can run Armory air gapped.
Anyone know of such vetted hardware sources?

"Vetted" by whom, and to what standards?

An independent & trusted 3rd party, with a proven track record of exposing security flaws.

But to what standard? Do you care about, for example, TEMPEST attacks?

Yes of course.  I want the hardware to be vetted against all known NSA level attacks.


text:
What are the parts of a Bitcoin Transaction "Input" script?
All the terminologies I find seem rather confusing about what explains what and they usually miss a few steps.
Example: Transaction 82d62d5f4e69ae8338c39b7ae2e1d33db59bdf62c869ded7344adc936bab8653
Found at https://blockchain.info/tx/82d62d5f4e69ae8338c39b7ae2e1d33db59bdf62c869ded7344adc936bab8653
Shows an "Input Script" of:
3045022100d52330113ccd033ccb1aaa3b759e9696c216e802922e5f1902cd5ada69c612e5022057880205319dccb05eebbe34323a852ee82653f09f81253ddccd08a810e9d42d01
03e5b9f0bb669b289efb8d2826487a24ef5f3985624c8bc3a3e34f6bd54e080b27
So, what parts of that are what, and how can I tell which parts are what in this transaction's "input script" as well as others?

3045022100d52330113ccd033ccb1aaa3b759e9696c216e802922e5f1902cd5ada69c612e5022057880205319dccb05eebbe34323a852ee82653f09f81253ddccd08a810e9d42d01

Is a DER encoded ECDSA signature. I'll break it down:

30

indicates that a compound structure follows (ECDSA signatures are treated as a compound of 2 integers, r and s)

45

is the total length of the compound structure (excluding the 2 header bytes, 30 45), 69.

02

the start of the contents of the compound structure, 02 indicates an integer (the signature's r value)

21

of 33 bytes

00d52330113ccd033ccb1aaa3b759e9696c216e802922e5f1902cd5ada69c612e5

the integer's value encoded in 33 big-endian bytes. The first byte is zero, as without it, it would be interpreted as a negative number (see 2's complement notation).

02

another integer follows (s)

20

of 32 bytes

57880205319dccb05eebbe34323a852ee82653f09f81253ddccd08a810e9d42d

the 32 bytes encoding the s value

01

this is a sighash byte appended by Bitcoin, and is not technically part of the ECDSA signature. As such, it's not counted as part of the length 69 (byte 45) at the start. It indicates what fields of the transaction are signed. 01 means "all".

That was fantastic!  Just one last part; are are these values always the same number of hex characters?  IE: are the "02"'s that indicate an integer always represented in the input scripts in bitcoin transactions by a two digit number?  Can I basically look at other Bitcoin input scrypts for transactions and just count the number of hex numbers/letters to determine which part is which?  The r and s values in this example appear to be 64 hex characters each is that always the case?

Yes, only the length bytes may differ slightly.

What is the "length bytes" compared to the actual number of hex characters?

+1 on both your answers for a very clear and detailed explanation :)

The 45, 21, and 20 are length descriptors.

the signature: 483045022100d52330113ccd033ccb1aaa3b759e9696c216e802922e5f1902cd5ada69c612e5022057880205319dccb05eebbe34323a852ee82653f09f81253ddccd08a810e9d42d01
and it's decomposition:
  ##################################################################
  ### tcls_in_sig_script.sh: decode SIG_script OPCODES from a TX ###
  ##################################################################
    48: OP_DATA_0x48:     push hex 48 (decimal 72) bytes as data
    30: OP_SEQUENCE_0x30: type tag indicating SEQUENCE, begin sigscript
    45: OP_LENGTH_0x45:   length of R + S
    02: OP_INT_0x02:      type tag indicating INTEGER
    21: OP_LENGTH_0x21:   this is SIG R
        00D52330113CCD03:3CCB1AAA3B759E96
        96C216E802922E5F:1902CD5ADA69C612
        E5
    02: OP_INT_0x02:      type tag indicating INTEGER
    20: OP_LENGTH_0x20:   this is SIG S
        57880205319DCCB0:5EEBBE34323A852E
        E82653F09F81253D:DCCD08A810E9D42D
    01: OP_SIGHASHALL:    this terminates the ECDSA signature (ASN1-DER structure)

3045022100d52330113ccd033ccb1aaa3b759e9696c216e802922e5f1902cd5ada69c612e5022057880205319dccb05eebbe34323a852ee82653f09f81253ddccd08a810e9d42d01

is an ECDSA signature with the sender's key.

03e5b9f0bb669b289efb8d2826487a24ef5f3985624c8bc3a3e34f6bd54e080b27

is the sender's public key (whose hash is stored in the address the coins were previously sent to).
However, in order to interpret these, you need to look at the output being spent, which is:

OP_DUP OP_HASH160 6ffdc2e9e69434a7832208db5a6148c67563e8ae OP_EQUALVERIFY OP_CHECKSIG

Which is a script that takes as input a public key and a signature, checks whether the hash of the public key is 6ffdc2e9e69434a7832208db5a6148c67563e8ae, and then verifies the signature against that public key.
In general, in order to know what is what in a scriptSig, you need to look at the output being spent. The output gives the conditions under which it can be spent (in the form of a script), and the input just contains the "variables" passed into the output's verification routine.

Thank you, that does help some, but aren't like the first certain number of numbers referencing something in particular, and then there are like 2-3 other parts within that? That's what I'm curious about in this question.  You said the input just contains "variables", which parts of it are the variables and what variables are they?

I'll add another answer for that.


text:
Someone stole my bitcoin. Help?
I have been a victim of a phishing attack today, and the perpetrator stole my bitcoin hosted at coinbase.com. I have an IP address that the attacker used. Is there anything I can do? Any info would be helpful.

In the future it would be a safer idea to set up an offline cold wallet. This prevents most attacks.

Yeah, that was what I learned from this experience. I actually only gained access too my bitcoin a day or two ago and hadn't gotten around to it (stupid, I realize). Thank you, though!

Does Coinbase show that your balance is 0 and a transfer out was done, e.g. "You sent bitcoin to an external account"? If Coinbase still shows your correct balance, then all that happened was that they moved money around.

Please explain how you got phished so that others are aware of the strategies people are using and can protect themselves. Did you click a link that brought you to a coinbase.com look a like website where you entered your password?

I clicked a link in an email that said "review user agreement." I then believe that I entered my username and password into a coinbase-like website, which was in retrospect not coinbase. However, it was so coinbase-like that I was fooled.

Then the perpetrators were somehow able to add their adroid device and transfer the bitcoin within minutes. I don't know why they were able to get into my authy account, which has a different username and password. In any case, they were. Or coinbase did not properly require 2-factor authentication. They also did not wait even two minutes to transfer the bitcoin, which I find frustrating, because I noticed this within minutes, and the coin was already gone. I'm not sure exactly what happened, though, because coinbase is not responding to me.

in your two factor settings there is a limit to what transactions require twofactor.  maybe it was set higher than what was stolen?

No, it was not. It was set to $100 (the default) and they transferred one coin at the current value, which was around $575.

Looks like they implemented new device confirmation today. Cold comfort to me now.


text:
Balance doesn't show up after import in multibit

I'm trying to import a private key that I exported from Blockchain, I import it, the right public key is created, but no transactions show up or balance?
I've imported a bunch of private keys. and this is the first time I've run into something like this.
Could it be the date? The key is exported in the right Bitcoin-QT format. What could it be?
How can I enable 0 confirmation spending? I want to use it between addresses that I use so I don't need to worry about double spending; I really don't want to alter the source code and all that.

What version of Multibit and on what platform ie OS?
There were issues with importing Blockchain wallets (a Reddit or BCT thread detailed lost BTC from a supposed lost imported Blockchain private key) so I believe recent Multibit versions have had Blockchain wallet imports disabled.
A couple threads to check:

http://www.reddit.com/r/Bitcoin/comments/1rop3t/bitcoins_showing_up_on_blockchain_but_not_in/
http://www.reddit.com/r/Bitcoin/comments/26fymy/multibit_has_removed_imports_from_blockchaininfo/

There's nothing stopping you from using Blockchain's export unencrypted keys in either base58 or Bitcoin-QT formats and pasting the private keys for import (PRIVKEY will either be 5H,5J,5K or K,L)


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

Can you explain in more detail what you have in mind?

Sure. The loyalty program  monitors the Bitcoin network by watching for payments to pre-configured Bitcoin wallet addresses. When payments to these addresses are detected members are awarded points based on the transaction amount. Just like you earn points when using master /visa cards or other loyalty cards.

So... people would get money back for spending with specific merchants? Who would decide which merchants were part of this program?

The difficulty with such a scheme would be identifying the customer.
Certainly, the loyalty program operator can monitor incoming transactions to addresses registered by participating merchants.  But the public blockchain shows only the address from which the payment was made.  The question is how to use that address to identify the customer who should be given points.
If the customer made all their payments from a single address, they could simply register this address with the loyalty program in advance.  However, most wallet clients don't work that way; users hold their coins in many different addresses, and new addresses are created (for change) every time another transaction is made.  (The thought is that this makes it harder to tell who a given address actually belongs to, and improves anonymity.)
So a customer would either have to register a large and constantly changing set of addresses (awkward) or would have to take steps to ensure that payments to the merchant were always made from one particular address that they had registered (not easy to do in most clients, and might require extra transactions and fees to move the coins to the proper address before making a payment).
There is a similar issue in that merchants should also want to use a large number of different addresses for incoming payments.  If all incoming payments go to the same address, it makes it easy for a competitor to see how much business they are doing.  Also, for safety they may not want to hold all their coins in a single address, so if all incoming payments go to a single address, they would need to make extra transactions later to spread them across other address.  So ideally, each customer makes their payment to a unique address.  Thus, it's not as easy as having each merchant register a single payment address.  They would probably want to pre-generate a large number of addresses and register all of them.

Please check > coinkite.com/faq/security . I think it is possible in this case ? Also note their comment about trusting them."The founders of Coinkite understand the inherent risk in trusting a third party with the private keys for your bitcoins. We feel by using BIP32 HD keys in this way, we can help to address those concerns should the business disappear"


text:
PHP Coinbase Callback POST
I've a problem with the callback.
The post data is not right, because the users cents is not update.
My Code:
    public function bitcoin($secret) {
        if($secret == App::Config(ROW_CONFIG_COINBASE_SC)) {
            if($_POST) {
                $total = User::Get($_POST["custom"], FIELD_USERS_CENT) + $_POST["total_native"];
                User::Set($_POST["custom"], FIELD_USERS_CENT, $total);
            }
        } else {
            die("error");
        }
    }

the post data:
{
    "order {
        "total_btc":{"cents":269800,"currency_iso":"BTC"},
        "total_native":{"cents":100,"currency_iso":"EUR"},
        "total_payout":{"cents":0,"currency_iso":"USD"},
    }
}

You're not accessing the post data correctly.
$data = json_decode(file_get_contents("php://input"))['order'];
$total = User::Get($data['custom'], FIELD_USERS_CENT) + $data['total_native']['cents'];
User::Set($data['custom'], FIELD_USERS_CENT, $total);

See also.


text:
Practical interpersonal address exchange
How can addresses be exchanged practically & efficiently between two users?
Visually copying & keying them is impractical & faulty.

It would be neat to write a little program to encode them as English sentences or something.

Very true! Manually copying a 34 character address is no fun.
You have three major options:

QR code. Print it out in advance.
Create a FirstBits address.
Bring your phone, and load a client that supports NFC.

By the way, if you enter someone's address wrong, the Bitcoins won't send - Bitcoin addresses have a checksum built in.

Concerning the checksum feature of addresses also see What happens if I mistype the address when making a payment?.

Yes, QR codes with an integrated camera capture are sufficiently convenient.  Thank you


text:
Is mining an antieconomical process?
I will (probably) oversimply things, but I see it like that:

Gold linked currencies: someone stores in vaults the value of the circulating money (1) and that "real wealth" is safe to be eventually put again on the market and used for something useful (build microchips, drugs, or something else)
Fiat-currency: someone "prints" money for free (or almost).
Bitcoin: issuing currency costs as much electricity and equipment as the value of the issued BTC (2). Those resources are lost forever.

(1) or a fraction of it
(2) it is an approximation, since the cost of issuing BTC can be more or less than the value of issued coins, but it will not be far from it. If it is very profitable more people will mine, making difficulty increase, if it is hardly or not profitable people will stop mining making difficulty decrease.
Is it correct? Does it mean that bitcoin has burnt some billions of dollar worth of resources?
Did someone address this economical and ethical problem?

possible duplicate of Is there a way to set up proof-of-work systems so it would be even more useful?

I like the part <<someone "prints" money for free>>

Related question: http://bitcoin.stackexchange.com/questions/592/will-the-amount-of-electricity-used-for-mining-be-huge-if-bitcoin-is-widely-adop

Actually, there are costs to issuing cash: Resources such as ink, paper, and metal have to be procured, shipped, and processed/minted. Machines have to be build to create the cash. The coins and bills have to be shipped to banks, have to be counted, and checked for validity. Shop-owners have to drive to banks in order to deposit their earnings and to acquire change. Most people have to frequent banks in order to keep a sufficient supply of cash. Cash has to be replaced regularly in order to keep up with advances in counterfeiting. Claiming all of the above to be "almost free" is droll.

Related question: http://bitcoin.stackexchange.com/questions/13890/will-the-energy-cost-and-deflationary-nature-of-bitcoins-doom-the-currency-to-ob

Is it correct? Does it mean that bitcoin has burnt some billions of dollar worth of resources?

Yes, though I don't think the amount is in the billions yet. Likely hundreds of millions of dollars have gone into electricity and ASICs just to keep the Bitcoin network secure.

Did someone address this economical and ethical problem?

Bitcoins are currently worth about $300 each. The average issue cost of a Bitcoin currently in circulation is much less than this. Over time, the block reward decreases. So if Bitcoin is successful over the long term, the issue cost of the average Bitcoin will likely be a small fraction of its value.
Let's not forget that Bitcoin creates value by providing for easy, quick payments around the world. Each Bitcoin can provide this value any number of times and only has to be issued once.

So first of all, 'anti-economical' is not a proper word and doesn't have a clear definition.
But I'll try to answer the question:
1) It is true that in a perfect market for mining, the cost of mining should be equal to the mining revenues generated. But think of it: For most of bitcoin's history they weren't worth very much so even if at the time people spent as much on mining as the bitcoins were worth this would have been a small amount. Most of the current value of bitcoins came through the price increase. Overall, this means that only a fraction of the value of bitcoin's were actually spent on mining.
2) I think it's wrong to say that those resources were 'lost forever' as they served to verify transactions and maintain the bitcoin network. This is an extremely valuable service. It would be more adequate to compare the costs of mining to the costs of maintaining the bank's payment processing infrastructure. So it only makes sense to say "resources spent on mining are lost forever" if you applied the same to a significant portion of bank's expenses.
3) In the medium to long-term miners will make most and then all of their revenues not from mining new coins but from transaction fees. So we would expect that the total cost of mining will end up being equal to the transaction fees. This means that transaction fees or how much people value making bitcoin transactions will drive miner's revenues and thus how much they invest in mining hardware and electricity which in turn will drive the difficulty. That seems like a pretty efficient system to me.

Does it mean that bitcoin has burnt some billions of dollar worth of resources?

Because gold is sitting in a vault, does that mean that some billions of dollars worth of resources were not spent to get it there? The gold may have been reformed a hundred times and been involved in dozens of wars. Any form of money should be worthy of costs to obtain it. That which is given without cost is a trick to extract a cost later. It is not unethical to have or want, but to take which has not been earned by just means.


text:
How many users did Mt.Gox have?
The amount of lost Bitcoin is well-known, but is it reported anywhere how many user accounts Mt. Gox had before its downfall?

The leaked database dumps (from when MtGox was hacked after they closed down) shows 189374 records as a result for this query:
mysql> SELECT * FROM platform.User_Wallet WHERE platform.User_Wallet.Balance != 0 ORDER BY platform.User_Wallet.Balance DESC;

Notes:

That's only non-zero balances
There are many currencies (BTC, USD, JPY, PLN, AUD, GBP, ...) in there, each counting as a seperate "wallet"
We don't know how many fake accounts there are (created by MtGox themselves).
The hackers that released these documents may have messed with them.
There are for example 8467 records that have Balance "1" (Satoshi or other currency). Likely remainders of incomplete withdrawals and such. There will be many many more that have up to a couple million Satoshis (which is still just dust).

Therefore, in short, this may NOT be a good approximate answer to your exact question.


text:
How to track Segregated Witness adoption rates
How can I find out what the current Segregated witness adoption rate is, so as to see how it is progressing towards the 95% readiness required for it to activate.

There is nothing to track until 0.12.2 is released. Once that happens the process is described here:
https://bitcoinmagazine.com/articles/the-segregated-witness-timeline-from-idea-to-adoption-in-six-steps-1461255570
"First, miners (or pools) running Bitcoin Core 0.12.2 (and Bitcoin implementations that merged similar code), automatically start signalling they are ready to mine Segregated Witness transactions. This happens through version bits they include in blocks they do mine that indicate what types of transactions and blocks they can mine.
Once miners representing 95 percent of hash power (1,916 blocks) within a single difficulty period (2,016 blocks/about two weeks) include the right version bit, the soft fork is locked in."
Block explorers will make it easy to track the progress after 0.12.2 is released

I found https://coin.dance/blocks#blockHistory which shows segwit support at 8%, how can that be if 0.12.2 is not released?

@trampster that is basically a flag to signal (unofficial) support but not the type of official support required to trigger the fork.

Can you include a link to a block explorer that tracks the type of support required to trigger the fork.

Bitcoin Core has a segwit adoption page that should help you track it: https://bitcoincore.org/en/segwit_adoption/

Now that segwit is active, there are a couple of sites that can give you info on how many segwit transactions are now appearing in blocks. Best one I've found is:
http://segwit.5gbfree.com/countsegwit
Another is: https://oxt.me/charts

See also http://segwit.party/charts/#

@DanielHimmelstein That's the one I go to all the time now! Good call!


text:
Spending unconfirmed output from a change address
Consider a custom program which will occasionally need to send out bitcoin to users to whom I owe money.
Let's say I have 100 unspent BTC at address ADDR_A.
UserX demands payment of 1 BTC to ADDR_X. I honor the request, spending my 100 BTC from ADDR_A, directing 1 BTC to ADDR_X and 99 to ADDR_CHANGE_A. (Let's ignore the impact of transaction fees in this contrived example.) The raw transaction is submitted via a public Bitcoin API like Insight.
Five seconds later UserY demands payment of 1 BTC to ADDR_Y. I want to use ADDR_CHANGE_A as an input to facilitate the transaction.
Question: Can I use my newly created ADDR_CHANGE_A address as an input given that the original change output that targeted ADDR_CHANGE_A has not yet confirmed? Other material on this site indicates that the transaction should work but I'd like to understand WHY it works. Assuming that the public Bitcoin API receives my transaction that uses ADDR_CHANGE_A as an input, but has no knowledge that ADDR_CHANGE_A was used as an output in a prior transaction which took place only seconds earlier, wouldn't it balk at my attempt to spend from ADDR_CHANGE_A?

WHY it works is actually quite simple: it's all just transactions linked together. Whether they end up in the same block or not doesn't matter. The reason why it's actually highly problematic is much more complicated. Bitcoin (the stackexchange user) explains that very well below.

Thanks. I'll follow his advice. Glad I asked this question early on before writing too much code.

You are technically able to do this but it is strongly not recommended. A transaction can spend the output of another transaction so long as the parent transaction is known by the node in question, however this is quite fragile.
Bitcoin transactions back reference by TXID, a cryptographic hash of the previous one being spent. Due to a property known as transaction malleability it is currently possible for this TXID to change spontaneously when it it broadcast through the network, due to some nodes running custom code which mutates transactions in specific ways. If you build a long chain of unconfirmed transactions and one early on is mutated, all subsequent transactions can suddenly appear to spend outputs which don't exist anymore and are effectively invalidated. It's difficult to produce safe software which can handle this situation with this as there's a lot of edge cases that need dealing with.
If you need to make a number of payments to many parties in a short period, many large providers will split their outputs up ahead of time to avoid ever needing to spend unconfirmed change. When they receive a 100 BTC output they might break it into four 25 BTC chunks paying themselves, which will allow them to pay four people when required without needing to ever attempt to spend unconfirmed change. Some delicate balancing is required here, if you have too many outputs in your wallet the fees increase dramatically and the software will become slow.

Thanks, friend. This is great info. Looks like I'm going to have to run a background routine to do exactly what you suggested: preemptively break down larger, unspent outputs into smaller ones that are confirmed and ready for use.


text:
Bitcoind daemon get received notifications by public address
For my project I need to check the balance of a public address using bitcoind. Can I do that without importing the private key, only by public address?
Need solution no dependence, because I tried with blockchain.info API and after x requests, they blocked me. I need to check a lot addresses every 30 minutes.

Instead of polling many addresses every 30 minutes, you probably want to import your addresses into bitcoind, using bitcoin-cli importaddress and then have bitcoind notify you automatically when a new transaction comes in, using the walletnotify option.
See for example: How do I use walletnotify?
There are a lot of details to get right: transactions might never confirm, the transaction ID might change. When bitcoind loses connection to the network, you want your script to be able to handle that. etc.

for import address bitcoind ask private key, I'm need solution only whit public key.

Bitcoind supports watch-only addresses with only the address. See here for more details:
https://bitcoin.stackexchange.com/questions/22152/add-a-watch-only-wallet-in-bitcoind


text:
Details in double spend detection
I'm confused with the details in double spend detection. my question is if Alice first sends her 10 BTC to Bob, and then sends the same 10 BTC to an address that belongs to herself. How do Bitcoin clients detect the second transaction is invalid? In other word, how can client know these bitcoins have been spent in the first transaction? Does the clients trace back all the blocks to check if these bitcoin have been spent before?

There are two stages that affect double spending transactions.
Initially, when the transactions are unconfirmed, a node can't know which transaction was "the first" or the "double spend". Through a local policy it can pick either, usually the first it sees. But it might pick the other one depending on for example the amount of fee (Miners might prefer the highest fee).
As soon as one of the transactions is confirmed (6 confirmations to be sure), the other will be invalid. A Bitcoin node maintains an Unspent Transaction Ouput (UTXO) set. Whenever a transaction spends an output (of an earlier transaciton), that ouput is removed from the UTXO set and any outputs of the new transaction are added to the set.
A double spend transaction would be trying to spend an output that is not in the UTXO set and is therefore invalid.
The UTXO set is currently about 1 GB and is kept in memory, to make all the lookups very fast. There are optimizations in the works that would reduce this size. Although with larger Bitcoin adoption the UTXO set will also grow again.


text:
Payment reference
Let's imagine I am hosting an online shop. I sell five different items with a price of 1 BTC.
Bob buys item A and Alice buys items B. Bob is paying the bill by sending 1 BTC to my Bitcoin address. Alice decides not to pay anything.
Now here is the big question: How do I know that I have received the money from Bob and not from Alice (I don't know their wallet)? Is there some kind of optional order reference / comment field in a transaction?

Your best option is for the online shop to provide unique bitcoin addresses for each customer.
Bob clicks to buy item A and then fills out a quick form with his shipping information, after completion he is prompted to send 1 BTC to bitcoin address X. Alice at the same time clicks to buy item B and fills out a form and she is prompted to send her payment to address Y.  If address X receives funds, the shop owner will know that Bob paid, and Alice did not.

Address reuse is bad in general anyway. Don't ruin your customers' privacy.

Or rather, when payment arrives on the address you gave to Bob, you know that Bob's bill was paid. You don't know (and shouldn't care) whether it was Bob himself who paid.

Yes, that is an important distinction. All we care is which invoice/bill is paid, not which individual made the payment.