text:
BFGminer can't find my NanoFury on Raspberry Pi
Related:

BFGminer can't find my NanoFury!

Posted on the RPi Exchange as well

https://raspberrypi.stackexchange.com/questions/14753/bfgminer-cant-find-my-nanofury-on-raspberry-pi

Forums:

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

I see the miners with these commands
lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/3p, 480M
        |__ Port 1: Dev 3, If 0, Class=vend., Driver=smsc95xx, 480M
        |__ Port 3: Dev 4, If 0, Class=hub, Driver=hub/4p, 480M
            |__ Port 4: Dev 5, If 0, Class=hub, Driver=hub/4p, 480M
                |__ Port 1: Dev 6, If 0, Class=HID, Driver=usbhid, 12M
                |__ Port 4: Dev 7, If 0, Class=HID, Driver=usbhid, 12M

and
lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 04d8:00de Microchip Technology, Inc. <-- USB Miner
Bus 001 Device 007: ID 04d8:00de Microchip Technology, Inc. <-- USB Miner
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 005: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB

but they do not show up when running bfgminer 3.10.0
Running Raspbian and have compiled everything from source.
Is there a missing driver I need for these?
command line
./bfgminer -o stratum+tcp://stratum.d7.lt:3333 -u username -p password -S nanofury:all --set-device NFY:osc6_bits=33

output
NO DEVICES FOUND: Press 'M' and '+' to add

I've seen this configured on other systems, do I need o configure this as well?
# NF2
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00de", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="root"

debug output
2014-03-25 04:01:06] hid_devinfo_scan: Found "NanoFury NF2 v0.5 by MLM" serial "0000100001"
 [2014-03-25 04:01:06] hid_devinfo_scan: Found "NanoFury NF2 v0.5 by MLM" serial "0000100002"
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:005 (path=(null), vid=1a40, pid=0101, manuf=(null), prod=USB 2.0 Hub, serial=(null))
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:004 (path=(null), vid=1a40, pid=0101, manuf=(null), prod=USB 2.0 Hub, serial=(null))
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:003 (path=(null), vid=0424, pid=ec00, manuf=(null), prod=(null), serial=(null))
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:007 (path=(null), vid=04d8, pid=00de, manuf=Microchip Technology Inc., prod=NanoFury NF2 v0.5 by MLM, serial=0000100001)
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:006 (path=(null), vid=04d8, pid=00de, manuf=Microchip Technology Inc., prod=NanoFury NF2 v0.5 by MLM, serial=0000100002)
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:001 (path=(null), vid=1d6b, pid=0002, manuf=Linux 3.10.25+ dwc_otg_hcd, prod=DWC OTG Controller, serial=bcm2708_usb)
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:002 (path=(null), vid=0424, pid=9512, manuf=(null), prod=(null), serial=(null))
 [2014-03-25 04:01:06] lowlevel_scan: Found hid device at hid:/dev/hidraw1 (path=/dev/hidraw1, vid=04d8, pid=00de, manuf=Microchip Technology Inc., prod=NanoFury NF2 v0.5 by MLM, serial=0000100001)
 [2014-03-25 04:01:06] lowlevel_scan: Found hid device at hid:/dev/hidraw0 (path=/dev/hidraw0, vid=04d8, pid=00de, manuf=Microchip Technology Inc., prod=NanoFury NF2 v0.5 by MLM, serial=0000100002)
 [2014-03-25 04:01:06] lowlevel_scan: Found mcp2210 device at hid:/dev/hidraw0 (path=/dev/hidraw0, vid=04d8, pid=00de, manuf=Microchip Technology Inc., prod=NanoFury NF2 v0.5 by MLM, serial=0000100001)
 [2014-03-25 04:01:06] lowlevel_scan: Found mcp2210 device at hid:/dev/hidraw1 (path=/dev/hidraw1, vid=04d8, pid=00de, manuf=Microchip Technology Inc., prod=NanoFury NF2 v0.5 by MLM, serial=0000100002)
 [2014-03-25 04:01:06] mcp2210_set_cfg_gpio: Failed to set current GPIO config
 [2014-03-25 04:01:06] mcp2210_get_gpio_input: Failed to get current GPIO input values
 [2014-03-25 04:01:06] mcp2210_set_cfg_gpio: Failed to set current GPIO config
 [2014-03-25 04:01:06] mcp2210_set_cfg_gpio: Failed to set current GPIO config
 [2014-03-25 04:01:06] mcp2210_get_gpio_input: Failed to get current GPIO input values
 [2014-03-25 04:01:06] mcp2210_set_cfg_gpio: Failed to set current GPIO config
 [2014-03-25 04:01:06] nanofury_lowl_probe: Matched "NanoFury NF2 v0.5 by MLM" serial "0000100001", but failed to detect nanofury
 [2014-03-25 04:01:06] mcp2210_set_cfg_gpio: Failed to set current GPIO config
 [2014-03-25 04:01:06] mcp2210_get_gpio_input: Failed to get current GPIO input values
 [2014-03-25 04:01:06] mcp2210_get_gpio_input: Failed to get current GPIO input values
 [2014-03-25 04:01:06] nanofury_lowl_probe: Matched "NanoFury NF2 v0.5 by MLM" serial "0000100002", but failed to detect nanofury
 [2014-03-25 04:01:06] INFO: bitfury_detect
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:07] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:07] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:07] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:07] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:07] No Bitfury chips detected!
 [2014-03-25 04:01:07] ManageTUI: (none): No new devices found

UPDATE
Looks like I missed a package I needed to install:

https://bitcointalk.org/index.php?topic=291456.msg3924680#msg3924680

But now Im getting this error
 [2014-03-26 01:43:29] mcp2210_get_configs: Failed to get current SPI config
Select processor to manage using up/down arrow keys
 [2014-03-26 01:43:29] NFY 0: Failed to open mcp2210 device
 NFY 0 : Initializing... [2014-03-26 01:43:29] NFY 0 failure, exitingSegmentation fault
root@raspberrypi:/usr/bfgminer/bfgminer-3.10.0#

at least it's progress but still an issue
UPDATE #2
some additional output since I've updated the RPi firmware
[2014-04-02 03:08:21] nanofury_lowl_probe: Matched "NanoFury NF2 v0.5 by MLM" serial "0000142845", but mcp2210 lowlevel driver failed to open it
 [2014-04-02 03:08:22] Probing for an alive pool
 [2014-04-02 03:08:22] Network difficulty changed to 96.8M (693.1Th/s)
 [2014-04-02 03:08:22] Stratum from pool 0 detected new block
 [2014-04-02 03:08:22] Pool 0 is hiding block contents from us
 [2014-04-02 03:08:23] mcp2210_spi_transfer: Failed to continue SPI transfer (1 bytes remaining)
 [2014-04-02 03:08:23] mcp2210_set_cfg_spi: Error setting current SPI config (248)
 [2014-04-02 03:08:23] NFY 0 failure, attempting to reinitialize
 [2014-04-02 03:08:23] mcp2210_spi_transfer: Failed to continue SPI transfer (1 bytes remaining)
 [2014-04-02 03:08:23] mcp2210_set_cfg_spi: Error setting current SPI config (248)

authors: Екатерина Лагутина


text:
Is there a service that automatically "sweeps" funds to another address whenever they are sent?
There's the sweepprivkey proposal from 2011 which was not accepted, that would have allowed one to instruct her bitcoind client to listen to transactions and sweep funds whenever they are transferred from one address to another.
There is also this question, "Is there a way to automatically send bitcoins from one wallet to another?", but it does not specifically ask about a service that would do that.
I was wondering whether someone developed, or is considering the development, of such a service.
There would be security implications, as the service would have to know the private key of the address to sweep - is there any secure way to implement this otherwise?

You could make one using bitcoinj which listens for txns, then triggers a spend.
Perhaps you would use rpc to control bitcoind to make the spend, and only use bitcoinj for the listening side ?
That should (I haven't done it but hope to soon) not require any private keys to listen to the wallet.
See this: Listening to all transactions of the Bitcoin network
bitcoind appears to be pull oriented, while bitcoinj can be set up to be push related, sort of.

source: Stack Exchange

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

sort: votes


text:
Why do transaction/blockchain based gambling sites use such complicated methods for proving fairness?
Doesn't the block hash or the transaction id provide enough entropy
(for example, by using block_hash % 37 to generate a random number between 0 and 36)?
Block Chain Roulette determines the lucky number as a function of the hash of newest block in the chain:

Everytime a new block is created on the Bitcoin block chain, the roulette wheel is spun and a random number between 0 and 36 is generated... random hash = hmac_sha512(secret hash, block hash) ...
  the random decimal integer is then multiplied by 37 and divided by (72057594037927935 + 1), decimal places dropped, resulting in a number between 0 and 36. 14 hex charecters are used because this represents a maximum random number of 72057594037927935, a number which is divisable equally by 37 (Or at least very very close to being equally divisable, when working with such large numbers). This ensures each number between 0 and 36 has an equal probability of being chosen. Continue reading...

SatoshiDice determines win/lose by using a pre-determined secret as well:

The lucky number used to determine the winner of games is simple. It is simply the first bytes of hmac_sha512(secert,txid:out_idx). That would be the secret string as the key and the transaction ID of your bet transaction as the data.

Can someone generate a transaction in such a way that its hash is known ahead of time?
Edit: It seems like the second part of the question has already been answered.

Obviously many gambling websites cheat. Most of them are not transparent.
An important thing is that most gambling websites that use a government-backed currency are subject to gambling laws in the country of that government.
Bitcoin isn't. Bitcoin is currently not subject to any gambling law and so it would be easier for gambling site owners to be unfair. For this reason, it can be very important for a Bitcoin business to be transparent if they want to gain traction in the masses.
Another reason, Bitcoin offers a unique way to prove fairness of such applications from within it's own workings. Why wouldn't you use it if you plan to offer a fair service after all??

Also, they have a "secret value/hash" so that you can't predict beforehand what the outcomes will be. They often will post the hashes of the secret values so you can verify that they didn't change the secret values and the actual secret values a few weeks later.

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


text:
How can multifactor authentication be used when there needs to be two people with access?
For a business account at a Bitcoin exchange, either of two people need to be able to send bitcoins or withdraw.  This account will be configured with two-factor authentication.
How can two of the business' staff, located in different offices, each have access to the account?
The exchange specifically will be with BitFloor using Google Authenticator OTP, but the same question would apply for using Mt. Gox, with Yubikey, for instance.

Apparently with YubiKey, the exchange needs to accommodate multiple OTP authentication devices.
It looks like the only exchange to support multiple simultaneous Yubikey authenticators is Mt. Gox.
The private key for Google Authenticator can be replicated so that doesn't have this restriction, as Daniel H answered below.

With Google Authenticator, you scan a barcode into your phone and it generates a temporary 6-digit key every minute, regardless of whether the app is open or not. It is not limited to one person, just to one account. These codes rely on times being in sync so that when an authenticator code expires, it expires on the site as well. Most use two protocols - HOTP and TOTP.
Highlights from this answer: https://security.stackexchange.com/a/35159
HOTP = Client and server share a counter, when code generated, timer increments, producing a new one-time login code.
TOTP = HOTP except the counter is replaced by the current time. So long as the system times are in sync, both the client and the server will be on the same page as far as what 2FA code is currently the correct one.
If multiple people scan this barcode, they will all generate the same keys. Thus, all you need to do is have both people present when setting up two-step authentication (or save the barcode if they have incompatible schedules, but be sure to shred it later), and they will both be able to access the account whenever they want.
Due to best OpSec practices, it is best to have separate 2FA keys, or use an alternative method, such as key-pair authentication where each user has their own key to access the server. This is better for auditing purposes where you can determine more easily the difference between different users, especially if one user decides to do something malicious using a shared authentication code.

Oh, of course -- with Google Authenticator I can copy the QR code (e.g., screen shot if  necessary) and then share that (in a secure manner) with each party that needs access.

@SentientFlesh I think your edit should have been a separate answer. I'm leaving it before this comment because it adds good information, but that information isn't always usable by website clients, depending on what the security policies actually are.

With Mt.Gox you can add multiple authenticators; while I'm not sure if you can add two copies of the same type of authenticator, it is worth a try.

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


text:
Which KYC solution providers are used by Bitcoin companies?
I am wondering which Know Your Client solution providers are used by Bitcoin companies?

Jumio is used by a few companies, including SnapSwap, CoinMKT, etc. Their notable products include NetVerify and BISON.
miiCard is used by Bylls and Bittylicious.
Sphonic is used by Bitnet.


text:
An authoritative resource for the history of Bitcoin
I've been developing an introductory course on Bitcoin and would like to have a lecture about its history. Other than Wikipedia, does there exist a community-accepted resource elaborating on the history of Bitcoin?

Charles, I removed your course link because 1) I didn't feel it was relevant to the question, and 2) I feel that you're promoting it too heavily.

Promoting a course that will eventually become the source for all introductory bitcoin knowledge. I guess so....:(

Censorship makes me a sad panda. I will be posting a bounty for this question in two days

I've also found that bitcointalk is one of the best sources, albeit necessary  to wade through a lot of posts. Search there for references to David Chaum, Hal Finney, Nick Szabo, and Wei Dai to understand some of the ideals and ideas that influenced Satoshi.
Here are some other relevant link to get you started:
*A Timeline History
*A very brief intro
*The original post of Satoshi on the metzdowd crypto mailing list - Try and follow the whole thread
Google the references in the original paper, will uncover good background detail.
*Who is Satoshi Nakamoto - you'll need google translate
*Bitcoin and me (Hal Finney)
*The Mystery of the Geneisis Block- very technical

Email me. Id like you to do a guest lecture for my course. Charles.hoskinson@gmail.com

The official Bitcoin Wiki has a page about the History of Bitcoin. Also, the original Bitcoin homepage has a page with a brief history of Bitcoin.
This wiki is primarily maintained by the original creators and developers of Bitcoin.
I especially like

May 21 2010 - laszlo first to buy pizza with Bitcoins agreeing upon
  paying 10,000 BTC for ~$25 worth of pizza courtesy of jercos

If you want authority, you can either visit the Bitcointalk forums and contact some of the oldest forum members. Or take a look at the official Bitcoin GitHub project were the lead developers are listed. (They are also listed on the Bitcoin homepage.)

DO you have contacts with anyone who was involved with Bitcoin in 2009 or 2010? I'd like to interview them for my class

You can go to bitcointalk.org, which were the whole bitcoin community came to life. If you list up all accounts sorted by registration date, you can easily find the early birds that helped shape what Bitcoin is today.

I added some authorative sources to my answer

i think this infographic will help you to get the answer you are looking for. It tells everything about bitcoin history...past...present...future..even also talks about some facts and great incidents that took in this long journey of bitcoin.
I found this infographic at : http://www.2kreviews.com/bitcoin-history-future-infographic/

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


text:
Does any exchange site let me automatically sell Bitcoin to USDT (or USD) right after I receive it?
I want to sell Bitcoin automatically and immediately after I receive it.
Is there any exchange site has this feature?

You can use one of the Bitcoin exchanges and using their API, create something with the following logic:
while True:
    current_balance = get_balance("BTC")
    if  current_balance > 0:
        crypto_exchange.sell_market_order(current_balance)
        print("Sold %s" % current_balance)
        break
    else:
        time.sleep(60)

This would automatically sell your crypto as soon as its confirmed as an active balance on the exchange and it would "hedge" your crypto exposure in the process.

I expect that any exchange will require that deposit transactions (i.e. sent from the global Bitcoin network, not from another account within the exchange) have to be confirmed before the coins can be sold or traded.  Otherwise, the exchange is vulnerable to double-spend attacks where a customer deposits coins, sells them, withdraws the cash, and then reverses the deposit transaction.
A common requirement is 6 confirmations, meaning that you will have to wait until your transaction is included in a block (which takes at least about 10 minutes on average, longer if the transaction fee you paid is too low) plus an additional 50 minutes on average.
So the answer is no, you should not expect to be able to sell Bitcoin immediately after you receive it.

Yeah.. there are a lot of websites that allow you to sell Bitcoin for USD.
Here are a few:

https://gemini.com
https://coinbase.com
https://localbitcoins.com
https://xcoins.io

This doesn't address the question of whether you can sell immediately.

How so? Have you ever used any of the platforms above? Localbitcoins is like craigslist. You get the money within minutes. Maybe immediately for you is within seconds?


text:
What are the "Know Your Customer" challenges that Bitcoin faces?
Can anyone explain what KYC (Know Your Customer) regulations are "missing", tough or impossible to implement with Bitcoin?
I will offer a bounty to the most detailed answer
(However this question is too new for me to do so)

TL;DR
Businesses in the Bitcoin space face no special challenges to implement KYC regulation, except the privacy oriented mindset special to some bitcoin users. However, it is impractical to enforce KYC regulation on the entirety of the bitcoin network itself.
Long version below
Know Your Customer (KYC) regulation applies to financial institutions and other regulated companies such as for example money transmitters and currency exchanges. It's stated goal is to make such companies report potential money laundering and to protect against identity theft.
The core component of KYC forms around following a Customer Identification Program, which means that the above introduced institutions have to form a reasonable belief that they know the true identity of each customer. This means that in order to comply with regulation they will require their customers to validate their accounts. The companies don't face any special difficulties whatsoever, except that there might be a slightly bigger number of Bitcoin users that will be adverse to their services due to KYC requirements.
On the other hand, companies that offer comparable money transmission services as the bitcoin network itself would be required to implement KYC regulation. It is possible that at some point in the future a country might require by law Bitcoin users to disclose their bitcoin addresses. However, that would be impractical – if not impossible – to enforce, as, due to the decentralized nature of the Bitcoin network there is no central entity that could be forced to disclose such information about other users and there would be any number of participants that would have to be monitored and brought into compliance in order to collect such address information about their business partners. Additionally, even if associated to certain addresses through business partners informing on them, in most cases users would be able to plausible deny control over said addresses.

In Australia, Bitcoin is considered by the Federal Government to be the same as a foreign currency.
AFAIK the regulations governing a business that trades in Bitcoin is the same as for a business that trades in cash exchange. So least as far I have so far been able to determine.
Many businesses that do so easily implement the KYC requirements here.
AML requirements, as I understand, are simply a matter of accurate record keeping and reporting. Once you have KYC it should be no big deal.


text:
When should an individual or business file a SAR with FinCen?
In the United States, both Individuals and Businesses are required to file a Suspicious Activity Report (SAR) with FinCen when:

Individuals who transport more than $10,000 into or out of the United States1
Shippers and receivers involved in the transfer of $10,000 into or out of the United States.
Businesses that receive more than $10,000 in a transaction or in related transactions1
People who have control over more than $10,000 in financial accounts outside of the U.S. during a calendar year

Question

How could these rules be interpreted when dealing with Bitcoin? (please contrast conservative and non-conservative viewpoints)
Since Bitcoin's value varies, does that mean that a declaration is required when the price exceeds a certain amount?
What is considered as "transporting" into and out of the United States?
Is simply running a Bitcoin QT client considered a "money services business" and is subject to FinCEN requirements?  If my wallet is hosted, does that mean they are responsible?

just an FYI, if you have greater than $10,000 USD or equivalent in a foreign bank account then you need to file a FBAR with the Treasury. Not sure about the FinCEN requirements, but hope that helps

Thank you @Cqm I wasn't aware of that.  Any additional filing requirements would be helpful

While bitcoin may seem to be useful as an offshore bank account, it likely won't be subject to the FBAR reporting requirements.
Now if you have fiat (e.g., USD) funds at an exchange that is not in your own country (e.g., Mt. Gox) and those funds exceed $10,000 worth then possibly that could be something where an FBAR filing might be required.
So having $10K or more at an exchange might be reportable but having $10K worth of bitcoins may or may not.
An excerpt from someone who studies this topic:

The critical issue is whether a wallet constitutes a financial account
  and if a wallet constitutes a financial account then what constitutes
  signature authority?

You are taking a big risk if you aren't going to report a Mt. Gox account.  In fact, I would say that such an account falls squarely within the regulations.
It is always better to err on the side of being more conservative.  I even report the money on my subway card.

The bullet points you give are out of context if you read the Wikipedia article you referenced.  The bullets refer to other activities that may require a form to be filed, but not the SAR.
Transporting $10,000 in or out of the U.S. does not generate a SAR, but it has to be reported.  This refers to electronic or physical currency, but it has to be dollars, and it doesn't apply to Bitcoin.   Same for the next two bullet points.
The last bullet point generates a Foreign Bank Account Report with the U.S. Treasury.  If you have money outside the U.S., you need to declare it.
The IRS and the U.S. Treasury are working on defining what is required.  At present, since the regs aren't finalized, you would not have to declare Bitcoin holdings on an FBAR, but you would have to declare cash balances at a brokerage such as Mt. Gox.
My advice is to declare your Bitcoin holdings on an FBAR form, and form 8938 if you live outside the U.S., even if the form doesn't anticipate it.  You need to declare the maximum value of the account during the year.
FBAR reporting can be done online, and there are severe penalties if you don't do it.   Err on the side of caution and report everything.  Report it and keep it, or don't report it and they will seize it.  You decide.
To answer your questions 3 and 4:

What is considered as "transporting" into and out of the United States?

An electronic or physical movement of the U.S. dollar across the border.

Is simply running a Bitcoin QT client considered a "money services
  business" and is subject to FinCEN requirements?

No.

If my wallet is hosted, does that mean they are responsible?

Responsible for what?  You will have to file an FBAR, and they will have to comply with their regulations, which are still being hashed out.

SUSPICIOUS ACTIVITY REPORT ("SAR") FILING REQUIREMENTS
http://www.fincen.gov/forms/files/FinCEN%20SAR%20ElectronicFilingInstructions-%20Stand%20Alone%20doc.pdf  page 80
MONEY SERVICE BUSINESS DEFINITION
http://www.fincen.gov/financial_institutions/msb/definitions/msb.html
I hope the above helps answer your questions.


text:
Is it acceptable / encouraged to ask for ID and keep a photocopy for OTC Bitcoin transactions?
Suppose a business wants to get into the OTC Bitcoin business. It will need to comply with AML laws. It is acceptable / encouraged for such a business to ask for photo ID and keep a photocopy?
Does this same principle apply to individual users?

In OTC, it is totally up to the mutual agreement of the two parties, if you are a financial business that has to comply with AML laws, you will have have to ask for these info, but that may mean some counterparties will shun from you.


text:
How do cryptocurrency exchanges handle users' accounts?
I recently became aware of the fact that exchanges have trading engines that execute all trades within the exchange itself, and not on the blockchains. That is to say, if User A sells to User B, there is no corresponding blockchain transaction transferring those coins. Instead, both users have accounts on the exchange which are debited and credited. A blockchain transfer only takes place during deposits and withdrawals.
Please explain the same case for currency like Bitcoin as it manages its assets using UTXO Model which is a record of unspent outputs. And for other currency like Ethereum using the account-balance model as the transactions aren't included in the blockchain. So, how they will reflect changes in the account of a user?

When you send funds to an exchange, you do not own the UTXOs created. They are owned by the exchange.
Exchanges use the UTXOs from all their wallets to process withdrawals. This means that if you were to deposit and withdraw coins with no trades in between, your withdrawal will still not come from the UTXO created by your deposit. It could come from any of the thousands of UTXOs owned by the exchange (comprising of other peoples' deposits).
It's similar to how your bank account functions. When you deposit cash, the cash you hand over becomes the property of the bank. From that point, any balance that you have solely exists on the banks' internal databases. If that database was tampered with or destroyed, no one can prove you had money there. If you were to withdraw cash, the notes you get back will not be the same ones you deposited, and were likely deposited by some other customer.
Similarly, when you send coins to an exchange, your balance exists solely in the exchange's  internal database system. As you make trades, this internal balance is debited and credited. When you withdraw, the coins come from a UTXO set that includes everyone's deposits.
This is also why it is recommended to only keep coins you are actively trading on an exchange, since it leaves you open to the possibility of an exchange losing your money.

If I am correct then owning a wallet on Exchange is making us only the part of a centralised system which is handling my transaction in their own database. There isn't any record of my account on the decentralised system of the blockchain. Making us again an underdog of the centralised system.

That's roughly correct. You could use decentralized exchanges such as Etherdelta or Switcheo, if you wish

Thank you, The answer was very helpful and If you can share any resource regarding the same will be great.


text:
International Bitcoin Payment Platform
I need to integrate bitcoins payments in my web application.
I was about to use Stripe platform for accepting bitcoins (works exactly the same than for accepting credit cards) but I realized they need me to have a US bank account which I don't have.
Is there a similar service that offers an API (java preferrably) to easily accept bitcoin payments or do I have to write down the code myself?
(By the way, I'm new to bitcoin but have a good dev exp.)

Answer is here, question already asked (sorry about that):
How to integrate a Bitcoin payment service in my auction site
my choice: https://bitpay.com/

Hi jon, welcome to the Bitcoin Stack Exchange! If you've found that there's another question that is essentially the same as yours, it's best to mark it as a duplicate like I did. Good luck getting bitcoin payments integrated into your website!


text:
Is there a way to reindex from disk but not start from blk0000.dat?
While my Bitcoin-Qt was synchronizing, I ran into the following error:
It first loaded full blocks from blk00000.dat to blk00217.dat file (with file size about 131 MB per file). Then Bitcoin-Qt indexed everything from rev00000.dat to rev00214 (with file size about 17 MB per file), but skipped rev00215 and rev00216, and just created rev00217.
Now Bitcoin-Qt is stuck synchronizing with network but doesn't load more block. The block number is constant.
I ran Bitcoin-Qt for 9 more days. I want to keep all index data completed (to blk00214) and continue reindex from right before where the error occurred (blk00215), rather than restarting from the beginning. Is there a way to reindex from a certain point?
Please help!

Which version of the Bitcoin-Qt software are you running?

Unfortunately, I don't believe the -reindex option has the ability to be that smart.
If I were you, I would:

Shutdown Bitcoin-Qt
Start Bitcoin-QT with the -reindex flag

Reindexing doesn't take very long usually (maybe a few hours). 9 days is a long time to wait, it would probably be better to just start with a clean reindex. This won't delete the blkxxxxx.dat files, so you won't have to download all that data again at least.

Thanks! but i don't want to reindex from begin (start blk00000.dat), i want to continue index from error ! how can i do ?

You can't. Doing what I suggested will be easier and take less time than trying to figure out how to continue from where you left off.


text:
Does mining without a realistic chance of solving a block provide any benefit to the network?
Okay, before anyone votes to close this as a duplicate, I would like you to hear me out.
Since I began using Bitcoin, I always thought about miners as the people that effectively "host" the bitcoin network as if it were a website. I know this isn't entirely true, but its the analogy i've been using for a while.
What I want to know is if I mine Bitcoins on my mid 2011 iMac with the sole intention of helping the bitcoin network, will I be providing any real benefit to the network or will I just be fruitlessly trying to solve problems when the bigger, faster, mining-dedicated computers will ultimately beat me to it?
EDIT: Also, as an extension of my question above, could I be one of those miners that tweaks he software and only processes transactions with no fees to provide a greater benefit or would this approach still cause me to get out-hashed by bigger, better computers?

It is duplicate. Your hosting analogy is fooling you. Run a full node, that's more analogous to hosting. Mining on a CPU will give you 0 blocks, so whatever policy you set doesn't matter and you're not helping the network. If you want to help the network buy some ASIC and you can calculate to what extent you're helping the network by looking at how many BTC you earn every 10 minutes divided by 25 (12.5 soon).

Possible duplicate of Is CPU mining even worth it?

@MarkS. Duplicate of a duplicate?!

What's the difference between running a node and mining then? @Jannes

@ACE A node is bit like bittorrent node: up and down loading (and validating) blocks and transactions. You don't get reward for that other than that you know any transactions you receive are valid. Mining is doing Proof of Work to chain blocks into the blockchain.

Possible duplicate of In the ASIC-age, is it worth starting mining Bitcoin at home?

My question boils down to: will I benefit the network at all by trying to mine, even though I know I won't ever mine a block or make any money? You guys are saying it's a duplicate of questions that are essentially "how do I make money mining?"...

@ACE: They are saying that because you get money for contributing to the mining process. The reward is directly proportional to your contribution. Therefore, if you wouldn't earn anything while mining that shows that your contribution to the mining process would be negligible.

@ACE, I see the distinction you are making, so I did not close this as a duplicate. I have also updated the title of the question to less ambiguously reflect the question you are asking.

TL;DR:
Mining is heavy duty number crunching, your iMac is useless for that. Running a node helps the network and gives you your own copy of the blockchain. Your iMac should probably be able to do that.
Mining
The purpose of mining is to 1. achieve consensus about the state of the network, 2. confirm transactions, and 3. initially distribute the bitcoins. For mining your machine continuously shuffles the unconfirmed transaction pool and tries whether the current jumble resolves to a valid block. To contribute to the network, you have to have a chance at succeeding at finding a block. With a "mid 2011 iMac" you do not have a chance at succeeding at mining, as explained on In the ASIC-age, is it worth starting mining Bitcoin at home?. Its computational power for the purpose of mining doesn't register, it's a waste of money, time, and unnecessary wear for your hardware. To have any kind of effect, you need an ASIC today.
Running a node
The purpose of running a node is to 1. relay information in the network, 2. check the work of miners for validity, and 3. to have your own copy of the blockchain. Catching up with the network requires some computational effort, but nodes can be run on fairly lean systems. Personally, I run a node on a RaspberryPi 2B, it took roughly eighteen days to synchronize with the blockchain, but is now happily churning along. You can do that with your iMac, but really it's only useful if you either have it running a large part of the day (at least 6h), or are interested in having your own copy of the blockchain. Not sure how well an iMac deals with permanent load though, so maybe it's not the best machine for a 24/7 gig.


text:
What app should I use to import my wallet keys?
I have the private key backup from my Android phone wallet. My phone broke and has been replaced but I can't see any import option in the Android wallet app.
How do I get my BTC back?

Where did you back it up? The wallet is perhaps in the cellphone storage card. Try connecting it via USB to a computer and see what's there. If you lost your wallet you probably also lost your coins.

I emailed the keys to myself so i have the key file.
I just don't know what to do with that, i can't see a button to import it.

Since I don't know what wallet app on Android you're using, I'll give an answer that should work for any:
If you create an account at Coinbase, you can import your private keys and then send them to an address on your Android wallet. This requires the private keys being in plain text. If your private key export is encrypted (with a password you gave it) or encoded in some non-obvious fashion, you'll need something to decode it before using this option.
If it's encrypted in a way that's compatible with the desktop Bitcoin-QT client, you can reclaim it that way.
If it's encrypted some other way, you'll likely need to restore it to your Android phone and enter a password there to get access to your bitcoins. This would be specific to the app you're using.
If you're using Bitcoin Wallet, which seems to be the closest thing to an "official" Android client, choose "Back up Keys" from the menu (on my device, I press the Menu hardkey to open that), and then click "Restore private keys".

On Bitcoin Wallet, go to the upper right three dot menu -> Safety -> Restore wallet -> Look up the file on your phone and input its password.


text:
import btc electrum wallet into coinomi
can I import btc electrum wallet into my coinomi mulit-currency wallet app?
They both use electrum servers and they both have seeds so it looks like they are a similar kind of wallet.
In electrum I have the option
File/Save Copy

This looks like it saves a file with no extension next to
/home/username/.electrum/wallets/default_wallet

Could I import this into Coinomi via
(Coinomi app) /Settings/Restore Wallet/RESTORE A WALLET

enter my electrum seed / recovery phrase and password...

Without loosing my coins?


text:
How can I take the exchange rate (1-Crypto-to-USD) and convert it to the other direction? (1-USD-to-Crypto)
My Question is below:
I get the value of one USD's amount in bitcoin using the last value from btc-e (In case someone finds this useful..)
The btc-e api call is https://btc-e.com/api/3/ticker/btc_usd
{"btc_usd":
    {
    "high":245.196,
    "low":238.75,
    "avg":241.973,
    "vol":1311899.79685,
    "vol_cur":5434.56688,
    "last":242.291,
    "buy":242.9,
    "sell":242.29,
    "updated":1431260454
    }}

The sum is like this
( 1 / ( 242.291 / 100000000 ) ) / 100000000

= 0.004127268449921788       btc-e exchange price for $1 worth of BTC

//0.00411811                 this is similar to blockchain.info's $1 average price

To explain, I am mimicking https://blockchain.info/tobtc?currency=USD&value=1 as it converts the price of one USD to its value in BTC like so:
0.00411811

My question:
I need to somehow do this with http://dogecoinaverage.com/USD
Which states:
The global volume-weighted average price of one Dogecoin is:
0.00009289 USD

Could I use that information to mathematically get the average price of 1USD in DOGE?

related: How do I calculate the value of some amount of bitcoins in my native currency?

If x is the number of dogecoins per dollar, then x * 0.00009289 = 1.  So
x = 1 / 0.00009289 = 10765.421.
In other words, simply take the reciprocal.


text:
BTC-E API and determining volume for any time interval
I've been logging data from BTC-E for a couple of months now and am writing my own charting app for personal use. I've been stumped for a while now on what the difference between "vol" and "vol_cur" is and how to determine the volume for any given interval I want (1min, 60min, 2month, etc):
https://btc-e.com/api/2/ltc_usd/ticker
{"ticker":{"high":11.976,"low":11.35,"avg":11.663,"vol":2147898.06418,"vol_cur":184074.26807,"last":11.35,"buy":11.35,"sell":11.32,"updated":1396883318,"server_time":1396883319}}

Subtracting the "vol" values from the end of my interval to the start sometimes yields negative numbers:
id |   timestamp_open    |   timestamp_close   |   open   |  close  |   high   |   low    |    volume
----+---------------------+---------------------+----------+---------+----------+----------+--------------
2 | 2014-02-15 18:00:00 | 2014-02-15 18:30:00 | 16.05385 | 15.9761 | 16.0675  | 15.9761  | -62044.90371
3 | 2014-02-15 18:30:00 | 2014-02-15 19:00:00 | 15.9761  | 16.049  | 16.05385 | 15.94642 | -40416.73599
4 | 2014-02-15 19:00:00 | 2014-02-15 19:30:00 | 15.94652 | 16.002  | 16.05385 | 15.935   | 32560.39743
5 | 2014-02-15 19:30:00 | 2014-02-15 20:00:00 | 16.002   | 16.05   | 16.05    | 16       | 31619.54125
6 | 2014-02-15 20:00:00 | 2014-02-15 20:30:00 | 16.03175 | 15.999  | 16.0532  | 15.9     | -10595.7155
7 | 2014-02-15 20:30:00 | 2014-02-15 21:00:00 | 15.999   | 15.997  | 15.999   | 15.94    | 61109.18234
8 | 2014-02-15 21:00:00 | 2014-02-15 21:30:00 | 15.997   | 16.132  | 16.25    | 15.997   | -33001.28287

The price did not close down so it is not representative of volume indicative of selling; how do I properly calculate the volume for an interval?

I would not rely on vol or vol_cur as they are computing data in a way you do not want from data which is available to you.
My recommendation would be to save the data of individual trades using btc-e API function TradeHistory. You can run a loop which would take the first result returned and using the timestamp as the parameter "end" for the next API call. Be aware that you will receive this and other transactions with the same timestamp in duplicate (so be sure to check the record doesn't exist in your db before adding it).
This way, you can write your own scripts to get your own averages and volumes over any time period you want :)

thanks for the reply. while that's a possible work around i'd like to avoid having to do that. the api i posted above replies with a 'vol' entry - what is it's purpose?  comparing btc-e's volume on their homepage and bitcoinwisdom for the same time frame (30min) for the same date/time, they are off by quite a bit (btce says 3k while bitcoinwisdom says 8k)
i'm really confused.

I'm sorry I have also not been able to figure out what these values are exactly, which is why I use methods such as the one I have recommended. Hopefully someone else will have the answer to this.

I agree with Mark, you should use the TradeHistory method. but to answer the other question, according to YoBit.net api docs (most btc exchanges use very similar api):

vol: traded volume
vol_cur: traded volume in currency

So "vol" is the volume of the counter currency (the second one in the pair, USD in this case)
and "vol_cur" is the volume in the base currency (the first in the pair, LTC in this case)


text:
How to build Bitcoin from source on Ubuntu 11.04 Natty Narwhal?
We have this detailed tutorial for Lucid Lynx, but somehow it doesn't work for Natty.
We also have a similar question but it is too broad and the solution there isn't complete enough to work.
I created this question asking for a tutorial that will work on any freshly installed Natty.

Do you know what goes wrong?

@David I posted as a comment on the tutorial for Lucid Lynx

Wolciph over on the Bitcoin forums wrote a bash script specifically for 11.04. You haven't posted your specific build errors, but I'm guessing that the problem is with the wxWidgets lib and you'll probably have less issues when the main Bitcoin client eventually moves over to Qt (which I believe is in the works, correct me if I'm wrong). In case the link to the script eventually goes down, here it is:
#!/bin/bash
echo "DISCLAIMER: you are using this script at your own discretion! By typing 'c', you agree that you have read the script yourself and have understood it and that you will thus take full responsabilty in the eventuality that this script leads to any harm to you or your property. If you do not agree type 'n'"
read -n 1 r
[ "$r" = 'c' ] || exit 0

set -e

echo "You will be prompted to enter your password in order to install necessary dependencies."

sudo apt-get install build-essential libgtk2.0-dev libssl-dev libdb4.7-dev libdb4.7++-dev libboost-all-dev
sudo apt-get build-dep libwxgtk2.8-dev

mkdir bitcoin || true
cd bitcoin

[ -e wxWidgets.tar.gz ] || wget "http://biolpc22.york.ac.uk/pub/Daily_HEAD/wxWidgets.tar.gz"
[ -e wxWidgets ] || tar -xvzf wxWidgets.tar.gz
cd wxWidgets
./configure
make -j3
sudo make install
sudo ldconfig
cd ..

[ -e miniupnpc*.tar.gz ] || wget "http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.5.tar.gz"
[ -e miniupnpc*/ ] || tar -xvzf *miniupnpc*.tar.gz
cd *miniupnpc*/
make
sudo make install
cd ..

#for some reason, github's certificate doesn't work:
[ -e bitcoin*.tar.gz ] || wget --no-check-certificate "https://www.github.com/bitcoin/bitcoin/tarball/v0.3.21"
[ -e bitcoin*/ ] || tar -xvzf "v0.3.21"
cd bitcoin*/
make -f makefile.unix
#optional:
strip bitcoin
echo "Bitcoin is now compiled : '$PWD/bitcoin'"
echo "Launch bitcoin now? (y/n)"
read -n1 r
[[ "$r" = y ]] && ./bitcoin
cd ..


text:
Does a trusted blockchain import from BitcoinCore require that chainstate and blocks be from the same source?
Can the chainstate folder from a pruned node be used with the blocks folder from a full node to provide the full blockchain?  Assume that both nodes have been running for months.
If the blocks folder contains references to filenames in the chainstate folder, then the answer is no.  I know this because the filenames in chainstate on the full node are different from those on the pruned node.
If, on the other hand, the chainstate folder stands as a self-contained and full record of the UTXO Set including all pointers, filenames, and identifiers required to interpret it, then it seems that I will NOT need to import chainstate from the full node to the cloud server.
Bonus question! Out of curiosity, there's another question here that doesn't affect my situation, but it would be nice to understand why the answer is no if it's no.  If the chainstate folder on a full node got corrupted, could the chainstate folder from a pruned node be dropped in to recover?
Clarification
Both the blocks and chainstate folders reflect a block tip, and if the two folders reflect different block tips, they will be incompatible.  I should have made it explicit that the question assumes that the two different sources of folders would both be synced up to the same block height.
An interesting edge case is what happens if they are using the same block height, but the blocks they used at that height are two valid but different blocks.

Since this is expected to work, I'm trying it. 1. Shut down the pruned node.
2. Edit bitcoin.conf to change pruned=10000 to pruned=0
3. Update the startup script to point to the new 400GB volume that already has the blocks folder on it.
4. Copy everything except the blocks folder from the current data directory to the new volume.
5. Restart the (now unpruned) node.
First problem I encountered: I hadn't copied everything from the full node's blocks folder. Starting the node clobbered blk00000.dat, so I have to copy it over again.

I just noticed that the question in the details is the opposite of the question in the title.  I am unable to edit the title of this question, so I thought it best to clarify that the question this answer addresses is: "Can the chainstate folder from a pruned node be used with the blocks folder from a full node to provide the full blockchain?"
It appears that the answer is yes.  I have not fully established that it was successful, but it looks like it's headed that way.  Here are the steps I followed:

Shut down the pruned node.
Edit bitcoin.conf to change pruned=10000 to pruned=0
Update the startup script to point to the new 400GB volume that already has the blocks folder on it.
Copy everything except the blocks folder from the current data directory to the new volume.
Restart the (now unpruned) node.

Note that none of these steps includes stopping either node at a specific block height. In fact, I'm fairly certain that the problems described below are all a result of the chainstate folder being at a different block height from the blocks folder.
The debug log showed this:
2020-01-02T02:47:48Z : Error initializing block database.
Please restart with -reindex or -reindex-chainstate to recover.
2020-01-02T02:47:48Z Aborted block database rebuild. Exiting.
2020-01-02T02:47:48Z Interrupting HTTP RPC server
2020-01-02T02:47:48Z Interrupting RPC
2020-01-02T02:47:48Z Shutdown: In progress...
2020-01-02T02:47:48Z Stopping HTTP RPC server
2020-01-02T02:47:48Z Stopping RPC
2020-01-02T02:47:48Z RPC stopped.
2020-01-02T02:47:48Z scheduler thread interrupt
2020-01-02T02:47:49Z Shutdown: done

That happened even after I used -reindex-chainstate, so I tried it with -reindex instead, and now it continues to run, reindexing about 460 of the almost 2000 blk#.dat files each hour. If all is well for a while once it's done in about 4 hours, I'll report that here too. Even after it loaded blocks, it had more work to do, although I didn't test to see if it was more functional after the blocks were loaded.  It started Updating the tip:
2020-01-04T05:01:06Z UpdateTip: new best=000000000000000000467af08dc436c11dfe1c49d62510aad9753ea3bcd30dc7 height=509848 version=0x20000000 log2_work=88.159019 tx=300224686 date='2018-02-19T00:41:58Z' progress=0.617787 cache=672.1MiB(5030801txo)
That seemed to take longer with blocks that had more transactions, suggesting it was still validating (in addition to indexing).
Following is a revised list of steps which could be tested to answer this question with a yes:

Copy the blocks folder from the full node to a new data directory for the pruned node, but leave both nodes running.
Note the latest file timestamps in the blocks folder of each node.
Verify that the block height on each node is the same and then shut them down. Note that if, after shutting down either node, its blocks folder shows a file modification time after those you recorded in the previous step, a block may have been processed on one node and not the other, so start them both up again, don't forget to re-copy the last blk#####.dat file and any rev#####.dat files, and return to the previous step.
Edit bitcoin.conf to change pruned=[not 0] to pruned=0
Update your .conf file or shortcut to point to the new location for the data directory on the pruned node.
Copy everything except the blocks folder from the current data directory on the pruned node to the new one.
Restart the (now unpruned) node.

It’s not self contained. The chain state contains references to the positions within the blocks which are unique to the sync state.

This is incorrect. The chainstate only contains references to blocks in the form of block hashes. As long as the blocks+index contains the tip the chainstate is synced to, both can come from independent datadirs.


text:
Where to buy huge amounts of Bitcoin?
I read the following article:

Bitcoin surging higher after mystery trader buys $344mn in cryptocurrency, Russia Today, February 19, 2018.

Where could the man buy such a large amount of Bitcoin? On an exchange?

Such amounts will not be bought in a single transaction. Instead buying them will be spread out across different exchanges and different periods of time. If this is not done such a transaction would buy up the whole sell order book of an exchange and would run up the price through the roof.
A total of 34k bitcoins is about 3.6% of the volume of the bitcoin market in the last 24 hours. Your Russian friend is a whale by any definition for sure, but 34k bitcoin is not an impossible amount to buy.

Definitely from Mining pools, because it's the source of newly generated coins. or maybe from the markets if he offered good price everyone gonna sell that buyer.

Mining pools will mostly use exchanges to facilitate their selling of newly generated coins. It does not really matter whether the coins come from miners or elsewhere.


text:
How do we know that exchanges don't have trading bots going, affecting prices and our trades?
There is so much unknown when it comes to an exchange. There are bids and asks constantly flashing. There are lots of people using some sort of trade bot tapped into an exchange's API.
How can we be sure that the people running the exchange are not doing anything sketchy?

To know what is going on, it is important to understand the order book.

The order book is the set of all open orders on the exchange.
The bids and asks we see flashing indicate changes occurring on the order book.

The order book changes when these happen:

An order is added to the order book (new order is placed).
An order is removed from the order book (order is filled by a trade or order is cancelled).

Since the order book is visible to us, we can check it for any type of sketchy behavior. The order book can be compared with order books on other exchanges. Some services exist that aggregate pricing data from exchanges. See: https://www.cryptocompare.com/coins/btc/markets/USD. If we use a limit order, there is no way for an exchange to manipulate our order or trade. If they did, we would know immediately. This is because we set the limit price of course. Ultimately, exchanges could be doing malicious things behind the scenes and malicious bots could be operating on the outside. In order to know if funny business is occurring, we must understand how the market is supposed to be working. Additionally, we must protect ourselves from the malicious behavior that may exist.
Additional notes on price manipulation:

If an exchange were to manipulate prices materially, they would create an arbitrage opportunity for market participants. As market participants exploited the opportunity, the price would move toward the true price.
If an exchange were to be creating phony bids/asks, aka quote stuffing, it would require analysis of all order submissions to know that this was happening. This data would need to be made available. The SEC provides this type of data for analysis of exchange traded equity securities. This data is provided through the Market Information Data Analytics System. This type of manipulation would not affect users creating limit orders. However, it would allow the exchange to scalp every market order.

We can protect ourselves by:

Using limit orders. When we use a limit order, we set the limit
that we are willing to pay. When we look at the order book, we are looking at all prices available to choose from. At each price there is some quantity available for trade See: GDAX limit order
Avoiding market orders. If we use a market order, the price is not
specified. Thus, any price can be used to fill our order. See: GDAX market order

I have made this video discussing the order book on GDAX.  Take a look here: GDAX order book
This playlist contains the videos mentioned above along with others that may help.
Take a look here: GDAX Playlist

not exactly answering the question. This is basic market fundamentals, not how an exchange could be manipulating bids/asks/prices behind the scenes without anyone knowing.

@yourbrutalness What I have stated is how to deal with those concerns. For example, the title mentions, affecting our trades. Using limit orders defends against this. I'll add some details.

@yourbrutalness I've provided an update. Please let me know what you think.

Thanks for the update. I read through it carefully and it does address the question more directly. You are right in stating that we know through limit orders (not market orders) that our(the user's) actual price that we have submitted is being filled. Yet, this does not explain how we can be sure, that an exchange "owner" is not adding a bunch of phony bid and ask orders, that through time, can artificially drive the price up or down by filling orders, primarily orders to make an open position, especially on pairs other than USD/BTC, that aren't on other exchanges that keep them honest.

@yourbrutalness I have added more information in this Additional notes on price manipulation section. I hope this helps. Let me know.

In an unregulated exchange anything is possible. I am positive that exchanges have great potential to do stuff that is sketchy. If you plan your trades hourly or weekly you will be affected in the minimum amount.
But for short term trades 30min etc you might be fooled by the trading bot of exchanges or bots connected by api.


text:
Do cryptocurrency exchange sites work and operate like a regular bank?
I have come across cryptocurrency exchange sites (for example, coinbase, bittrex, etc) and I was wondering if they operate like banks. What are the (usual) legal requirements in order for a site to operate legally?

Main laws that they do have to comply with are Money Laundering and Terrorist Financing and "Know Your Customer" type rules.
This is why when you open an account you have to send ID etc.. These they are forced to comply with as the banks that serve them (remember you have to wire them the USD EUR etc.. somehow - and that is through a bank with whom they have an account) force them.
What they DO NOT have to comply with are all the other regulations that an exchange/bank would normally have to comply with - hence the reason they go bust so often!
E.g. they are not required to segregate client funds, they do not have to retain capital to protect clients, nor do they have the same requirements for auditors, segregation of duties (making sure the developer is not supporting the site too!), being fair to clients etc..

Each site and it's country regulation rules. if there is no regulation or law, for the majority there isn't, so the site can be forced to be closed someday.


text:
Can't buy bitcoins from Greece via prepaid card
I have an account at National Bank of Greece and would like to buy bitcoins in Greece using a pre-paid Visa Card. Can someone point out how I could do that? I could also get one from another bank if that's necessary. I have heard about a Bitcoin ATM somewhere, but I'm unsure if that would work in my case.
I also tried blockchain, but the bank didn't send the cash.

Bitcoin Core is a full node and includes wallet features. You cannot buy and sell Bitcoin directly in Bitcoin Core, you can only send/receive BTC. To buy/sell Bitcoin you need an exchange.

You cannot buy bitcoin from a greek bank account, transfer, with credit/debit card or using paypal. They have blocked all transactions due to the capital controls.

Seriously? What a mess

Using a prepaid card (if it's anonymous) is not something widely accepted, because it's not possible to see who's the sender. That's one of the main reasons to have some struggles.
If you have a bank account in Greece, you can easily buy Bitcoin using bank transfer (SEPA).

Is it about buying coins anonymously? Then I would recommend to check out bisq, a decentralized exchange where you trade peer to peer via the means of your choice (SEPA and even cash in person I think). The best solution would buying for cash obviously, check out this website for checking if there is a Bitcoin-ATM around your place.
Relai or Pocket are good solutions if KYC-light is an option for you. However I don't know if they are blacklisted by your bank.

You can buy Bitcoin via credit card / paypal via https://xcoins.io
Disclaimer: I do work for them as an Software Engineer in our Santa Monica office.


text:
How do I know which exchanges are serious actors?

How do I find bitcoin exchanges?
How do I know if the exchanges can be trusted?

The question here is how to evaluate and pick an exchange to do business with. Answers that ignore the question and instead recommend specific services will be removed as spam.

For finding Bitcoin exchanges, check here (exchanges are ordered by volume):
https://www.cryptocompare.com/coins/btc/markets/USD
There are two types of Bitcoin exchanges to consider:

Centralized
Decentralized

With decentralized exchanges, users keep their assets local, and so there is no need to trust a central authority. At the present time, it is harder for decentralized exchanges to build up liquidity. This means that the trading volume is lower and the bid/ask spread is wider.
Here are couple of resources regarding decentralized exchanges:

0x Protocol for building decentralized exchanges for Ethereum
assets
Waves platform DEX - decentralized exchange
https://www.cryptocompare.com/exchanges/guides/what-is-a-decentralized-exchange/

Now, with centralized exchanges, the central authority running the exchange must be trusted. The process of deciding who to trust is less straight forward. Here are some attributes to consider when evaluating a centralized exchange:

The people running the exchange or company
The country where the exchange is subject to regulations
The security practice the exchange uses to protect customer assets
The insurance policy offered by the exchange
The history of customer issues at the exchange, reviews etc.
The transparency the exchange offers
The communication facilitated by the exchange with its customers

I have put together this YouTube playlist discussing some of these attributes with respect to GDAX, Coinbase's exchange: GDAX and Coinbase cryptocurrency exchange - Overview

@Taemyr I updated with further info: For finding Bitcoin exchanges, check here (exchanges are ordered by volume): https://www.cryptocompare.com/coins/btc/markets/USD

I've come to realize over the years it's a good practice if you have a decent amount of value sitting on an exchange and you want to go long..  it's best to take the time to download the blockchain for your investments, Then encrypt the wallet files and backup to multiple places (including a cloud account).
Taking the coin off the exchange gives you a peace of mind and mitigates "impulse trades".
If you are trying to find the best exchange to short a coin, click the coin on coinmarketcap.com and look for the exchange with the most volume.
I prefer Poloniex, Kraken, hitbtc, and liqu
I've lost coin on mtgox, bitfinex, btce
Good luck trading!

Most of this answer is unrelated to the question, he didn't ask about long term holding best-practises...

This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

@cdecker I think this is an answer - the answer is 'don't put yourself in a position where you need to trust the exchange for long periods of time.'


text:
BTC Arbitrage Opportunity question
I have an bank account that allows me to exchange between currencies at no extra premium other than the exchange rate.
I am noticing large spreads between some of the BTC prices in various currencies.
For example
1 BTC USD is 9283
1 BTC GBP is 5382 (7338 USD)
I am seeing this correctly, does it make sense .....is this an arbitrage opportunity?

Is this an arbitrage opportunity?
You also need to consider the exchange rate between the two currencies to determine if this truely is an arbitrage opportunity.
1 British Pound currently buys 1.39 US Dollars1 whereas the transfer via BTC using the figures you have quoted yeilds 1.724823486 times.
This is indeed an arbitrage opportuniy if you can buy BTC in British Pounds and sell them for more US Dollars, provided you have some British Pounds to buy them with initially (and allowing for any additional cost of buying them, and the transaction fees).
If you can instantly buy and instantly sell this is possibly (the disclaimer) a large opportunity.
rel:
1. According to Big Internet Search Engine.

Thanks.....Looks like this one is gone for now, but RMB arbitrage is back...


text:
Can I send bitcoin from paper wallet directly to hardware wallet?
Can I send bitcoin from my paper wallet to my hardware Ledger wallet without using blockchain wallet?

Paper wallets give you direct control of your funds and a single private key.
Some wallets have an import private key feature. Check if your Hardware wallet allows importing or sweeping.
What you want to do is sign a transaction for all of the unspent outputs that sends funds to one of the addresses on your Hardware wallet. This is often known as "sweeping", when you take all available funds under an address and send them to a different address.
Most wallets will sweep funds to itself, as opposed to letting you enter any address to sweep to. Creating a sweep transaction on your own is an advanced technique for programmers and command-line junkies. You should be comfortable creating these types of transactions in a test environment before ever attempting to do so with real sums of money.
There are also tools and libraries available that will help you with this, just be very careful to only use a reputable source -- there are many scams that want to steal your private key(s).
Recommendations on this site are strongly discouraged, so here are three (3) external examples that can help you sweep your funds.

Samourai Wallet can sweep funds from private keys and QR codes.

Electrum can sweep keys to any destination address. To sweep private keys, go to the Wallet menu -> Private Keys -> Sweep. Enter the private key in the appropriate field. By default the “Address” field is populated with an address from your existing electrum wallet. Change this to your one of your Hardware wallet addresses.

Sweepkey is an open-source tool I created using the bitcoin-js library for my own usage that sweeps funds from a private key to any specified address (again not a recommendation just an example).

I cannot stress enough, be very careful when interacting with private keys in a hot(online) environment. It is best to never expose them to an online environment, but if you have to, please practice on testnet or with small amounts until you feel comfortable you know what you are doing.

Yes you can.
1) download a wallet like electrum or multibit exc.. which one do  you like you can download it ( you can find s ome wallets at bitcoin.org NOT *.com it is *.org be careful)
2) import your private key to the wallet then send your bitcoins.

Use https://coinb.in
You can just import the private key, and make a transaction, without installing a wallet!
Security advice: Download coinb.in from GitHub and run it locally.

All you need is an address to send the money to. You could create an address with your hardware wallet, create a wallet here https://www.blockchain.com/wallet
Import your private key then generate a tx to your hardware wallet and send it, then discard the online wallet


text:
Is it safe to use a second-hand Trezor (like from ebay)?
I just got a good price from eBay on a supposedly never-used Trezor hardware wallet.  I have no specific reason to think this would be dangerous to use, but I'm being cautious and ask here first:

Are there any reasons why it would be unsafe to use a second-hand Trezor to store my BTC?
Is there any way the previous owner could retain access to it and get at my coins?
Any other risks to a used hardware wallet I should be aware of?

If you update the firmware you are probably safe, but why take the chance? The Trezor itself (or even the included USB cable https://www.wired.com/2014/07/usb-security/) could have been corrupted/replaced by a sophisticated actor.
If someone gave me a used Trezor for free, I would throw it in the garbage. No discount would be sufficient enough for me to justify buying a used Trezor:
https://www.reddit.com/r/Bitcoin/comments/2dbjd9/trezor_tamper_proof_seal_doesnt_help_much_against/

Hmmmm but from reading that thread, even a Trezor shipped directly from the company can not be ensured to be un-molested.  If taken seriously, this makes me think that absolutely no hardware device could ever be trusted... not a USB stick, not a router, nor anything that has ever been shipped via any means whatsoever.  Seems like unless you build your own chips, code your own software by hand, and assemble your own computer... one can never be certain of its security...

It's honesty easier to just mug/rob you and take your belongings than to corrupt your USB cable, either when reselling on eBay or by intervening in a package from the manufacturer. Don't nail the door shut and leave the windows open in your quest for security.

That was kinda my thinking as well, but I wanted to get some outside, hopefully educated, alternate points of view.


text:
If cryptocurrencies have no intrinsic value, how do they originate?
In theory, anyone could create an infinite quantity of their own cryptocurrency right now. However, if you were to do this, it would have no value and, thus, it would be useless.
Since value comes from demand, how is it possible to create something from nothing and expect people to pay for it?

related: Where do bitcoins come from and what gives them their value?

You seem to have a misunderstanding:

anyone could create an infinite quantity of their own cryptocurrency right now

This is not accurate.  The breakthrough that enabled Bitcoin (and other cryptocurrencies) was the ability to make a digital asset scarce without trusting a central authority.
In the past, currencies (digital and otherwise) have required an issuing party, whom we all have to trust won't hyperinflate the currency by creating too much of it.  This might be a regional bank, a central bank, a government, or something of the sort.  Bitcoin changed this.  By using a few clever cryptographic tricks and some game theory, Bitcoin is able to give its users a very strong assurance that hyperinflation will not occur, without anyone trusting a central authority.  Bitcoin has decentralized digital scarcity.
What this means, is that there is a fixed supply (which nobody can reasonably increase) of a currency with a built in transaction network.  There is plenty of demand for such a system, yet limited supply...therefore, there is value.

fractional reserve banking in principle can increase money supply over the fixed hard coded limit. 2 the participants of bitcoin may agree at some point to increase the limit, it's actually quite easy to do as long as the major players agree on the decision.

@Aksakal, yes, that's true, but unlikely.  That's where the game theory comes in.  It is not in the best interests of the people  who could raise the 21M BTC limit to do so, and since you'd need such wide consensus to change, it's technically possible but highly improbable.  Too many people would have to ignore their own interests.

@Aksakal: However in Bitcoin the IOU's necessary for FRB don't have much less friction than actual bitcoins but are trivial to distinguish.

There are a few things going on here:
First, if you were to create your own coin, without using any of the infrastructure created in the -coin community, you could very easily create an infinite supply of your currency and may be able to exploit it before the whole thing collapses.  It is very unlikely, as currencies of any kind need to be backed by faith that it has value and will continue to have value.
Bitcoin, and other alt-coins, have a limit built into them.  Without going too far into the history and future of bitcoin, basically every so often, a block of coins is "mined" that grants an amount of coins to whoever mined the block.  Every so often (I believe targeted at 4 years for Bitcoin) the value of these blocks is halved.  In the beginning it was 50 coins a block, and now I believe it is at 12.5 coins per block.  Eventually, there will be no more coins created for these blocks.  These blocks represent transactions that are occurring on the blockchain, and "miners" who are trying to solve the blocks are verifying and processing transactions.  Solving the block also nets you any transaction fees in addition to the coins minted for the block (so when all coins are gone, in theory, the blocks will still be "mined" for the transaction fees).
To go to the second point, how bitcoin has value, it doesn't operate like most currencies, in that there is no bank that can just print more money, instead it operates like a finite resource.  There are only so many bitcoins in existence, and there only will ever be so many.  Additionally, there are some "dead" bitcoins in accounts that are not in use or have been lost (for example, there's an anecdotal story about a guy who mined 16,000 bitcoins and threw away the computer he mined them on, without having access to the private key for his wallet elsewhere.  Now that bitcoins are worth $2500+, that's a lot of lost money sitting in a landfill somewhere).   It's value is both in its rarity and the willingness of people to accept it as currency.  As more people use bitcoin, it becomes more valuable (which is why so many bitcoin users seem like missionaries, trying to get people to convert to using bitcoin).
Bitcoin has no real value beyond it's ability to be accepted as a form of exchange.  If, for example, all countries in the world outlawed the use of bitcoin, it's price would plummet and it would become worth nearly nothing.  On the other hand, if a country enacted laws demanding all vendors accept bitcoin, its price would increase (as demand increases).  In any case, it has no value beyond the fact people are willing to accept it as a medium of exchange.  This is different from most fiat currencies, in that while most do not have any true value on their own either, most governments have sufficient power to ensure they are accepted as a means of exchange and faith in the government provides some implicit backing (plus in many countries, vendors are required by law to accept local currencies, they are not required to accept bitcoin).

These responses miss the original post. They explain the inflation/deflation aspects of Bitcoin.
The responses don’t address ‘intrinsic value’ - acceptance of one currency over another. How can any crypto/blockchain currency be accepted widely if there could conceivably be an infinite number of crypto currencies. And the answer is that it it cannot.
How has the USD maintained an intrinsic value? It’s centrally regulated, and more importantly, trust. Trust because the USD maintains an intrinsic value loosely associated with US democracy and capital markets.
Blockchain is a great new technology that many banks and governments talk about adopting.. Blockchain isn’t crypto. So let’s be clear, a proprietary currency will not last without a trusted political and regulated infrastructure.


text:
Is there anything like a "blank" blockchain?
I'm looking to create a coin with my own method of securing the network. Is there anything close to something I could create my own algorithm and replace that portion of the code with my own? Thanks!

Yep. Do all of the normal steps for creating an altcoin. https://bitcointalk.org/index.php?topic=225690.0
Then, replace the CheckProofOfWork function with something else.

Methinks we need this answer as a template :)


text:
Questions about Bitcoin mining hardware and in pools
I have recently found out about Bitcoin, and as I read more and found about about hardware and stuff, I thought of a lot of questions.
So Butterfly Labs has Bitcoin mining hardware, and I was thinking, "if I'm going to do it, I'm going to do it well." With my current setup (GTX 560), I was making about 1 cent a day. I have given up with that now, because with power usage of mining with a GPU, it's not even worth it. So I was looking at the 600 GH Bitcoin mining card on Butterfly Labs (https://products.butterflylabs.com/homepage-new-products/600-gh-bitcoin-mining-card.html), and with the specs that they have listed, I figured on this calculator (http://www.bitcoinx.com/profit/) that it would make enough Bitcoins to pay for itself in about 16 days (at the current difficulty level, its power consumption, and price of Bitcoins).
Now, that brings me to shares in pools. It says that EasyMiner software is provided. That would mine the Bitcoins for me, but when I was mining with GUIMiner, I realized that I wasn't getting share after share, I was getting one about every 4 or 5 minutes. Is it the software that requests shares, or does the pool's server push it to your miner? This EasyMiner that comes with this mining card, does it know when it finishes mining and requests another share, if that's the case?
Also, the calculated price, is that mining alone, or is it in a pool? It says that alone, it would take 148 days to decrypt a block, or whatever it does (I'm not quite sure what it does yet, but from what I understand, "blocks" are SHA hashes or something). Would I be able to put that card in my current machine (in a free PCI express slot) and run the program, and it wouldn't even slow my PC down? Or would I want a different machine for it? It seems too easy to get all of that money with just this one card.
There is also the TerraMiner IV (www.cointerra.com/product/terraminer-iv-2ths-networked-asic-miner-may-batch/) that is 2 TH/s, but comes with CGminer (with web-based management, whatever that means. Connect to it via the internet?). Would it be better to invest in this than in the ButterflyLabs 600 GH/s card?

It depends on what you mean by "doing it well". If you have beyond tens of thousands of dollars to spend BFL's stuff would work out. But most profitable for the thousand dollar operation would be mining scrypt and the many altcoins with a bunch of graphics cards.

Hi TheNytangel, welcome to Bitcoin.SE. Stackexchange is a question and answer site that is designed to collect questions and great answers. It works best, if you only ask a single question. Please check out [about] and [ask] for more information.

First a short explanation what your miner does: it calculates the (double) sha256 hash of some data. The resulting hash has to have some leading zeros. The number of leading zeros is the "difficulty": The more zeros, the more difficult it is to find it. A miner changes some bytes of the data it hashes, to generate different hashes.
Most pools support different protocols with different options. The original protocol was getwork. But this allows only 2^32=4.29 GH for one request. For fast ASIC miners with 600 GH/s, the limiting factor would be the network speed, not the mining speed, because the miner was allowed to change 4 bytes only. There are some extensions to increase this limit, but it is not a nice an extend-able protocol. This was the reason to invent getblocktemplate. It allows to change much more data on the miner client side, and the miner decides what transactions are included in a block.
If your mining software gets a "share", it mines it until it finds a hash for the requested difficulty. Then it sends it to the server. There are pools which adjusts the difficulty, depending on how fast your client solves a share. The client can actively request new shares, or it can use the longpoll option, which means the server sends new shares, if it thinks it is necessary (e.g. there are new and profitable transactions with fees which can be included in a new block and which might require a new getblocktemplate). Easyminer supports getblocktemplate, so it is not important how many shares you get.
The profit calculator you cited is for using the miner with a pool. Except the solo mining days number: 148 days would be the average time you need to solve a block on your own. the difference to pool mining is, that you create your own block (this is similar to getblocktemplate), but the difficulty is not from the mining pool, but it is the current difficulty from the bitcoin network. This makes it much harder to find some data, so that the resulting hash satisfies the difficulty. But if you mine a block, you'll get 25 bitcoins for it. If you are lucky, you could find a block after a week, but if you are unlucky it might need a year.
The required processing power for your computer for a PCI card is very low. The computer is only used to get the work from a pool (or the bitcoin network for solo mining) and then waits for the card to brute force a lot of hashes. But you need a good power supply and cooling system.
The problem with all the current mining hardware is the availability. You can pre-order it, but when you get it (sometimes you have to wait months for new products), the difficulty of the bitcoin network might have increased already, so that it needs longer until the hardware break even. Or the exchange rate for bitcoins to a fiat currency dropped, if you want to exchange it.

So the network speed, would you want a better download speed, or upload speed? And I'm thinking about going with the TerraMiner IV (definitely not ButterflyLabs because I saw another question and they were not highly recommended because of delays and not responding to emails) which is 2 TH/s, so what sort of network speed would you want?

The internet network speed is not important. One request is just a few kilobytes, and you need new requests only every some minutes, or at most seconds. You could mine even with an old ISDN line.


text:
Detailed overview over old exchange rate
I would like to create a detailed overview about the exchange rate of bitcoins over the last months. Unfortunately, all I can find are lists with one value per day, but I would like to have much more detail (one value per hour at last).
Is such a detailed list available somewhere on the internet?


text:
Spend Segwit address output
I want to create a segwit transaction using bitcoind on testnet2. For this I created a P2SH-P2WPKH  address as mentioned here and sent coins to it. Now, how do I create a segwit transaction to spend from this segwit address. Is there any easy way other than createrawtransaction ?
As suggested I tried using normal bitcoin payment operations to achieve this, but it didn't work !
Created segwit address and sent funds to it. Looking good !
enigma@enigma-laptop:~$ bitcoin-cli getnewaddress
mybVcLQk3BdDWvQFKFrX6cfsMUDA2XyQUv
enigma@enigma-laptop:~$ bitcoin-cli addwitnessaddress mybVcLQk3BdDWvQFKFrX6cfsMUDA2XyQUv
2N14FtFJFhvvvwLKq8dQqQ9NPEmWQF9bwPV
enigma@enigma-laptop:~$ bitcoin-cli setaccount "2N14FtFJFhvvvwLKq8dQqQ9NPEmWQF9bwPV" "segwit_testnet"
enigma@enigma-laptop:~$ bitcoin-cli getaddressesbyaccount "segwit_testnet"
[
  "2N14FtFJFhvvvwLKq8dQqQ9NPEmWQF9bwPV"
]
enigma@enigma-laptop:~$ bitcoin-cli listtransactions "segwit_testnet"
[
  {
    "account": "segwit_testnet",
    "address": "2N14FtFJFhvvvwLKq8dQqQ9NPEmWQF9bwPV",
    "category": "receive",
    "amount": 0.01111000,
    "label": "segwit_testnet",
    "vout": 1,
    "confirmations": 0,
    "trusted": true,
    "txid": "1a9f518606078495460edd0b98ac5e7bfd1a4dd5cc982d20eff4f67333a09257",
    "walletconflicts": [
    ],
    "time": 1503208157,
    "timereceived": 1503208157,
    "bip125-replaceable": "no"
  }
]

Trying to spend from segwit address output
enigma@enigma-laptop:~$ bitcoin-cli sendfrom "segwit_testnet" mh8tGnF6RCsnWUMTw1WL9UWjjgyMRRTM8t 0.0088 0
9d3c5496f60376daf0db2aa683f7932cd8003dc16e7841e310cebf582ae25674
enigma@enigma-laptop:~$ bitcoin-cli getrawtransaction 9d3c5496f60376daf0db2aa683f7932cd8003dc16e7841e310cebf582ae25674 1
{
  "hex": "020000000191158541159bfcaecb5f51cf219aa5f412bfa4e6dc24cedb1d941926edd661a8000000006b4830450221008e7a6ac64baf93451f05307bb5e0c7544d7667a9793ce691487a5afaaf1b3839022043415d2a85d61be67912c3a9ea1b42dfdfc1a6997bba2d2fef998ad999aa0c23012102dfd3b9834bc783a9a86136ca9d3941f85798902e3d3c70b056e8fb26a204bf2dfeffffff02806d0d00000000001976a91411c3be38b2bef73be3d80d92cadd265dfaa84fe288ac5b60891c000000001976a914c11b02c5c06a5e68cf59fcba24d3a74e38bb404f88ac5dff1100",
  "txid": "9d3c5496f60376daf0db2aa683f7932cd8003dc16e7841e310cebf582ae25674",
  "hash": "9d3c5496f60376daf0db2aa683f7932cd8003dc16e7841e310cebf582ae25674",
  "size": 226,
  "vsize": 226,
  "version": 2,
  "locktime": 1179485,
  "vin": [
    {
      "txid": "a861d6ed2619941ddbce24dce6a4bf12f4a59a21cf515fcbaefc9b1541851591",
      "vout": 0,
      "scriptSig": {
        "asm": "30450221008e7a6ac64baf93451f05307bb5e0c7544d7667a9793ce691487a5afaaf1b3839022043415d2a85d61be67912c3a9ea1b42dfdfc1a6997bba2d2fef998ad999aa0c23[ALL] 02dfd3b9834bc783a9a86136ca9d3941f85798902e3d3c70b056e8fb26a204bf2d",
        "hex": "4830450221008e7a6ac64baf93451f05307bb5e0c7544d7667a9793ce691487a5afaaf1b3839022043415d2a85d61be67912c3a9ea1b42dfdfc1a6997bba2d2fef998ad999aa0c23012102dfd3b9834bc783a9a86136ca9d3941f85798902e3d3c70b056e8fb26a204bf2d"
      },
      "sequence": 4294967294
    }
  ],
  "vout": [
    {
      "value": 0.00880000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 11c3be38b2bef73be3d80d92cadd265dfaa84fe2 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a91411c3be38b2bef73be3d80d92cadd265dfaa84fe288ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "mh8tGnF6RCsnWUMTw1WL9UWjjgyMRRTM8t"
        ]
      }
    },
    {
      "value": 4.78765147,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 c11b02c5c06a5e68cf59fcba24d3a74e38bb404f OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a914c11b02c5c06a5e68cf59fcba24d3a74e38bb404f88ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "my814pfgD9Cexktur58B4nSY5vQfCqJQ1g"
        ]
      }
    }
  ],
  "blockhash": "0000000074ba5f011ef6bf50e387b701188359f3e0b60b2169c3109eedda0295",
  "confirmations": 1,
  "time": 1503208357,
  "blocktime": 1503208357
}

The vin txid should be 1a9f518606078495460edd0b98ac5e7bfd1a4dd5cc982d20eff4f67333a09257 and it should spend the segwit address txout. Why did this not work ?

If you used addwitnessaddress on your wallet, and sent money to the resulting P2SH-P2WPKH address, the resulting outputs will be considered owned by your wallet. As a result, they're available for all normal coin selection operations. That includes using listunspent, createrawtransaction and signrawtransaction, but also all normal payment operations like sendtoaddress. Those segwit outputs just become part of your wallet, and the wallet will spend them whenever needed.

Thanks @Pieter. I tried to do this using existing bitcoin-cli operations and it didn't work (Reference: Edited Question). Please advise

You're using "sendfrom" in an attempt to control which inputs are spent. That is not what what sendfrom does. Accounts are just bean counters; inputs don't belong to a specific account, they belong to the whole wallet. Accounts just let you account for things. You need to use createrawtransaction with spefific inputs, or spend enough money so that the segwit coins get selected automatically.

oh ok got it ! I will do a createrawtransaction then. I just thought there would be easier way to help make segwit transactions in bitcoin-core/qt ..so that people can take advantage of rather than manually construct using rawtransaction (like a simple check box in GUI or a flag in rpc command).  Anyway that is out of scope of this thread. Will check on bitcoincore github  . Thanks a lot @Pieter

Pieter Wuille, are you going to publish your SegWit address vanity software?


text:
How does an exchange calculate the price of a coin?
How does an exchange calculate the price of a coin? I know it has to do with the amount of sell and buy orders, but what is the formula to do this?
For example, if GDAX says one bitcoin is $10k on their exchange, how did they calculate that?

It's not a calculation, just a report of the price at which trades are currently taking place.  It's likely either a bid, ask, or last price; you can look up all those on any finance site.  It could also be an average of recent trade prices; you'd have to look carefully at the description attached to the price.

VWAP

It's normally all about offer and demand.
A "formula" for an exchange could be something like: BTC price shown on the website = average amound (in $) paid for 1 BTC within the last 2 minutes [- exchange fees]
If there are 2 trades in this time:
person A buys 1 BTC for 10,000$ and person B buys 1 BTC for 10,100$, the average is 10,050$. And if there are 500 trades in the last 2 minutes, you get a more accurate average price.

it's value change is analogous to other market thing as gold,silver.
if 1.people  not want Bitcoin suddenly 2.or country ban the Bitcoin 3.bitcoin network get problem with some reason  and many more event cause demand reduce and supply increase so Bitcoin value decrease and vise versa  if demand increase the Bitcoin value increase.
The value of its decided at bitcoin exchange which depends on market (one of main reason is supply and demand).each Bitcoin exchange have own value but not far from other exchange . almost all exchange have equal value.


text:
Can the Large Bitcoin Collider project 'break' into offline hardware wallets like the Nano Ledger S?
Let's say the Large Bitcoin Collider manages to guess the private key of a particular Nano Ledger S. Can they then 'spend' or 'steal' the Bitcoins on the Nano or 'send' them to another wallet?

No, because it can't break any private key at all (if generated correctly).

What do you mean it can't break any private key at all ? I've read they have already 'guessed' several private keys.

Only ones created by broken software. It is computationally infeasible to break an actual randomly generated key.

Wow .... didn't know that. So why are people at LBC trying ??? Are there that many private keys that are created by broken software ?

I believe they're just having fun spreading nonsense.

If LBC is somehow able to guess anyone's private key, regardless of how the private key is normally stored and generated, then yes, they can just spend the coins. All you need is the private key, it does not matter how the key was obtained.
Of course this is impossible to do in practice with today's technology. The range of possible private keys is incredibly large, much larger than a human can imagine. If the private keys were generated with sufficient randomness (which Ledger Nano S's do as they have a True Random Number Generator), then the probability of generating a private key that is in use is so small that it is effectively zero.


text:
Selling Bitcoin for cash in my store
I am small tech store owner and I was recently thinking about selling bitcoins for cash into my store. A lot of clients asked me if I could install a BTC ATM in my store.
But investing in an ATM machine isn't possible for me at the moment. So I wondered if I could possibly sell them for cash directly. The question is: is there any service out there that provides an API to buy bitcoins with my credit card and send them to the client's wallet directly ?
I could possibly create that API myself and send the Bitcoins from my wallet but that would mean that I'll have to invest in Bitcoin and could possibly be losing if the BTC price falls down.
Do the ATM companies actually own Bitcoins ? Or are they purchasing them when someone uses the device ?

So far as I know, most store owners just rent floor space to a company that operates the Bitcoin "ATM". The store owner gets fixed monthly rental income and doesn't have to get involved in Bitcoin transactions themselves.
You don't need to invest in the "ATM". Just rent some floor space with power. I would expect the ATM operator (not the store owner) to arrange for Internet connectivity, but that's probably just a business negotiation.
One way to find a local Bitcoin kiosk operator is to search the map at https://coinatmradar.com/ - the operator's name is shown at the top when you click on a kiosk location after zooming in to an individual kiosk location.

As Wikipedia notes:
"Bitcoin machines are not ATMs in the traditional sense". A better phrase might be "Bitcoin kiosk" or "Cryptocurrency kiosk" since they generally deal with one or two altcoins too.
"According to Coin ATM Radar, there are more than 800 Bitcoin ATMs in the United States as of 2017, with small shop owners earning a reported $300 a month for rental space." (my emphasis)


text:
How are Ledger Nano S private keys protected?
I've read quite some material but it boils down that there "is a chip" on Ledger Nano S and the private key never leaves it. But what I would like to know is the following.

Is it encrypted? If so, how? Using my PIN?
I know the device is reset after 3 false tries while entering the PIN, but is the private key really encrypted inside this chip? Otherwise one could (in theory) remove the chip, put is somewhere else and read it out.

Any thoughts?

Ledger uses a secure element chip to store the private key.
In simplified terms this means that the private key is stored on a special chip that is almost like a small computer with a Operating System with a very strict and well defined interface. This interface is designed to NEVER allow an extraction of the private key except during the creation of the key when the seed is shown on the display. The only operation that uses the private key that is supported is to send input (read transactions in terms of bitcoin) that the chip signs with the private key, and then returns the signature. Therefore the only output you could get from the chip is the signed transaction, and never the private key, no matter where you put the chip.
Secure element chips are not a new invention by Ledger, but actually a technology used in many other use cases (other examples are passports and credit cards). Ledger uses a Javacard with version 3+, which supports creation of ECC keys that have size of bitcoin keys.
It should however be noted, that even though the chips are designed to never let anyone extract the key from the chip, even with physical access to it, a well motivated and funded actor (like NSA) could theoretically extract the private key.


text:
If I send Bitcoin from the USA to a friend in India, do I have to pay capital gain tax on it if he sells it and makes a profit?
Let's say I buy $10,000 worth of Bitcoin in the USA, which I transfer to my friend in India. He sells it for $11,000 and keeps that money himself as I have gifted him that Bitcoin. My questions:

Should I pay the tax in the USA because he got profits from the Bitcoin which I sent?
How does the IRS know that particular Bitcoin has been sold?
Even if they know it was sold, how can they tax me as I am not the person who sold it?

Is this a true gift? That is, you aren't getting any benefit from it and are just giving it to him out of generosity? It's not part of any transaction? Did you make any other gifts to the same person this taxable year? If so, are you married? (If not, it doesn't matter.)

If this is a true gift, that is, not part of any larger transaction and given out of the kindness of your heart, then you're probably going to have to consult a tax professional because this will depend on the precise tax treaties between the United States and India.
Generally, when you give a gift to another person in the United States, you do not have to recognize the appreciation in value of that gift as a capital gain and the recipient gets the same basis you had, so they will have to pay capital gains tax when/if they sell it.
But generally, when you give a gift to someone who is not a US citizen, you do have to recognize the appreciation of the value of the gift as a taxable capital gain before you can gift it. However, this can be modified by tax treaties.
If this is not a true gift and is part of some other kind of transaction, then you absolutely must recognize the change in value of the bitcoin as a capital gain before you can give it to someone else, domestic or foreign.
You asked:

Even if they know it was sold, how can they tax me as I am not the person who sold it?

The tax is not on the sale, it's on the increase in value which is a form of income. Generally, whenever you dispose of an asset, any increase in its value is a taxable gain. There are exceptions, such as a true domestic gift, those made by international treaty, and if it's transferred because of your death.

I am not a lawyer or a tax accountant so you can take my answer FWIW.
Your question equates to, if I gave my friend in India some USD, would I have to pay Capital Gains Tax if the value of the USD went up, or, if I gave my friend in India some peanuts, would I have to pay Capital Gains Tax if the value of the peanuts went up.
So, the answer is no, no CGT on what you gave away (unless if by some strange quirk US law requires you to pay CGT on property you have already given away anyway, if the value of said property increases?)
In Australia generally, CGT is only payable when the profit is taken, i.e. when the property is sold for a higher value than it was acquired for. I do not know that there are specific laws in Australia for CGT to be payable on forex trading, as BTC is seen akin to foreign cash here, although I believe you would still need to declare the income from the profit and pay the appropriate marginal rate of income tax on that.

Not a lawyer or tax accountant either, but at least if this was within the US, I believe this is wrong. If you pay someone by means of transferring an asset to them, you should pay CPG on it, and the recipient receives the assets with cost basis the value being paid. However, if it is a gift (meaning it is not in return for anything else), no CPG is owed and the recipient gets the asset with the original cost basis you had. The situation may be different for international transfers/gifts, though.