Why is two hours the maximum acceptable offset for Bitcoin blocks? As far as I understand, Bitcoin transactions include a timestamp, but the only requirement is that they don't differ for more than two hours.

But why two hours? For computers that are constantly synced via NTP, two hours seem like a very big difference. I would expect that a difference of 10 minutes should be enough.

Or, if this is about time zones and summer time, shouldn't they be using UTC time?

Transactions don't have a timestamp. Blocks have a timestamp. The difference is important, because the block timestamp on some of the blocks changes the difficulty.

  Why is the maximum difference two hours?

It's not particularly important to have very accurate timestamps. Timestamps have two uses:

Difficulty retargeting
Calculating progress of synchronization. If the blockchain started in 2009, and the last block you saw was made in 2012, then you're about halfway done.

  Or, if this is about time zones and summer time, shouldn't they be using UTC time?

They do. Of course, not all systems are set up correctly. For example, imagine a system that doesn't use NTP. The user doesn't know how to set up DST correctly, so they move their computer's clock forward/backward an hour every spring/fall.


Will mining in the (far) future produce a payout? According to this question, there will only be 21 million bitcoins at most. These coins are being produced logarithmically by mining, so the payout will decrease as time goes by.

When all 21 million bitcoins are in circulation, will there be any reason for mining? Is mining only useful for us "early adopters" or will it be a permanent part of Bitcoin?

Miners earning = block reward + fees

Miners will continue to get block reward in the next hundred years, but long before the reward "stops", the miners will get most of their earnings from transaction fees, so they will continue to have economic incentive to mine, when the block reward stops.


Bitcoin Core Development Contribution I have learned a lot about how bitcoin works. Now I want to contribute to bitcoin source code, how can I do this?
Of course, bitcoin is open source so anyone could go to the bitcoin repo here and start making commits. Most users in this community have probably figured out by now that I am not a professional computer scientist (at best I have strong math skills and experience with imperative programming - python, R). This question is subjective but there are several users in this community who are top contributors to Bitcoin Core and likely have extensive knowledge regarding the source code and the community surrounding it. My hope is that an answer to this question could serve as an extensive list of resources and advice for a non-professional looking to get involved in contributing to Bitcoin Core. Topics to address could include:

Learning C++ - concepts extensively used in bcc that must be mastered/concepts rarely used in bcc that could be brushed over/ resources for learning C++
Understanding the code structure - in older versions of bcc there was a main.cpp that seemed a logical place to start. In bcc 0.21.0 I no longer see a 'main' file, and can actually find very few files where I can relate the code back to bitcoin concepts I am aware of. Not sure where to start.
Community/BCC Goals - Once I have some C++ skills and code structure knowledge how will I even be able to find things that need development or contributions in bcc? Obviously I am not expecting to be writing entire libraries for a new elliptic curve, or introducing the next space saving concept like segwit, so how can I find a way appropriate for my ability level to help out? Where is there community talking about what could be done? I imagine BIPS (Bitcoin Improvement Proposals) will come into play here. And even better yet, once I had some skills, where could I find a possible mentor!
Full Node/ Pruned Node - Will running a full node / pruned node be imperative in any way to this journey (perhaps for testing, etc)? Are there smaller projects or exercises once could start with that would help reach the goal of being a bcc developer?

Any other advice, resource, links certainly welcome. I think once a person had a good understanding of those topics above they could get started and then continue using this site for more specific technical questions, in its usual way.

Clone bitcoin core repo, build and test it yourself: https://jonatack.github.io/articles/how-to-compile-bitcoin-core-and-run-the-tests

Be active on https://bitcoin.stackexchange.com to learn and contribute

Experiment with bitcoin core GUI (qt) and CLI with different RPC commands mentioned here: https://bitcoincore.org/en/doc/0.21.0/ on testnet and regtest

Once you understand how things work, start looking for issues in https://github.com/bitcoin/bitcoin/issues that you can resolve or start with "Good first issues" with pull requests or create issues if you find something wrong while testing.

Participate in Bitcoin Core PR Review Club meetings: https://bitcoincore.reviews/

You can also start reviewing other PRs because bitcoin core has fewer devs to review a lot of code which delays things.

IRC channels that can be helpful apart from few technical posts on r/bitcoin, blogs of bitcoin devs etc.: #bitcoin-core-dev #bitcoin-core-pr-reviews ##bitcoin-core-gui


3 days still unconfirmed transaction! I have never had this happen before it's been three days and still unconfirmed has anybody else experienced this!?! Will it ever confirm?

https://blockchain.info/tx/5d054c0f9a686a67f3be86b3fb8b91f5f61291145714dcf466f64ebc45b71019?show_adv=true

If you are using bitcoin core, you can try to erase the transactions in your wallet.dat file with pywallet. (https://github.com/jackjack-jj/pywallet)

Then you only have the keys left in your wallet.dat. When you start Bitcoin, you'll need to start it with CLI and add the option -rescan.

Your BTC should appear in your balance as unspent. You can then send them again, with a higher fee. When that transaction will confirm, the old one will automatically be rejected because it'll be a double spend.

But in the end, it makes you able to send your BTC again. :)

REMEMBER : ALWAYS BACKUP YOUR WALLET.DAT FILE BEFORE DOING ANYTHING !


Bitcoin charts for websites Does anyone know of any good paid or open source software solutions for displaying Bitcoin charts on a customer facing website?

There are three main types of charts we want to offer at this stage:

MtGox Live style (not sure what this type of chart is called but would love to know if someone does?)
Candlestick Charts like at http://bitcoincharts.com/charts
Basic line graphs like at http://blockchain.info/charts

I have to date found the following:

Google charts https://developers.google.com/chart/ These unfortunately don't really cut it.
StatsMix http://www.statsmix.com/ The pricing a little higher than I wanted to pay for this solution.

As for where to get the data feeds I am okey with this. It's only the web facing charts that I need to find a solution toif anyone has come across before?

http://www.highcharts.com is pretty good (Blockchain.info uses it). Charts can be rendered both client and server side which is useful for png previews.


Can I specify one of my existing "receive" address as a "change" address when I create a transaction when using the Bitcoin Armory client? Using the Armory client, is it possible to specify one of my existing "receive" addresses in my wallet as a "change" address when I create a spend transactions? (Instead of the Armory client creating a new "change" address)

Yes you can, but you have to switch to "Expert" usermode from the main window.  After you do, the "Send Bitcoins" window will have an option for customizing the change address.  You can click on the addressbook and select any address in any wallet.  Or really put in any address you want.

Just remember that you are compromising your privacy by reusing addresses.  Even when you don't reuse addresses, there's a surprisingly amount of linkage between your addresses already, just by the way they are combined for some transactions.  By reusing change addresses, you are dramatically amplifying that effect.  That why this feature is hidden under the "Expert Mode."

For instance, if you always shuffle your coins between 10 addresses, then there is no question that all 10 addresses will eventually be linked, and undeniably part of the same wallet.  Thus, every person you ever transact with, will have the capability to see your entire wallet balance at any time, as well as every transaction you ever execute.


Stores that accept bitcoins & Alternatives to Bitmit? Are there stores that accept bitcoins?
In particular, are there alternatives to the ebay-like website Bitmit?
Bitmit has shut down, and I am looking for an alternative.

Sure, plenty of places accept bitcoin.

Here are a few links:

https://www.spendbitcoins.com/places/ - General list.
https://en.bitcoin.it/wiki/Trade - General list.
http://www.gyft.com/ (enables you to use giftcards at major retailers, from your phone and paid in BTC.)
http://coinmap.org/ for local places accepting bitcoin.
http://www.foodler.com for dinner.
https://www.bitcoinstore.com/ for electronics.
https://www.corkket.com/ for selling locally.


Mining: GetWork, Get Nonce, ???, Submit Hash? I make a getwork request and get back data, hash1, midstate, and target. Mining on a KC705 development FPGA board, and following the readme.md file here:
https://github.com/progranism/Open-Source-FPGA-Bitcoin-Miner/tree/master/projects/KC705_experimental

I do a uart_write of a section of data plus the midstate, and that would return the golden nonces. Doing that does in fact return the 0E33337A as stated along with two others, 9CCDEF20 and ACBBA77F.

Now I start getting confused. Given the response from the getwork request and 3 nonces, what exactly am I submitting back? From what I gather, I am supposed to do a hash using each nonce, check it if it's smaller than the target, and if it is, submit that hash?

In KC705_experimental, the readme says the device should return 0E33337A and two other results. It just so happens the bit of test work described in the readme has three different solutions to it.  A mining script should return all three solutions to the server.

fpgaminer, the author of the KC705_experimental code, has written an addon for the Modular Python Bitcoin Miner project (MPBM) to mine using KC705 hardware.  If writing your own mining script you may want to refer to his work.  You can find more information here:  https://bitcointalk.org/index.php?topic=9047.msg2019538#msg2019538


What unique business models has Bitcoin enabled? Are there specific, unique business models that have been made possible by the invention of Bitcoin?  And if so, what are they?

Edit:

I seem to be getting a lot of answers about the areas of industry that people hope and or predict Bitcoin will be great for.  That's all well and good, but it's not what I'm asking in this question.  What I'm curious to find are specific, unique-to-Bitcoin business models that did not and could not have existed before.  David Schwartz suggest there may be none (and he may be right), in which case there shouldn't be any answers here.  Please don't upvote answers which don't answer this question!

As a simple clarifying analogy, consider this question asked of the internet.  We can answer with things like "Pay per click advertising", MMO gaming, etc. because these things are specific, unique compared to anything that came before, and only possible due to the internet.  True, these have become entire industries, but they are industries that didn't exist in any form before the internet.  All I'm wondering is if anyone knows of any comparable things for Bitcoin.  I don't know of any, and I'm a fairly Bitcoin-aware guy.  That's why I asked.  Hopefully this clarifies the question.

The only thing I can think of is Mike Hearn's idea for Smart Property. This would allow the ownership of physical assets to be digitally exchanged and stored in the block chain. Other than that, I think Bitcoin mainly improves the efficiency of many, mainly digital, business models.


Can a 51% attack be detected and dealt with? If someone got 51% hash power and started rewriting the blockchain from scratch (building a longer chain with a completely different history), could this be detected? Could "the honest users" revert such attacks?

Can such attacks be detected? Yes.

What you would see is a chain reorganization that invalidates a large (greater than three) number of previously-accepted blocks. The standard client will actually log this -- you'll see a REORGANIZE in the client's debug.log file. The client doesn't currently log the number of blocks invalidated by the reorganization, but that's a simple enhancement.

Can honest users revert such attacks? Sort of.

If a transaction you care about is in the set of blocks that was invalidated, you can always resubmit that transaction. Unless the sender issued a conflicting transaction as part of a double-spend attack, the transaction will still be valid. (The network will actually do this for you automatically. Miners don't want to miss out on the chance to grab the transaction fees associated with the undone transactions.)

As a longer-term solution, there have been proposals discussed to reject reorganizations that invalidate suspiciously large numbers of blocks such as four or more. The problem with these proposals is that under unusual circumstances (such as if a disaster partitions the Internet for half an hour), the network can permanently split with each side rejecting the other side's block chain as a suspicious reorganization.

Essentially, the client would have to go to a "lockout" mode if this happened and reject all transactions until some mechanism to find the real block chain could be implemented. (It could submit all transactions to both chains and consider only transactions accepted in both as confirmed!) One proposal uses a central authority to pick the real chain. This is an area where there is room for innovation.

One important point to keep in mind though: If the sender is not attempting a double-spend attack, you have nothing to worry about (other than the reduced usefulness of an unstable exchange network). You can submit the transaction to the block chain as many times as you need to until some block containing the transaction finally does win. Only the sender can create a conflicting transaction that would make you unable to get the transaction you care about into the chain.

Update: In fact, you can lose coins even if the sender wasn't attempting a double-spend attack. Suppose A sends B money and then B sends C money, if A successfully uses a double-spend attack to invalidate the transaction that sent the coins to B, the send from B to C can fail (because a conflicting transactions means B will never have the funds to spend) even though B was not attempting a double-spend attack.


Is it possible to build mining reward pooling directly into Bitcoin? Mining pools were formed quite early in Bitcoin's history. Since then, they have not been considered ideal because of more and more centralization creeping in. But it seemed the community has learned to accept and live with this necessary evil.

So in this context, has it ever been discussed to build mining reward pooling into the actual Bitcoin protocol, making centrally administrated mining pools obsolete?

A technical implementation could look like this:

A miner that finds a hash with difficulty n still solves a block around every 10 minutes, but also miners who find a hash with difficulty n-1, n-2, or even n-3 can submit their solution[1], however without triggering a solution for the current block.

The mining reward could then be distributed in one transaction proportionally to all miners who have found hashes.

Are there any altcoins that implement this or a similar concept already?

I'm aware there's P2Pool, but it uses a separate blockchain, which causes latency issues that make it unable to compete with centralized mining pools.

[1] Submit their solution how and to where? This would be a technical detail to discuss later. They could be opening a transaction channel or the like.

I believe this would be very difficult to implement in Bitcoin.  Not only because of technical feasibility, but also because gaining concensus would be difficult.

  The mining reward could then be distributed in one transaction
  proportionally to all miners who have found hashes.

This appears to be making modifications to the coinbase transaction, which would almost certainly require a hard fork.  Also, what is preventing the miner who created the block at full difficulty from simply cutting out all the miners who submitted blocks at n-1, n-2, etc...?  How would other network participants know that other miners have been cut out, so know they should reject the block?  That trust model would have to be solved.

If a hard fork is necessary, you would need concensus from the mining pools...which are the entities your are attempting to disrupt.  Even though their hashing power comes from individual participants in the pools, it would be hard to push something through that isn't necessarily in their best interest.

Finally, what would prevent individual miners from banding together to "game" the new protocol, thus re-creating mining pools on top of this mining pool protocol?  Building pools into the protocol won't stop people from pooling together...it will just give them different goals for them to pool resources for.


How to add handwritten key or code to a wallet I am actually a newbie who bought twenty (2) bitcoins in 2010 and I have only just found where I copied down the code or key. How do I get this code or key onto a wallet or USB? Please advise.

How do I get this code or key onto a wallet or USB?

Wallet

By USB I guess you mean a hardware-wallet like the Trezor etc.

Choosing a wallet is an important step, I assume you have looked into this and are aware of the dangers of using some types of wallets and are aware of the need to never give any helpers your private-key or the password to a wallet.

There are several ways of writing down a private-key and there are mnemonic-word based systems for saving private-keys (the private-key is derived from the phrase). You should find out which sort of private-key or seed-phrase you have and make sure your chosen wallet supports it.

The general process is to first install the wallet, some wallets are full-nodes and take several days to synchronise with the Bitcoin network.

Private key

Once you have a wallet installed and ready for use, you find the menu option for importing a private key. You can then type the key into the wallet. It should then show the amount of unspent bitcoin for addresses derived from your private key.

A private-key in Wallet Import Format (WIF) might look like 5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTJ

A private-key in Hexadecimal format might look like 0C28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1D

Seed phrase

A seed phrase might look like witch collapse practice feed shame open despair creek road again ice least. They usually have 12, 18 or 24 words chosen from a list defined in BIP39. Not all wallets used BIP39 though.

Wallets such as Electrum support this seed-phrase system which can be used for "wallet recovery".

Useful links:

Wallet Import Format (WIF)
Seed phrase
Wallets
What type of Bitcoin wallet is more secure than others?
Types of Wallet
Why doc says importing private keys is so dangerous?


How to install specific version of bitcoind How do I install a specific version of bitcoind?

I want to install bitcoind version 0.12.1 in my system.

How can I do that?

I am trying to use bitcore's Insight Explorer in my project.  It uses version bitcoind v0.12 to query all those things that are shown in the UI... I have tried to run this with v0.14 but Insight UI crashes.

Source code for Bitcoin Core, v0.12.1 can be downloaded directly from GitHub, via https://github.com/bitcoin/bitcoin/releases/tag/v0.12.1

Binaries are available at:  https://bitcoin.org/bin/bitcoin-core-0.12.1/

Be aware, v0.12 has known vulnerabilities, and should not be used in new work.  https://bitcoin.org/en/release/v0.13.0 shows some of the vulnerabilities that were fixed in v0.13.


Are there any HD Bitcoin mobile wallets with the mnemonic seed in traditional Chinese? If not, what would be the easiest way to modify an open source iOS/Android wallet (eg copay) to do this?

Here is the bip39 for traditional Chinese word list.

https://github.com/bitcoin/bips/blob/master/bip-0039/chinese_traditional.txt

Also, there are some useful pages that explain how to implement Mnemonic code for generating deterministic keys as following,

https://github.com/bitcoinjs/bip39

https://iancoleman.io/bip39/#chinese_traditional


Manually creating transactions Due to complete lack of documentation on the subject, how would the pseucode for creating a transaction look using the following functions: createrawtransaction signrawtransaction and sendrawtransaction.

I receive the user transaction for incoming coins on IncomingTxID, when I create a raw transction I want to include at least some of those coins so if they won't confirm, neither will his payout.

I am assuming you want to accomplish something akin to what SatoshiDice does. Here is how it can be done, using API calls with the Bitcoin-Qt/bitcoind client:

listunspent - you get the list of all unspent transactions
You determine which ones you want to spend
You use createrawtransaction to create your inputs / outputs, taking txid and vout from the list of transactions that you have that are playing, as well as a list of transactions that constitute a "money supply" for you.
Use signrawtransaction to sign the created transaction
Use sendrawtransaction to send the signed transaction

That should be pretty much it. I have implemented some of that code myself and it is pretty easy once you get a hang of it all.


What value should nonce be when mining bitcoin ? When the miner program start, the value of nonce is zero or a random number? Which of them is better?

This is essentially like asking: "When buying a lottery ticket is it better to have a zero or a random number in my lottery number?"

The reality is that it actually doesn't matter because it's an entirely random process, just like winning the lottery.


Stratum from pool 0 detected new block I'm trying to mine litecoin on litecoin-pool with cgminer

./cgminer --scrypt -u username.1 -p password -o stratum+tcp://lite.coin-pool.com:3333

and it keeps on returning

[2013-10-05 14:24:28] Stratum from pool 0 detected new block
[2013-10-05 14:25:16] Stratum from pool 0 detected new block
[2013-10-05 14:27:05] Stratum from pool 0 detected new block
[2013-10-05 14:27:22] Stratum from pool 0 detected new block

and I'm using the correct username and password.

What could be causing this?

It is not an error that new blocks are detected.
You should check other parts of the output to see if you are correctly connected, you are hashing and submitting shares.
If you want us to check what's wrong, please, submit some other part of the cgminer's log.


What do the details on bfgminer mean What do the details mean on bfgminer?

Like at the bottom of the command prompt, before the devices show up, it has:

A:8781 R:11+0(.14%) HW:5527/ 37%

What does that all mean?

Each column is as follows:
  The number of devices and processors currently mining
  Hottest temperature reported by any processor
  5 second exponentially decaying average hash rate
  An all time average hash rate
  An all time average hash rate based on actual nonces found, adjusted for pool
      reject and stale rate
  The number of Accepted shares
  The number of Rejected shares and stale shares discarded (never submitted),
      and the percentage these are of total found.
  The number of HardWare errors, and percentage invalid of nonces returned


Can a wallet allow you to receive Bitcoins from the same wallet you send them from? Can a wallet allow you to receive Bitcoins from the same wallet you send them from, and if so, why would there be some reason why this shouldn't be done.

Some wallets do allow you to receive coins to the same addr they are sent from. But generally this is not a good idea; your transactions could be more easily traced this way.


As of today Jan-2014. How much drive space does the following coins blockchain data take? As of today 2014-January-05.

How much drive space does each of these coins take after downloading the complete blockchain?

Bitcoin
Litecoin
PPCoin
Florincoin
Philosopher Stone
Norbits
Anonymous Coin

Or better yet, is there a website that shows all this data with these altcoins.

6 january 2014
Bitcoin blockchain: 14.9 GB (the size of the /data/blocks folder)


Can there be a blockchain without mining? This is a question about Blockchain in general, not about Bitcoin as a currency on top of Blockchain technology.

Let's say I want to issue a vote on top of, lets say, multichain. I would issue an asset called "voting_right". Let's say I have 1000 participants, so I create 1000 voting rights and send each participant address one voting right. Everyone can either transfer their vote to somebody else or directly to a vote option.

I don't have given anyone mining permissions, because I don't want anyone to "illegally" earn voting rights. On the other side, I require miners to collect the votes into blocks and prevent double-voting.

Can there be a Blockchain without miners?
If no, what I am assuming, is there any danger if I, let's say create two mining-enabled multichain nodes (with 0 reward), 100% controlled by me? How can others trust me?

I don't know anything about Multichain so I'm not sure if this is the answer you're looking for, but here's one answer that might help you.

The interesting thing about proof-of-work (Nakamoto) blockchains is that they enable a constantly-changing set of unknown nodes on the internet to achieve consensus under certain assumptions about the adversary (i.e., the good guys are more "powerful" than the bad guys).

Before Bitcoin, no one knew how to do this (AFAIK) and all consensus algorithms required that the participants were known and that 2/3 of them were honest. Typically, an admission control process was used to decide who could participate and who couldn't. This was, for the most part, a human process.

Now, blockchains solve this very hard problem of permissionless consensus: How can you agree on a log of operations among N participants as they leave and join the system, without an admission control process? The answer: Use a little bit of economics to incentivize participants to behave correctly, no matter who they are (i.e., Bitcoin).

Now, with this understanding of the hard problem Nakamoto blockchains solve, you can image that a system such as the one you propose (if I understand it correctly), where users have to trust you to correctly dictate consensus, is not that interesting nor useful. It is well known how to achieve consensus with trust: just use any Byzantine agreement protocol and keep 2/3 of your nodes honest.

I am not sure if I properly understood your question and your system, so I hope this answer is not completely useless to you.


Would it be possible to overtake the network by running a secluded mining operation for many years? I have a scenario. Let's say I start my own Bitcoin mining on a secluded network. I leave this to mine for many years or even pass it down to future generations.

To the very point that my chain is longer than the worlds current chain. Then I connect to the network. What would the result be? Would I instantly own every coin mined?

'Longer' means 'more total work spent'. You're not going to be working harder than all miners put together are you? Then the only way to get some money is to join the existing miners and work with them. And by doing that you coincidentally enlarge the group of 'honest' miners, making it that much harder for someone else to consider your  'evil' plan.


Loading seed coins in test mode I'm setting up a regtest node on my Windows machine using bitcoin-qt. Here's my config:

regtest=1
txindex=1
server=1
[test]
rpcport=8332
rpcuser=ulu
rpcpassword=***

Next, I would like to run a transaction using RPC. However, I'm totally lost here:
 1. What is the BTC address I could use for creating a transaction?
 2. How do I "unlock" it to be able to send a transaction?
 3. How do I add some BTC to it to be able to send it and/or pay for the transaction?

What is the BTC address I could use for creating a transaction?

Any valid testnet address. You can get one from Bitcoin Core using the getnewaddress command.

  How do I "unlock" it to be able to send a transaction?

Use the walletpassphrase <passphrase> <timeout> command where <passphrase> is your passphrase and <timeout> is the amount of time you want the wallet to be unlocked for. The wallet will automatically lock itself after the number of seconds specified in <timeout>.

  How do I add some BTC to it to be able to send it and/or pay for the transaction?

To get regtest coins, you need to mine them yourself. Bitcoin Core can quickly and easily mine a bunch of blocks, just use the generatetoaddress command. Note that newly mined Bitcoin only become spendable after the coinbase transaction that produces them has 100 confirmations. So if you mine 101 blocks, you will be able to spend the 50 Bitcoin from the first block mined.

For help with the RPCs, there is a help command. You can use that to get a list of available commands. Their names are pretty self explanatory. You can then do help <command> where <command> is some command you need help with. This will give you a more detailed description of the RPC, the parameters it takes, and what the result it returns will look like.


How can I generate a QR code for multiple outputs? I have an online store where users can pay with Bitcoin. I'd like them to send the total amount they have to pay to an QR code. From there on, the sent coins should be redistributed to two different wallet addresses in a 90%:10% ratio. How can I possibly do this?

BIP0021 (the contents of a QR code) does not specify a method for defining multiple addresses.


Bitcoin accepted charities or organizations I'm looking for Bitcoin accepted Charities. I want to make a list of the charities.

I found that Donation-accepting organizations and projects but I prefer organizations which are saving children, providing educations or solving environmental issues. Typical examples are UNICEF and WWF.

And also, I need to know the charitable bitcoin address. I mean that using payment processer, like bitpay, are not useful in my case.

The followings are what I found it.

BitGive
Dignitas International

Are there any organizations?

Thanks.

GiveBTC by the Bitcoin Foundation Canada / Bitcoin Embassy is the best directory I've seen.  Linked from the top of that page, they also have an excellent handbook for charities considering accepting bitcoin donations.

  I need to know the charitable bitcoin address. I mean that using payment processer, like bitpay, are not useful in my case.

I'm sorry to hear that.  Neither individuals nor organizations should be reusing addresses because it reduces their privacy and the privacy of all Bitcoin users they transact with.  Here's a related answer I wrote.


PPLNS is good against pool hoping? Is this true?

miningpoolhub.com use PPLNS

https://miningpoolhub.com/?page=account&action=balances

They said it's hopping proof.

Is this true? There is no way to adjust that?

So there is some luck involved? If after we mine we got a coin quickly our share may be doubled if the next one is also short.

Yes, PPLNS is protected against pool hopping. That is the purpose of PPLNS. If it  wasn't then pools would use proportional payouts rather than PPLNS.

Yes, there is luck involved. There is ONLY luck involved. That is how it is pool hopper safe.

If you were able, at the time you do some work, to know whether that work would be paid well or poorly then you could abuse the pool with pool hopping. But with PPLNS you just have to wait and see - you can't know in advance.

There are some (very vocal) people who say they can pool hop PPLNS because they can tell the future. Don't be one of those guys. Educate yourself.

If you want to know the details of mining pool reward systems then  I suggest reading Meni Rosenfeld's paper on the matter. See https://bitcoil.co.il/pool_analysis.pdf or https://arxiv.org/abs/1112.4980

Also see What is pool hopping?


How could Schnorr signatures be aggregated across the whole transaction? I am studying the MuSig protocol and am having trouble grasping certain segments. This is my understanding thus far:

In current Bitcoin CHECKMULTISIG format, the size of the signature grows linearly with the number of additional "m" signers. The way CHECKMULTISIG works is that each signer produces their own independent signature, and we embed all these individual values in the scriptsig. So, a 3 of 5 unlocking script might read [sig 1][sig 2][sig 5]...for simplicity sake I will be calling this compilation of all individual sig values the "group signature". In the given example, this signature field would be 3x the length of a standard P2PKH.

In a "naive" Schnorr multisignature scheme, rather than dropping all the potential public keys and [much larger] group signature onto the blockchain for verifier computation, we can have the signers interactively sum their individual public keys in a precommitment phase to derive a single "aggregate" key, that reads synonymously to a traditional public key. An outside member could then send BTC to this aggregate key, where it would be controlled by the group members. For the group to spend, each party would create a partial signature using their unique personal keys, and interactively sum all these signature values to create a group signature. At this point, we are left with a group signature (that is the size of a basic P2PKH sig) and aggregate public key being appended to the blockchain, providing us great space savings. However, this scheme is insecure unless operating under a KOSK model. We turn to another Schnorr variant, MuSig, that can offer provably secure key aggregation while operating in the plain public key context.

The 2018 Blockstream blog post states:

  Instead of restricting ourselves to one signature per input, we can actually get one signature for the entire transaction. Key aggregation can’t be used across multiple inputs, as the public keys are committed to by the outputs, and those can be spent independently.

I am having trouble understanding this paragraph. I am guessing that each aggregate key must be referenced in the scriptsig, since the previous sender's scriptpubkey would have mandated proof in order to unlock the encumbrance. I am struggling to understand how the aggregated signature across multiple inputs part is accomplished.

This is a feature of Schnorr digital signatures (ECSDSA) that did not exist in the digital signature scheme (ECDSA) that we are currently using. You should not compare the two multisig schemes together, the current design is a workaround.

Schnorr allows you to "aggregate" multiple signatures into only one signature by combining both private/public keys in the process of signing and produce a single signature (r,s) based on them. As a result you should only see one signature and one public key in your Schnorr transaction scriptSig and the output scripts (scriptPubkey) should also only use a single public key.

Take a look at this answer for a simplified collective signature scheme to get the general idea of how we only have one signature/pubkey, MuSig adds some additional steps to this process to prevent certain attacks.


Where can I find the transaction volume? I want to find the trading volume to do some trend analysis.But I can't find

I am assuming you are asking for trading volume across exchanges.

Brave New Coin (BLX) provides a good API to get volume weighed average across major exchanges: https://bravenewcoin.com/data-and-charts/indices/blx

You can also see their chart with volume on Trading View (look for BLX ticker): https://www.tradingview.com/chart/?symbol=BNC:BLX


What are the analogous steps between transfer of value from buyer to seller with traditional P.O.S. solutions vs. with bitcoin Recently I built a site that allows purchase of items with bitcoin, also paypal and credit cards.  In testing I haven been struck by how different the experience of purchasing online with bitcoin is vs. traditional methods. It takes much longer from the point of confirmation of sale to the "acceptance" of the payment (the point after which the workflow can move on to fulfillment).  It also takes more user input and action.  It's difficult on the surface of it to understand how this can be the case when transferring value from one person to another seems so much quicker and easier than traditional alternatives.

It occurs to me that part of the difference may be due to fundamental differences in what is taking place. Is a credit card transaction directly analogous to a bitcoin transaction, or instead does a credit card transaction only match a bitcoin transaction considered along with the bank and other transfers on either end of it? Are there other differences or considerations to make when comparing the two experiences procedurally?  I am unsure.

Coming up with strongly analogous steps between these two procedures of transferring value from a buyer to a seller might reveal choking points/areas of improvement for Point of Sale with bitcoin or highlight the differential value of bitcoin's approach.

So what are the analogous steps between the two experiences?

I think the answer is that a credit card company is vouching for you when you make a purchase. The seller does not know you, but they know the credit card company, and they know the credit card will give them their funds. The credit card company in turn knows you, and has deemed you credit-worthy. This is why it's called "credit" ... from the latin credere: "to believe" or "to trust". The credit card company believes that you will pay your bill at the end of the month.

Bitcoin is like cash... except that handing over physical cash takes a fraction of a second, but handing over digital cash takes approximately 10 minutes in the case of bitcoin (less with alt coins that add to their block chains at a faster rate).

The seller could decide that if this is a repeat customer (who has bought successfully with bitcoin once or more times before) to extend credit themselves, and just assume the transaction will be validated. Then, at the time of sale, the transaction will be just as quick as a legacy credit card transaction would.

Some alt coins are building in reputation via marking (such as Bitmark) which will go a long way towards allowing sellers to make immediate credit decisions even from buyers new to them. I think this is somewhat analogous to a built-in FICO score for a particular wallet.


Custom transaction IDs I understand that TxIDs are simply the double hash of tx data. But who creates them? I assume that all the nodes create the TXIDs of the transactions on their own and the TxIDs are not transferred along with the tx data. I am asking this because I want to create custom TxIDs (for some application) for the Txs and do not want the IDs to be double hash of the tx data. Is it possible to do so, or would the nodes then reject my tx.

You cannot do that.

The txid is not "chosen"; it is defined as the double-SHA256 of the transaction data (excluding the witness, when it is a segwit transactio ). Every node computes the txid independently.


How is a "standard" Bitcoin transaction defined? This is useful in Andreas Antonopoulos' book, Mastering Bitcoin:

https://github.com/bitcoinbook/bitcoinbook/blob/7c552ea5cfbc19448635b36407761b377ff5cbe9/ch05.asciidoc#standard-transactions

"In the first few years of bitcoin’s development, the developers introduced some limitations in the types of scripts that could be processed by the reference client. These limitations are encoded in a function called isStandard(), which defines five types of "standard" transactions."

Where are the five types listed in the Bitcoin Core codebase?

This is easier said than done, IMO. There are plenty of little fact sheet web pages (e.g. https://www.cryptocompare.com/coins/guides/what-are-the-bitcoin-transaction-types/) lying around that give a list of the "Standard" Bitcoin Transaction types, but nothing super authoritative.

However, I think the most authoritative source as of this very moment is the Bitcoin core source code.

I did my own search, recently, to prep for Andreas Antonopoulos' meetup tomorrow:

https://duckduckgo.com/?q=how+can+I+find+out+if+a+bitcoin+transaction+type+is+considered+standard%3F&t=ha&ia=web

The Mastering Bitcoin book refers to it in three different chapters:

https://github.com/bitcoinbook/bitcoinbook/search?utf8=%E2%9C%93&q=%22standard+transactions%22&type=

https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch07.asciidoc#multi-signature

I also found a good link to a comprehensive list of them here:

https://books.google.com/books?id=YHfCBwAAQBAJ&pg=PA92&lpg=PA92&dq=how+can+I+find+out+if+a+bitcoin+transaction+type+is+considered+standard?&source=bl&ots=GK4gh-mjoL&sig=BHl4csT7dQZUPwT61W6-QT1qrR0&hl=en&sa=X&ved=0ahUKEwjD5JCD-obTAhUJ0mMKHdyeCBQQ6AEIQDAF#v=onepage&q=how%20can%20I%20find%20out%20if%20a%20bitcoin%20transaction%20type%20is%20considered%20standard%3F&f=false

And the 5 types, pubkey, pubkey_hash, multisig, script_hash, op_return, have some neato stats here: https://webbtc.com/stats

Long story short, I think you're just going to have to byte the bullet and get a friend who knows C++ to explain the contents of the policy.cpp file to you:

https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L44

That friend will be me, shortly...

(some time later)

It looks like there are two functions that tell whether a transaction is 'Standard' by Bitcoin Core's logic: IsStandard() and IsStandardTx().

Header: https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.h#L75

Source code:

IsStandard(): https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L34

IsStandard() first checks the transaction against the Solver.
https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L37
Next, IsStandard() checks whether the transaction is an N of 3 multisig:
https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L40
Lastly, if witness transactions are enabled, IsStandard() checks that the transaction is one of the two standard types of witness transactions.
https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L53

IsStandardTx(): https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L59

A standard transaction must have a sufficiently low application version. https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L61
The transaction has to have a sufficiently low weight.
https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L66
If a given Bitcoin Transaction is a Pay to Script Hash transaction, it must have a small scriptSig value. According to the arithmetic in the comments, that works out to about 15 M of N signers (that is, 15 "co-signers" for a transaction) maximum. AND it has to be push-only. Not sure what "push-only" means, but apparently it's important.
https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L76
https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L89
Next, it seems that it's checking the scriptPubKey against the IsStandard() function.
https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L97
Null transactions are considered standard, as are transactions that have only one OP_RETURN output. But not empty multisig or dust transactions.
https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L103
https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L114

I'd guess this is a pretty reasonable standard to which to hold "Standard" transactions.

The comments explain some of it.

If you want to have a look at what inputs and witnesses are considered standard, you can just have a look further down the page, or ask another question on this site.


Script evaluated without error but finished with a false/empty top stack element I'm trying to spend coins from this tx

  https://tchain.btc.com/ad7a1ed858eecdd146d9c932779aecae4b33f068d29cf794fad6de20f5a5d449

The scriptpubkey is simple:

1 OP_CHECKSEQUENCEVERIFY OP_DROP OP_SHA256 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b OP_EQUAL

SHA256 (1) = 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b

So, I just need to push 1 to the stack using OP_1

Here is my transaction:

bitcoin-cli -testnet decoderawtransaction 020000000149d4a5f520ded6fa94f79cd268f0334baeec9a7732c9d946d1cdee58d81e7aad0000000001510100000001904c96000000000017a914f45d94733d430261962932e0c847075195916a048700000000
{
  "txid": "51060bbaf1b29b2ec3b1bb4eef0d56f61121e4df167768f52e6f67f81321eaf5",
  "hash": "51060bbaf1b29b2ec3b1bb4eef0d56f61121e4df167768f52e6f67f81321eaf5",
  "version": 2,
  "size": 84,
  "vsize": 84,
  "weight": 336,
  "locktime": 0,
  "vin": [
    {
      "txid": "ad7a1ed858eecdd146d9c932779aecae4b33f068d29cf794fad6de20f5a5d449",
      "vout": 0,
      "scriptSig": {
        "asm": "1",
        "hex": "51"
      },
      "sequence": 1
    }
  ],
  "vout": [
    {
      "value": 0.09850000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 f45d94733d430261962932e0c847075195916a04 OP_EQUAL",
        "hex": "a914f45d94733d430261962932e0c847075195916a0487",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "2NFXJy8mvz7ZiT4VVN29xPGC38hTygd3AyJ"
        ]
      }
    }
  ]
}

When I use sendrawtransaction I got

mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element) (code 16)

Is my redeem script wrong? Or it's something wrong with the scriptpubkey ?

The SHA256 of 1 is 4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a

$ printf "01" | xxd -r -p | openssl sha256
(stdin)= 4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a
$ printf "31" | xxd -r -p | openssl sha256
(stdin)= 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b

You were probably trying to do the SHA256 of the ascii character "1" which has a byte value of 0x31 or 41 in decimal.


Bitcoin legalized by some governments Recently, there have been rumors that some governments from around the world are looking forward to legalize crypto currencies and recognize them as legal tender / official payment methods.

What do you think?

Is it something that is going to happen?
Will it affect the value of the bitcoin?
If it is not a hoax, is it just to be able to tax it and to be able to set up a government authority controlling bitcoin?

Bitcoin has already been recognized as a currency by many nations for quite some time. But that's only a prerequisite. It previously was seen as as commodity by many nations which in a lot of tax systems has a very bad implication:

If you buy something like food or electronics, that's a commodity. If you pay it with a currency, you have to pay sales tax for the value of the commodity you sold or bought (depending on the tax system). Now hat if instead of trading currency against commodity, you trade commodity against commodity? Can you evade sales tax by this? Of course not, the makes of tax systems thought about that and in most cases implemented a law making it highly undesirable to trade commodity against commodity: Sales tax has to be paid for both commodities which were exchanged so you basically have to pay twice the sales tax if you don't use a currency.

With bitcoin being recognized as a currency by many nations, this problem vanishes. However, it still doesn't mean that it's widely known and used which are the real factors for success. Of course, if payments in bitcoin are more widely accepted, demand for bitcoin rises which increases the bitcoin price because bitcoin is non-inflationary.

However, it is reasonable to assume that governments aren't exactly in favor of bitcoin becoming more widely accepted because it makes it harder for them to monitor and control the flow of money. As a government, you can force banks to tell you about all bank remittances. You can also add serial numbers to bank notes and force banks to tell you when which serial number was given out or taken in by which branch of which bank by which person. In bitcoin, money isn't associated with people's names and addresses except if this information can be derived from other information. This makes monitoring the flow of money considerably harder.

Furthermore, right now, governments can force banks to make money of certain people unspendable (to "freeze"/block accounts). This gives them great control but isn't possible with bitcoin.

Bitcoin doesn't enable you to not pay taxes. If your employer pays you in bitcoin, they and you will have to pay the same amount of taxes and whether these taxes are paid to the state in bitcoin or that state's fiat currency, doesn't really matter for the concept of it. The state you live and work in decides how much you have to pay in taxes, not the currency you're using.

However, just because your government can (and will) still force you to pay taxes (which are needed for a functioning society, after all), doesn't mean they have great control over bitcoin. Something like what you mean with "to be set a government control over it", isn't possible because it would require a national entity to be able to declare a block invalid if it contains a transaction it declared invalid. In bitcoin, the the longest valid block chain defines the history of transactions and who has control over how much money which ultimately is whether a money transfer was or wasn't executed.

In particular, the longest valid block chain defines how much money you have. If the government wants to make a transaction of money I sent to you invalid, it has to persuade the miners to not view the longest valid block chain as the effective block chain but the longest one which doesn't contain that transaction. A government can't make everyone do that. It can force the miners in the area it controls to stop mining on top of the (for everyone else) effective blockchain and make then fork their own one. But their's will just have no value as it isn't accepted by the people. If many governments do that by force (has to be done by force) in a joint effort, that would just be them making mining of bitcoin illegal, therefore restricting their peoples' freedom to a great extend. Would you want to live under a government which tells you which computations you can and cannot execute?

Ergo, governments can't control bitcoin. The best they can do to control it is to make it illegal.


How does cryptsy.com allocate trades for many orders with same price How does cryptsy.com allocate trades for many orders with same price ?

Orders can come from one or many accounts, my question applies to both situations, but it's obviously more interesting how they are executed when orders come from multiple accounts from different people. For example, if I see order for 100 BTC and want to attach my order for 0.1 BTC to the same price tag, what are my chances of getting a deal ? Do I get a deal only after all 100BTC exchanged ?

Obvously my question applies to both types: buy and sell orders.

Do other exchanges have same order allocation schema as Cryptsy ? If not, what allocation schemas do they use ?

Examples of possible allocations that I can think of:

1) First Come First Serve - earliest order gets deal first

2) Last Come First Serve - latest order gets deal first

3) Proportional - deal amount is distributed between orders proportional to amount of these orders.

4) Minimal split - system picks closest amount to avoid splitting orders into many small fractions.

5) Small orders first, Large Last - close as many orders as possible to keep minimum number of open orders in the system.

6) Each account gets equal share from new deal regardless of order size or time

7) Random per account - equal probability for each participating account to get a deal

8) Random per order - gives incentive to make many smaller orders rather than one large order

At Cryptsy the order is First In First Out influenced by the account's trading history. If the server were to receive buy orders at the same time assuming there is enough coins at the specified price to fill the orders, the server looks at each account and the one with the most trading history gets processed first, then in order to the account with the least trading history. I work for Cryptsy, I'm Brad!


How can a bitcoin exchange prove its solvency while maintaining privacy? What methods can an exchange website use to prove that it actually has all its users' bitcoins?

These are the requirements:

User privacy is a must. No one should be able to tell how many bitcoins an account has (besides his own).
Total number of accounts should be kept secret.
Total number of bitcoins should be kept secret (if possible).

I've came across gmaxwell's transcript but it seems to lack many core details and I couldn't really grasp it in it's entirety.

We start out with the exchange having two things. It has a set of Bitcoin addresses that it owns, each of which has some balance. It also has a set of accounts, each of which it owes some number of Bitcoin to. The objective is to prove that the exchange controls each Bitcoin address on that list and that the total of all account debts is less than the total balance of all accounts, without revealing anyone's balance to anyone else or any totals.

To do this, the exchange must first assign accounts to Bitcoin addresses such that no single address is overspent. This may require moving Bitcoins around. Now, the exchange assembles a giant merkle radix tree. From the root are inner nodes that are indexed by the Bitcoin address they link to. When you reach a Bitcoin address, the nodes contains balances, so if an address contains, say, 10 Bitcoins, the child nodes have balances that add up to no more than 10. Off the balance nodes are account nodes -- these hold the individual user accounts. Each user account node is signed with the key corresponding to the Bitcoin address.

The exchange now publishes the hash of the tip of this tree. Any user who wishes to challenge the exchange will be given the following:

Every node that leads to their account node.
Every other inner node that hangs off the address node their account node hangs off.

This doesn't tell them any totals, since they have no address nodes but the one their account is assigned to. This doesn't let them see anyone else's balance, since they only have their own account node.

They can now confirm that there is a real Bitcoin address that the exchange controls (because their account node is signed with that key) and that a portion of that balance equal to what they are owed has been uniquely assigned to them.


double spend attack: Is this actually true for the more time progress the higher the probability of success for attacker I'm new here.
I have  a question here. Some experts keep saying that this assumption isn't formally correct and I don't really understand why or why they might be wrong.

In the double spend attack; you have attacking network and honest network.
Total Hash rate is split between those.

some experts keep saying that time is not a factor in determining how fast you can generate blocks. That's something I don't really get.

So, is it incorrect to say that the probability of success of the attacker
increases with the time T it takes to generate z transactions since they have more time to secretly mine their alternate blockchain ?

update:
@G. Maxwell. I am not sure what i am asking for exactly. So let me try this.

Perhaps I am asking whether the assumption that the time to mine blocks is memoryless ? And how this clashes, if it does, with the proposition that the probability of success an attacker increases with time T it takes to mine the z transactions since they have more time to secretly mine their alternate blockchain.
I am not assuming any other external attacks other than mere hashpower.

I believe you are asking if the inter-block interval matters for the success rate of a high hashpower reorg attack.

It does, because if it is too fast the honest participants will spend a substantial fraction of their time not working on the same (honest) chain, because they haven't heard of each others blocks or have created their own blocks before other honest blocks arrived.

So the attacker pillages the village while the defense is diluted and not working together perfectly.

Slowness in this case is always relative to the overall processing and propagation time. So a system which worked without substantial dilution normally could run into problems when flooded with transactions or if an attacker started also DOS attacking nodes.

Mining a block is memoryless, but mining a chain makes progress. But both the attacker and the honest network make progress, so when considering their relative advantages their success depends on their relative hashrates.  If in fact the honest network takes longer (due to bad luck) to mine this particular block then it is easier for an attaker to be successful during that time.

So, for example, in your risk calculation if you observe that blocks have been slower than expected recently it may be reasonable to require more confirmations for two reasons: One reason is because if the honest network was unlucky an attacker with a secret chain might have done better with only average luck. Another reason is because the reduced block speed may in fact be because part of the network has split off to attack.


Is it possible to have complete cold storage in NXT? BTC has capability to create new account on offline computer and send some coins to and from that account without ever going online.

Sending coins to that account is trivial.
Sending from that account is done by generating transaction on offline computer, saving it on flash drive or CD, inserting that media into online computer and feeding transaction to the network.

That way I can keep large chunk of my coins on my offline computer without worrying about keyloggers. Even if they got there during installation they won't be able to send anything because it's offline. The only thing they can do is corrupt my data, which is solved by backing keys up on another flash drive or CD.

Does such possibility exist in NXT ?

Unlike BTC, new NXT account has to send at least one outgoing transaction to become fully initialized by the network, otherwise collisions may spoil it. Sending money to that account is not sufficient for initialization.

Can I generate and save and feed transaction in NXT like in BTC ?

If not then how am I supposed to initialize my offline NXT account without giving my password to online computer that may have keyloggers, viruses, NSA bots and whatever else runs on it ?

Is it possible to initialize NXT account with authorization token generated offline ?

Is it possible to send money or message or buy alias or participate in distributed exchange using authorization token or some other way generated offline ?

Does NXT have that feature in it's plans ?

I don't know if this is the recommended way, but I did this by using the Send Nxt API call on an offline computer, storing the transaction bytes, and broadcasting the transaction from an online computer by using the Broadcast Transaction API call.


What piece of code would allow me to check if a block has been found then run an operation? I am relatively new to C++ and I was wondering if anybody could help me out. I am looking piece of code that will loop until a block is found by a node and then when one is found print a simple output like "Block found".

Thanks!

You could simply record the value of bitcoind getblockcount somewhere and see when that changes by calling getblockcount repeatedly.


Sending Bitcoins from a Mastercoin Address Is there any danger in sending any remaining bitcoin funds that are still sitting in a Mastercoin address, i.e. the bitcoin address from which one sent funds to the Exodus address?

No, it's completely safe.

To send mastercoins you have to use one of the mastercoin clients - you can't accidentally send mastercoins by working with a Bitcoin wallet.


Fork Dash - New coin problems Currently I am doing my final year project by forking the Dash code and generate a new coin from that. I had read lots of tutorial online and follow the steps as well. First, I had generate the genesis block using the genesisH0. I replace the alert pub key, genesis block, merkle root and some code. However, I cannot mining with the genesis block 0.

The QT program is stop at the beginning and stated synchronizing header and the another PC stated connecting to peer. I had check the peer info as well. Both of the PC show that there are connect to each other. But there was a weird thing, which was the port number associate with each of the IP. The port number is random as well. Anyone can help me about this?

As far as the port number, the outgoing port will usually be random but on each PC it is connecting to it should be static.


How do developing countries begin to adopt bitcoin? If you're in, for example Congo, or Ecuador (or any other developing country) how do people there begin to adopt bitcoin? I mean the very first people, obviously things are easier once a, even small, group of people are using it in a given country.
The problem I see here, is why would you (say as the owner of bitcoin) want a high risk currency, in exchange for bitcoin? So:

1 Who can you give bitcoin to in these countries?

2 Why would you(or any seller of bitcoin to the local currency) be willing to accept such an insecure local currency?

It's quite simple to begin being part of the Bitcoin network. It's public and open to everybody.

If there is no Bitcoin infrastructure around your community, for example where you could buy bitcoins, you start telling people that you accept bitcoins as a payment.

You could sell a product and accept bitcoin.
Offer your services for bitcoins.

Eventually, someone will be the first one to pay you in bitcoins. Like a domino effect you will start tipping your friends and the bitcoins will move around.

In case you do have a credit card you could buy them on an exchange such as bitstamp, circle or bpesa to mention a few. You could then sell them in your community to help adoption. They pay you in local currency and you hand over bitcoin. What you do with the local currency is your choice. You can keep them, pay a bill or exchange them and purchase more bitcoins.

If it has utility people will start using them. Some sooner and some later. Same with countries.


Multibit Private Key Restore I backed up my private key and restored it into a new copy of Multibit (difference machine). The import was successful but the public key address has not been updated with my previous address.
I've done "Check Private Keys" which said it was successful as well as forced a resync with the blockchain. None of my old transactions are showing up.
Any thoughts? No doubt I'm doing something wrong.
Thanks!
Edit:
Thanks for the response! I verified through bitaddress.org that the private key I exported only matches the bitcoin address automatically generated when I created the new wallet.
But the old private key that I IMPORTED into this same wallet is nowhere to be found. Multibit says the import was a success. If this is true there should be TWO private keys in the export file; one for the auto-generated bitcoin address and one that matches the old imported private key.
I'd love to take the private key in my original export file and paste it into bitaddress.org to see if it matches my public address but my export file is encrypted. So I have to import into Multibit, enter the password and then export it unencrypted to obtain the private key.
Does anyone know of a way to decrypt an encrypted private key file without using Multibit?

You can use an offline copy of bit address.org to check private keys against addresses if you want. It's the wallet tab.


Why does some transaction returned in the result of Blocktrail api call contain a field called "raw"? Such as the result of https://api.blocktrail.com/v1/btc/transaction/57ecab25858a91448cbca713ea369c23a06f6080fca85dea367c33fad93fa056?api_key=MY_APIKEY

Also what exactly does "raw" mean here? Could it be translated to some information?

It looks like a hex encoding of the binary encoding that Bitcoin uses. You could also get this through the getrawtransaction Bitcoin RPC call, if you have txindex=1 enabled.


Manual work as source of entropy Working on an opensource air-gapped crypto vault, in which I have the regular method of relying on OS to provide cryptographically secure random source and use that to generate the mnemonic phrase.
Also wish to provide a manual option of using dice rolls or coin flips to provide your own entropy and not needing to trust the software to do it for you. Exploring how trustless it can be.
As, I understand there are some bias associated with coins & dices as well. They may tend to favor one or some outcomes more than other. I have read a lot about providing your own entropy source and how that will usually be insecure if you accidentally introduce some bias. But considering, I am willing to go as far as flipping/rolling 256 times to generate a 256 bit binary number, does that eliminate the bias?
If yes, then is it possible to utilize less number of flips/rolls to generate less entropy which is well verified to be secure enough for the purpose of mnemonic generation? Wish to explore this option as its simply a lot of monotonous manual work for the extremely cautious user & if its possible to reduce the burden without sacrificing security.
Again, I have read many statements by fellow people on internet but I have no means to verify anybody's claim hence reverting to this community to chime in.
Some of the methods I read about:

Using multiple dices to effectively roll x dices in every attempt and do it faster. Not sure how the order of reading dices matter here. Saw someone mentioning they should be read in the exact same order.

Approach of mixing coin flip along with four dices to use the provided mapping to derive the words. I don't want to trust this. I would very much like to arrive at a random index for each word and then read the value at that index from the wordlist.

Using Ionman's BIP39 tool, how it shows the provided entropy to be enough, it indeed required putting in 256 inputs (0/1) random values in there before the security validation message (mnemonic looks more secure than it really is) goes away. So as per that tool, anything less than 256 flips/rolls isn't secure enough. True?

How to interpret dice rolls: Then there is also the question of interpreting the dice rolls. Do I use odd even numbers as 0 & 1 respectively or should I use half the range of possible outcomes (1-3) as 0 or 1 and the other half range as the other binary bit?

Just gather every source of randomness you have all together and apply a 256-bit secure hashing function to it such as SHA-256. The advantage of this approach is that it is as secure as its strongest input up to the limit of the hashing function you use.
There is no benefit to discarding information. Why map 3 and 5 both to 1 and give up some entropy? What benefit would you get?


bitcoind - how to find out what is affecting the verificationprogress Problem

Bitcoind verificationprogress continues to go up and down around .99999xxx and never finish verifying

Background

Looking for any insight here, had a node that went down and upon bringing it back up it spent about 18 hours between .999992 and .9999998 and just keeps bouncing up and down there.

I'm assuming there is some verification or validation and as blocks are coming in the number goes down slightly but I can't find any stats to help me figure out what is remaining or if there are any issues.

The verification progress is an estimate, based on how many transactions have been seen versus known statistics about the transaction rate on the network.

If the latest block timestamp is in the past, the verification progress will be below 1. If the latest block timestamp is in the future, the verification progress will be above 1.

Nothing is wrong by it persistently below 1. It's a side effect of blocks only appearing every 10 minutes.


To run bitcoin core testnet on Ubuntu 16.04 How can I run Bitcoin core testnet version on ubuntu 16.04 platform ? I am getting so many reference about how to run bitcoin core mainnet but it will take around 20 days to synchronize with the network as per my bandwidth and also will take my half of the HDD. So I opt for Testnet. Can someone explain me how to insatll bitcoin core testnet on Ubuntu 16.04? I would be grateful. Step by step explanation or reference would be much appreciated.

After having installed Bitcoin core on your machine, run the following command to start synchronising the testnet blockchain
bitcoind -testnet -daemon
The synchronisation starts as a daemon and runs in the background, you can issue the following the command to see the progress
tailf ~/.bitcoin/testnet3/debug.log
To access the command line apis , just add the -testnet parameter
bitcoin-cli -testnet getinfo
Update: The RPC getinfo is deprecated, use getblockchaininfo for it to work with the latest version
bitcoin-cli -testnet getblockchaininfo


Where is data folder for Bitcoin Core in Windows 7? I cannot find any wallet.dat file on my c: drive. Any ideas where it can be put?
Everybody says the same and I'm doing it. Maybe I'm kind of idiot so I'm pasting screens with steps I have done:

1

2

The same with Litecoin Core

The default directory would be %APPDATA%\Bitcoin

If you can't find it you may hit the Windows-Key+F and enter "wallet.dat"

You can also export your wallet from within Bitcoin-QT: File>Save Wallet


Selling bitcoin from a paper wallet I'm looking to sell bitcoin from a paper wallet into fiat.
So far my research is suggesting that a good way of doing this may be to transfer the paper wallet to LocalBitcoins wallet and sell from there. As I understand it, this incurs a fee to bring into the LocalBitcoins wallet, and then a fee to sell. In order to get the paper wallet BTC into the LocalBitcoins account, I would surely have to import the paper wallet into a software wallet first in order to transfer them to LocalBitcoin.
This means it would be something like:
Paper Wallet > Software Wallet > LocalBitcoin Wallet > Sell on LocalBitcoin
The above seems quite convoluted. I don't mind convoluted if it saves on money and is relatively secure. But it would be good to get some advice on either reducing the number of steps in this process or an improved method of selling from a paper wallet. Note that I want to spend all of the BTC in the paper wallet (which is a fraction of a BTC) so the software wallet does not need to be trusted beyond the importing/spending part of the process.
Also, if I must do the software wallet first, would be good to get recommendations on good software wallets. I assume I can spend bitcoins from a software wallet that I have "imported" my paper wallet into rather than "sweeped"?
I'm using the term "software wallet" to include online hosted wallets and local computer wallets alike here. But will play close attention to any advice given on this.
I also have a Bitcoin.com account, if that's any use.

Since the LocalBitcoin wallet doesn't have a private key import function, you can't shorten the number of steps.
You can use Electrum, it's very popular and it has both "import" and "sweep" functions. If you don't want to trust it (I do trust it, unless the computer has malware) you can use it on an airgapped computer.
That's all you need to know, good luck!


rpc cookie authentication I am getting a message when I start bitcoind :

Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation

What is cookie based auth and how can I use it ?

Thanks

Cookie based authentication is used when no rpc password is provided. The 0.12 release of Bitcoin Core had the following to say about it:

  When no -rpcpassword is specified, the daemon now uses a special
  ‘cookie’ file for authentication. This file is generated with random
  content when the daemon starts, and deleted when it exits. Its
  contents are used as authentication token. Read access to this file
  controls who can access through RPC. By default it is stored in the
  data directory but its location can be overridden with the option
  -rpccookiefile.

  This is similar to Tor’s CookieAuthentication: see
  https://www.torproject.org/docs/tor-manual.html.en

  This allows running bitcoind without having to do any manual
  configuration.

If all you use is bitcoin-cli without need for the RPC user/password stuff, you should probably just comment out or remove rpcuser=XXX and rpcpassword=YYY from bitcoin.conf and restart bitcoin. It "should just work [tm]".

If you need a specified rpc user/pass combo, you need to switch to using rpcauth instead of rpcuser/rpcpassword.

The rpcauth is described as

  Username and hashed password for JSON-RPC connections. The field  comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is included in share/rpcuser. This option can be specified multiple times

In share/rpcuser (on github) there is a Python script which lets you create such a user/password combo (note that you are given the password, you do not get to specify it yourself).

Grab that python script, then run it. E.g.

$ python ./rpcuser.py foo
String to be appended to bitcoin.conf:
rpcauth=foo:a14191e6892facf70686a397b126423$ddd6f7480817bd6f8083a2e07e24b93c4d74e667f3a001df26c5dd0ef5eafd0d
Your password:
VX3z87LBVc_X7NBLABLABLABLA

Then replace rpcuser with foo and rpcpassword with VX3z87LBVc_X7NBLABLABLABLA wherever you are connecting to the bitcoind RPC.


I had bitcoin stored on my phone, but then lost my phone, please help I had some bitcoins stored on my cell phone, but then it was stolen from me. How can I recover the bitcoins? Please help me!

Sorry to hear that you have had your device stolen. When using Coinomi all you need to be able to restore your funds on a new device is the 24word recovery phrase which you were given when you set up your wallet. You can learn more about this here

Since Coinomi is an HD wallet, all you need as a backup is your Recovery Phrase

...

If you ever lose or change phones, or want to use multiple devices at the same time, simply install Coinomi and choose the option "restore a wallet" and input all words in order. Make sure all characters are typed in lowercase and that there is a single space between each word. Type the first 3 or 4 letters of each word and select the suggestion that pops up to avoid misspellings.

Please open a ticket on that site if you require further support. Thank you


Receive bitcoin before block downloading is finished here's the story:

I've downloaded Bitcoin v0.8.5-beta and bought myself some bitcoins before the block downloading was finished. Now the downloading is still not finished (3 days and counting): 250k and a bit with a rate of 100 an hour or so. I' ve got a bit of an older computer so that's probably not helping.

Question: will I ever see my bitcoins and/or is there another way to transfer it to another wallet? Or is there a way to download the blocks faster?

I'm fearing that the rate of blocks created is higher then the download rate of my computer...

Please consider using thin client, like Multibit. Your balance will be available to you after few second. You can import BitcoinQT wallet in no time.


What's the difference between BTC and BCH transaction capacity? If Bitcoin can process x transactions per second, how many transactions per second can Bitcoin Cash process?

tldr - BTC = 3.33-6.66tx/second, BCH = 27 tx/second

For non-segwit-enabled Bitcoin nodes, transaction capacity is determined by Bitcoin's 1MB block size limit. A 1MB block will contain about 2000 transactions on average (see here). Because 1 block is mined every 10 minutes, this works out to roughly 3.33 tx/second.

BCH transaction capacity is determined by its 8MB block size limit. Because a given non-segwit BTC transaction should be roughly equal in size to its equivalent BCH transaction, this puts the transaction capacity of BCH at 8x that of BTC without segwit, or roughly 27 tx/second.

For segwit-enabled BTC nodes, transaction capacity is limited by the 4MB block weight limit (Note that block weight ≠ block size, see here for more info). It is estimated that roughly 2x the amount segwit transactions can be fit into a BTC block as can their non-segwit equivalents (see here and here). This would make the transaction capacity of a fully segwit-enabled BTC network roughly 6.66 transactions/second.

A few things worth noting:

1) Visa typically processes ~2,000 transactions/second and can process up to 24,000 transactions/second (see here).

2) As of Feb 2018, roughly 14% of BTC transactions are segwit transactions (see here)

3) On average, a serialized BTC block full of segwit transactions should take up ~2MB on disk.

4) Increasing the block size limit increases the amount of disk space and RAM required by miners to operate full nodes.

5) Generally speaking, the BTC community plans to increase transaction capacity via an overlay network (e.g. the lightning network) whereas the BCH community plans to increase transaction capacity by continuing to increase the block size.


how do i convert an uncompressed key to an extended bip 32? I am completely new to bitcoin. My question is how do you convert an uncompressed key to an extended bip32 key? Are there any tools that do that? Thank you

With "uncompressed key" you probably refers to an uncompressed public-key.

An extended public-key has additional informations (next to the compressed public-key itself).
You can get the pure compressed public key from an extended public key, but not vice-versa.

depth (in the hierarchy)
child-index
chaincode (the hierarchal link)
fingerprint (first 4 bytes of the keyId [ripemd(sha256())])


Is transaction malleability an issue in Ripple? Are the algorithms used in Ripple vulnerable to transaction malleability?

Ripple uses substantially the same signature scheme as Bitcoin does and the server validates signatures similarly using OpenSSL. But Ripple doesn't require you to refer to previous transactions by ID to spend from them. So you can't prevent people from spending funds or jam their transaction chains.

The Ripple server will soon enforce fully canonical signatures on transactions and validations to ensure that no such attack is possible.


In the Ardor platform, what are all the different "types" and "subtypes" in a transaction? In the Ardor platform, there are different types of transactions. What do each number type represent? Some are asset transfers, send transaction, and voting. Where can I find a list of these types of transactions?

Use the getConstants API and check the "transactionSubTypes" JSON array for a mapping of transaction types and sub types to their display name.

"transactionSubTypes": {
    "AssetIssuance": {
        "isPhasable": true,
        "subtype": 0,
        "mustHaveRecipient": false,
        "name": "AssetIssuance",
        "canHaveRecipient": false,
        "isGlobal": true,
        "type": 2,
        "isPhasingSafe": true


2013 Paper Wallet Issues Thought I made a paper wallet in 2013 with 2 coins, just checked it is showing empty. The blockchain transaction showing unspent as of when I made the wallet in 2013.
I thought it was in the paper wallet so I miss placed my blockchain wallets info. I have wallet ID's but no passwords, 3 wallets trying to narrow down which wallet to try and figure out the password.

Is there a way to figure out what wallet a transaction came from, because I fave a few?? I think the transaction is in limbo- Please help anyone
Any suggestions would be greatly appreciated!!

Is there a way to figure out what wallet a transaction came from, because I fave a few??

No, wallets just hold private keys, and the private key is all you need to spend coins sent to a "normal" bitcoin address starting with a 1. From the public view, all that can be seen is the address the coins were sent to, there is no more information about that address such as what wallet generated it or where the private key is held.

  I think the transaction is in limbo

If the transaction was confirmed back in 2013, and it is unspent since then, it won't be in limbo, you just need to find the wallet which holds the private key for the address that transaction was sent to :)

I'm afraid there isn't much else anyone here can do to help you, if you have lost the private key then your bitcoins are lost, so I hope you find them in one of your wallets!


How Do Peers Choose Which Peer To Trust? So the way I understand how the blockchain works is that each new block uses the previous block's hash, which means if my block[100].hash != someone_elses_block[100].hash that means that either I broke some rule, or the other person did; In this case, how does my client find a trusted peer? And WHERE does my client get the latest CORRECT blockchain? Is there a central server for it? If so, where did the server it from? Because the miner will have the longest chain, but what if they are not actually following the rules? Then what?
Lets say I stopped my client for 100 days, during those 100 days there was 500 new transactions, which means that if I was to compare my last block with someone elses then my client would be outdated, therefore it needs to download the extra blocks, where does it find these blocks and how does it determine which peers to sync to and to trust?
A question about the nonce, if lets say there was no nonce; If client A has a chain that followed the rules and client B was verifying transactions without actually doing all the proper checks, that means that client A at block[100].hash != client B at block[100] therefore client B is not following the rules, so the question is what is the real need for the nonce? Because in my mind it seems like it's just there to make it harder to mine for people, correct? Or does it add some sort of security? And if it does, will it have the same security if let's say the nonce was always any number between 0 and 15? Or would it have to be adjusted as mining gets faster?

Thanks!

either I broke some rule, or the other person did; In this case, how does my client find a trusted peer

Your client does not trust any peer. It fully validates the blockchain. In the event of multiple conflicting blocks at a given block height, your node will choose to go with the first block it hears of. However it will still retain and validate all of the other blocks that it has received for that block height. Only after more blocks have been mined does it actually choose which of those conflicting blocks becomes part of its main chain. It chooses based upon which branch has the most cumulative work.

There is no trust in this process; it uses first heard initially and then will readjust if later blocks belong to a different branch. These reorganizations are why it is recommended to wait for multiple confirmations as one block reorgs are not uncommon.

Also, the blockchain with the most cumulative work (typically referred to as the longest blockchain) is not the only determination for what blockchain to use. The blockchain also has to be valid, it can't just have the most work.

  2: Lets say I stopped my client for 100 days, during those 100 days there was 500 new transactions, which means that if I was to compare my last block with someone elses then my client would be outdated, therefore it needs to download the extra blocks, where does it find these blocks and how does it determine which peers to sync to and to trust?

Your node does the normal peer discovery process every time it goes online. Your node will then randomly choose one of the peers it has connected to to be the "sync node". It doesn't actually sync much off of this node, just the block headers. It downloads the block headers from this node and validates them. Then it will download the blocks for those headers from the other nodes it has connected to.

Once the headers chain of one node has been synced, it will request the headers of other nodes to get an idea of what their best headers chain is in order to determine if the sync node was dishonest.

Again, there is no trust in this process as all blocks and headers are still fully validated. Since the download involves checking against multiple nodes, it is unlikely that your node will have the incorrect blockchain as not just one node dictates what chain you download.

  so the question is what is the real need for the nonce?

The nonce is completely unrelated to validity except for the fact that it is part of the block header which is hashed. The nonce's sole purpose is to have something to change when mining. It provides no security characteristics nor is it related to the consensus rules (except for the fact that it has to exist, it could be zero). Miners could very well just not do anything to the nonce and change something else to get a different hash. It exists solely as a convenience.


Deleting and restoring wallet Is it safe to delete my bitcoin wallet (coinomi) and restore it from 24 words phrase when ever i need it (once a year)

By delete your wallet do you mean delete your account and .dat file? Thanks to BIP32 the seed/recovery phrase allows a user to back up and restore a wallet without needing any other information and can in some cases allow the creation of public addresses without the knowledge of the private key.

In other words your recovery phrase is equivalent to the private key so if you had a lost/deleted/stolen wallet then you would be able to recover it with the recovery phrase/seed.


What is the current actual cost of mining 1BTC? Bitcoin is going down right now. It's about 500USD/BTC. I wonder what is mental support price for miners under which they would prefer to buy btc instead of mining it? That would be more or less mining cost. So what is the current actual cost of mining 1BTC?

You can use a mining calculator to compare the available hardware's output, then add fixed cost (hardware) and variable cost (the cost of manpower, power, replacements, maintenance, etc).

I am assuming you mean ASIC mining cost, as GPU mining has not been profitable for bitcoin for quite some time. I found a site which keeps track of ASIC deployment and also provides a mining calculator: http://minr.info/

Generally miners do a lot of work to find places with cheap power, you can find kWh rates here: http://en.wikipedia.org/wiki/Electricity_pricing#Price_comparison

Even though this may seem unrelated, miners can also use GPU or Scrypt ASICs to generate alternate coins (and then convert them to bitcoin), which may be cheaper than generating/buying bitcoins. You can find a lot of information about various algorithms and a mining calculator for many alternative algorithms here: http://www.coinwarz.com/cryptocurrency

Beyond all of this, it is worth noting that bitcoins can be generated by any computer capable of doing such calculations, and that there are at least some people who do not pay for the power that they consume, and sometimes not even the hardware (such as college students and hackers, respectively). Therefore the price of mining a bitcoin can be next to nothing or actually nothing for some people who do not play fairly, and who will mine full-force at virtually any price.


How do I get my Bitcoin "Spendable" instead of it being "Non-Spendable" on my Blockchain Account? I have been fighting this all night and day and haven't made any progress. I used a CoinFlip ATM to buy BitCoin or deposit USD into the machine. I have an account at Blockchain and I used the right QR code to deposit, or buy, the Bitcoin. My transaction is showing in my Blockchain Account but it's showing as non-spendable. I need to make a payment on something and need to know ASAP how to make it spendable to transfer. Something to do with a Private Key, that I have no idea how to get either. HELP Please!

OP answered own question:

  I have been using my laptop to try all this and I just opened up my phone and the Blockchain app and apparently the Private Key was stored on the phone app and so it released the funds.


dogecoind won't read conf I'm having issues starting dogecoind after compiling in ubuntu 12.04 x64 running in VirtualBox on win 7 ultimate x64

here's what i've tried from inside dogecoin/src after make -f makefile.unix:

sudo su
./dogecoind -server -listen -daemon -rpcuser=dogerpc -rpcpassword=dogerpcpw -rpctimeout=30 -rpcport=8334 -rpcallowip=192.168.1.* -rpcallowip=127.0.0.1 -testnet

and i get:

Error: To use the "-server" option, you must set a secure rpcpassword in the configuration file:
/root/.dogecoin/dogecoin.conf

so i do:

cd ~/.dogecoin
emacs dogecoin.conf

i save the following parameters:

rpcuser=dogerpc
rpcpassword=dogerpcpw
rpcport=8334
rpcallowip=192.168.1.*
rpcallowip=127.0.0.1
server=1
daemon=1
listen=1
testnet=1

i even chmod 777 dogecoin.conf to be sure everyone on God's green earth could access it so that wouldn't be a problem, but still the same error when trying to start up dogecoind

would much appreciate any help/tips!

It's unclear which version of dogecoind you are using. However, in the current 1.5 code on Github, there is a similar message:

if (mapArgs["-rpcuser"] == "" && mapArgs["-rpcpassword"] == "")
    throw runtime_error(strprintf(
        _("You must set rpcpassword=<password> in the configuration file:\n%s\n"
          "If the file does not exist, create it with owner-readable-only file permissions."),
            GetConfigFile().string().c_str()));

https://github.com/dogecoin/dogecoin/blob/master-1.5/src/bitcoinrpc.cpp#L1080

This indicates that your attempt at working around the problem with chmod 777 would not have had the desired effect. Instead, try chmod 600 dogecoin.conf.


Exit bitcoind gracefully in a bash script I'm writing a bash script for some Bitcoin / Lightning experiments. I want to start bitcoind in the background (and also LN instances, but they are not the focus of this question). I want the script to shutdown bitcoind gracefully and exit on Ctrl+C. This is my attempt to implement this:

#!/bin/bash

echo "Starting bitcoind in the background..."
bitcoind &
sleep 5
echo "bitcoind started."
BITCOIND_PID=$!
echo $BITCOIND_PID

cleanup() {
    echo 'cleaning up'
    pkill $BITCOIND_PID
    exit
}

trap "cleanup" INT

# Run the script until we stop it
wait

This script produces the following output:

<some bitcoind output>
bitcoind started.
18574
2019-09-17T14:12:20Z Adding fixed seed nodes as DNS doesn't seem to be available.
^C2019-09-17T14:14:07Z tor: Thread interrupt
cleaning up
2019-09-17T14:14:07Z opencon thread exit
2019-09-17T14:14:07Z torcontrol thread exit
2019-09-17T14:14:07Z addcon thread exit
2019-09-17T14:14:07Z Shutdown: In progress...
2019-09-17T14:14:07Z net thread exit
sergei:~$ 2019-09-17T14:14:07Z msghand thread exit
2019-09-17T14:14:07Z scheduler thread interrupt
2019-09-17T14:14:07Z Dumped mempool: 2e-06s to copy, 0.004053s to dump
2019-09-17T14:14:07Z [default wallet] Releasing wallet
2019-09-17T14:14:07Z Shutdown: done

Then I have to press Ctrl+C once again to exit the script.

How do I make the script shutdown bitcoind first and then exit automatically?

Related: How to use Ctrl+C to kill all background processes started in a Bash script?, Best way to kill processes created by bash script?.

Is bitcoin-cli available? If so, bitcoin-cli stop instead of pkill $BITCOIND_PID.

My own preference is to add sleep 2 following a stop, as I've experienced issues immediately restarting the stopped daemon where it behaves like a child thread hasn't finished cleaning up before the parent exits. That may not be what's happening - I've not investigated that behaviour.


How is a Butterfly Labs Bitforce Single powered? Its website says it uses 80W of power, so that's too much for a USB port. How does it receive it's power?
Can it run on a 240V power supply, or does it need 110V?
Note I'm not asking about the newer "Bitforce Single (SC)", which hasn't been shipped to anyone yet. This the older (FPGA?) hardware that has been sold for some time.

It uses ~70W @ 12V of external power. The stock power brick is cheaply made, giant, and inefficient (PF=.5,efficiency~.8). Fortunately, the power brick can run on 240V.  Many people make their own cables to use an ATX or bench PSU (with higher powerfactor and efficiency)

source: https://bitcointalk.org/index.php?topic=67819.msg796852#msg796852


QT Client - Wallet.Dat - Vulnerable? I recently took my BTC off my QT Core Client on my computer and got the coins onto my Ledger Nano S wallet fine.

My question is if the Wallet.Dat file on my computer (from the QT client install) were ever compromised, could that be used to steal my BTC from the blockchain?

In other words, do I still need to be concerned about security of my Wallet.Dat file given it could reveal my private keys?

My question is if the Wallet.Dat file on my computer (from the QT client install) were ever compromised, could that be used to steal my BTC from the blockchain?

Note that there is no such thing as "stealing Bitcoin from the blockchain". Bitcoin cannot be sent to or from the blockchain, that is not how Bitcoin works.

To answer your question, if your wallet.dat were to be compromised, your Bitcoin will be safe assuming that you have properly transferred your Bitcoin to a Ledger Nano S. By properly I mean that you generated a seed using your Ledger Nano S and creating Bitcoin transactions from your Bitcoin Core wallet that sent your Bitcoin to addresses from your Ledger. If you did that, then if your wallet.dat is compromised, your Bitcoin will be safe. The private keys your Bitcoin are associated with are on your Ledger, not in your wallet.dat file.

Of course Bitcoin sent to addresses from your Bitcoin Core wallet will still be in your Bitcoin Core wallet and not on your Ledger. Those coins can be stolen if your wallet.dat is compromised.

Even with a new wallet, it is advised that you hold onto your original wallet.dat and keep it in a secure location. You never know when you may need those private keys; someone could send you Bitcoin to an address in that wallet.


How do MtGox redeemable codes work? At MtGox (and presumably some other sites), you can withdraw money in the form of a redeemable code. These codes are also accepted for deposit at some Bitcoin exchanges.

How does this work? Specifically, is there protection against double-spending? Can I know that the code I got is still valid, and has not been given to others as well?

The code is effectively just a long random string.  When you create a redeemable code, a random string is selected, entered into the database at the exchange and associated with a currency and an amount.  That string is your redeemable code.  The string is long enough to make it very unlikely that anyone would be able to guess it in a reasonable length of time.

The first person to attempt to redeem the code gets the amount credited to their account on the exchange, which causes the database entry on the exchange for that code to be marked as having been redeemed.

The way to tell whether a code is valid is to try redeeming it.  If it works, you're the first to try it.  If not, you're either not the first to try using it, or it was never a valid code to start with.

The exchange should prevent "double-spending" by making sure that the "look up whether code is spent; credit account; make code as spent" sequence is an atomic operation.  We don't want two users both running through that same sequence at the same time, where both pass the "look up whether code is spent" check, then both accounts get credited, etc.


Estimate of Net % of transaction fees in bitcoin transactions one of the major pain points that bitcoin is trying to solve is the 2% transaction fee. However bitcoin is not necessarily free, even if it gets mass acceptance (say the entire USD is replaced by bitcoins). There will be additional transaction costs such as 1. generation of bitcoins 2. storage of bitcoins 3. apps that enable people to transact in bitcoins 4. credit history monitoring services etc. Some of these will be paid directly while exchange of value for currency (such as through transcation fees in bitcoin based credit cards), some of them may be indirect (such as an app which allows you to store/monitor bitcoins, but then uses ads to support itself. The ads inturn increase the price of the commodities that are being bought or sold. So you are paying for the bitcoin indirectly).

I am curious to know whether any study has been done to calculate the net % that will be lost in transcation fees (paid directly or indirectly by the purchaser of the goods) as compared to that of credit cards (~2%)?

I am curious to know whether any study has been done to calculate the net % that will be lost in transcation fees (paid directly or indirectly by the purchaser of the goods) as compared to that of credit cards (~2%)?

Credit cards don't support all types of transactions. For example, say you wanted to pay me to fix your computer. You can't do that with a credit card, because I don't have a merchant account, and it's not worth the trouble for me to get one. There are other ways to accomplish this (bank wire, mailed check, PayPal) but they have different fee structures. The economy doesn't run entirely on credit cards.
#1 will cost as much as the block reward plus the transaction fees - if miners spend more than that, they will lose money. #2 would cost $100 to $200 per person, for secure, tamperproof devices. #3 is likely to be the same amount spent to develop phone apps as is spent currently.
People won't have the same incentives in a Bitcoin world. Suppose that when everyone uses Bitcoin, it's harder to force someone to pay a court judgement. Because of this, a car manufacturer becomes slightly less careful about the safety of their cars, and an extra 40 people die in the US every year. How are we supposed to convert that into an equivalent transaction fee?

You mention credit monitoring services, which I don't think would exist in a Bitcoin economy; I don't think you'd be able to get any loans. How could you give someone a mortgage, if they could secretly start socking away money where you can't get at it?