Can I cancel an offline transaction with this approach? (opposite of nLocktime) I would like to cancel a transaction I sent offline, and am looking for ways to prevent it from being accepted by the network.

Will the Bitcoin client prohibit the entire Tx if there is even on input that is already spent?

If the answer to that question is "yes", then what if I created "control addresses as follows:

Generate 10,000 addresses and send each 0.0001 BTC
After N confirmations pass, create an offline transaction
Consume one of the balances in step 1 above in the offline Tx

I suspect either one of the two scenarios will occur:

User broadcasts offline Tx, and completes the Tx
I spend the balance of the "control address", and when the user tries to spend the offline tx, they are denied because one of the inputs it refers to has already been spent.
???

Question

Is this a correct approach to canceling offline transactions?
What optimizations can be made?  I dislike having the overhead of having to sign each control input with a new private key each time.

The approach is correct. You don't have to use different private keys, you can use the same private key and same address for each of the control outputs.


How To Lower The Disk Space Needed For Full Blockchain? I'm looking to run bitcoind on a virtual machine.

However the main nets Blockchain size is over 21GB, and growing.

Is there a way to compress this down or lower the amount of disk-space needed for the full Blockchain?

No, there isn't any straightforward way to reduce the disk space requirement.  The block chain is the size that it is.

There are various ways proposed for bitcoind to use less disk space (see diskspace), but as far as I know, none of them have yet been added to the standard distribution.


How to toggle visibility of sender? I am trying to track inventory as it flows through the supply chain.  This inventory requires chain of custody.

The original transaction would be from the manufacturer for a number of Satoshi equal to the quantity of units in the block.  It must be verifiable that the wallet that created the transaction was from the manufacturer.

Subsequent holders of inventory should be allowed to be anonymous or public on a per transaction basis.

How can I accomplish this?

There are a lot of protocols that sit on top of bitcoin that do something like what you're asking. They're mostly called "colored coins" (see http://coloredcoins.org/)

Basically, the idea is that you need some way to create the inventory tokens on the bitcoin blockchain, then track them using normal bitcoin transactions. The big thing to note is that there is a 5430 satoshi minimum for transactions, so the various colored coins protocols (at last count, at least 5) try to get around that in some way.

Best of luck in finding a solution.


accessing the Litecoin testnet I am very new to creation of cryptocurrency wallet. how to create and access the litecoin testnet and elaborate the available ways to do that?if possible, provide link to simple sample project.
Thanks

It depends, do you want to run a full node and store the entire blockchain? You could run Litecoin Core: https://github.com/litecoin-project/litecoin. There are other implementations/installation options as well.

For an example of a project with a wallet, explorer, and full node, see:

https://github.com/litecoin-project/litecore

It implements:

Node - A full node with extended capabilities using Litecoin Core
Insight Lite API - A blockchain explorer HTTP API
Insight Lite UI - A blockchain explorer web user interface
Wallet Service - A multisig HD service for wallets
Wallet Client - A client for the wallet service
CLI Wallet - A command-line based wallet client
Angular Wallet Client - An Angular based wallet client
Copay - An easy-to-use, multiplatform, multisignature, secure bitcoin wallet


How did transaction malleability/DDOS attacks allow an exchange's internal accounting system to get "out of sync"? This Coindesk article says that:

  “So as transactions are being created, malformed/parallel transactions
  are also being created so as to create a fog of confusion over the
  entire network, which then affects almost every single implementation
  out there,” he added.

  Antonopoulos went on to say that Blockchain.info’s implementation is
  not affected, but some exchanges have been affected – their internal
  accounting systems are gradually going out of sync with the network.

How does this getting out of sync occur? Here's my understanding; as a transaction is created, malicious users create hundreds of transactions in the network that are identical except for a mutated signature. The original transaction may or may not be confirmed because a mutated version may get confirmed in the blockchain first.

For example, Mt. Gox, which used an automated system to approve withdrawals (as the article states), would consider a withdrawal transaction approved before it was actually confirmed in the blockchain. Once a mutated version of that transaction was confirmed in the blockchain, Mt. Gox's accounting system had a problem because a transaction it assumed was confirmed (and therefore had already "lost" the Bitcoins for) wasn't actually confirmed.

Is my understanding correct?

I'll assume that MtGOX are being truthful here, to avoid undermining OP's question. Transaction malleability was absolutely an issue around the time. It affected a number of implementations, from BitcoinJ, to older bitcoin nodes.

The operator of http://faucet.xeno-genesis.com/ also informed me his service had huge issues around the time of the malleability bot.

The confusion that can occur in a wallet is like this: Imagine your node hears about a transaction with ID A, paying into your wallet. But, imagine this transaction was malleated, and the original was the one to be confirmed. Your wallet has no knowledge of this.

All transactions refer to unspent transactions, and although a various copies of a transaction transaction can exist temporarily in different parts of the world, eventually only one will confirm. We know inputs can only be spent once.

Some implementations might not handle this correctly. Imagine trying to spend a Tx that didn't exist, maybe your customer wants to withdraw BTC? It would fail if you don't check if newly published blocks have transactions that conflict with unconfirmed transactions. You could observe two transactions spending the same input, so you'd take the confirmed one as valid.

MtGOX also would have had issues sending coins they received before the attack. The reason is, if they broadcast their transaction, and a malleated copy ended up in the blockchain, they would assume it failed to confirm, so the customer can try again. Maybe even using other inputs! This cycle could have been repeated by one attacker over and over draining the wallet.

Another possible issue is that if they did correctly believe the transaction went through, but still tried to spend the incorrect TxID, then that transaction would fail, causing panic from the customer.

Wallets which sent a high number of transactions during the attack were most affected.


What are the chances bitcoin big mining pools to unite and do 51% attack? Looking at this bitcoin hash rate distribution chart (https://www.blockchain.com/en/pools), it only takes 3-4 mining pools to unite and do a 51% attack.

With this possibility, how can people still think that Bitcoin can be the money of the future?

PS: I'm also a bitcoin believer

It won't happen if the bosses of the pools are all ideal.

In the real word, they may be lunatics or terrorists, they may be cheated or threatened. As long as they have the ability, the world is in danger.

The traditional security is based on economics, or on rational persons. That is not enough. The goal of cryptocurrencies is to upgrade the security to be based on cryptography.

To consider security like "they can but they won't" is no more than the traditional system, cannot reflect the superiority of cryptocurrencies.


What exactly makes altering of data in non-bitcoin blocks hard? If leading zeros is only bitcoin requirement, then what makes altering of data in blocks hard? Like now its easy to modify a block and generate new hash for every subsequent blocks since generating hash is not as costly compared to bitcoin requirement.

The leading zeroes is what makes altering block data hard. One of the things that makes a block valid is that it's hash is less than some predetermined value. For simplicity, this can be thought of as the hash has to have some predetermined number of leading zeroes. However making such a block meet that requirements is hard and being able to do so proves that you have done some amount of work, hence Proof of Work.

Making a block whose hash has enough leading zeroes is hard because the output of SHA256 Double (the hash function used in Bitcoin) is random. Given some input, you can't predict the output of SHA256d without running the data through it. So the only way to get some block data (the input) to have a hash with some number of leading zeroes is to hash it, see if it meets the criteria, and if it does not, change it and try again. This is what miners do, and the criteria restricts the range of possible valid hashes to such a small percentage of the entire range of possible hashes that it takes the entire network 10 minutes on average to find a hash that meets the criteria.

Iif you wanted to alter the data in a block, you would have to recompute the Proof of Work, i.e. you would need to find a block with your altered data that has a hash with the required number of leading zeroes. Keep in mind that it took the entire Bitcoin network 10 minutes on average to find the block you are changing, so it will probably take you longer than 10 minutes to find a replacement. Then if you want to change a block that has blocks on top of it, you would need to re-mine those blocks too. Otherwise your fork of the blockchain won't be considered the best blockchain as it is not the longest.

While generating a hash is fast, having to do it 25 sextillion (2.5 * 10^22) times on average to find a block is a lot of hashes and is going to take you quite some time.


Is there an easy way to search all the transactions? Is than an easy way to search the list of all bitcoin transactions? For example to find all the bitcoins sent to or from an address?

Try BlockExplorer, it can search by block, public address, and a few other ways. It also has some cool analysis and statistics abilities.


Does halving ever end? Every certain number of blocks the reward is cut in half, for example from 50 to 25 BTC.  Will this halving continue indefinitely, so the reward never gets to zero?

It will, one day, reach 0, which mean mining wont be possible anymore (or it wont just be worth it). and by 0, I mean it could be 0.000001.

But if you look at it in a mathematical way, it should never end. Try that with a calculator, the number becomes really small.

The Bitcoin network is made so there will be a limited number of coins available and they have to be generated at a predictable rate, thats also why there is a difficulty on the mining


Can a wallet/exchange provider ask for transaction details My question has two parts,

Am I obligated to share transaction details with my wallet/exchange provider for any payment I made to an individual, like subscription to a website?
Irrespective of the above point, If I pay for a subscription using Bitcoins to someone, and the recieving party misuse the coins for something illegal unknown to me, will I be in problem?

Thanks

Am I obligated to share transaction details with my wallet/exchange provider for any payment I made to an individual, like subscription to a website?

A proper noncustodial wallet will impose no such restrictions.

A business that is running a wallet service might impose restrictions though. So this question really just depends on the terms of service / policy of that business. If they are holding your private keys, you will be 'obligated' to follow their rules, though I'm not sure I agree with the use of that word, maybe the word 'forced' would be a better pick. Not your keys, not your coins, and all that.

  Irrespective of the above point, If I pay for a subscription using Bitcoins to someone, and the recieving party misuse the coins for something illegal unknown to me, will I be in problem?

Most businesses (ie exchanges) that impose such restrictions do so for legal reasons: the jurisdiction they operate within requires some sort of KYC/AML procedures. So these businesses will often employ the use of a chain analysis service, which can supply the business with more info about happenings on the blockchain, thus satisfying regulators. Chain analysis services are not capable of perfectly knowing what on-chain transactions represent, but they can make guesses based on certain heuristics, and data gathered from various sources.

Some easy ways to mitigate against this risk:

Don't store coins with custodians that might restrict your access
Create another wallet, send coins to it, perform a self-send or two with that wallet, and then finally, pay the coins to your intended destination. This adds some extra steps between the address which is known to be owned by you, and the person you are sending payment to, breaking the obvious link between you two.
Use a wallet which creates coinjoins to obfuscate your UTXO history, such as Wasabi, or JoinMarket
Use a wallet which has payjoin/P2EP enabled (this is currently an ongoing development)

There is a lot of nuance to bitcoin privacy, I'd recommend giving this wiki entry about Bitcoin privacy a read if you're interested.

Generally, the sort of worry you have doesn't seem to cause problems for users these days (I haven't seen many complaints of this online), but if you're worried I would simply suggest adding a new wallet and a transaction or two in between the regulated custodian, and the outgoing payment.

More broadly, in order for Bitcoin to really be useful, users need to not worry about these sorts of risks. Bitcoin can function in a way which allows all transactions to be perfectly traceable, but it can also function in a way which provides the user with financial privacy. As a user, you can employ certain techniques and strategies to help retain your privacy, but remember also: the businesses you support are the ones which will continue to grow in this industry. If you don't like the sort of existential risk imposed on the network by KYC'd exchanges, don't use them. As they say: vote with your dollars (or in this case, your sats).


What is meant by Bitcoin dust? I've seen the term "dust" used to describe small transactions that might be considered as spam by the Bitcoin network. Is there is a generally accepted definition of this term?

The definition of dust is client-specific and not a network rule.
Bitcoin Core considers a transaction output to be dust, when its value is lower than the cost of spending it at the dustRelayFee rate. The default value for dustRelayFee is 3,000 satoshi per kilobyte, which results in the same dust values as the dust definition used before Bitcoin Core 0.15.0. The previous dust definition tied the dust limit to the minRelayTxFee rate and the spending cost of an output exceeding 1/3 of its value.
At the default dustRelayFee of 3,000 satoshi per kilobyte, the size of a P2PKH input being 148 bytes, and the size of a P2PKH output being 34 bytes, P2PKH outputs of 546 satoshis or smaller are being considered dust by Bitcoin Core. For P2WPKH (native segwit) outputs, 293 satoshis or smaller are being considered dust as outputs are about 31 vbytes and inputs are about 67 vbytes.
The dustRelayFee can be set with the hidden command line option -dustrelayfee.
Additionally, Bitcoin Core 0.15.0 added a discard_rate. The discard_rate matches the longest target fee rate estimate (currently the 1,000 block fee rate estimate), but is bounded to be between at least dustRelayFee and at most 10,000 satoshi/kB. Any change output that would be dust at the discard_rate, i.e. would cost more to spend than its value at the discard_rate, will automatically be dropped to the fee instead of being created as a change output.
Other uses of "dust"
Note that the term dust is also colloquially used to refer to any UTXOs of vanishingly low value, or for UTXOs that are uneconomic to create or spend at a given feerate.


strange weird address in transaction after send bitcoin bitcoin-qt as an example, I have the wallet with address-A (with 10 BTC)
If I send 1 BTC to someone (address-B) then in transaction I see

address-A > 1 BTC > address-B
address-A > 1 BTC > address-C

after, on address-A I have 8 BTC, but my bitcoin-qt show me 9 BTC (as it must be)
why it makes sends to strange address-C ?
=================
Found an answer here https://en.bitcoin.it/wiki/Change

When you send money to another address, the client selects one or more unspent outputs to get a sufficient amount to cover the amount you are sending.  Any excess is returned to your wallet using a change address.

In your case, it looks like you had an unspent output of 2 BTC.  Since a transaction completely consumes its inputs,  the transaction needs to send 1 BTC to your specified address and 1 BTC back to your wallet to account for the 2 BTC that were consumed.

Changes addresses are typically not displayed by the client.  If you are running Bitcoin-Qt, you can check all of the addresses in your wallet by entering the command

  listaddressgroupings

in the debug console.


What is the actual Bitcoin block size? 2mb or 1mb? I am not asking about block weight. I hear many people saying that the actual Bitcon block size is 2mb. However, in any block explorer, I can see that blocks are around 1200kb. This is very confusing, where is the cap?

The cap on the block size excluding witness data is 1000000 bytes.

There is no cap on block size including witness data. Instead, there is a limit on the block weight at 4000000 weight units. Depending on the composition of the block, 4000000 WU can correspond to anything from 1000000 bytes to close to 4000000 bytes (including witness data).

But a block with 4000000 WU is "full" - regardless of whether it's 1 MB or 3.8 MB of data.


Transaction Duration Given the volatile bitcoin value, how long is a transaction valid? For example, say a vendor requires X fiat currency via a bitcoin service provider. The service provider link (ie, coinbase.com) contains instructions (also via QR code) to pay Y bitcoins to account Z per the current market rate (this might include a transaction fee, I'm not sure). How long is this link valid?

Say the bitcoin value halves 24 hours later. Would I have saved X/2 money?

It's entirely up to the vendor (and you---you can always refuse to pay).  BitPay used to require payment within 10 minutes; recently they increased that to within 15 minutes.  I don't know what timeout Coinbase and other payment processors use.

In each case, these payment processors require that they receive your transaction within the allotted time.  To be specific, you must enter the payment details into your wallet, click Send/Pay, enter your password if necessary, and wait for your wallet to sign and broadcast the transaction.  Then you must further wait for the transaction to traverse the network until it reaches the payment processor's node (happily, transaction propagation times are typically only a few seconds or less).

However, if your transaction doesn't arrive in time, the Bitcoin transaction itself is still valid.  What isn't valid is the contract of Y bitcoins for X value.  That means your bitcoins will be gone, but you'll have to contact the payment processor (and possibly the merchant) to arrange to pay an extra amount, to have an overpay refunded, or to request a full refund.


Storage exceeded in middle of synch A friend gave me a few bitcoins a number of years ago. Yesterday, I read an article about bitcoin and it reminded me I had some. I went online to check the value and to possibly spend them. I tried to access my wallet and since I haven't checked in a long time, it is taking forever to synchronize with the network. I left it on all night and now my macbook's storage is full. It's a real problem for me, as I need to work and don't want to a lot of other stuff at the moment. How do I get out of this mess? I have no sophistication whatsoever. I can't program or do anything fancy. I regret this situation and would rather just delete the app but I think there's some real value there and don't want to screw up my wallet. What do I do??? Help!

You may enable pruned mode on your blockchain storage by setting the following line in your bitcoin.conf

# Reduce storage requirements by only storing most recent N MiB of block. This mode is incompatible with -txindex and -rescan. WARNING: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, greater than 550 = automatically prune blocks to stay under target size in MiB).
prune=10237

Bitcoin Core will automatically prune the blockchain storage back to the amount specified.

Regardless, always keep a secure up-to-date backup of your wallet.dat


How is the UTXO database initialized? The IDs of the unspent transactions are stored in the UTXO database. I assume that it's generated like this by the client:

for block in blocks:
    for transaction in block:
        utxo.remove(transaction.input)
        utxo.add(transaction)

However, I have some doubts: What else is stored in the UTXO database? Does it store the actual amount of unspent coins for each transaction (which would seem necessary for the verification of the uncomfirmed transactions)?

The UTXO database starts empty and then is updated while the blockchain is parsed in the manner that you described. Only, there can be more than one input and more than one output for a transaction, so I'd put it like this:

for block in blocks:
    for transaction in block:
        for(input in transaction):
            utxoset.remove(input)
        for(output in transaction):
            utxoset.add(output)

Obviously, the block is checked for validity and therefore we know that the inputs and outputs are legit.

The UTXO set then stores the UTXOs referenced by outpoints as key, where an outpoint consists of:

TXID: Unique hash identifier of the transaction that created the output
index: the position of the output in the transaction's output list

And the information stored in the Transaction Outputs is:

value: number of satoshis the output is good for
pubkey script: the conditions the output can be spent under

Finally, for each block undo data is generated, in the case that a reorganization occurs.


Can I Hook Up RX-460 to Regular PCI Slot via PCI-E Riser I have motherboard with 3 Regular PCI slots beside 3 PCI-Express slots. (https://www.asus.com/Motherboards/M4A88TDV_EVOUSB3/specifications/)
Can I Hook Up 3 RX-460 to Regular 3 PCI Slot via PCI-E Riser USB?  Will it be stable?

No.  PCI and PCI-e are two entirely different things.  PCI is a more traditional parallel data channel, while PCI-e is a serial data channel (that can have multiple parallel "lanes").

You cannot plug PCI-e devices into PCI sockets.

If you're desperate, you can try the mechanism specified here, no guarantees though :)

https://www.youtube.com/watch?v=5vDHACwXSxE


Can a Bitcoin transaction have the same address for input and output? Can a Bitcoin transaction have the same address for input and output, i.e. spend some of the coins that are linked to an address and send the rest back to that same address? Is there some reason why it is imprudent to do so?

At the protocol level, there is no such thing as "balance of an address". There are individual unspent outputs (like coins in a wallet), which must be individually spent. You can't partially spend an output, but you can split/combine it.

So for example, you have a 70 BTC output assigned to an address, and a 80 BTC output assigned to the same address. Some software will show this as 150 BTC balance of that address, but you still need to know the individual outputs to spend them. If you want to send 100 BTC to someone, you would consume those two outputs in a transaction, and create two new outputs using it, a 100 BTC one (to the recipient) and a 50 BTC one (back to yourself).

Whether you use a new address for that 50 BTC "change" output doesn't matter to the protocol. You can reuse the old one, but will make it obvious to everyone in the world which who was the sender and who was the recipient in the transaction. Using a fresh address improves privacy.

Seen otherwise: reusing the same address may look convenient, as it allows you (and software you use) to more easily distinguish what your balance is, but it does this at the cost of making it obvious to everyone in the world. This hurts Bitcoin's privacy - not just yours, but that of everyone in the system.


How are Lightning network, duplex channels, and micropayment channels related? I'm new to Bitcoin and just became familiar with Micropayment channels. But how exactly do they relate to:

Lightning network
Duplex Micropayment Channels
?

I am reading about these but can't find a "big picture" view. Most big-picture posts are over-simplistic or promoting either of these I found.

Also, micropayment channels, as implemented by bitcoinJ, are used in practice I believe. What about Lightning and Duplex?

(Successful efforts to implement Lightning exist (e.g., blockchain.info, Lightning). Has there been any effort to implement Duplex?)

thank you

Both lightning channels and duplex micropayment channels (DMC) are proposals to create bidirectional micropayment channels, that is, micropayment channels that can be used in both directions (a user A can pay to another user B and, at the same time, B can pay to A). Apart from their goal, both proposals also have similitudes in the basic blocks they use to achieve it (e.g. multisignatures, time locks, etc.).

They differ on the exact way to accomplish it and on some of the properties of the created channels. For instance, DMC create channels with a finite lifetime while lightning channels can be kept open indefinitely. They also differ on the exact number of signatures and transactions involved in the creation of the channel, the payments and the resolution of disputes.

A more detailed description and comparison can be found in this recent paper.

AFAIK, both lightning channels and duplex micropayment channels can not be used in practice yet because they need some functionalities that are still not deployed in the main network (e.g., the ability to build upon unsigned transactions). I am not aware of any available implementation of DMC.


Where does change go when making a transaction from funds imported from a paper wallet? I'm new to bitcoin and have read numerous articles about it, but I still have questions about how it works.

All the articles that I read say the same that, once I spend bitcoin from paper wallet its address gets depleted. So what does that mean exactly? My understanding is that after importing my paper wallet (for example I use it for a donation) to software wallet, the bitcoins still belong to the paper wallet. I didn't transfer them into software wallet address. In other words, I let the software wallet manage my paper wallet, right?

So after I import it, I want to spend it (say I have 2 bitcoins in paper wallet). I want to sent 0.5 of 2.0 bitcoins to, for example, an address belonging to Alice. After that transaction all the paper wallet bitcoins are sent to the network to split into 0.5 and 1.5. 0.5 goes to Alice, and 1.5 goes back to where?

To my software wallet address or paper wallet address (as it was specified as outgoing address)?

If they're going back to the paper wallet, how is that that there're a lot of topics that someone lost all the change after the transaction?

Great to see that you are learning about BTC.

A paper wallet contains all the necessary details which you require to access your BTC.
But the true purpose of a paper wallet is security. Once you create one paper wallet and transfer BTC to the address, unless the person get's the physical paper, there will be no way to steal it by hacking or any other way.

Now coming back to your question, there are two ways how you use a software for your paper wallet.

By importing
In this method, if you transfer your BTC as you say in your question, your paper wallet will remain the rest 1.5 BTC
By sweeping/transfer to software
In this method, your total BTC will be transferred from your paper wallet to software wallet. In this case, after your transaction, the software will contain your remaining amount.

Note: Some software uses change addresses, so even if you use any of the above method, the rest goes into the change address created by that software wallet rather than your paper wallet. This is for privacy concern and mainly depends on the software you choose.

Hope this answers your question.


BIP 32 seed resulting in an invalid private key everyone.

For my final year project, I'm developing some Bitcoin/Bitcoin related technologies (BIP32, BIP 38, BIP39, Bas58Check encoding/decoding, etc) in pure Node.js (using only native libraries, such as 'crypto').

After writing the module dealing with BIP32 wallet generation, I wrote a bunch of tests trying to cover 100% of statements/branches/functions/lines, but there's one scenario I can't seem to reproduce, due to it being very unlikely to stumble upon.

Given a random seed, you apply HMAC-SHA512 to get the master extended private key. In it, there is a private key, which can be invalid if equal to 0x0000000000000000000000000000000000000000000000000000000000000000 or greater than 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140.

Have you guys seen any seed which generates an invalid private key? I looked through the internet for such known value and could not find it.

The same can happen when generating children private keys. Is there any known parent private key + parent chain code + index resulting in an invalid private key?

Thanks a ton!

Sounds like a cool project!

  Given a random seed, you apply HMAC-SHA512 to get the master extended private key. In it, there is a private key, which can be invalid if equal to 0x0000000000000000000000000000000000000000000000000000000000000000 or greater than 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140.

That's mostly right. It should error if I_L is greater than the curve order, (that's the number you have there) or if the child key (k_i) is 0. (https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#private-parent-key--private-child-key)

  Have you guys seen any seed which generates an invalid private key? I looked through the internet for such known value and could not find it.

It would be really surprising if someone knew a seed that would do that. The two conditions happen about 1 in every 2^127 times, and about 1 in every 2^256 times, respectively. If SHA512 is a secure hash function, it should take about 2^127 runs of it to find a seed that fails.

To be clear, such a seed exists, but we don't know what it is.

While researching this, I found this error message in the pycoin library. It shows up if either of the conditions you mentioned happen.

_SUBKEY_VALIDATION_LOG_ERR_FMT = """
BUY A LOTTO TICKET RIGHT NOW! (And consider giving up your wallet to
science!)

You have stumbled across an astronomically unlikely scenario. Your HD
wallet contains an invalid subkey. Having access to this information would
be incredibly valuable to the Bitcoin development community.

If you are inclined to help, please make sure to back up this wallet (or
any outputted information) onto a USB drive and e-mail "Richard Kiss"
<him@richardkiss.com> or "Matt Bogosian" <mtb19@columbia.edu> for
instructions on how best to donate it without losing your bitcoins.

WARNING: DO NOT SEND ANY WALLET INFORMATION UNLESS YOU WANT TO LOSE ALL
THE BITCOINS IT CONTAINS.
""".strip()

Sound advice. Winning the lottery is a mere 1 in 2^28 chance.


Where is the configuration file of Bitcoin-Qt kept? I keep getting this error:

EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15
program_options26invalid_config_file_syntaxEEEEE
the options configuration file contains an invalid line 'XXXXXXXXXXX'

Where can I find the bitcoin.conf file?

The location of bitcoin.conf depends on your operating system:

Windows XP             C:\Documents and Settings\<username>\Application Data\Bitcoin\bitcoin.conf
Windows Vista, 7, 10C:\Users\<username>\AppData\Roaming\Bitcoin
Linux                         /home/<username>/.bitcoin/bitcoin.conf
Mac OSX                  /Users/<username>/Library/Application Support/Bitcoin/bitcoin.conf

Source


What happens when you send a transaction that ends up in an orphaned block. Is it recoverable? I've found a lot of information regarding orphan blocks, but I can't find an answer to this simple question.

If I send a payment to a user and my transaction happens to end up in an orphaned block, how will I recover my bitcoins?  When the block-chain reorganizes itself and orphans the original block, will the client automatically add back my funds?

I've never encountered an orphan block so I have no clue how the transactions are resolved.  Could someone please clarify what happens to the funds within these blocks?

Orphaned transactions are returned to the memory pool, they are never "lost". If the TX did cease to exist from the mempools, it would just be as if they has never been sent, so again they wouldn't be lost.


Bitcoin address with money need help getting it? I have money in a bitcoin address how do I get the money out of it? I am new to bitcoin any help is helpful.

If Bitcoin hasn't synchronized ? export the private key to other wallet and spend the funds on private keys' addresses.

Follow steps here to get your private keys
How do I export my private keys from my Bitcoin-Qt client?


Is it possible to deploy a python script on Ethereum Virtual Network or NEO? Is it possible to deploy a python script as a dApp on the Ethereum or NEO virtual network?

First of all: I don't know anything about NEO, I can just give you what I know about Ethereum.

As far as I know it is not possible to deploy a python script in the Ethereum network. In Ethereum you can only deploy Ethereum bytecode. It is compiled from smart contracts written in Solidity, Serpent, LLL or Vyper.

Other code than Ethereum bytecode will never be stored on the Ethereum blockchain (at least not in an executable way).

When you want to build a dApp you need to write the needed smart contract and (if necessary) somewhere host your python (or whatever) frontend and/or backend.


What is Bitcoin's locktime feature exactly? How can it be used? What is Bitcoin's locktime feature and what are some example use cases?

And how can a user make use of this new feature? Is it in any gui wallet? And how would one use it in the command line if its the only option?

Like a cheque with a date in future, a Bitcoin transaction with locktime cannot be unlocked (read cashed) before that date. The definition in bitcoin.org is pretty clear

  Part of a transaction which indicates the earliest time or earliest
  block when that transaction may be added to the block chain.

Sample use case is a cautionary deposit. For a great example see micropayment channel protocol implemented by bitcoinj and described here:

https://bitcoinj.github.io/working-with-micropayments


How do I spend a paper wallet into my coinbase.com account using the Android Coinbase app and the paper wallet QR code? I created a paper wallet using bitaddress.org and spent bitcoins into it using the Coinbase mobile (Android App). I then noticed that the paper wallet cut off part of the private key during printing! They don't leave anough room for the entire private key. I need to get those bitcoins back out of that wallet/address using only the QR code. I can't figure out how to use the Coinbase mobile app to do that. It apparently can send to a QR code, but not receive from one.

I found another Android app called "Bitcoin Wallet" that let me "sweep" the paper wallet into another address. Everything is fine.


Is there any party who is archiving all transactions that have been broadcast? There is a person claiming that Blockchain.info/wallet sent a transaction but for whatever reason that transaction never got included in a block.

If the transaction is valid today but perhaps just didn't get re-broadcast for whatever reason and has since expired from each node's memory pool, any party  with an archive of transactions could re-broadcast that transaction and it now might get included in a block.

Does anyone maintain an archive of all transactions, for instance, by archiving each OnTransaction event in BitcoinJ?

Anybody that has downloaded the blockchain has a log of all transactions. Blockchain.info should have it. In the future only accept confirmed transactions


Are generated public/private keypair the most random possible? The number of possible Bitcoin private/public keypair is very strong (2^160 which is 1,461501637×10⁴⁸).

However, if the random generator is not good enough, only a subset of all that "space" could be used which would considerably break the security of Bitcoin.

That kind of problem has already happened, like that Debian bug in the OpenSSL package.

How can we be sure that random generation is done so it could generated all private/public keypair from the possible "space" ?

The source code is open take a look for yourself. I am no expert on cryptography though so I will leave the explanation of this to someone who is. This is the file that you would want to look over https://github.com/bitcoin/bitcoin/blob/master/src/key.h


Problem mining Genesis Block in Dash Clone Good morning, I need help !! I have cloned other coins (scrypt and SHA256), but I found a big problem with the DASH CLONE.
After having completed the DASHCLONE project. When I can not do the genesis block (tried with QT and tried with daemon) it does not mine .........! getgenerate = true, but do not mine!
the log writes this:

CMasternodeSync::ProcessTick -- nTick 1189 nRequestedMasternodeAssets 0 nRequestedMasternodeAttempt 0 nSyncProgress -0.250000

Thank you

I am not familiar with dash-coin, however, in my experience with cloning other coins (litecoin w/ scrypt PoW, bitcoin w/ SHA256) even with a few nodes running the client, I was unable to mine with an external mining software (like cpuminer) until 15-20th block was generated using the CLI. Either within the qt client console or using the coin-cli generate nblocks command.

If you have successfully coded the genesis block into the source and were able to compile/run the client I would try using the generate command or whatever the equivalent is within the client.


Segwit Addressed from xpub key How can i get the public key of my segwit address with my extended public key. when i import the xpub into electrum it automatically creates a legacy wallet for me. i'm not with my nano and won't be with it for a while, please how do i go about it, thanks.

You have to convert the xpub into p2wpkh or p2wpkh-p2sh format. You can use this script to do it.


what is preventing me from changing difficulty every submit when pool mining? If I do pool mining at difficulty=1000 and I find a share with difficulty=2000, I can tell the pool that I was mining at difficulty=2000 and then submit the share. I can earn more in this way.

Does the pool allow me to change difficulty whenever I want? If not, assume that it let me change difficulty every 30 minutes, then I can use a high difficulty which makes every share more than 30 minutes.

Even if this cannot be done, when I find a share with difficulty=2000, I can connect to the pool as a new worker with a static difficulty=2000 and submit the share.

What is preventing me from doing this?

The work you were given is associated with a difficulty that the server decided upon before giving you that work.

Any work results you send in must be associated with work data known by the server.

When you submit work results, the work is looked up, and voila, there is the difficulty.

You may be given new work that has a different difficulty associated with it at a later time, but the old work still has the old difficulty.


Current simple ways to participate with a Lightning Node? Lightning is kicking it!! I just read this article about worldwide nodes distribution https://cryptonomist.ch/en/2019/03/02/top-10-countries-bitcoin-nodes/

So, my questions are basically:

1)) what are the current the most relevant entry-barriers / entry-requirements (technical/financial) to be able to participate with own lightning node?

2)) What are currently very easy and non-complex (for the layman) ways to have an own lightning node+wallet?  If you could maybe give one suggestion for Desktop PC based software,  and one where your mobile phone could act as a node (wallet+node in one?)?

Thank you so much!

As for the first part: Technically you currently still need a full bitcoin node in order to have your own lightning node. Also you should have your lightning node online most of the time. As in terms of financials no special hardware is needed. People are able to run a lightning node on hardware next to their router with little costs of hardware and little cost of electricity. For example with the DIY RaspiBlitz.

Concerning the second part: You can try https://github.com/lightning-power-users/node-launcher/releases or https://zap.jackmallers.com/ if you want to use your own hardware. Also there is a commercial counterpart to the before mentioned open source RaspiBlitz which is called the casa hodl node. As for mobile wallets there are currently no fully functioning mobile wallets available. The closest that you can get is Eclair for testnet. They announced that the mainnet release is supposed to come soon. A mainnet release which does not have the ability to receive funds is already available.

It seems like there is a trend for mobile custodial solutions like bluewallet or wallet of satoshi. I should also mention the bitcoin lightning wallet. There is also a clear trend for so called remote controls. These are apps that give you a nice interface for your lightning full node which stands at home or in a server center. For c-lightning there exists spark wallet and for lnd there seems to be bluewallet also available as a remote control. Also I should mention that electrum is working on a lightning wallet which was supposed to be released in the beginning of this year.


Can an exchange work which does not have control of the private keys? It seems like there is really no great way to exchange USD for BTC.  Having to trust an exchange with your private keys is undesirable.  I'm wondering if there is a way to utilize the convenience of an online exchange without needing to trust them with your private keys.  So two questions:

Are there any exchanges which do not require control of the private keys?  I am aware that Coinbase offers a multi-sig vault but I'm talking more about zero control, zilch, nada, private keys on your local device only.
Is there a problem with the following exchange model?  The exchange manages all the market orders and matches buyers and sellers to transact directly.  The exchange communicates the terms of a transaction to the BTC seller's wallet (like the blockchain wallet) and tells the seller that he has X minutes until the terms are void.  The BTC seller's wallet finalizes the transaction.  The transaction requires the exchanges signature and the seller's signature.  The seller signs the transaction using his private key and forwards it to the exchange.  The BTC buyer sends money to the exchange.  The exchange then signs the transaction and sends it off to the network.  Once the transaction is confirmed in the blockchain Y number of times (to avoid double spending), the exchange forwards along the money to the BTC seller, keeping a commission for himself.

This could work. Participants would need to deliver sufficient money to the exchange to protect others from their non-performance. But the exchange would never have to touch any Bitcoins.

When you sell Bitcoins, you'd have to be responsible for any decrease in the value of Bitcoins between when you sold them and when you delivered them. Rational sellers would price this risk into their spreads and try to deliver as quickly as possible.

Likely, the buyer would have to be able to cancel a buy if the seller didn't deliver. If the price had gone down, the buyer would be responsible for the difference in price.

The problem with such a service, at least today, is that it would be difficult for people to buy and sell on it. Buyers would have to wait for delivery and possibly switch offers and sellers would need to deliver quickly or risk losing money. This would result in higher buy prices and lower sell prices, which would likely discourage adoption.

It could become popular among people who want to speculate on the price of Bitcoins with leverage. You could sell Bitcoins you don't have, for example. The buyer doesn't want Bitcoins, they just want to profit if the price goes up.


By whom and when can transaction malleability be applied? Once I create a transaction and relay it to the network, who can alter the transaction id? Can the transaction id change at any time or only when the transaction is confirmed or unconfirmed?

The underlying data cannot be changed, only the signature thus id can.  It can be altered by anyone with knowledge of how to alter digital signatures while not invalidating them.

If it's a valid transaction, either the altered or unaltered version can be included in the blockchain.

Once it's cemented into the blockchain, the signature thus id cannot be changed.


Segwit Address Supporting Testnet Faucet Looking for a good Segwit supporting testnet faucet and preferably one that supports P2WPKH addresses, however answers that allow only P2WSH are fine too.

Ended up using Manu's faucet with a nested p2wkh address NP2WKH.

It will reject native Segwit addresses P2WKH.


Auto funded old wallet Some time ago I lost my phone with copay installed on it. I also dont know my seed info. Not a big deal I had no funds in the wallet.
Sadly I forgot I used that address for auto pool payouts. Yesterday that pool payed out, and I can not access the wallet (no seed).
How do i get that btc back?

Like all true Bitcoin wallets, the Copay wallet secures your Bitcoin and Bitcoin Cash only on your device. To restore your wallet if your device is lost or stolen, you must save the 12-word backup phrase that you receive when you create a wallet. Without this recovery phrase, you will not be able to recover your funds.


Problem in my bitcoin wallet, not sure why this glitch is happening The other day, I found my old 2011 dell laptop and decided to boot it up. I noticed I had a bitcoin wallet on it and then I remembered I purchased bitcoins back in 2011 (about a couple dollars worth).

In the wallet there is 642 bitcoins, and my wallet says that is $1540800 USD. I am so shocked I am not even sure if this is a glitch or not. How can this be?? I havent touched this computer since 2011 nor ought any coins since then. Is this a bug in the blockchain?

The exchange rate between bitcoin and USD fluctuates (and, on average, has been going up a lot). In 2011, the dollar value of a single bitcoin was far less than it is today. I have no idea what the value of a bitcoin was when you bought in 2011, but suppose 1 BTC was worth $0.01. For $6.42 (ignoring fees) you could have bought 642 BTC.

Fast forward to today, where 1 BTC is worth about $2400, then your 642 BTC would be worth $1540800.

When Bitcoin started, it was worthless. Anecdotally, the first bitcoin transaction for a real world item was for two pizzas for 10,000 BTC. Apparently that was worth $41 at the time, so 1 BTC was worth $0.0041. Back then, nobody had any idea how much 1 BTC should be worth.

It seems rather unlikely that a bug has caused you to unknowingly acquire bitcoins without your involvement. Instead, it seems plausible that you bought in very early when the price was quite low, and now have an asset that is worth quite a bit more than what you paid for it.


Is this man-in-the-middle double-spending attack against Bitcoin viable? There is an almost trivial double-spending attack against Bitcoin if an attacker has a MITM (man-in-the-middle) attack against a victim: the attacker prevents all blocks from being seen, and replaces them with their own.  The argument against this I've read online is that "it will take an extremely long time for the attacker to generate their own blocks, so the victim will notice there's something wrong".

But what about the following attack?

Attacker "Mallory" has a MITM attack against victim "Alice".  Say it takes Mallory T minutes to generate a block, where T >> 10
When the N-th block is generated on the network, Mallory waits C*N minutes before forwarding it to Alice  (here C is a small arbitrary constant, and N=1 is the first block generated on the network after the MITM attack begins).  In other words, only a small amount of time is added to each block, but Alice's blockchain gets further and further behind the "real" blockchain as time goes on.
Let M=6*T/C.  After M blocks, Alice's blockchain will be C*M = 6*T minutes behind the real blockchain.  Mallory starts generating blocks against the real blockchain's head at this point.  She inserts a malicious fake transaction into the first block she finds, and fills the rest with transactions from the real blockchain.
By the time Alice catches up to that point of the blockchain, Mallory will have generated 6 blocks, enough to make Alice believe the malicious transaction has been confirmed.

In other words, Mallory builds up time for herself to generate some blocks by adding C extra minutes between each block.  Once she's accumulated enough time, she then "spends" it to generate some fake blocks.

Alice still sees a block ~every 10+C minutes, so as long as C is small she never notices anything is wrong.  She also sees her own transactions eventually going through, just with an extra delay of N*C minutes.

Does Bitcoin somehow protect against this?  Or is this a legitimate double-spending attack?

Is this man-in-the-middle double-spending attack against Bitcoin viable?
To complete a double spending attack on Bitcoin as described, you need to be able to present an alternate block that is otherwise valid and with valid proof of work.
To create such a block in a 10-minute average requires as much mining power as exists in all the rest of the network (a 51% attack).
Yes, Mallory can delay Alice from receiving a new block but, Mallory must also successfully present Alice with a valid alternate block. There is one significant failing:

The proposed attack suggests insertion of a malicious fake transaction (temporary may be a better word) into a maliciously crafted block, a temporary transaction we suppose is Mallory paying to Alice while on the real blockchain Mallory is paying to herself.
Mallory puts Alice on drip-feed only giving new blocks slowly so that the real blockchain is ahead.
After Mallory lets the real blockchain get far enough ahead Mallory wants to build a fake block on top of a real block {blockheight-6}
Mallory requires as much mining power as exists in all of the rest of the mining network in order to solve the malicious block in a 10-minute average. Note that even in that case since it is an average it could take as long as 20-minutes. So, with approximately 25,681,575,019 GH/s[1] of mining power the attack can probably be carried out unnoticed. With half as much mining power as exists in all of the rest of the network Mallory would be able to solve a new block in a 20-minute average or, about 40-minutes max.

The problem in completing a 51% attack is revealed when it is understood that one modest Bitcoin miner is probably capable of just 13,500 GH/s.
Setting aside plausibility, the transaction would need to be of exceptionally large value to be financially viable.
EDIT: On the point that with 1% of the mining power a block can be generated in an average of 16 hours (max 32 hours) this is in theory not totally implausible, however, it should be noted that would still require currently ~19023 Antminer S9's. Also, if you test drip feeding the node in a laboratory environment to get 16~32 hours behind to see how the node behaves I doubt that Alice would not notice, even more so if also waiting for 6 confirmations. If Mallory also had access to Alice's computer to replace the software with a modified version then the attack becomes more realistic. Note that Mallory will still need to make private arrangements to distribute work amongst her miners i.e. a private mining pool.
rel:
[1] https://blockchain.info/stats


Javascript widget that shows the balance of a particular address Is there an embeddable javascript widget (perhaps using blockchain.info API) that can show information about a specific Bitcoin address?

Like current balance, total incoming, outgoing, and latest transactions?

Here's a third party service that creates an img:

Balance:

http://bitcoinbox.ru/display/graph.php?btcaddress=1PC9aZC4hNX2rmmrt7uHTfYAS3hRbph4UN&type=balance

Total received at the address:

http://bitcoinbox.ru/display/graph.php?btcaddress=1PC9aZC4hNX2rmmrt7uHTfYAS3hRbph4UN


If I bought bitcoin in the early days in some exchange for $10, would it have been lost if I kept it in the exchange? I just want to get some history perspective of Bitcoin.  Say in the early days when Bitcoin was $1 or $10, if I decided, "ok, I may invest in US$3000 at the software startup I work for, but that US$3000 is likely to go to $0, so I will just invest $1000 in Bitcoin anyway, assuming it could be lost but not a big deal".
So what places was available for me to buy Bitcoin at that time?  If I bought it from BitInstant, Mtgox (I am not familiar and will need somebody who knows the history to answer this), then would that mean that $1000 could become $3 million, except it was all lost or stolen along the way during the BitInstant and Mtgox time?
But if I bought it and immediately transfer to my own wallet, and didn't forget the password, then it would have been ok?

You are correct.
Leaving your money in the hands of a third party such as an exchange means two things

so far as the Bitcoin network is concerned, you own no money at all.
when that business fails, your money is usually lost. You might get some back if there is a police investigation and/or some bankruptcy process - but you shouldn't rely on this.

Transferring the Bitcoin amount to the sole control of your own Bitcoin wallet means that your money is safe, so long as

you keep a copy of the private key(s) or seed-phrase somewhere safe, or make regular backups and remember any password.
your computer isn't hacked or infected.


How to exchange small amounts of dogecoin to bitcoin? I want to convert a small amount of dogecoin (about 200D) to BTC. However, I've noticed that the withdrawal fees on all exchanges are more the amount of bitcoin I will have.
Is there no way of exchanging small amounts with a fee I can pay?

Thanks,
part12

One Doge/BTC exchange I know is https://shapeshift.io - but they are currently down since it was hacked last weekend. Even small amounts was working (I don't know the exact minimum since there down currently - but some hundred Doge was possible).

Maybe they will come back again in the next few days...


Running bitcoind getaccountaddress When I run

bitcoind getaccountaddress

I get this error

error: {"code":-1,"message":"getaccountaddress \"account\"\n\nReturns the current Bitcoin address for receiving payments to this account.\n\nArguments:\n1. \"account\"       (string, required) The account name for the address. It ca     n also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created and a new address created  if there is no account by the given name.\n\nResult:\n\"bitcoinaddress\"   (s     tring) The account bitcoin address\n\nExamples:\n> bitcoin-cli getaccountaddress \n> bitcoin-cli getaccountaddress \"\"\n> bitcoin-cli getaccountaddress \"myaccount\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \     "id\":\"curltest\", \"method\": \"getaccountaddress\", \"params\": [\"myaccount\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n"}

The getaccountadress command needs an argument: a string giving  the name of the account with which you want the new address to be associated.


Why don't P2PK scripts have their own address? If I understand addresses correctly, different types of addresses are used to map to a particular locking script (scriptPubKey).

So based on the leading character of an address, a wallet will decode the address, and then form the appropriate locking script around it.

For example:

P2PKH = 1address

13qWKACQWgQDwDRDoRtqUbN59bar6ousQf
OP_DUP OP_HASH160 1f1cafe31d63e061a3f74b541f4ce7a4515b4d0c OP_EQUALVERIFY OP_CHECKSIG

P2SH = 3address

3MmRfLoNzap2Mt8PwHqhVtxHsmdRieuXfk
OP_HASH160 dc37feb38b5a4ad4bf09bc61eea4831f85c58103 OP_EQUAL

P2PK = n/a

n/a
031b0e8c2567c12536aa13357b79a073dc4444acb83c4ec7a0e2f99dd7457516c5 OP_CHECKSIG

Why is it that P2PK scripts have never been given their own address?

Why not give the public key in a P2PK a checksum, then base58 encode it with it's own leading character so that we can have an address for it?

One of the issues with encoding P2PK outputs as an address is that they can be very long. P2PK can have both compressed and uncompressed keys. Uncompressed keys are 65 bytes, which means that the resulting address would be very long. In fact, this length is probably why P2PKH exists in the first place: as a way to have short strings as addresses. So P2PK addresses could be very long and unwieldy, so not that useful.

But nowadays, everyone uses compressed pubkeys so length isn't much of an issue anymore.

Since Satoshi didn't give P2PK an address type, the reason that one has not been created since then is that no one cares to. P2PKH already does everything P2PK does, just a little bit longer. And with other improvements coming such as Taproot (which is A pay to pubkey scheme and has its own address type), there isn't a compelling reason to go through the effort of defining a standard and trying to get wallets to implement it.


What are the regulated exchanges out there? I do not have trust in random exchanges.

I'm looking for regulated exchange so I'm less likely to lose my BTC.

What are the regulated exchanges out there?

Some hints:

https://techcrunch.com/2015/01/25/coinbase-us-bitcoin-exchange/
What changed about coinbase.com to make it a "regulated exchange"?

You are always taking a risk having your BTC on an exchange. By sending BTC to an exchange you pretty much trade your BTC for their tokens that you can later trade back to BTC, assuming they don't get hacked, seized by the FBI or just steal them.

If you are planning exchanging BTC to another currency i would recommend withdrawing the other currency asap from the exchange. The only reason for leaving your money on an exchange is to daytrade. Most people that daytrade will lose money doing it and not even realize it.
You might make a profit if you compare your initial fiat investment to your current fiat value. What you need to consider is if you made a profit compared to just holding BTC. You should also consider the risk of something happening to the exchange and the risk increased with time as long as you have your money on an exchange.


Transaction cancelled but bitcoin was not return back to my wallet I made a transaction on 2017-05-04 04:40:52  to  39j2nuZWr4F2hZ5wYDwQwZWzsTJC4H6ujn and my transaction was on pending till today and i got a message today Sun, May 28, 2017 at 4:20 AM that my transaction was cancelled but my bitcoin was not return to my bitcoin wallet account, i want to know what is going and i will appreciate you help, thank you

While your transaction may have been cancelled by whatever system you used, you have to wait for it to cancel out everywhere else too.

Since you only provided a destination wallet and not the actual transaction ID, it's hard to provide much info. I do, however, see transactions going to the wallet you specified above without issue. It does look like your fee (8.93 sat/B on a 224byte trans) was well below a reasonable fee to be processed in a decent amount of time on the transactions that show up though..

I suggest leveraging https://bitcoinfees.21.co/ to ensure your transactions process in a decent amount of time in the future. Relying on a cancellation is unreliable.

To see your transaction ids, check the following links

https://blockchain.info/address/39j2nuZWr4F2hZ5wYDwQwZWzsTJC4H6ujn
https://blockexplorer.com/address/39j2nuZWr4F2hZ5wYDwQwZWzsTJC4H6ujn

you will notice the transaction IDs under the heading "transactions"


What is preventing me from simply constructing a hash that's lower than the current target? I just started learning about Bitcoin, and something I can figure out is why miners have to use a random process (hashing a nonce) to get lower than the target. For example, if the target is

00000000000001ae00000000000000

why not just produce

000000000000000000000000000001

to become the winner? I have no practical experience mining, I'm guessing my ignorance lies in the requirements of how a hash is produced. If so, where can I find about those requirements? Thanks.

EDIT: For clarity, I mean this in the sense of what part of the technology requires me to use a hash function? Rather than in the sense of just constructing something that looks like a valid hash.

Hash functions are unpredictable.

You can't simply find an input to the hash function that produces such an output. The only way to accomplish that is by trying lots and lots of candidate blocks as input. If the target is 1000 times smaller, it requires 1000 times as many tries.


Bitcoin Vanitygen > how to edit .cl kernel file to so that it will verify the public key directly instead So im trying to create a vanityaddress, which is 1 followed by my 10 chars plus some random chars, no matter how i try i get 9 right out of my chars  not the 10th chars , so i everyday get bunch of address but not the one  i want, i dont care what it comes after 1oth char,  is there a way to narrow down your search, ? or how to edit the .cl kernal file  see verify the public key directly instead of converting it to an address and then comparing it.  costum seed file etc , how ....

1Mycharsss?XXXXXXXXXXXXXXXXXXXXXXXX

Each additional specific character you want in your vanity address will make the search 58x as long. In other words, you will find 58x as many 9 character matches, as 10 character matches. If the vanity generator is working otherwise, just keep searching.

  how to edit the .cl kernal file see verify the public key directly instead of converting it to an address and then comparing it

No, there is no way to tell what the address will be, without converting the public key to an address. Part of the address derivation involves hash functions, so you cannot know the output just by looking at the input value, you must invoke the hash function to get this. The best you can do is to randomly pick private keys, and then derive the address of each one and check to see if it matches your desired string.


How to get permission to edit in Bitcoin Wiki? How to create and edit a bitcoin wiki page?I do not have permission to create page,How to get permission to edit in Bitcoin Wiki?

Currently, you can ask for permission at IRC channel #bitcoin-wiki on Freenode


this bitcoin address contains transactions which may be double spends. You should be extremely careful i sent 0.4 btc to exchanger
and this transaction was sent 2 times from my wallet and spent to me 200$ (0.8 btc)
which i wanted only 0.4btc to send
transaction hash:
https://blockchain.info/address/15o8CfP4z8cWiZCp5euzNEqXjEFTyNF5Yb
funds are still missing from my blockchain wallet more than hour ago
and at this transaction at other place when clicking on "hash" i see:
" A conflicting transaction has been detected in our memory pool. The transaction hash displayed below may change. "
https://blockchain.info/tx/f3cf0d91fd678de0bbbf13aa69e87ab3c0e7c55c3aecb03c06ac78d5139fc2b6

so my funds are gone now? or will they come back

One of the transactions was rejected by blockchain.info and one got through.

There was a "malleability attack" going on just recently, that's probably the reason.  The attacker can take legitimate transactions, change the transaction ID (hash) and republish the transaction to the network.  See more at https://en.bitcoin.it/wiki/Transaction_Malleability - there is a BIP 62 in the pipeline dealing with this problem.

The attack is merely an annoyance, the recipient will never get twice the amount (800 mBTC in your case) through a malleability attack.


Why does the bitcoin mining code have the same if statement twice? From the v0.9.3 miner.cpp source (https://github.com/bitcoin/bitcoin/blob/v0.9.3/src/miner.cpp#L598-L604):

if (GetTimeMillis() - nHPSTimerStart > 4000)
{
    static CCriticalSection cs;
    {
        LOCK(cs);
        if (GetTimeMillis() - nHPSTimerStart > 4000)
        {
        ....

Why is the same if statement "if (GetTimeMillis() - nHPSTimerStart > 4000)" executed twice? GetTimeMillis() can only go up, so it seems like if the first one is true, then the second statement can only ever evaluate to true as well, and is useless. I'm assuming this is not entirely correct, though, and am also assuming it has something to do with the CCriticalSelection, but would like to understand the nature of it better.

Thanks!

This is double-checked locking, which is

  ...a software design pattern used to reduce the overhead of acquiring a lock by first testing the locking criterion [...] without actually acquiring the lock.

This pattern can be fraught with issues; even folks who otherwise know what they're doing can be bitten by subtle issues.  See, for example, C++ and the Perils of Double-Checked Locking by Scott Meyers and Andrei Alexandrescu.

The particular use case you cite looks fairly innocuous, though.


What does a wallet do? what are the actual requirements for a bitcoin transaction? Not the simple inputs, outputs, verification or amounts, but in the technical sense. what does your wallet do? every thing I read says you need a client but what does it do? people used paper wallets before how were they able to do so? did they still need a client? and if so for what reason? does it just connect them to the network or is there more to it?

Clients
The word client is normally used for a client-server arrangement. One example is the world wide web where web-browsers like Chrome, Firefox and edge are clients. Web-servers like  apache-webserver and IIS are servers. Clients need servers, clients and servers do entirely different jobs.
Bitcoin doesn't really use a client-server model, it uses a peer to peer model where every node is the same. At least, that was the case in the beginning. Bitcoin was originally designed to avoid the need for trusted third parties but many commercial businesses have entered the Bitcoin world and some of them use a client-server model for the software they provide. This answer will focus instead on the peer-to-peer model used originally and still used by popular wallets like Bitcoin core.
Wallets
A wallet does several jobs:

It stores data locally.

The only truly important item is the private key (or master private key)
It also caches a local copy of the transaction journal (the blockchain)
It keeps other records of transactions etc it has been involved in.

It provides a user interface for a person to spend money, see historical expenditure etc
It creates new unconfirmed transactions that spend money controlled by it's private key

It sends these to a few nearby peers to be passed on so they eventually reach miners.
Consequently it has to initially discover some peers and keep contact with them.

It keeps track of the amount of money under it's control (often called a balance)
It communicates with a few other peers to learn about new blocks of transactions

Note that the only vital task is storing a number that is kept secret. Everything  else is comparatively unimportant.
Paper wallets
a paper wallet is a number written down on a piece of paper and kept secret.
Paper wallets obviously only do the first of the jobs listed above. Storing a private key. Money can be received by a paper wallet because the recipient of a transaction is purely passive and not really involved in the processing of any transaction. The sender only needs to know an address for the recipient, beyond that the recipient is not involved.
Paper wallets were useful for long-term storage of money. However the person who created that wallet would have to have some external means of keeping track of the amount of money. This could be other paper records, use of blockchain-explorers or some other system.
To spend money, the owner of a paper wallet would have to copy the secret number into a software or hardware wallet.

Related questions:

What kinds of wallets are there?
How transaction happen in blockchain?
I sent Bitcoin to an address but the recipient hasn't yet received it


What is the unit of time_lock_delta in LND? LND has a configuration setting called time_lock_delta with the description "The required timelock delta for HTLCs forwarded over the channel.". I assume this to refer to some measure of time, but what is the unit of this value?

None of the four files in the LND repository that contain this string appear to mention the unit either.

The time_lock_delta is the minimum difference in the number of blocks between the CLTV of an incoming HTLC and the forwarded HTLC.

Full details are described in BOLT2 # CLTV expiry delta.


asic mining with different cryptocurrencies after it is no longer profitable If I have an Asic to mine bitcoin and I mine to the point that it no longer becomes profitable to mine them anymore, Can I use the Asic to mine a different cryptocurrency and will the difficulty needed to mine it be higher than if I just bought a new Asic?

An ASIC is an "Application Specific Integrated Circuit".  In the case of a Bitcoin miner, the specific application is performing the SHA256 hashing algorithm.  That is the only thing the ASIC knows how to do.

So long as the cryptocurrency you want to mine uses SHA256, you should be able to use the ASIC on that currency.


Bitcoin wallet security If I use a Bitcoin wallet from say Bitcoin.com and Bitcoin.com folds, will I still be able to download the software and input my pass phrase to get my bitcoin back?

You'll want to save the seed phrase mnemonic (likely 12-24 words long) that the wallet gives you when you first start it up. Doing so is very important!

If Bitcoin.com disappears tomorrow, you'll be able to input that seed phrase into any other compatible piece software. Many wallets use the same key derivation scheme.


What exactly is a "non-fungible token" and why would anyone care or want one? https://en.wikipedia.org/wiki/Non-fungible_token
I've read that many times. It makes zero sense to me. (Just like 99,99% of the nonsensical word salad that's said these days.)
Okay, so it's some kind of garbagecoin where each coin is "unique", and that's somehow... worth money? What?
Isn't the truth that this is just yet another crypto currency-related scam designed purely to make people give them money so that they can buy more Bitcoin, the only crypto-currency which has actual value?

What is NFT?
Non-Fungible Token. Tokens that are unique and used for something special.
Is it something new and useful?
No its not a new concept IMO. Can be useful in some cases and off-chain tokens used in games like Lightnite for skins makes sense. They are trending for now and there will be lot of people trying to make money from such online trends. Some will lose money.
NFTs using bitcoin tech:
LN: https://scarce.city/
Liquid: https://explorer.lightnite.io/
Rootstock: https://watafan.com/#/marketplace
LNP/BP: https://github.com/LNP-BP/LNPBPs/blob/647acb854783b3caa9a84f782d199c19e64d9e28/lnpbp-0021.md
You can also sell digital content without NFTs: https://github.com/yzernik/squeaknode


Securing a wallet and multiple addresses I am trying to understand Bitcoin QT. Sorry for the questions.

If I create two new addresses, then encrypt my wallet and then create a third new address after the encryption process, are all three new addresses encrypted and safe to use?
If I then copy the wallet.dat file to usb sticks and delete the wallet.dat file on my laptop, are the funds on the usb stick still accessible? On all three addresses?
Can I then continue sending money to these addresses? Even thought the wallet isn't connected to the internet?
Imagine I have a copy of the wallet.dat file on a usb stick. If I generate a 4th address on my laptop, and then destroy the laptops wallet.dat file, will funds I send to the 4th address still go into the wallet.dat copy  on the usb stick which was made before I created the 4th address?
If I can see coins transfered to my wallet and confirmed, should I bother setting up a second wallet on my other computer and doing a test transaction with my new funds? Or can I safely assume the coins are ok?
Is there a gauranteed fail safe way to check the balance in an address without hooking up the wallet.dat file to my client? I want to keep my wallet.dat file offline.
Are the answers to the above the same for Litecoin QT?

Thanks so much for any guidance

Yes, your "wallet.dat" contains all your keys, and when you make new keys then they will be added to your wallet.dat. If you encrypt your wallet.dat, then all keys in it will be encryptet and all keys added to it will also be encryptet.
Your founds is not stored in your wallet.dat. The founds are stored in the blockchain (which everyone can download via a huge p2p network).
Yes. Your wallet.dat only contain the private keys to spend coins. Everyone can at all time send you coins (whether your connected to the internet or not).
No. The USB stick will only be able to spend coins send to the first 3 addresses (as the USB stick's wallet.dat will only contain private keys to the first 3 addresses).
As long as your client has the longest blockchain, then coins send to you can NEVER be removed again (unless someone spends them, with the private key only you know). However note that coins can first be "trusted", when there is enough confirms ("0 confirms" just means that someone has sent you a transaction, but it will first be "trustable" when it's included in the blockchain and enough blocks confirms that the blockchain will never be forked under your transaction. But usually 6 confirms should be enough).
Type your address on a trusted website, e.g. https://blockchain.info/ and look at the balance. Some clients support "watch-only" addresses (they only store your bitcoin address and not your private key), but I don't think Bitcoin-QT supports this (yet).
I don't know much about litecoin, but most of the "public/private key" stuff, apply to all cryptocoins (e.g. you can watch an address without storing the private key, etc).


Intercept and edit transaction output When a P2PKH transaction is created there are two main parts: the transaction input and the transaction output. I understand that the transaction input requires a signature that unlocks a previous UTXO for that specific address.

So in simple terms we have

transaction = transaction input(UTXO+sig) + transaction output(destination address and amount)

What prevents someone from intercepting the transaction and replacing the 'transaction output' with their own address?

The sig part signs the entire transaction, not just the input part. So if someone intercepting the transaction replaced the transaction output part, the sig would no longer be valid. In fact, changing other inputs or outputs or amounts would also render the sig and thus the transaction invalid.

When you sign away an input, you are essentially saying "only this very specific transaction may spend this input".


How could Bitcoin lending be secured? I have been thinking a lot about platforms that allow us to borrow/make money.
Such a platform would be really wonderful, mainly for people in countries such as Brazil, which has high taxes on interest.

The problem is the risk.

I read in the news about a guy that did not pay the amount he was supposed to on btcjam, which was really bad.

Leading to the question: How will we be able to have a more stable and reliable Bitcoin lending service, so that people might trust bitcoins even more?

There is currently no mechanism known to enforce loan repayments, as the lending happens on the blockchain and the repayment is tied to an offchain contract.

The revenue of Bitcoins is very high, because the risk of the borrower evading repayment is very high.


Are you considered a money transmitter if your end users sends you their private keys to send funds on their behalf? I have a service where the end user sends me their bitcoin private keys and I send it back out to a new address when a condition happens (ex. if the weather is raining).

Is this still considered as a money transmitter in the US or NYC? And how is this different from a bitcoin wallet application like blockchain.info that also has your private keys but you also have it too?

That's not a very secure system.

You should set up a 1-of-2 multisig address with the user instead and have them send funds to that address.  They're still placing a lot of trust in you but they don't have to expose their private key.

As far as your original question goes: I don't think so since they're still technically in control of their funds (just you are as well), it's more like a jointly owned bank account.  Of course, I am not a lawyer.

Or better yet (updating this later after thinking about it a bit): Instead, have the user sign a bitcoin transaction, specifying the destination address but have them give it to you without actually publishing it until the condition has been met.  That way you don't have control over their funds at all, but you can still pull the trigger on sending a transaction.  This has the benefit of only requiring a single tx to complete the whole process.


how to move bitcoin from watching only wallet to standard wallet in electrum 3.3.8? I accidentally swiped my bitcoin into a watching only wallet in electrum and I need help to move it from "cold storage" to an active standard electrum wallet... Help!

I accidentally swiped my bitcoin into a watching only wallet in electrum ...  from a paper coin

The way you describe this makes it difficult for me to work out what happened but I am unfamiliar with Electrum so it may make sense to someone familiar with Electrum.

Watch-only

A Watch-only address is a bitcoin address for which the wallet has no record of the private-key from which the address was generated.

A Watch only wallet would be a wallet that contains a watch-only address (without the corresponding private key).

Sweeping

When you "sweep" bitcoin from one "place" into another, I believe that usually means creating a Bitcoin transaction on the blockchain which transfers control of the money from one wallet to another. The target wallet can create this transaction if you give it the private-key of the donor wallet. However, there is no way this transaction should result in a watch-only address - where the target wallet does not know the private key of the target address.

Importing

The alternative process is to import the private key from the paper wallet into the target wallet. Again there is no way the target wallet could end up not knowing the private key which controls the money.

Recovering control

I would dig out the old paper wallet (which you called a paper bitcoin), create a new wallet and import the private key from the paper wallet. I would do this on a new PC or first carefully back-up the existing wallet (and preferably test the backup can be recovered).

If you would like more detailed advice, it would probably require you to say how the paper wallet was obtained - e.g. "it was printed by an Acme-coinomatic BTM, in Idaho in June 2017".

If you have disposed of the paper wallet, your Bitcoin are probably lost forever.


is there a way to run bitcoin-qt and point it to a local testnet? I'm running a small testnet locally with this project:

http://github.com/freewil/bitcoin-testnet-box

but I'm having trouble pointing bitcoin-qt to the blockchain that I created locally myself, so I have some data like this:

bitcoin-cli -datadir=1  getinfo
{
    "version" : 90300,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 0,
    "timeoffset" : 0,
    "connections" : 1,
    "proxy" : "",
    "difficulty" : 0.00000000,
    "testnet" : false,
    "keypoololdest" : 1413617762,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00001000,
    "errors" : ""
}
bitcoin-cli -datadir=2  getinfo
{
    "version" : 90300,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 0,
    "timeoffset" : 0,
    "connections" : 1,
    "proxy" : "",
    "difficulty" : 0.00000000,
    "testnet" : false,
    "keypoololdest" : 1413617762,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00001000,
    "errors" : ""
}

and I want that to be the data, and the addresses that is picked up and incorporated by bitcoin-qt. I guess there should be some flags to facilitate this but everything I've tried so far always in unsuccessful- maybe someone on here knows or has some idea?

Use the -testnet option. This will run the daemon in testnet.


Creating secure architecture and payout process I studied lots of valuable q&a here, but still I have some doubts.

Case - simple game (calm down - I'm not one of the rookies creating exchange as seen here), which allows to pay for a game. The character of the gameplay forces us to create virtual balance for each player and create payouts on daily basis/request.

What's done:

compiled bitcoind client is running on encrypted wallet in background
creating in advance pool of addresses
assigning free address to registered user
listen for incoming transactions/confirmations
on 6th confirmation we add transaction to user balance

Where I need guidance / pro advice:

strip my runnning bitcoind client with wallet from holding private keys (I've read about it but don't know how to achieve it properly)
many guides advice to run bitcoind client on other machine - but how to setup secure communication between two machines (vpn?), if someone gains access to game server, it doesn't matter where client is located (right?)
as private keys are stored away, how I can deal with payout requests? Are there known practices in that field? I've read https://bitcoinsecurityproject.org/SecureApplicationArchitecture/, but can't imagine real world example/process

Last but not least - if users send coins to private addresses created in one wallet, which private key should sign a transaction? As you probably see, I'm confused with some "basics" after research here :)

EDIT

I found steps to sign transaction offline (http://people.xiph.org/~greg/signdemo.txt) is it preferable way in real world apps?

You're going to  be doing some fun stuff if you need a complex system.

The Simple Way

Just use Bitcoind along with it's walletnotify and blocknotify arguments. See here. As soon as you get a walletnotify, store it in a database and make sure txid is unique. Walletnotify fires multiple times throughout a transaction's life. Check the database every block looking for unprocessed transactions that have 6 confirms. Those that do should get marked as "processed" or get deleted from the database.

The Hardcore Way

If you need the functionality like described. Consider using one of the many libraries that implement some Bitcoin features and function. Check out Bitcoinj (java), Libbitcoin (C++), Gocoin (Go), and the many python libraries that can be found through search. These libraries can make it a lot more simple to run a more finely controlled and specialized node.


How to create offer using JSON RPC in Ripple I am currently working on Ripple API here but have not been able to figure out how to create offer using JSON RPC, I will appreciate any help from you guys

I asked this questions sometimes in November 2016, then I was a newbie to ripple and ripple gateway.

So I choose to answer this question for the purpose of those who may like face this same challenge in the future

if you are creating offers between two none native currencies this is a good sample request.

{
  "method": "submit",
  "params": [
    {
      "offline": false,
      "secret": "snYothV5CFDMpMYStmL5VwMHzxHFr",
      "fee_mult_max": 1000,
      "tx_json": {
        "TakerGets": {
          "currency": "EUR",
          "value": "0.94",
          "issuer": "rJ5mA3kRwJWahdb3GqH3vmrbRd7eVufsVk"
        },
        "TakerPays": {
          "currency": "NGN",
          "value": "305",
          "issuer": "rGGpYkf66FaZb3zymeB3xH1SRdtx2zGxVN"
        },
        "Account": "rJ5mA3kRwJWahdb3GqH3vmrbRd7eVufsVk",
        "TransactionType": "OfferCreate",
        "Fee": "12",
        "Flags": "65536"
      }
    }
  ]
}

this will give a provisional response similar to this.

{
  "result": {
    "engine_result": "tesSUCCESS",
    "engine_result_code": 0,
    "engine_result_message": "The transaction was applied. Only final in a validated ledger.",
    "status": "success",
    "tx_blob": "1200072200010000240000007564D50AD5F57690A0000000000000000000000000004E474E0000000000A7616AF5356D585317A38B2EEC95B163BAC3434B65D46165400CE380000000000000000000000000004555520000000000C260B3831882A44608EE81C2F3726AA72D11CA9568400000000000000C732102272E391673B735C9D96435DAFF89F9EA7B4EC285C39643A754848EDE19A6542674473045022100F75C2C1B926F2880A38DB028B64F5363800FDC8FB8F4813ADE60A820DA9D8A710220148CC10AE87F0625733E73F35CB713857B1FDD6F5255979AA1075CE51FE3BAA38114C260B3831882A44608EE81C2F3726AA72D11CA95",
    "tx_json": {
      "Account": "rJ5mA3kRwJWahdb3GqH3vmrbRd7eVufsVk",
      "Fee": "12",
      "Flags": 65536,
      "Sequence": 117,
      "SigningPubKey": "02272E391673B735C9D96435DAFF89F9EA7B4EC285C39643A754848EDE19A65426",
      "TakerGets": {
        "currency": "EUR",
        "issuer": "rJ5mA3kRwJWahdb3GqH3vmrbRd7eVufsVk",
        "value": "0.94"
      },
      "TakerPays": {
        "currency": "NGN",
        "issuer": "rGGpYkf66FaZb3zymeB3xH1SRdtx2zGxVN",
        "value": "305"
      },
      "TransactionType": "OfferCreate",
      "TxnSignature": "3045022100F75C2C1B926F2880A38DB028B64F5363800FDC8FB8F4813ADE60A820DA9D8A710220148CC10AE87F0625733E73F35CB713857B1FDD6F5255979AA1075CE51FE3BAA3",
      "hash": "1B5738875CA25CA1CD76F6C8EEA65182172A2F7B7C87777614FA9FAEE2610F45"
    }
  }
}

if you are creating an offer to exchange XRP for none native currency, in which takers of the offer will get XRP for it's non native currency

{
  "method": "submit",
  "params": [
    {
      "offline": false,
      "secret": "snYothV5CFDMpMYStmL5VwMHzxHFr",
      "fee_mult_max": 1000,
      "tx_json": {
        "TakerGets": 10,
        "TakerPays": {
          "currency": "NGN",
          "value": "305",
          "issuer": "rGGpYkf66FaZb3zymeB3xH1SRdtx2zGxVN"
        },
        "Account": "rJ5mA3kRwJWahdb3GqH3vmrbRd7eVufsVk",
        "TransactionType": "OfferCreate",
        "Fee": "12",
        "Flags": "65536"
      }
    }
  ]
}

and the sample response goes thus

{
  "result": {
    "engine_result": "tesSUCCESS",
    "engine_result_code": 0,
    "engine_result_message": "The transaction was applied. Only final in a validated ledger.",
    "status": "success",
    "tx_blob": "1200072200010000240000007664D50AD5F57690A0000000000000000000000000004E474E0000000000A7616AF5356D585317A38B2EEC95B163BAC3434B65400000000000000A68400000000000000C732102272E391673B735C9D96435DAFF89F9EA7B4EC285C39643A754848EDE19A6542674473045022100C1BC4CF6D6D62670BAD3ACACA822E15E97F9594E30605B67178A25107880BA5B02207F0944A56ABD1BB5C13708903DA5AE13736356F99B1609261A3B4F2E6365A1D88114C260B3831882A44608EE81C2F3726AA72D11CA95",
    "tx_json": {
      "Account": "rJ5mA3kRwJWahdb3GqH3vmrbRd7eVufsVk",
      "Fee": "12",
      "Flags": 65536,
      "Sequence": 118,
      "SigningPubKey": "02272E391673B735C9D96435DAFF89F9EA7B4EC285C39643A754848EDE19A65426",
      "TakerGets": "10",
      "TakerPays": {
        "currency": "NGN",
        "issuer": "rGGpYkf66FaZb3zymeB3xH1SRdtx2zGxVN",
        "value": "305"
      },
      "TransactionType": "OfferCreate",
      "TxnSignature": "3045022100C1BC4CF6D6D62670BAD3ACACA822E15E97F9594E30605B67178A25107880BA5B02207F0944A56ABD1BB5C13708903DA5AE13736356F99B1609261A3B4F2E6365A1D8",
      "hash": "BF257B79B3D80FD7E8B5A42A60BA13904704AE21BFD07E56CE38F229A4C462A6"
    }
  }
}


Block index versus Block height When I start up my Bitcoin core, it says "loading block index". Does this indexing occur on my local machine or does this mean my wallet fetches the latest block info, more specifically the block height?
What is the purpose of this block indexing?
Thanks

When I start up my Bitcoin core, it says "loading block index".

The Bitcoin Core node software maintains several pieces of data on disk (excluding the wallet):

The actual blocks in append-only data files.
The block index (which block headers exist, how they interconnect, and where on disk they are stored)
The chain state (the set of unspent outputs with amount, txid and address) at the current best block in the index.

Because this information about what blocks are known and where they are on disk is so frequently needed, it is loaded entirely into memory.

During the "loading block index", the full block index is loaded into memory (it's pretty small, 60 MB at the time of writing), and several consistency checks are done (including verifying all difficulties and proof of work).

  Does this indexing occur on my local machine

Yes.

  or does this mean my wallet fetches the latest block info, more specifically the block height?

No, fetching information about new blocks always occurs in the background while your node is active, but during the "Loading block index" phase it is not yet active.

  What is the purpose of this block indexing?

By index you perhaps are thinking of something more fancy than it is. It's simply a table that allows you to look a block's information based on its hash.

Bitcoin Core internally has dozens of indexes for various pieces of data. This is just one that is relatively big, and stored on disk.


How to obtain the private key of an Armory wallet? I have a paper backup, a digital wallet backup and all the passwords: how do I retrieve the private key for a watch-only wallet so I can send some coins out of it (created in armory and imported into, for example, blockchain.info)?

If that's not possible, is using passphrase from within armory the only way to send coins out of an armory watch-only wallet?

This is how you obtain the private key for an Armory wallet:

In Armory-Qt, click on Wallet Properties (or in the newer versions, double click on your wallet to open your Wallet Properties), then click Backup this wallet>See other backup options>Export Key Lists then click the button Export Key Lists. Enter your passphrase and Armory will show your wallet's list of public addresses and private keys. If you are --offline or didn't download the blockchain, the list may be empty (Armory thinks no addresses were used), but checking "include unused" will allow you to see the entire list. Note that a watch-only copy of a wallet uses the same private key as the original wallet it was created from.

This is useful if you want to send coins from an Armory wallet without using Armory, for example from an armory wallet address you imported into blockchain.info. In order to do so, you need to enter into the chosen service the private keys to the wallet you want to send from. In the case of BlockChain.info, the key it accepts is the one in PrivHexBE format, after you remove the spaces.

Word of caution: after you enter a wallet's private key into any online service that wallet is no longer secure. You should considering transferring all the coins it holds out - do not use that wallet again.


hello, need some help Who is responsible for ensuring that the bitcoin protocol is not violated in the network?
    1. The market forces behind the supply and demand of bitcoin
    2. Miners
    3. Consensus of the miners
    4. Developers of the bitcoin protocol

There is no single entity responsible for ensuring the rules of the protocol are not violated. Rather, bitcoin is a decentralized network, so all participants must adhere to the protocol’s rules, or else the network will ignore them.

This is accomplished by a network of full nodes, that relay and validate all transactions and blocks against the network’s rules. All of the nodes together form the decentralized network, so to join the network you must adhere to the rules defined by the node’s code.

  The market forces behind the supply and demand of bitcoin

This will determine the price, but the price will not affect the ability of participants to violate the networ’s rules, nor will it ensure that rules are not violated. The rules must be followed whether the price is $1 per bitcoin, or $1 million per bitcoin.

  Miners

Miners work to secure the blockchain record, they will validate transactions in the same way other (non-mining) full nodes do, and they will ensure only valid transactions are added to the blockchain.

  Consensus of the miners

Same as above. Note that even if a group of miners decided to violate the network’s rules, then the network (full nodes) would simply ignore any new (invalid) blocks found by those miners.

  Developers of the bitcoin protocol

The developers collaboratively write and refine the code that runs the network, but this does not give them absolute powers to violate or change the rules. Their code works to ensure that everyone involved in the network is behaving, and that any misbehaving nodes are banned.


what happens if a miner include a transaction already exists in another block? Suppose that I have a Transaction A. (txA)
I send my txA to bitcoin network and full node validate it and put in Mempool and starts to broadcasting it.

A Miner A connect to a fullnode to create a candidate block and wins the POW. In this block there is my txA

A miners B create another block with all different transactions except to my txA.

If block A and block B have the same previous block Hash it's a fork,and if the chain of block A wins, all transaction of block B return to mempool.

But if B Has the previous block hash of A ?
After create a block there is another check of all transactions?
When TxA is in mempool it's unconfirmed when become confirmed?

It can only exist in one block.  That is why it is safer to wait for 2-6 confirmations before accepting a large transaction.

So to answer the title of your post - a miner can't include a transaction which exists on another block in the same chain since it would not be a valid block.


Bitcoin Core 0.13 wallet encryption Is it safe to encrypt bitcoind wallet if it holds funded addresses?

Not only is it safe to encrypt wallets with money in them, it is unsafe not to do so. Think of your wallet as a computer file serving as your safe, in which you put your savings. Would you leave your safe open? Probably not. You'd set a complex combination.

This is even more important in Bitcoin. Since your wallet is just a file on your hard disk, it can not only get physically stolen, but also digitally stolen over the Internet by viruses and other malware. Having your wallet setup to not require a password is asking for trouble. You could lose everything in an instant.

The only real risk of encryption is forgetting the password. Unlike a safe, encryption can't be bypassed by a locksmith. Lose the password, lose the money. If physical theft is not a problem for you, you may want to write down the password and put it in a safe deposit box. Viruses don't read paper. Regardless of encryption, you also want to make a backup of your wallet file onto external storage, in case your hard drive goes kaput. This should also be in a safe place.