text:
How do I setup an Esplora instance for local testing
How can I setup a local instance of https://github.com/Blockstream/electrs, for example to test/experiment with the Esplora backend for syncing BDK or LDK?

To setup a local instance running in the regtest network, you basically just have to run bitcoind -regtest as usual, and then  follow the instructions given by the electrs installation instructions:
$ git clone https://github.com/blockstream/electrs && cd electrs
$ git checkout new-index
$ cargo run --release --bin electrs -- -vvvv --daemon-dir ~/.bitcoin

However, you have to give a --network=regtest to the last command and possibly need to adapt you bitcoin dir.
After the chain made some progress, the log outputs of electrs will spit out localhost addresses you can give to BDK, LDK transaction sync, or just an instance of rust-esplora-client:

INFO - REST server running on 127.0.0.1:3002

(Note that an Electrum RPC address is also given in case you prefer to use the Electrum protocol)

This is how I startup my bitcoind for regtest testing, I also enable filters for any CBF testing:
mkdir -p /tmp/regtest1/bitcoind; bitcoind -datadir=/tmp/regtest1/bitcoind -regtest -server -fallbackfee=0.0002 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 -peerblockfilters=1 -daemon
For cookie authentication the file is at /tmp/regtest1/bitcoind/regtest/.cookie.

Here is an example if using Polar.
cargo run --release --bin electrs -- -vvvv --daemon-dir ~/.polar/networks/1/volumes/bitcoind/backend1/ --network=regtest

Nigiri is another way of doing it https://nigiri.vulpem.com/ though it comes with other things that you probably want to run yourself


text:
How to create a Blockchain for new alt coin after genesis block has been created?
I am creating a new alt coin and I want to know how to generate a Blockchain for that coin. I have already created the genesis block for my new alt coin.

What's the block generation mechanism? Proof-of-work? Proof-of-stake? Something else? Please post the parameters for your altcoin, otherwise, it's impossible to answer your question.

Iam suing Scrypt-Adaptive-Nfactor

Are you mining yet? What error messages do you get when you try?

you can try the following steps:
 bitcoind -daemon # Start bitcoin core
 bitcoin-cli setgenerate true 1 # You've started a new miner!!
 tail -f ~/.bitcoin/debug.log # Track your log
After a while (it depends on the difficulty of your altcoin), a new block will be generated by your miner.

Check it by typing "bitcoin-cli getblockcount". Every time a new block is genereated, the value increases by one.

hi @moshaholo i'm trying to execute this command "bitcoin-cli setgenerate true 1" but i was removed in the new versions, do you know how can i get first block with recently litecoin source?. thanks

If you're using some form of Proof-of-Work, i believe you have to generate enough transactions that can fill a block. Of course that 1st block will refer to the genesys block. Then other transactions will fill a 2nd block, that will refer to the 1st. And so on.
And voilá, you have the blockchain.
Good luck with your altcoin.

source: Stack Exchange

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

sort: votes


text:
Import a legacy Mycelium wallet from my old phone but see no transactions
I am moving a Mycelium wallet from my old to my new phone, Android to Android.
I have an HD wallet and I have several legacy wallets.
Unfortunately, Mycelium doesn't have an easy way to copy all wallets and transaction labels from one phone to another so I do this manually.
Some of the legacy wallets I import, import fine but they do not show any transactions in the transactions tab. They do have transactions according to the old phone and block explorers on the net.
Why does this happen? How can I solve it?

Typically happens for importing public keys (readonly)

I found the problem.
It is a bug in mycelium... When you show the qr code of a legacy wallet in the "balance" tab, you can click on the qr code to change the format of the bitcoin address... P2PKH or Bech32.... Etc...
It turns out that mycelium will only show the transactions in the imported wallet only if you import Legacy(P2PKH) qr codes!
It took me hours to figure this one out hope i helped!

Sometimes this solution only shows some transactions but not all, then the solution is to import the private key and not the public one

If you want to be able to spend from the new wallet, you should definitely import all the private keys. The public keys will only allow you to watch, but not to spend.

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


text:
What does it mean when a block is "kicked"?
While mining on a NOMP mining pool, I noticed that when you add the confirmed blocks and pending blocks together, they rarely add up to the total blocks found. It is my understanding that the missing blocks were "kicked." What does it mean when a block is "kicked"?

The term seems to have been defined in this GitHub issue: https://github.com/zone117x/node-open-mining-portal/issues/138#issuecomment-42396180.
Kicked basically means orphaned one way or another. Apparently, the creator of this pool software was seeing some strange behavior in the way the daemon would report blocks as being orphaned, and decided to just call them all "kicked" blocks than to differentiate how they were orphaned.
If you are unsure what orphaned blocks are, look at this: What are orphaned and stale blocks?. Essentially they are solved blocks that are not accepted by the network, usually because a different block at the same height was solved at nearly the same time.

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


text:
Can someone with an unlimited amount of money compromize the network?
I was reading this interesting discussion in the comments section on ZH where this guy was talking about how a single entity (think corrupt government and banksters) can throw money and processing power at will at the network to successfully manage a 51% attack or just cause havoc in the system by sending incorrect network messages, such as denying valid transactions or allowing invalid transactions.
The initial part of the discussion quoted here

Assume I'm a completely unscrupulous and ammoral person, for example,
  and I want to shut down bitcoin.  Here are the ways I would attempt to
  do it.

Write a virus to mine bit coins and spread it across the internet.
Write a virus to steal bit coins, and spread it across the internet.
Write a virus to act as part of the bitcoin network, and deny
  transactions that are valid
Write a virus to act as part of the bitcoin network to approve
  transactions that are invalid.
Dump the bit coins I mined as part of step #1 and #2 on the market
Create a mania in bitcoins by dumping billions into buying bitcoins
  after doing step #5
Associate it with terrorism
Associate it with drugs
Claim that people like me are manipulating it

And that's just off the top of my head.
I gots unlimited money.  I am working in a market that is unregulated.
  I run the government or own it.  Try to stop me.

Here is a link to that discussion.
http://www.zerohedge.com/news/2013-03-25/bitcoin-mania-accelerates?page=2#comment-3373165
Can someone please comment on whether this is possible and if not, how does the bitcoin algorithm/ecosystem counter such an attack

Can you quote the comment? Your link doesn't take me to it.

Very similar to Can a 51% attack be detected and dealt with?

@NickODell i've clarified the question further. i guess the question is not ALL about a 51% attack like i posted earlier.

With unlimited money, you could destroy almost anything. I don't really see why it matters. If someone with unlimited money spends a few billion dollars to destroy Bitcoin, we'll just create Bitcoin2 and maybe he'll spend another few billion destroying that. We can keep creating new crypto-currencies indefinitely. If each one gets a few billion dollars out of the hands of some evil entity, that's a win in my book.

Doesn't work this way: if you destroy one currency, the trust in the next one would be back at zero...

Quite the reverse, the inflow of billions of dollars will spur massive interest among people trying to get a piece of that money.

Oh, if you put it that way, that makes sense!

In fact they can. Somebody who could raise 20x of the entire network's computing power can rerun the transaction history from the beginning, throwing out any transactions they don't like. So long as the rest of the transactions are consistent, they should be able to gain the trunk blockchain line. This would make the entire blockchain we have been running up to this point a very large split.
See What is the longest blockchain fork that has been orphaned to date? for a few details.


text:
Uses of computing power by bitcoin miners
How much of what this article says is true?  I thought I had read that bitcoin miners are the ones who maintain the blockchain.  Do they also do something other than maintaining the blockchain?  In particular, things that no one would otherwise want done?
http://gizmodo.com/the-worlds-most-powerful-computer-network-is-being-was-504503726

Related: http://bitcoin.stackexchange.com/questions/331/is-there-a-way-to-set-up-proof-of-work-systems-so-it-would-be-even-more-useful

I'd really be curious, as to how much the computer infrastructure and personnel expenditures of banks would amount to, for the same amount of money transfered and number of transactions processed.

You may be interested in the answers here:
http://bitcoin.stackexchange.com/questions/5617/why-are-bitcoin-calculation-useless/5618#5618

YES.
1)They help maintain the reputation of bitcoin by showing how it "works" and demonstrating that you can make money AND THEREFORE
2)They help encourage the developement of more powerful mining rigs and the business sector that makes them AND
3)They encourage more mining activity AND
4)They increase the difficulty.
GO TO 2).
Oh, just forgot one..
5)They help keep the planet nice and warm with all the electricity converted to heat by the mining rigs (I do hate being cold !).
6)AND ALSO (see my previously posted question): The may(or may not) be effectively working for the NSA (or someone) by helping to crack and/or obtain hash results of SHA256 which may (or may not) be useful (for someone to do something) such as constructing a larger look up table for SHA256 (e.g. crack longer length passwords.).
I suppose if you own a nice big mining rig (or otherwise have "control" of someone else's) it might be more cost effective to use it to hack into something rather than mine coins so I think one answer to the question would be "Yes, but not bitcoin mining if you choose to use the rig for something else more profitable and are dishonest/criminally minded".

SHA3 is interesting. A completely different algorithm (sponge function), variable output length (very useful) but as I understand it still being tweaked with respect to various parameters. I have no doubt it will be the one for the future but whether SHA3 has weaknesses is another matter and time will tell. In general we do need to move away from the simple probability calculations (e.g. 10^15 years). Enigma coding machines have lovely big numbers and seem to get better the more cylinders/wheels added but if you pick at some stage an even no. instead of odd...disaster=crackable.


text:
Where does one find documentation for the MtGox trade API?
I find a lot of references to it, ruby-wrappers etc., but where can one find actual documentation for the MtGox API?

Related: http://bitcoin.stackexchange.com/questions/6133/is-there-any-useful-documentation-on-using-the-mtgox-api-with-node-js

I rephrased the title of the question, since it seemed to me that you were more interested in where to find documentation rather then whether one exists. Please review whether the edit fits your intent, otherwise you may role it back, or improve it to your liking.

Here is their documentation for their http based api and here is their documentation for the websockets based one.
There are many wrappers in many languages already written.

Ruby
Node.js
Python

just to name a few


text:
When a block is "discovered" how is the nonce determined?
I know that a block is based on a random number called a nonce, but if that number is random  and unknown to the miner, how is that number actually verified as the correct nonce and not some arbitrary number?

The nonce is public knowledge once a block is discovered. The number is available to the miner and the verifier.

Basically, there is no such thing as a "correct" nonce, only a set of possible "correct" blocks which can use any nonce they wish to obtain an acceptable hash.  So the nonce is just "some arbitrary number".  But in order to understand how nonces work, you first have to understand the hashing process by which blocks are produced.
Cryptographic hashes are a mathematical way of turning any set of data into a random number, called a hash.  The hashing process is designed so that it's easy to calculate the hash of some data but nearly impossible to find data which will fit a specific hash, having even a slightly different set of data will produce a totally different hash, and so that the only way to find a hash with a particular property (say, being below a certain number) is to calculate lots of them until you get lucky.
In the Bitcoin network, only blocks with certain hashes get accepted and included in the official list.  The criteria for which blocks "count" is that their hash has to be below a certain number called the target.  The network adjusts this number up and down according to how frequently blocks are passing the test--this is how it's able to keep the rate of block production at an average of 10 minutes per block.  So if the target is
00000692856290566183958127638592383846392938562929689273923968

then a block with a hash of
00000739485762992939239823472938472569106923385616929838472389

won't be accepted, but blocks with hashes of
00000683060299472046094517810601040976920106812102601296720934

00000000000000000000000000000000000000000000000000000000453737

or
00000692856290566183958127638592383846392938562929689273923967

will all pass with flying colours.  These aren't real hashes--they're just examples.
A miner is taking a list of checked and valid transactions, putting them together in the right format, and then calculating their cryptographic hash.  But let's say that the hash they get doesn't meet the criteria (as most of them don't).  What are they supposed to do?  The only way to get a different hash is to use at least slightly different data.  So instead of messing up their list of valid transactions or anything like that, blocks have something called a nonce in them.  The nonce is just a meaningless number that can be changed as many times as you like so that you can check a bunch of different hashes and see whether they pass the network's difficulty check.  So when a miner is checking billions of hashes per second (as many of them are) they are just changing the nonce to something else, checking the hash of the whole block; changing the nonce to something else, checking the hash of the (now slightly different) block; changing the nonce again, etc.
In this sense a "correct" nonce is simply the one that allows the block to hash to an acceptable number.  Just like there are many acceptable hashes, there are many different nonces which will work for the same block.  But a miner only has to find one of them.  Whichever one they find first is just fine.
You may also be interested in how the target is calculated.

In fact, because the nonce is only 32-bits, for most blocks, there is no valid nonce that will meet the difficulty. In that case, the miner does have to change the transaction set. Typically, the coinbase transaction is changed. (A meaningless field in the coinbase transaction is used as an 'extra' nonce.)

I'm not sure how far back you mean, but at least as of 0.3.23, it would change the coinbase transaction if the nonce was exhausted. And, of course, all modern miners and mining pools do this.

@eMansipater starting from the very first block at difficulty of one extra-nonce was used.  With diffiuclty of 1 the odds of any particular hash meeting target is 1/(2^32).  With only 2^32 nonce values there is a 36% chance for any given header NO nonce value will create a valid hash.   That is at difficulty of 1.  As difficulty rises the probability that no nonce in nonce range will make a valid hash only increases.

Very good answer! So, you can also say that the difficulty represents the amount of 0s which need to be at the beginning of the hash?

Wow, great answer. One of the things I heard a lot when I started learning was "solving a really difficult problem" but not understanding what the problem was or why it was hard. This makes it clear what makes it "difficult" and that outside of this application, it's an essentially useless problem.

Thanks for this answer. Quick question: What happens if a correct block is found simultaneously by 2 different miners? Since for the block to be "correct" the hash has to be lower than the target, I'm assuming its a possibility. How does the network handle this?

Nothing special happens. It's always the case that the last few blocks in the chain are uncertain because some miners could be building on other, equally-long chains. The further back you go in the chain, the lower the probability that a chain not including that block will ever exceed the length of the main chain. Hence the need for multiple confirmations.


text:
Is there a Bitcoin price alert application that can use data from BitcoinCharts.com?
Is there a Bitcoin price alert application that can use data from BitcoinCharts.com?  Something like a windows desktop alert is what I have in mind.
I need this as I am trying to monitor prices of different exchanges such as localbitcoins.
If not then I may write a quick application for it and post it here.
Thanks

When you say "alert" can you be more specific?  Send an email? have (insert specified OS or device) pop up a notification? Etc

Also, check out this similar question.  http://bitcoin.stackexchange.com/questions/2532/is-there-any-desktop-notifier-application-for-bitcoin-prices?rq=1
There's a link to a webapp http://www.bitcoin-tools.de/

@NeilNeyman Thanks but that web app only uses mtgox data. And by alert I just mean any form of alert. Desktop alert would be best. I am thinking about writing a C# app that sits in the system tray polling bitcoincharts. Something like that would be ideal

The wiki maintains a list of currently available software tools.
I don't see anything on there per-se but it might be an included feature in one of the pc tools.
But I say go ahead and write one if you have the time and desire.  It's nice to have options even if that feature already exists somewhere. I'm mostly Mac desktop guy these days so I'm a fan of multi-platform tools when possible. But that's tough to do for the kind of thing you're taking about. But if you open-source it there's always room for someone to port it or expand upon it!

If you know a little bit of scripting and you are in Linux, you can make a simple script (using curl or wget for instance) that do exactly what you want. Check this out.

I use Bitcoin Checker in my phone, it has a plethora of exchanges but it doesn't have Bitcoincharts, most probably because Bitcoincharts doesn't seem to be a Bitcoin exchange, thus being irrelevant for the use of a price alert app.
In this open source app you can track Bitcoin price in different exchanges and set the alert to a % of variation from the last price, I think it is a great app.

You can try this bitcoin price alert service. It isn't tied specifically to bitcoincharts, but it supports some of the bigger exchanges and can send notifications through text or e-mail.


text:
Which pools offer payouts via generation? (Eligius-style payouts)
As the title says, which pools offer payouts to miners directly in the generation transaction of the block, as in Eligius?

P2Pool for one thing, but that's not strictly speaking a pool...

How isn't it a pool?  It's a group of people pooling their hashing power and sharing rewards.  That makes it a pool as far as I'm concerned.

Luke recently posted that:

Fresh-mined coins for payouts were innovated by pools in the following
  order: puddinpop, Eligius, BitPenny, p2pool.

If puddinpop, Eligius, and BitPenny pay their miners via the generation transaction, does P2Pool have any advantage over them, security-wise? It would seem all these pools are equally immune to potential pool manager fraud, then.

@Geremia: I think I answered my own question: non-P2Pool pool managers still have complete control over the payout queue, viz., who to include in the next block's generation transaction and how much to pay them. So, P2Pool is more secure against pool manager fraud, even than Eligius et al.


text:
Can a blocksize limit be a sustainable way to introduce scarcity?
Some people feel that it will be important in the future to introduce some scarcity into the mining market by having a block size limit.  The idea is that this will force transactors to bid up transaction fees in order to get their transaction into the block.  This may be necessary as the freshly minted BTC subsidy becomes less and less significant over time.
If this idea is going to work, it's safe to assume that the size limit will be hit every 10 minutes.  otherwise, it's not effectively forcing transactors to bid up the fees.  But if that is the case, won't a backlog of transactions start accruing such that the average wait time grows infinitely?  For example, if the limit is (more or less) 2000 transactions per block but the protocol puts a limit at 1500 transactions per block, it seems like there's no way around building up a stock of unconfirmed transactions that grows unbounded at a rate of 500 transactions every 10 minutes.
So it seems to me that a limit on block size can serve the original purpose of preventing some kinds of one-off spam attacks, but it can't be a long term solution to the tragedy of the commons problem.  Please confirm or correct my understanding?

Your analysis seems to assume unconfirmed transactions will sit in the queue forever.  That's not the case.  When someone realizes that their transaction will never confirm, they can create a double spend with a higher fee.  When the double spend is confirmed, the earlier transaction becomes invalid (barring a chain reorganization).
I think it's an open question about how much we should be restricting block sizes.  The current hard limit of 1 MB seems to be a comfortable place for miners with current technology and for full node operators with current disk space and bandwidth limitations.  As fast block propagation technology improves, block chain pruning technology gets deployed, and higher-bandwidth connections become more common, we will likely see a push towards higher block size limits.
We will also hopefully see technology and techniques developed that allow for alternative ways to pay for block chain security, so we aren't so dependent on transaction fees.

My primary concern is that the size of the transaction queue will grow unboundedly.  Is that not the case?  I agree with you that it is not the case that all transactions will wait infinitely.  But I do suspect that the average wait time will grow without bound.

That is very unlikely to be the case.  People will not make transactions that won't confirm, and if they do accidentally create such transactions, they can create double-spends that will confirm.  Imagine we were talking about something besides Bitcoin: if a city reduces the number of available subway trains, will the line of riders increase unboundedly?  No---because people will adapt to the situation.

Could you expand on "adapt to the situation."  How will bitcoin protocol users adapt to the situation of not being able to transact?  It sounds like you're implying that a blocksize limit will result in a reduction of the volume of transactions and an increased transaction price a la a profit maximizing monopolist.  Is that right?  I might be undesirable that, say, the least wealthy 10% of the population will be excluded from the network by design.

You seem to be asking about the consequences of inelastic demand in the face of reduced supply.  I'm saying that scenario is unlikely to result in unbounded growth in pending transactions because users will change their behavior to prevent their transactions from getting stuck in the queue.  Beyond that, your questions are more about what type of uses we should prioritize Bitcoin for---and that's an opinion-oriented question for which I can't provide an objective answer.

What behaviors will they change to prevent their transactions from getting stuck in the queue?  They could bid up the transaction fee but that still leaves some people who can't fit in.  What will those people do?

If you don't think it's worth paying the higher fee, you won't create a transaction.


text:
Unknown key format when importing Private Key from Multibit to Blockchain.info
I'm trying to import a Private Key from MultiBit into Blockchain.info, but get an error saying "Error importing private key: Unknown Key Format".
Is my MultiBit key in the wrong format or something?

What's the first letter of the private key?

`# KEEP YOUR PRIVATE KEYS SAFE !
Anyone who can read this file can spend your bitcoin.

Format:
[[]]

The Base58 encoded private keys are the same format as
produced by the Satoshi client/ sipa dumpprivkey utility.

Key createdAt is in UTC format as specified by ISO 8601
e.g: 2011-12-31T16:42:00Z . The century, 'T' and 'Z' are mandatory

L3m6g... 2015-07-26T11:37:52Z`

If you have not been successful yet, PM me, I think I can help.


text:
How to add money to my Bitcoin Wallet and send my first Raw Transaction with OP_RETURN using bitcoin-cli
Background
So after reading these two articles (Learning Bitcoin from the Command Line and Mastering Bitcoin), I am trying to piece together how I can get my first transaction with OP_RETURN data passed along to store in the blockchain.
I have a full node environment working using bitcoind. Now what I did was encrypt my wallet which came with installing Bitcoin Core.
$ bitcoin-cli encryptwallet "my_pass_phrase"

At this point I'm lost and not sure what to do next. I've purchased $10 worth of bitcoin from Coinbase and it's sitting there in my Coinbase "BTC" wallet I guess. I don't have any other bitcoin available other than this new Coinbase bitcoin.
From what I understand so far, I need to create an address first? Why do I create an address if I don't have anyone specific I am sending money to? I just want to append some 80-bytes of OP_RETURN data to the blockchain. So who do I create the transaction with, what address? And oh, also, what account should I be using, just the default "" account?
So even though I haven't done anything yet, for best-practices sake I've created a backup of my wallet.
$ bitcoin-cli backupwallet wallet.backup

(Not sure where I should put this, but anyways...)
I didn't need to install any external third party wallet system like Electrum which everyone seems to recommend, maybe nowadays Bitcoin Core has all the functionality you need. Not sure.
Anyways, in the "Learning Bitcoin from the Command Line" they say:

Sign your raw transaction and send it, and soon that OP_RETURN will be embedded in the blockchain!

So I would like to, for this post, to create a "raw transaction", rather than doing it the easy way. Some commands that seem relevant are:
$ bitcoin-cli getnewaddress "" legacy
n4cqjJE6fqcmeWpftygwPoKMMDva6BpyHf
$ bitcoin-cli getbalance
0.00000000
$ bitcoin-cli getunconfirmedbalance
0.47000000
$ bitcoin-cli getwalletinfo
$ bitcoin-cli listtransactions
$ bitcoin-cli listunspent
$ bitcoin-cli getrawchangeaddress
$ bitcoin-cli -named createrawtransaction inputs='''[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout' } ]''' outputs='''{ "data": "'$op_return_data'", "'$changeaddress'": 0.8995 }'''
$ bitcoin-cli signrawtransaction 0100000001e34ac1e2baac09c366fce1c2245536bda8f7db0f6685862aecf53ebd69f9a89c0000000000ffffffff02a0252600000000001976a914d90d36e98f62968d2bc9bbd68107564a156a9bcf88ac50622500000000001976a91407bdb518fa2e6089fd810235cf1100c9c13d1fd288ac00000000
$ bitcoin-cli sendrawtransaction0100000001e34ac1e2baac09c366fce1c2245536bda8f7db0f6685862aecf53ebd69f9a89c000000006a47304402203e8a16522da80cef66bacfbc0c800c6d52c4a26d1d86a54e0a1b76d661f020c9022010397f00149f2a8fb2bc5bca52f2d7a7f87e3897a273ef54b277e4af52051a06012103c9700559f690c4a9182faa8bed88ad8a0c563777ac1d3f00fd44ea6c71dc5127ffffffff02a0252600000000001976a914d90d36e98f62968d2bc9bbd68107564a156a9bcf88ac50622500000000001976a91407bdb518fa2e6089fd810235cf1100c9c13d1fd288ac00000000ae74538baa914f3799081ba78429d5d84f36a0127438e9f721dff584ac17b346
$ # Then verify the transaction visually:
$ bitcoin-cli gettransaction ae74538baa914f3799081ba78429d5d84f36a0127438e9f721dff584ac17b346
$ bitcoin-cli decoderawtransaction $rawtxhex

I don't want to have to mess with the testing testnet addresses and such, I just want this to work on the main system (mainnet?).
Not sure if at any point I will be needing to "sign" anything, as in:
$ bitcoin-cli signmessage "n4cqjJE6fqcmeWpftygwPoKMMDva6BpyHf" "Hello, World"

Goal
My goal is to (1) get funds from my Coinbase account into my full node system, and (2) create the transaction somewhere with the OP_RETURN data of an 80-byte string I have. I am not sure who the recipient is in this case as well. I am also not sure how I figure out the amount I should be sending.
The sequence of commands I am considering to run are these:
# Find out where the money is coming from when I send to my wallet from Coinbase
$ bitcoin-cli listtransactions
$ bitcoin-cli listunspent
# Start a new transaction
$ bitcoin-cli getrawchangeaddress
$ bitcoin-cli -named createrawtransaction inputs='''[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout' } ]''' outputs='''{ "data": "'$op_return_data'", "'$changeaddress'": 0.8995 }'''
$ bitcoin-cli signrawtransaction
$ bitcoin-cli sendrawtransaction
$ bitcoin-cli gettransaction

I'm just not exactly sure what should be plugged into what, or if this is correct. Please help.

It might be wise to gain some general familiarity with using Bitcoin Core (especially on testnet) before working with raw transactions, which is sort of an "advanced" topic.  With raw transactions, it is very easy to lose all your money by making simple mistakes.

If you don't know who the recipient is, you presumably don't intend to transfer any money, as you shouldn't be creating a transaction at all (unless it's for testing/learning purposes, in which case testnet is the right choice).

@PieterWuille I want to store data with OP_RETURN, so how do I send some data with that?

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


text:
Could the $25/£16 Raspberry Pi computer be used to run mining equipment?
Raspberry Pi $25/£16 PC article
I saw this article today and it looks like a really interesting development in budget computing.
It's a $25 barebones computer that runs Linux, and can play games like Quake 3 Arena with no problems.
My question is would we be able to run GPUs/FPGAs with it?
I'm guessing FPGAs are feasible since there are USB ports to connect them to, but what about GPUs?
NOTE: The Raspberry Pi would only getwork and pass it to the FPGAs/GPUs. I didn't mean mining directly on the Raspberry Pi itself!

Good clarification

Yeah I thought I best put that before people start posting saying "this won't even get 1Mhash/s"

Yes and no.
As far as FPGAs are concerned, I see no reason why you should not, technically, be able to handle a getwork on one of these and pass the work units to one or more FPGAs via USB.
These units do not, however, have a PCIe slot nor do they have any connectors which, to my knowledge, are capable of connecting to an external PCIe enclosure box, so GPU mining is out of the question.
The real problem you're likely to run into is software. The Raspberry Pi uses an ARM processor and runs on a custom-compiled version of Debian. All software running on the device will have to be compiled from source (since most projects don't just release ARM-compatible executables) and even then some software simply might not work. I'm not an FPGA expert by any means so I've got no idea what kind of software is required to speak to that particular hardware, but I do at least know that software is required and you'll probably have to do some tweaking to make that hardware work.
So yes, it's technically feasible, but don't expect it to be easy (or done for you).

This is what I thought also. I really hope they release a PCI-e breakout for it, but that really is wishful thinking. The project is already amazing as it is.
As for recompiling programs, I think you're right that it is completely feasible to run a FPGA since most FPGA/Bitcoin related projects are open source :)

Agreed, I just wanted to make sure folks were prepared for the amount/level of crazy they're about to be in for grabbing their first ARM platform. You start off thinking "Oh, I'll just compile Bitcoin from source" and then it relies on library X, which relies on Y Z and Q, which each have 7 libraries they rely on none of which have ARM binaries and all of which have to be compiled from source. Total culture shock for those whose primary Linux experience was Ubuntu on i386-compatible hardware.

Yeah, I admit I'm not looking forward to recompiling everything... But it's possible! I don't actually own a FPGA yet sadly.

Doing it that way for an FPGA or ASIC would be very easy, once you have the FPGA or ASIC. All you need to talk to an FPGA or ASIC is a USB port and the software required is very simple. You would need a PC somewhere to act as the mining controller. Of course, if you're mining in a pool, the pool provides the controller, so no issues there.
Using a GPU is a bit harder -- you need a PCI-e interface. PCI-Express interface cores with Linux support are available for Linux -- they're used by some routers to interface to PCI Express mini WiFi cards. Xilinx also has an ARM-to-PCIe core with Linux drivers available. Unfortunately, at least as far as I can tell, there's no sane way to connect these to a Raspberry Pi board. You really want the PCI-Express controller combined with the ARM core or the interfacing gets difficult, ugly, and expensive.

Reading this in 2017 with a chuckle.  The Pi is pretty much the defacto controller due to its low cost and energy use.  I have one running an ASIC over USB with cgminer, compiled on the Pi.
Some of Bitmain's Antminers use Beaglebone Blacks (TI?), I'm not sure why.  I'm in a Debian ARM mailing list and there are more little ARM machines than I can count.  Odroid comes to mind off the top of my head.  What the Pi has going for it is mostly a large userbase (over 8 million last time I checked) and the fact that Raspbian is almost perfect, I'm using it to write this.  I'm fixing to move my ASICs to a Zero since they both just need USB connections.  Cloned my SD card, set up the /boot/config.txt for the old monitor I'll use on it, I don't expect any problems.  The trouble with a Zero is that you need a mini HDMI adapter, an OTG cable, a USB hub, plus a USB to WiFi or LAN adapter.  More practical to just buy another Pi, but for $5 I had to try one.  This will be the first use I've found for it.

back in my day...! ;)

Great summary here:
https://www.electromaker.io/blog/article/cryptocurrency-mining-on-the-raspberry-pi-60
Also includes a step-by-step guide on how to mine crypto currency on the Raspberry pi

Welcome to Bitcoin! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.


text:
BAMT Email Alerts Setup
I have BAMT running on my rig but I don't think the email alerts are working, possibly due to a bad config.
I would like to use Google's SMTP server if possible (or any other free SMTP provider) but Google's uses TLS, which isn't supported in the BAMT configs I believe, so if this isn't possible (and no other free SMTP servers are available), how would I go about setting up my own SMTP server on the rig?
Thanks

Stick with Google and use STunnel to avoid TLS
There is a useful article describing how to get this to work here: https://groups.google.com/a/googleproductforums.com/forum/#!category-topic/apps/mail-settings/oCwPE2o_oCM
The relevant excerpts are:

You can use STunnel to allow non-SSL devices to connect.  STunnel
should be run on a computer on your network that is up 24/7.  The
network printers will connect to STunnel using non-SSL SMTP then
STunnel will bridge the connection to Google Apps using an SSL
connection.  STunnel can be downloaded at:
http://www.stunnel.org/
Your stunnel.conf file should look like:
-- begin stunnel.conf --
cert = stunnel.pem
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
client = yes
[pop3s]
accept  = 110
connect = pop.gmail.com:995
[imaps]
accept  = 143
connect = imap.gmail.com:993
[ssmtp]
accept  = 25
connect = smtp.gmail.com:465
-- end stunnel.conf --

It's worth reading around the rest of the information on the site
I tried STunnel and failed! What now?
Try using the sneaky printer backdoor to Google's SMTP servers that avoids SSL. Instructions are here: http://support.google.com/a/bin/answer.py?hl=en&hlrm=en&answer=176600
Relevant info is:

If your device does not support SSL, connect to aspmx.l.google.com on port 25.
You must configure an SPF record for your domain with the IP address
of the device to ensure that recipients do not reject mail sent from
it. You must also add this IP address to the Email Whitelist box in
your Google Apps control panel.
For example. if your sending device
sends from 123.45.67.89, add that address to your SPF record without
removing the Google Apps mail servers from the record: v=spf1
ip4:123.45.67.89 include:_spf.google.com ~all

Thanks. I'm assuming I can run STunnel on the same BAMT rig?

Give it a go and see how it works out. If it works well then provide some feedback so that others can take advantage too. You might find the printer backdoor method works better for your situation.


text:
After Segwit Activation, what is the largest block size possible?
The code says MAX_BLOCK_SERIALIZED_SIZE = 4000000, but that is actually not a actually consensus rule as stated here:
https://github.com/bitcoin/bitcoin/issues/10289
The actual consensus rule is based on MAX_BLOCK_WEIGHT, which is also 4000000. It's unclear to me what the minimum weight a p2wpk or p2wsh transaction can have. Specifically, what's the best witness-serialized size/weight ratio that a transaction can have post-segwit activation?
That should answer the question of what is the largest block size possible post-segwit activation.

The maximum block size is 4,000,000 bytes (4 MB). This is because the block weight calculation is base size (in MB) * 3 + total size (in MB) = block weight (see BIP 141). Since the only units are MB, the block weight's only units are also MB, thus the maximum block size is the same as the block weight.
The best possible size to weight ratio I can think of is a transaction which also spends a P2WSH output that has a ridiculous redeemscript. And then there's also the coinbase transaction and block header. The witness would be 4000000 - 240 * 3 - 240 = 3999040. So there is 3999040 bytes in the witness. The total block size is then 3999040 + 240 = 3999280 bytes.

Coinbase transactions can't spend anything.

All. I thought there has been a coinbase in the past that spent coins. I guess I'm mistaken.

Is the 80-byte block header included in the calculation?

I'm pretty sure it is.

Total Size and Base Size both include nonwitness data? So some bytes are being counted twice? That means a 4MB block would be impossible

@PieterWuille is the 4MB answer correct? Wouldn't it be smaller because "total size" and "base size" BOTH include the same non-witness data? In calculating a block weight (with Max 400000) some bytes are counted twice, a 4MB block is impossible.

In theory, you can get pretty close to 4M, by having transactions that consist almost entirely of witness data. In practice, that won't happen for normal financial transactions, closer to 2M.

@PieterWuille is it a mistake to measure weight in bytes? (Or MB)


text:
Why is the signature hash different for each input in a multi-input transaction?
In pre-BIP143 signature hashes, I know that the signature hash differs because you have to substitute the previous scriptPubKey for each input and thus the serialization changes.
The question is why? If the HASH_TYPE is SIGHASH_ALL, why does the signature hash need to change for each input? Why not sign the same "blanked" transaction or the same transaction with the scriptPubKeys?

Related to https://bitcoin.stackexchange.com/questions/54548/scriptsig-content-during-signature-quadratic-hashing and https://bitcoin.stackexchange.com/questions/63489/why-is-scriptsig-filled-with-scriptpubkey-before-signing-a-transaction

From my understanding, after reading through the p2sh-p2wpkh test vector in bip143, you need to include the 'outpoint'. This suggests that there will also be more than one hash for a multi-input transaction. Is there a way of creating one hash that can be signed in bip143 using SIGHASH_ALL?

Varying the signature per input helps prevents some attacks during multi-party transaction construction.
Consider a coinjoin involving Alice and Bob.  Alice selects one of her UTXOs for the coinjoin.  Bob chooses a UTXO for his input, but he actually selects ones of Alice's other UTXOs that reuse the same address as the one she selected.  Alice does not notice that Bob selected one of her UTXOs and continues with the coinjoin protocol, signing her input.  Now Bob copies her signature, which would be valid for the UTXO of Alice's that he selected if SIGHASH_ALL were constant for all inputs.  Now Bob has procured Alice's funds for himself.
Technically this can be prevented if Alice checks all other inputs to the coinjoin to make sure that they are not controlled by herself, but that is a huge pain, error prone, surprising, and likely means a secure signing module needs to be aware of all UTXOs that use the same public key.

"a huge pain, error prone, surprising, and likely means a secure signing module needs to be aware of all UTXOs" because of a race with unconfirmed transactions, I argue this is actually not even possible! :)  One could require the other party to provide all the input transactions but that would be inefficient and all your error prone comments would still apply.

I'd been wondering about this for quite a long time, since it was the reason behind the quadratic hashing problem. The best answer I found so far is the one given by Pieter Wuille in the Bitcoin talk forum. The answers is most likely not going to be satisfying though.


text:
Compute TxID of Bitcoin Transaction
Originally posted to StackOverflow but with no response. Thought I might have better luck here.
I've successfully created a Bitcoin transaction in C# according to the protocol specifications. Here's the transaction in binary:
010000000162EF5D87E91090453009860C6F135EA2A490133B2633F8F7BA014889F5FF7E4A000000008A4730440220497E2D3F9BBBC0C122D839968FF880514440CED08A71D28E614FF4C871964024022049687008E4AF72682992325F17E95DA382D63E3FB14605A81B4498DFF9210E310141040BCF1BECF4EF6A5C24FD790CA86E8DCDFA3538CB97E99C254F84D209CFE47BFC6BF3B11ACA05DB7C7638301711070F176E848B650A406EB7AFC30AA9EA242489FFFFFFFF02404B4C00000000001976A9140A24F0387F05A6EECD1F8B327BB442EAB767CBC888ACCA165E00000000001976A914F8FB3B4E5D75652795DD13B209E0BE7BBD66B5D488AC00000000
I know the transaction is solid because the BTCs were transmitted properly. Furthermore, pasting my transaction above into this validator indicates the correct values.
What's stumping me is how the official transaction ID is generated. Everything on the Bitcoin and StackOverflow StackExchange sites indicate that it's generated by hashing the transaction bytes twice. I tried to do so as follows:
const String txHex="010000000162EF5D87E91090453009860C6F135EA2A490133B2633F8F7BA014889F5FF7E4A000000008A4730440220497E2D3F9BBBC0C122D839968FF880514440CED08A71D28E614FF4C871964024022049687008E4AF72682992325F17E95DA382D63E3FB14605A81B4498DFF9210E310141040BCF1BECF4EF6A5C24FD790CA86E8DCDFA3538CB97E99C254F84D209CFE47BFC6BF3B11ACA05DB7C7638301711070F176E848B650A406EB7AFC30AA9EA242489FFFFFFFF02404B4C00000000001976A9140A24F0387F05A6EECD1F8B327BB442EAB767CBC888ACCA165E00000000001976A914F8FB3B4E5D75652795DD13B209E0BE7BBD66B5D488AC00000000";

SHA256Managed sha256Hasher=new SHA256Managed();
Func<byte[],byte[]> doubleHash=(bytes)=>{
    return sha256Hasher.ComputeHash((sha256Hasher.ComputeHash(bytes)));
};
String txidHex=Utils.ToHex(doubleHash(Utils.FromHex(txHex)));

Utils.ToHex() and Utils.FromHex() are helper functions copied from StackOverflow which convert between byte[] and a hex string.
The code above yields a txidHex value of 27E6C3EF18D14FB49CBAC182BBDB47FC9D6F79DA65C101873207B60A957852A7 but searching BlockExplorer.com for that particular txid yields no results.
I mentioned earlier that my transaction did execute properly. It turns out that it did so using a txid of 11172aed3a61fe64ae82cb02e886757d352a4452f956a0703d0809880538ba58. If you paste that txid into BlockExplorer you'll see my transaction.
Which leads me to my question: Given a valid transaction byte stream (byte[]), how does one correctly compute a transaction ID?
Thanks.

You've forgotten to convert from internal byte order (used in transactions to specify outpoints,) to output byte order (displayed to users.) Reverse the bytes after the second hash.
See also: How do I calculate the txid of this raw transaction?
The transaction you've included in your question and the transaction on the blockchain are slightly different. However, since they reference the same outpoint, they cannot coexist in the blockchain.
Blockchain:
TXID: 11172aed3a61fe64ae82cb02e886757d352a4452f956a0703d0809880538ba58

010000000162ef5d87e91090453009860c6f135ea2a490133b2633f8f7ba014889f5ff7e4a00000000
8b48304502205abb829faec8571a6469d40edbceb7938dbb5eeb0efa5b6b284d9730eb8e90a7022100
c0aec347ffa72ed22057a821b0219e114a3d2686eb67904403529eac4e2c7c260141040bcf1becf4ef
6a5c24fd790ca86e8dcdfa3538cb97e99c254f84d209cfe47bfc6bf3b11aca05db7c7638301711070f
176e848b650a406eb7afc30aa9ea242489ffffffff02404b4c00000000001976a9140a24f0387f05a6
eecd1f8b327bb442eab767cbc888acca165e00000000001976a914f8fb3b4e5d75652795dd13b209e0
be7bbd66b5d488ac00000000

Question:
TXID: a75278950ab607328701c165da796f9dfc47dbbb82c1ba9cb44fd118efc3e627

010000000162ef5d87e91090453009860c6f135ea2a490133b2633f8f7ba014889f5ff7e4a00000000
8a4730440220497e2d3f9bbbc0c122d839968ff880514440ced08a71d28e614ff4c871964024022049
687008e4af72682992325f17e95da382d63e3fb14605a81b4498dff9210e310141040bcf1becf4ef6a
5c24fd790ca86e8dcdfa3538cb97e99c254f84d209cfe47bfc6bf3b11aca05db7c7638301711070f17
6e848b650a406eb7afc30aa9ea242489ffffffff02404b4c00000000001976a9140a24f0387f05a6ee
cd1f8b327bb442eab767cbc888acca165e00000000001976a914f8fb3b4e5d75652795dd13b209e0be
7bbd66b5d488ac00000000

Thanks, man.. This bitcoin protocol is some fascinating stuff! I'm going to dig into the info you've provided.

It's just weird mostly, the endianness of elements in transactions flips for no discernible reason. There's no standard for it in Bitcoin whatsoever. Just be aware that hashes for blocks and transactions are internally little endian but are displayed big endian to users.

Wow, ok, I think I get it now. Everything you stated makes sense but it leads me to a different question: Why is the transaction that was finalized in the block chain slightly different from what I submitted in my original question? The inputs/outputs are all correct. Everything looks good. Yet the transaction bytes are slightly different.

B/c your Tx has a different signature 48304502205abb829faec8571a6469d40edbceb7938dbb5eeb0efa5b6b284d9730eb8e90a7022100c0aec347ffa72ed22057a821b0219e114a3d2686eb67904403529eac4e2c7c260141040bcf1becf4ef6a5c24fd790ca86e8dcdfa3538cb97e99c254f84d209cfe47bfc6bf3b11aca05db7c7638301711070f176e848b650a406eb7afc30aa9ea242489 Vs 4730440220497e2d3f9bbbc0c122d839968ff880514440ced08a71d28e614ff4c871964024022049687008e4af72682992325f17e95da382d63e3fb14605a81b4498dff9210e310141040bcf1becf4ef6a5c24fd790ca86e8dcdfa3538cb97e99c254f84d209cfe47bfc6bf3b11aca05db7c7638301711070f176e848b650a406eb7afc30aa9ea242489

authors: ณรงค์เดช อะทะเทพ


text:
What happens if a miner confirms their own double spend?
Suppose an attacker makes a double-spend and controls the mining pool that happens to find the good which confirms the transactions.  What happens?  I suppose the network hopes that a vigilante sees the double spend on the block chain and notifies everyone. Then what happens?  Do the mining pools coordinate and remine the block?  Seems like a big disruption.  Is there a more elegant solution?

Do you mean that he tries to spend coins that were spent already, or do you mean that he prioritizes a second order to spend his coins benefiting himself over another transaction posted earlier?

@Murch I really meant double spend in a contemporaneous sense.  Like spending once and then spending again 1 second later.

Every single Bitcoin node in the network will reject and ignore the block as invalid if there is a double spend in it. The block won't even spread very far, because the peers that first receive it will ban the miner who sent it and not forward on the block to any other nodes.
It is not a big disruption as the check for this is fast. Other mining pools don't need to "remine" it , they'll just recognize the submitted block as invalid, and keep working on their own block.

Perhaps this question was about sending TX to a merchant who accepts payment with 0 conf, creating another TX after receiving the goods which spends the same inputs and then confirming the second TX. In this case the block would still be valid. And there is no network level rule that can prevent this. As discussed here: http://bitcoin.stackexchange.com/questions/3315/double-spend-attack-by-sending-higher-fee-transaction-directly-to-the-pools-poss


text:
Is "bitcoin" a countable noun?
Should "bitcoin" be used as a countable noun admitting a singular and a plural (so that one says "600 bitcoins are in this wallet") or as a mass noun, (like "water" or "money") (so that one says "How much bitcoin is used every day throughout the world" or "600 bitcoin is enough for this transaction")?

The former seems to be the consenus.  The two latter examples are rarely if ever used.  They would be more commonly expressed as "how MANY bitocinS are used every day" and "600 bitcoinS is enough for this transaction".

Everyone is using it as a countable noun. There's actually a grammatical rule that says this is what should happen. If a new term ends with an existing term and is semantically related to that term, it gets the old term's rules. If not, it does not.
So, a "pop fly" is not a type of fly (the bug). So we don't say "pop flies" but "pop flys".
A "bag lady" is a type of lady. So we don't say "bag ladys" but "bag ladies".
We don't say "two firemans" because while a fireman is not necessarily a man, the origin is directly related.
So, a "bitcoin" is a type of coin, the terms are semantically related. So it should inherit the rules of the word 'coin'. Since we'd say "one coin", "two coins", we would expect the rule to be "one bitcoin", "two bitcoins". This feels natural to people, so it's what they do.

Is this answer strictly in line with the consensus mentioned here: http://bitcoin.stackexchange.com/q/462/117. It would appear that a "Bitcoin" should be more accurately referred to as a "bitcoin" to differentiate it from the Bitcoin protocol.

I agree. I'll change my answer.

I have typically seen Bitcoin used as a countable noun, as in your first example. There is much confusion around the terminology commonly used since the word can refer either to a project encompassing the currency or can refer to the units of currency themselves. We had quite a discussion on capitalization over on meta, for example.


text:
aggregated signatures for combining payments over a low bandwidth mesh network
Background
I'm researching how in a low bandwidth mesh network payment transactions from nodes can be combined to reduce the bandwidth used for payments.  Aggregated signatures seem like a useful technology to reduce the size of transactions between nodes involved in a message relay circuit.
I believe it's important to focus on the signatures because unlike the payment addresseses in a transaction, signatures cannot be compressed by using a lookup table of their hash and/or an HD wallet path.
Greg Maxwell's write up on aggregated signatures mentions a scheme using Schnorr signatures and two other schemes, one way aggregated signatures (OWAS) and Boneh–Lynn–Shacham (BLS) signature aggregation.
Question
Which signature aggregation approach, if any, do you think is best suited for building up a payment transaction where each node in a chain pays the next node some small amount?
To try and make my question more concrete, a simplified protocol might look like:
1) Node A broadcasts a transaction tx_A that has two outputs: one spends some value to any address and one spends the change back to an address node A controls.
2) Node B receives tx_A, and broadcasts a tx_B that spends the unspent value from tx_A to an address node B controls, and spends from that address (less some fee they keep) to any address.  Node B creates a signature for tx_B that aggregates the spending signature from tx_A.
3) Node C receives tx_B and does the same as in step 2 to produce tx_C.  This continues until the message is received by the message destination node F, or there is no more unspent value left.
4) The final tx_E should have an aggregated signature that spends from addresses controlled by nodes A..E to pay nodes B..F.
Key requirements are:

non-interactive (or only interactive with the next node in the chain)
aggregating many signatures does not increase the transaction size

Thanks in advance and sorry if my question is not clear.  I've had trouble digesting the primary source material and hope what I'm asking isn't too crazy.


text:
Do I need a wallet to start mining?
Oh, sorry. The question is really simple:
Do I need a wallet to start mining and "keep" this bitcoins?
or
Can I just stay with my bitcoins in my computer?

wallet.dat is the name of the file that stores the coins in your computer. So if you have the bitcoin client, you already have a wallet.

A wallet is how you hold Bitcoins on your computer. The 'wallet' holds the keys you need to spend the Bitcoins.

The wallet doesn't have to be on the same computer. For example, you can mine in a pool and the address to receive bitcoins could be from any wallet located anywhere.

In many cases this is the best solution.

You don't need a wallet if you are mining at a pool. The coins are kept at your account in their website and you can use them from there. If you want to transfer them to your computer, then yes, you need to download the bitcoin client which automatically creates a wallet for you.
If you are solo mining (which is not recommended unless you have lots of GPUs) you need to have the bitcoin client running, therefore you will also have a wallet.
You can mine, use and trade bitcoins without ever installing the bitcoin client because there are lots of websites/exchanges where you can keep your coins. If you don't want to trust your money to a third party, then make sure that the computer where you store your wallet is clean from virus/spyware.

A wallet is something you'll usually keep on your computer, it is not an external website.
A miner will generate a fresh wallet on startup (which you should backup immediately and perhaps regularilly). The location of the file on disk varies between OSes. Then, when the miner is run, this wallet will start filling up with coins (over time. If you mine Bitcoin, your throughput will be low right now).
If you're new to mining, make sure to read about Mining Pools.


text:
How can I start mining Bitcoin?
Ok. I don't care if I make only a small amount of bitcoins mining. I want to mine.
How do I setup my machine (amd x64 4.6Ghz 6GB/RAM with GeForce Nvidia 7300, LinuxMint 10) to start mining?
Is it damn simple, or it's a damn-high-geek-setup?
Can I set up to use both CPU and GPU?
How much should I expect in this simple system per month with my machine on all time?

I cleaned up your question a bit. I advise you remove the last mini-question about how much can you expect, because it's already been answered - http://bitcoin.stackexchange.com/questions/118/how-much-bitcoin-will-i-mine-right-now-with-hardware-x

Also, I think you should specify Windows or Linux. Or perhaps answerers will provide a generic answer.

@ripper234 - Ok, thanks for the edit and the answer. I'll mantain the last part of the question, maybe someone have a similar system, just that. If you read in my question "...LinuxMint 10..." is specified. Anyway, truly thank you. =)

Also, check out LiteCoin - to be released on Wednesday/Thursday. It's a "CPU friendly" bitcoin fork that looks relatively promising. https://bitcointalk.org/index.php?topic=47417.msg564414

It's utterly and completely pointless. The effort alone of writing this post, let alone reading the answers and setting up a miner, won't even remotely be repaid by the ridiculously tiny amount of coins you'll generate.

CPU mining is DEAD. GPU mining is DEAD. Even FPGA mining is DEAD ! ASIC's ? Yes them still can be profitable. But..... ONLY if you can get your ASIC cheap.
Here are the maximum prices you can pay for ASIC, and still have some hopes to get ROI in 3-4 month: * 40+ GHs for 1BTC - if you get your machine TODAY * 75+ GH/BTC - if ASIC delivered within 1 month * 160+ GH/BTC - if ASIC delivered within 2 month Why ROI in 3-4 month? Because if it takes longer, most likelly you will never get your money back
Never forget this:
http://i.imgur.com/FTEN5SW.png
![asic income over time](http://i.s

Please check this question first:
How much Bitcoin will I mine right now with hardware X?
Before you go through all this work, it is important to know what to expect from your hardware.

There are two options: solo mining or pool mining. Unless you have a lot of computing power (several ASICs), you should probably mine at a pool.
So the first thing to do is to sign up at a bitcoin pool. The stickies in this bitcointalk section have links for the top 10 pools. The main differences between them are the payout models and the fees. If you just want to try things out, choose one of the most popular pools like Deepbit or BTC Guild. You can then try others, according to your needs.
Now you need to install a miner. It has a simple interface, a drop down menu with a list of pre-configured pools and it is not difficult to setup.
After you install the miner, you need to point it towards your pool. So select device you want to mine with (probably your FPGA/ASIC), enter the pool URL (if you don't know what it is, check the FAQ/help section of your pool's website) and your username/password.
That's it. You can now see your progress at the pool's website.
Useful links:

What is a Mining Pool, what is it good for?
Is CPU mining even worth it?
What is a good mining pool/payout model for infrequent mining?

In your specific case, you have no ASICs or FPGAs, so you will earn less than a penny of Bitcoin.

Please note that despite all the upvotes, this answer is severely outdated.  There is zero chance that you will profit from mining on a CPU or GPU now

@RentFree Can you make an answer  to reflect the current situation, please?

There are several options for Mining Bitcoins some of these are no longer profitable, but for the sake of being thorough here they are in order of efficiency lowest to highest:
Methods

CPU Mining (minerd)
GPU Mining (cgminer, bfgminer)
FPGA Mining (Custom software - https://github.com/fpgaminer/Open-Source-FPGA-Bitcoin-Miner)
ASIC Mining (cgminer, bfgminer, also some custom software that ships with various ASIC's)

Currently the most efficient method is to use ASIC miners as with the difficulty always increasing, it becomes harder and harder to gain returns on lower spec hardware.
Some Example Hardware Setups

GPU - https://en.bitcoin.it/wiki/Mining_rig
Hardware Comparison - https://en.bitcoin.it/wiki/Mining_rig
ASIS's:
-- Avalon - http://avalon-asics.com/
-- Bit Fury - http://www.bitfurystrikesback.com/
-- KNC - https://www.kncminer.com/
-- CoinTerra - http://cointerra.com/
-- Butterfly Labs - http://www.butterflylabs.com/

Most ASICS work out the box and have built in web interfaces to control and monitor the   hashing of the device, where as other forms of mining normally require a bit getting down and dirty in the command line.  Also as its mostly ineffective to mine in any other way this is generally the way most people choose to go although there is normally a high barrier to entry due to the high cost of entry e.g. the new Cointerra TerraMiner can achieve 2TH/s and is priced at USD $5,999 making it an expensive device to purchase.
Monitoring
When mining you want to ensure maximum possible up time as whenever you have hardware not hashing you are loosing money, So its pretty important to setup some kind of monitoring for your devices.  Some mining software comes with this built in however there are also some other options out there.

CGWatcher - http://manotechnology.blogspot.co.uk/p/cgwatcher.html
CGRemote (Donation Only) - http://manotechnology.blogspot.co.uk/p/cgremote.html
Miner.php (cgminer builtin) -https://github.com/ckolivas/cgminer/blob/master/miner.php
MinePeon (Dedicated Mining OS with Web Interface) - http://mineforeman.com/minepeon/
Anubis (CGMiner Web Front End) - https://github.com/pshep/ANUBIS

Pools / Stratum Proxy
The Final piece in the puzzle is the pool, now obviously you can choose one of the many pools already out there or you can run your own pool.  Running your own pool can be a daunting task for beginners, but it is well worthwhile with the knowledge you learn while building and maintaining it.
Build Your Own Pool:

P2Pool
-- https://p2pool.org/
-- https://en.bitcoin.it/wiki/P2Pool
-- https://github.com/forrestv/p2pool
-- Complete P2Pool setup Guide (MERGED MINING) - https://bitcointalk.org/index.php?topic=62842.0
-- Maximizing P2Pool Efficency -  https://bitcointalk.org/index.php?topic=153232.0
-Eloi Pool
-- https://bitcointalk.org/index.php?topic=158105.0
-- https://github.com/ZeroASIC/eloipool-server
Stratum Proxy - http://mining.bitcoin.cz/mining-proxy-howto

Some of My Favorite Pools

https://www.multipool.us/ -  Automatically Mines the most profitable SHA-256 and or scrypt coin.
https://ghash.io/ - This is the mining pool backend for cex.io and they offer merged mining with Namecoin, Devcoin, Ixcoin
https://hashco.ws/ - Like multipool but offer ability to recieve all payout in BTC

I Hope this very brief overview of mining helps you get started :)

Might be worth to add that mining Bitcoin specifically is rarely profitable as the Bitcoin mining market is very close to a perfect competition one, so profits tend to fall rapidly to almost the equilibrium point. Unless you can get a 2nd hand ASIC really cheap or electricity for free, most probably it won't be worth it. What's usually more profitable, as of now, is mining alt-coins and exchanging them for bitcoins...

If you are after bitcoins I wouldn't even spend time on CPU or GPU. It is now difficult with specialized hardware (butterfly labs, kncminer ... ). You can have a look at cloud mining (cexio) as well it is expensive and you have to have bitcoins already but you can buy and sell GH/s and you can actually make more from trading than mining.

Are you using CEXIO ? Any experience to share with us? Thanks.

Yes I'm using it, I started in december more or less. So far I had no issues. Mining is great, you need to be careful and buy at the right price. The price of ghs is changing all the time. People actually tend to earn more on trading than mining. I had just one issue with accessing the website from a mobile phone. But I found this app that solved the issue: http://goo.gl/OXa4sD

Thannks @Luigi for the tips, I will dig a little bit more into CEXIO.


text:
What software and skills do I need?
Never having owned bitcoins I don't know how bitcoin wallets work and I'm wondering: if I buy bitcoins, what will I need to know about the software involved, and where should I keep my bitcoin wallet?  I have a home computer and I have a Google account.  Can the latter be used?  What security issues are involved?  If I'm travelling and far from home, how would I have access to my bitcoins?

if I buy bitcoins, what will I need to know about the software involved?

You don't have to know anything really, if you don't want to.

and where should I keep my bitcoin wallet?

If you don't want to learn about the software or how to keep your wallet secure you should try to find the most reputable e-wallet and keep your money there. People will have different opinions on which one is the safest so have a look around, read forum threads, use something that is well established. MtGox is one option that is well established and is also the exchange with the highest volume.

I have a home computer and I have a Google account. Can the latter be used?

If you don't want to use an e-wallet you could download the official client from bitcoin.org and store your money in its wallet. Your money is then stored in a file on your computer. You could use your Google account to backup that file (your wallet). That would basically mean that the same money is stored in two places - on your own computer, and in your Google account.

What security issues are involved?

If you choose the option of downloading the client it means that anyone who gets ahold of your wallet file can spend your money. If you have uploaded the wallet to your Google account that simply means that there are two places to rob you. It would be enough for the thief to get it either from your home computer or from your Google account.
There is an option in the client to encrypt the wallet using a password. That way anyone who gets ahold of your wallet file can't use your money unless they also know your password. Things to keep in mind here is that if you have some malware on your computer it is possible that it could sniff that password as you type it and then the encryption won't help you. Also, if you forget your password your money is gone. There is no way to recover it.

If I'm travelling and far from home, how would I have access to my bitcoins?

Then the simplest way would be to use the e-wallet option.

Don't follow this outdated advice on MtGox, see https://en.wikipedia.org/wiki/Mt._Gox#Suspension_of_trading_2013 for more details

It depends on how much security you want. If you only have a few bitcoins to get started you can get by with only medium security, for which simply installing the software or any eWallet will be fine. (Just be sure to tighten up security before you invest your entire life savings into Bitcoin). For absolute convenience you can't beat Instawallet.
When it's time to add more security, keep in mind you need to protect against both loss and theft, and that the former is much more likely. So err on the side of having more copies with more availability for your data.

The first step will be to locate the wallet.dat file on your computer and include it in a routine backup procedure. Once a week should be fine. If you change computers make sure to take it with you. If you're using an eWallet, store your password in several safe places.
The next step up is using the new wallet encryption feature. This makes theft harder but loss easier, so make sure the password is written down in a safe place. Note that this isn't airtight security, you're still vulnerable to keyloggers and other sophisticated infections.
The next step is to separate your everyday use wallet from a savings wallet. This can require a bit more skills to do properly - the basic idea is to keep the savings wallet in a secure machine (preferably Linux) and not let it get in contact with a vulnerable system. You'll only spend from this wallet occasionally so it's ok if accessing it as a bit of a hassle, depositing funds in is easy. Make sure to take precautions against loss.
In the future you will also be able to incorporate two-factor authentication to your wallets, which when done correctly can give very high security.

To access your bitcoins while traveling, you can use either a remote login software such as LogMeIn, or an eWallet (memorizing or taking with you your password). Even if you don't use an eWallet normally, you can transfer to one how many bitcoins you think you'll need.

You really don't have to be too computer savvy to own & trade in bitcoins. If you are a newbie, this explanation might help you figure out how to participate.
A "wallet" is where you store your bitcoins. You can have a wallet on your computer, or you can have a web-based wallet online. A great comparison is to think of email. You can use Outlook or Thunderbird where all the email is actually stored on your pc, or you can use gmail and have your email stored in the cloud online. The online wallets are called e-wallets. The little programs that run in your pc or smartphone are just called wallets (or bitcoin clients).
Online wallets are as easy to set up as, well, a gmail or yahoo mail account. In a few minutes you are all done. Your e-wallet "account" is created and ready for transactions.
If you choose to create a wallet on your pc, the setup process takes a bit longer. As of this writing, (april 2013) it takes about one minute to install the bitcoin client on your pc. But it takes about two days for the client to download this huge file called the blockchain. Your client won't show any deposits to your account until the blockchain is fully downloaded and "synchronized."
The blockchain is this huge record of EVERY bitcoin transaction that has taken place, ever! It grows and grows with each transaction. It is "synchronized" with every other bitcoin client (with some exceptions) A copy of it exists on every bitcoin client in the world. Why? because by publishing the transaction block to every bitcoin client, "they" (the enemies of bitcoin) can't just take out one computer or web address and kill bitcoin. "They'd" have to take out every computer that is running bitcoin.
This concept implies a big vulnerability not of wallets, but of e-wallets, the online wallets. E-wallet service providers are vulnerable to cyber attacks, etc. And if they decide to "temporarily suspend operations" or plain old go out of business, then you could lose some or all of your account balance.
Please note that another answer in this thread refers the user to get an e-wallet account with INSTAWALLET.COM. Well, as of this writing, Instawallet.com has ceased operation and is giving out "refunds" and they may or may not be complete refunds. (story: http://techcrunch.com/2013/04/03/bitcoin-instawallet/)
So there is risk to using online e-wallets. But not so with the regular wallets that are stored on your pc. They have a different kind of risk. Basically, the wallet in your pc is as vulnerable to loss as the cherished photos and other documents you keep on your pc. If your pc is stolen, or if the hard drive goes out, then you are up the creek... unless you have backed up your wallet. Like your photos, it's just data and it can easily be backed up.
So are you computer savvy enough to own and trade in bitcoins? I will continue to use the email metaphor from above. If you think you are computer literate enough to install an email client such as Outlook, Thunderbird, or Eudora on your pc, and if you do regular backups of your precious files, then you have what it takes to go with an original bitcoin client, such as Bitcoin-Qt. (Get it from bitcoin.org)  Otherwise, if you prefer the ease of use of gmail, and if you are willing to accept the risks outlined above, then go with an online e-wallet. (one is blockchain.info)
Here is an excellent primer to Bitcoin... "What it is, How it's used, and Why you should care."
best wishes!

If you set up a mtgox account to buy some bitcoins, you can store them there for the time being. If you want to get setup with a wallet on your desktop, you can follow the instructions at https://en.bitcoin.it/wiki/Getting_started
It basically entails downloading the client, and running it on your computer. It will create a wallet for you, which stores your account(s), addresses, and bitcoins.
You can then tell mtgox to withdraw your bitcoins to your bitcoin address. This sends the bitcoins to your wallet on your computer.
As for travel, you can keep the bitcoins in an ewallet, mtgox, or even a mobile wallet on your cell phone.


text:
What if some group of people start sending small transactions from wallet to wallet just to make the blockchain bigger?
What if some government start using their computers to move the tiniest amount of Bitcoin possible, from wallet to wallet, just to make the blockchain REALLY big? Is this possible?
And also, is it possible to generate large amounts of transactions so that one winning node can't include them all in one 10 minute mining process?

You don't need the govt. 8 of the top 10 most popular addresses are for SatoshiDice and similar.

The current maximum size of a block is 1 MB.  Current block sizes are about half that, so the absolute worse case scenario is that the block chain grows in size twice as fast as it does now.  That's not particularly scary.
It's easy to create more than 1 MB of transactions every 10 minutes.  If anyone does that, some transactions can't be included in blocks.  However, at present, there are almost always more transactions available than miners are willing to include in blocks, so we're already at the point where miners need to choose what transactions get included.
For the most part, miners choose based on fee per kilobyte of transaction data, so transactions that pay more fee/kB get included in blocks sooner.  If someone wanted to, they could create large transactions that paid large fees in order to raise the transaction fee the rest of us would need to pay.  Since that would cost the attacker money every block without actually preventing us from using the system (if we were willing to pay the higher fees), it's also not particularly scary.

And what if transaction fees are kept to a minimum? I understand the topic starter's worry of spamming the blockchain.

@jorijnsmit I think the answer above already answers that.  If all miners create max-sized blocks, the most spam can do is grow the block chain about twice as fast.  If the spammer pays very low fees, real block chain users like you and me can continue paying regular fees to get pretty much exactly the same quality of service we get now.  Spam is bad, no doubt, but its potential for damage within Bitcoin is currently well bounded.


text:
When ASICs generate a share, is it always at difficulty 1?
Are they preset to only return difficulty 1 shares when the find a nonce?  Then mining software verifies if it meets current target difficulty?  Or, if given a different target difficulty, will the ASIC only return shares that meet that difficulty setting?
If this is hardware specific, any idea which chips allow variation in the target difficulty?
The question in part stems from some misunderstandings I have seen on questions of what a share is.  Whether it is always a nonce found for difficulty 1, or if it is a nonce found for the target difficulty sent to the miner.  There are some confusing answers out there.

It's hardware specific, and most of the information for Bitcoin mining ASIC are under an NDA so this can't be posted publicly. There's very little utility in returning difficulty one shares to the controller, for a device doing 1TH/s it would mean dealing with hundreds of results a second that the controller is just throwing away.
The difficulty of a "share" is whatever the hash target was, if we have a target of difficulty 256, then any valid block header with a difficulty more than this would make that "share" valid for the target. Shares with a vastly higher difficulty (in the billions today) might also be valid as a block for their parent pool. Shares are only used by pools to gauge how much work a client is putting into finding a block (they are simply blocks with too low of a difficulty to be valid), they're completely useless for anything else and thrown away.


text:
How to tell whether an address is local or remote?
For example, I have a BTC address. Can I (using RPC) get information is this address my local or remote?

The validateaddress RPC will do precisely that.  Here's sample output from a testnet address with Bitcoin Core 0.10.0:
{
    "isvalid" : true,
    "address" : "mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe",
    "ismine" : true,
    "iswatchonly" : false,
    "isscript" : false,
    "pubkey" : "03bacb84c6464a58b3e0a53cc0ba4cb3b82848cd7bed25a7724b3cc75d76c9c1ba",
    "iscompressed" : true,
    "account" : "test label"
}

If the field ismine is false, the address doesn't belong to the currently-running Bitcoin Core wallet.

verifyaddress or validateaddress?

@theymos thanks for editing.  Karaslov: It was validateaddress; see the edit.  (And sorry about the confusion.)


text:
Is Bitcoin Core storage compatible across different machine architecture?
I want to run Bitcoin core on a raspberry PI (arm32v7), but the initial sync takes way too long.
I am thinking importing the UTXO set from another of my node which run on x64.
Would it work? Is it safe to assume it will always work?

Related: https://bitcoin.stackexchange.com/questions/62890/is-it-possible-to-transfer-blockchain-data-from-one-machine-to-another#comment72369_62890

It does not reply whether it should works across different architecture

The database format is supposed to be compatible across architectures.


text:
How to connect to antpool?
So I'm using an antminer s3. I have been on btc guild for about a week. Today they announce they are closing. So I looked around and figured I would join antpool.
The problem is when I changed all my pool config, my antminer won't start. It turns on and the fans spin very slowly.
When I was on btc guild the miner ran right away. I'm not sure what the problem is. My miner stats say this section contains no values yet.
I input everything the way it showed me on antpools website. Any ideas what I'm doing wrong? Is there something else I need to change?

Did you check that the URL is correct? Did you try contacting their support people?

directions I followed this morning. Unplug your computer from all internet sources. Plug in an ethernet cable from the AntMiner to your computer. Navigate to Control Panel -> Network and Sharing Centre -> Change Adapter Settings. Right click on your ethernet adapter -> Properties. Click on "Internet Protocol Version 4" and click properties. Select "Use the following IP address" and enter the following: IP Address: 192.168.1.1, Subnet Mask: 255.255.255.0, Default Gateway: 192.168.1.99. Plug in an ethernet cable from the AntMiner to you router. Restart the configuration instructions as above.

The I went to work. The miner was not working. After 3 hours I checked antpool and found that the miner started working. It was very random that it started 3 hours later. After I did what you read up there I could not log on to the internet at all. I just got home and changed my protocol back to what it was. The miner is still hashing and I can go online, however I can not go to the miner config. Very confusing.

I made a good tutorial on how to setup the antminer or any bitcoin miner to antpool using the gui. Here is the link to the video:  Hopefully   it helps!
How to setup Antminer S9, or any antminers GUI to Antpool set mining pools in under 8 minutes for 2018!
https://youtu.be/o8op00b7_RM


text:
Will Flattr support Bitcoin?
It would be great if it would be possible to spend Bitcoins via Flattr. Does anybody know if there is something planed?

Your timing is perfect. Yesterday Flattr announced that they were going to implement Bitcoin.


text:
Auto Adding Devices to BFGMiner
Every time I launch BFG Miner I have to add the devices by entering the com port it is on. Is there anyway to do this automatically?
Here is my start script:
bfgminer -o stratum.bitcoin.cz:3333 -u Bgordy2014.RaspberryPi -p PW -G

I was thinking along the lines of -D erupter:\.\COM3
D equaling devices

-S all will attempt autodetection.


text:
Miners don't detect ASIC Devices
When I try to add devices to BFGMiner and BitMinter, Only 3/4 devices will be detected, When I go to Devices and Printers (In Windows 7) it shows all of my ASIC Miners.
Here is the error:
2014.02.26 [19:09] BitMinter Client v1.4.3 started
2014.02.26 [19:09] Found 1 OpenCL-compatible GPU
2014.02.26 [19:09]  Hint: Use performance mode for best GPU results (bottom right button)
 2014.02.26 [19:09] Probing all ports for external devices
2014.02.26 [19:09]  Probe of port COM16 failed: timeout
2014.02.26 [19:09] No external devices detected.
2014.02.26 [19:09] Device detected on COM15: Icarus
2014.02.26 [19:09]  Icarus detection on COM3 failed. Expected nonce 0x00000109 but got 0x3F3F3F09.
2014.02.26 [19:09] Device detected on COM3: Icarus
2014.02.26 [19:10]  Icarus detection on COM17 failed. Expected nonce 0x00000109 but got 0xFFFFFFFF.
2014.02.26 [19:10]  Icarus detection on COM17 failed. Expected nonce 0x00000109 but got 0xFFFFFFFF.
2014.02.26 [19:10]  Probe of port COM17 failed: timeout
2014.02.26 [19:10]  Error reading from COM17: File descriptor is -1 < 0, maybe closed by previous error condition
2014.02.26 [19:10] Device detected on COM16: Icarus

How can I get the miners to detect all the devices. The devices are on COM 3, 17, 19, and 20
Thanks,
Bgordy

what kind of asic miner? block erupters?

You are likely running into power limits. Your USB hubs must be powered properly, able to supply the full current all of these devices need to operate.


text:
What temperature should a USB ASIC Miner have while running?
What is the maximum temperature a USB miner should be running at? Mine are at about 60°C/150°F.

What model do you have - there is quite few USB ASIC miners these day ?

The sapphire 333Mhz/s Bitcoin branded miner.

160°C == 320°F.  There is some doubt as to the actual temperature you are reporting.

If this graphic is true, the miner's PCB should run at around 125°F (51°C)

However, If reviews are to be believed, you shouldn't run it at all.

authors: ผมมีนามว่า อีกาดำ


text:
Can A Mining Farm Profit From Transactions
Background
Last night, I debated a friend of mine about the decentralized nature of bitcoin.  He made an argument indicating that the Chinese Communist Party isn't concerned about bitcoin because more and more bitcoin transactions are completed in China and he believes the Communist Party of China is behind these mining farms.  He claims that once all bitcoins are mined, with China owning as many mining farms as they do, they can charge a tiny fraction for every transaction they process, thus making a stable bitcoin revenue over the long run.  His point is that it's in their inherent interest for bitcoin to become important for their citizens to use, as it's a small tax on all the usage.
This is his way of explaining why China, unlike Russia, hasn't made bitcoin illegal for citizens to use (even if the citizens are trying to hide capital).  I was not aware that a miner processing transactions could charge a small fee.
Question
Can a company/country set up a mining farm for processing transactions and charge a fraction for every transaction, say 0.0001 bitcoins per every transaction it completes?

Fees only get created by the individuals creating the transactions. There is no way for a miner to take a fee from a transaction that did not include a fee. Miners can be selective if they choose to and only include transactions with fees.
Essentially the answer to your question is no they cannot gain any advantage over any other miner. They can select and include transactions with fees but this can be done by all miners.


text:
Direct Deposit From Employer To BitPay?
I searched the site to see if this had been asked and don't see it.  A friend of mine told me yesterday that I could have a portion of my direct deposit directed to a BitPay account that could auto-buy a portion of a bitcoin (like $20 each check).  I searched their site and I couldn't find the routing/account number combination that would be required.
Is this correct and (or) how would someone who's looking to put a small amount of money toward bitcoin each check do this?
Thanks.

I am not aware of BitPay providing that service.
The most well known company that specializes in what you describe is BitWage:
https://www.bitwage.com/
Maybe that is what your friend meant since they have similar names,

BitPay offers direct deposit, but it is for their prepaid debit card. As far as I can tell, the funds are in USD and can not be converted into Bitcoin.


text:
How To Buy Bitcoins On BTC-e (USA)
BTC-e doesn't appear to allow USA wires from banks, and it has other options like MoneyPolo or OKPAY, neither of which allow USA customers either.  I've seen bitcoin traders arbitrage trade using US Dollars with BTC-e and they are Americans, so I'm curious how Americans use BTC-e outside of transferring bitcoin from one site to BTC-e?

BTC-E shut down by government and it won't come back. So there's no way to do that.

(source: btc-e.com)

You can either fund your account with btc directly, or if you must deposit usd, you can wire the money (with a hefty fee). http://support.btc-e.com/index.php?/Knowledgebase/Article/View/204/26/deposits
I recommend buying your btc at a dealer like coinbase.com, which you can setup to withdrawal  from your bank. Then transfer the btc to btc-e to trade.
Edit: arbitrage with the same "pool" of money is not very easy. Like you say, you have to withdrawal usd at some point to send it to another exchange which could take days to clear. Arbitrage is done with two or more "pools" of money, one on each exchange. You don't move the usd back and forth (you can move the btc much more easily, but that's only arbitrage one way). The gains from arb'ing are a net sum value of all pools of money. Or you can take short positions on the higher priced exchange and long positions on the lower priced exchange, hoping they meet in the middle.

Thanks, I discovered that I can't wire funds to BTC-e from a US bank.  Also, for reasons I'm not sure of, the US doesn't allow MoneyPolo, OKPAY or the other electronic options that BTC-e uses, and BTC-e doesn't appear to use PayPal.

Do you used btc-e-codes? It's like real cash, but only in exchange. On BTC-e avalibale codes for RUR-rubles, EUR-euros and USD-US dollars.

authors: ธงชัย วันอ้น


text:
What would happen if a private fork several hundred blocks ahead tried to merge back?
Suppose mining pool has been off the main network for a long time so that they are 100 or so blocks behind, but managed to mine 200 blocks in the period (say, some combination of had 33% before, deliberately selecting easy blocks to extend, and ...).
Obviously, this can happen by choking down the difficulty, but I'd assume there are protections against such an obvious attack as that one. Update: assumption verified; reducing the difficulty doesn't work here as expected.
I found two roughly similar questions, but neither seems right:
Can a double spend attack be obfuscated by mimicking the transactions seen before the fork?
Countrywide Internet isolation, inevitable fork
The obvious answer, if it contained only mined transactions, would be to manually discard it, but I don't think that assumption would prove valid.
I am bothered by the belief that this is a duplicate of longest chain vs. highest difficulty. Marking this as duplicate pre-supposes an entire class of cryptographic attacks on hashes does not exist, and many other things as well.
One possibility, as hinted by Murch, would be to pre-build a long chain, then using an attack on the hash take a few hours to construct a block with exactly a given hash. This may require waiting until an exceptionally vulnerable block appears but that doesn't really matter.
I finally guessed what a no-malice version might look like and I found this: Scenario: disaster splits the Internet into dozens unconnected fragments Basically, bad things happen if the largest connected network is << 50%.

@Jestin: Turns out my assumption was correct. Lowering the difficulty gets caught.

If they are a 33% percent miner, then they won't be able to mine those 200 blocks in time to overtake the rest of the network. The miner can of course try adjusting the difficulty down (if some those 200 blocks are within a difficulty transition), but then the "heaviest chain" rule would ensure his fork gets dropped.

I'm imagining something like a chosen block attack on the hash itself where the difficulty meter is false if you can constrain the block contents sufficiently.

I'm not sure what you mean by a "chosen block attack" but note that you can't fake the difficulty of a block, nor the difficulty of a chain. In a difficulty readjustment period of 2016 blocks you can make it seem like you have found those blocks really really fast by lying about their timestamp, but that will increase your difficulty in the next period, making it very slow for you to mine the next 2016 blocks. Not sure if this addresses your attack or not.

@Joshua: Sorry, we must have misunderstood your scenario. So, they created a longer chain, but didn't lower the difficulty. Could you please elaborate how they managed that? What properties does the longer chain have? A longer chain of valid blocks would cause a reorganization, I believe up to 100 blocks. If they however cheated with some form of invalid blocks, they'd just be ignored by the network. So, please clarify the scenario. Especially, what do you mean with "if it contained only mined transactions"? What is "it" and what do you mean with "mined"?

@Joshua, I get the feeling that you are misunderstanding something fundamental, although I'm not sure what.  The cryptography that Bitcoin is based on is indeed presupposed to be secure against certain cryptographic attacks.  If there were known vulnerabilities in the cryptography used, then there would be a fork to change to a more secure algorithm.  If you feel that you can break the existing crypto, then there is a $10B bounty to do so.  So far, it hasn't been claimed.

@Jestin: The misunderstanding is based on assuming feasability of pre-image attacks. However, that would also completely nullify mining as the proof-of-work would cease to be that. Bitcoin would have to switch to another pow algorithm at that point, but probably it would be just dead.

I finally found an answer (very old): https://bitcointalk.org/index.php?topic=823.msg9668#msg9668
knightmb: "The old clients should accept it all the way back to the last snapshot of release"
If it's still true this in fact answers my question.

Actually, up to the last checkpoint, which is block 295,000. If that was your question, it really wasn't clear… Your title was "…100 blocks ahead tried to merge back?".

One possibility, as hinted by Murch, would be to pre-build a long chain, then using an attack on the hash take a few hours to construct a block with exactly a given hash. This may require waiting until an exceptionally vulnerable block appears but that doesn't really matter.

I don't see where I hinted that, but that would definitely not work.

few hours to construct a block with exactly a given hash.

Block hashes are SHA-256d hashes. The space of 2^256 is too large to brute force for the foreseeable future. Definitely its impossible to do in "a few hours".

exceptionally vulnerable block

What's that supposed to be? Blocks are not more or less vulnerable.

pre-build a long chain

The whole chain would become invalid if you changed the first element. Each block builds on the block hash of its predecessor. Therefore, two blockchains cannot be arbitrarily appended to each other.
And as already described in the comments above:

high number of lower difficulty blocks

It's not the count of blocks that counts but the total "weight" measured in summed difficulty.

I am extrapolating what early attacks might appear first in SHA-256 based on what order they appeared in MD5. And with MD5 it did happen where certain MD5 hashes were far easier to construct vectors for than others.

MD5 was broken to prefix collision attacks. What we'd need here are pre-image attacks. Even MD5 remains safe to pre-image attacks. In fact, mining is basically an attempt to brute force a pre-image attack. All of that is further encumbered by you needing to use a valid block header as input. It seems rather unlikely that SHA-256d pre-image resistance will be broken anytime soon, but knock yourself out.

@Joshua, perhaps this is a separate question.  It feels like you are asking more about potential cryptographic attacks than you are block reorginzations.  Your clarifications don't really seem to have much to do with the original question.  I'm not saying that it's a bad line of inquiry, but perhaps it should be its own question.


text:
Can the Bitcoin Miner run offline?
Is it possible to run a Bitcoin Miner offline and calculate hashes without being connected to the Internet?

Please please please do your research before buying anything from Butterfly Labs. Customer satisfaction levels are low.

You cannot earn Bitcoins mining unless you either add blocks to the blockchain or cooperate with others to do so. Without being online, you wouldn't know the current head of the blockchain (or any information based on it), so there's no way you could actually do either of those things. You could hash all you want, but you would never mine a block nor contribute towards mining one, so there wouldn't really be any reason to do so.

Yes you can, but the whole point of hashing is to share the results with the blockchain which can only be done while online. Without sharing results there is a very big chance you are calculating the wrong transactions--transactions which have already been hashed by someone else.
It would be like mining gold inside a mountain but never bringing it to the surface. Why bother?

But can we mine on a offline computer carrying the results and needed information through a pendrive everyday?


text:
Has the BitForce Bitcoin Miner be connected to a PC all the time?
When the BitForce Bitcoin Miner is mining, does it have to be connected to a PC all the time?

Yes. Mining devices such as this are merely highly-specialized processors that communicate with a computer via serial over USB. The computer is necessary in order to tell the device what to do, and to get its result to post to the mining system (i.e. a pool or bitcoind).

Really? This means, additional to the energy consumptions of the Miner comes the energy consumed by the PC/Laptop?

Yes. There's a bit of an assumption that you'd already have it running 24/7, or that you're running a lower power machine anyway. The hashrate to wattage ratio of an ASIC will always beat that of a GPU.

@powtac Keep in mind that you can have very low power footprint devices connected. ie, android tablet, or phones or Raspberry pi device. There is a article made by a guy from NZ showing his setup using the 5GH/s butterfly lab device running with raspberry pi which was using a total of 44wat IIRC