What is a megahash and how is it used to estimate the rate at which bitcoins are mined? What part of the bitcoin network requires hashes and why? What is the relation between money and the megahashes a card can do?

A hash is a function that takes a string as an input, does a transformation of it, and returns a second string that's considerably shorter than the original and that could be considered is the "resume" of the original. You can check Wikipedia's Hash definition

Hashes are required for "mining". I'm new to Bitcoin so I may describe this wrongly: As part of mining, miners compete to discover a short number that, when added to the end of a string (which contains all recent transactions since 10 minutes ago) produces a hash with a specific number of zeros at the beginning. The correctness of such a discovery can be easily verified by anyone but finding that small apendix is computationally very, very hard. The first miner to discover such a key to "lock" a block is awarded the reward - 25 BTCs as of now.

Here in comes the "mega-hash" term: CPUs, arrays of GPUs and ASICs are rated according to how many different hashes they can compute per second. Analyzing a million different hashes per second is what's called a "mega-hash". Obviously, the higher this number the more different combinatinos you can try, so it becomes more probable that you will find an answer. However, this is only a relative advantage that may be completely nullified if the other miners have a similar or even higher computing power than yours.

This graph explains it all beautifully, hope it's clearer than my bad prose


Why would I have so many rejected shares while mining? I am mining litecoin with give-me-coins and I have the following info on website's stats section

 Valid Paid: 118
 Invalid (Not Paid): 113 (95.76%)

As far as I know this is not very good.

How can I make it better ?

I use cgminer 3.7.2 (used 3.6.6 also) with following command

cgminer --scrypt -o ltc-eu.give-me-coins.com:3333 -u user.pass -p x -I 11

You can try decreasing your intensity. Other parameters can also lower speed and decrease/remove failures. It's like running too eagerly, it might make you trip a lot.

It could also be your Internet connection or even give-me-coins itself (although I doubt it's give-me-coins itself).


electrum, jaxx, and exodus I am interested in storing some bitcoin, etheruim, altcoins a year or some years.
I know hardware or paper wallets are the best choice, but as an absolute newbie, I decided to use a software offline wallet for simplicity( advice is welcomed).
Searching, I found Jaxx, Electrum, and Exodus as best choices.
As I read, I preferred electrum, but it supports only Bitcoins.
I need : (opensource offline-online user-controlled private keys, software wallet)
I am asking support for deciding on one of the following choices:
1. use an equivalent for electrum for multiple cryptocurrencies. And what to use multiBitHd, Jaxx, ...
2. start with bitcoin, when get some knowledge, create a paper wallet for multicurrencies?

Here is how to create a paper wallet for almost any Cryptocurrency :
https://steemit.com/cryptocurrency/@bad.r2017/how-to-create-a-paper-wallet-for-any-cryptocurrency-in-7-steps


How do you get Sibling Hashed Values in a Merkle Proof? Merkle Proofs are one of the main reasons that people attribute Bitcoin's use of Merkle Trees. But I'm struggling to understand how these work in practice. Please explain theoretically as well as practically.

Given that Lightweight Nodes only store Block Headers to limit the storage needed for their copies of the BlockChain, Nodes don't have access to the transactions in a Block; by definition of a Block Header, the only info they have about transactions is the Merkle Root.

But the Merkle Root is not enough to prove a transaction is in a block. All the sibling-values up the Merkle Tree are needed. Where do these values come from if they aren't already stored?

Example. Node 1 has a Block on its Blockchain with Merkle Root = H_ABC...P. It wishes to see if H_K is in the block. To do so, it needs the values H_L; H_IJK; H_MNOP; H_ABC..H. Where and how does it get these?

But the Merkle Root is not enough to prove a transaction is in a block. All the sibling-values up the Merkle Tree are needed. Where do these values come from if they aren't already stored?

Any full node that has a complete copy of the block can construct a merkle proof that proves a requested transaction identifier (txid) connects to the merkle root in a block header.  Here's an animated graphic showing how Bitcoin Core constructs a merkle proof:

For the txid (H5) for transaction 5, a list of hashes necessary to make the proof plus is created along with a list of flags telling the software evaluating the proof which side of each branch the would find the hash.

The lightweight client evaluating the proof uses those flags and hashes to prove the txid connects to the merkle root like this:

For more information, you may wish to read about the peer-to-peer network protocol message merkleblock in the BtcInformation.org Developer Reference, which includes these illustrations.


How does mimblewimble protect the chain state? I have recently learned about some concepts of mimblewimble. I heard that in a mimblewimble implementation, the blockchain history is not kept. Does that mean that all blocks that include the hashes (which represent the proof of work) are being thrown away, too? How does a mimblewimble implementation protect the chain state if all the proof of actual work is being thrown away? Anybody could just replace the state with something else. What am I missing?

The proof of work is definitely not thrown away. All block headers need to be kept to prove the most work chain of headers. What is thrown away is what you would typically think as the content of the block: inputs and outputs.

This works by keeping a current state tracking transaction outputs and various other bits of data and committing to all of that in some Merkle-like tree. The root of the current tree is included in each block header. So when you start a new node and download only the current state, without needing all the transaction history, you can validate that the state you've been given is anchored in the block header chain, which gives you the proof of work.


What does a negative Ripple balance mean? I just sold some BTC for XRP, and managed to get a negative balance. WTF?

Transaction ID - E2D1BBD7A602E9D5B16FD79819A0347E18DED7F988F2F4C9EA3854BFCB4D3664

Ripple address r3AWbdp2jQLXLywJypdoNwVSvr81xs3uhn and you set up a trust line for 1.0 BTC in each direction. As part of some previous payment (not a trade), Ripple made use of that trust line just as it was told it could. If you don't want a negative balance ask people not to trust you :-). [As an aside, previous ripple implementations like classic.ripplepay.com required you to approve and limit what trust others gave you, it's more complicated and there really isn't a downside to people trusting you so ripple.com doesn't support that, at least not yet).]

Looking at the Ripple Live Graph... you currently owe the above address 0.1 BTC and you have 0.096+ BTC from WeExchange. For small amounts it's generally easiest to just leave it alone in Ripple rather than trying to zero it. The friend that has your IOU can use it to make payments through you and anyone that accepts your IOUs or that accepts any IOUs you hold.

E.g. If your friend had a WeExchange account (they don't trust WeEx currently so they may not) they could pay WeExchange say 0.06 BTC. Your total balance would stay the same but you'd owe the friend only 0.04 BTC and hold 0.036+ BTC from WeExchange. Your friend could pay their Bitstamp account too. In that case the payment would go through you, to rfTXGr6j9ExwSQd9NwRaLBCCa4VETr4GYu (who trusts you) and from them to Bitstamp. In that case the first friend would effectively be exchanging your IOUs with the second friend in exchange for their Bitstamp IOUs :-).


How to move Bitcoin data from Application Support on an external drive [Mac] I'd like to put all my Bitcoin data on an external drive instead of having it on my hard drive, as it's taking too much space on my laptop.

I did find an answer on this page regarding how to create a standalone application out of Bitcoin-Qt, but somehow that doesn't work for me. It doesn't seem to do anything different.

How can I move my Bitcoin data?

Assumptions:

Your current folder for your bitcoin data is here:
"~/Library/Application Support/Bitcoin" or here
"/Users//Library/Application Support/Bitcoin"
Your current folder for your bitcoin-qt application is here:
/Applications/Bitcoin-qt.app
You have an external drive named "My Passport" and your Finder,
Preferences setting are set to display Devices.  Select Finder,
Preferences and tick the box to the left of External disks.

To do this on a MAC running OSX 10.9 follow these instructions:

Open Finder.
In Finder, using the Finder menu bar, select: Go, Go To Folder... , and type ~/Library and press the RETURN key.
In Finder, navigate to the "Application Support" folder.  You will see the Bitcoin directory.
In Finder, select, or highlight, this folder, then select: Edit, Copy "Bitcoin" from menu bar.
In Finder, navigate to your external drive "My Passport".
In Finder, create a folder called "Applications" on your "My Passport" external drive (see step "3" above after connecting external drive, if necessary).
In Finder, navigate to the newly created "Applications" directory.
In Finder, select edit and paste item to start copying the "Bitcoin" directory to your external drive's "/Volumes/My Passport/Applications/" folder.
Once this completes and both the "~/Library/Application Support/Bitcoin" and "/Volumes/My Passport/Applications/Bitcoin" folders are identical.  Rename the Bitcoin directory in  "~/Library/Application Support/Bitcoin" to  "~/Library/Application Support/BitcoinOLD".
Launch Terminal from LaunchPad, Utilities or from Applications in Finder.
At the Terminal prompt type: cd ~/Library/Application\ Support Yes, that "\" slash is necessary.
Type: ls -laf, and insure that the Bitcoin directory is now called BitcoinOLD.
Type: ln -s /Volumes/My\ Passport/Applications/Bitcoin/ ./Bitcoin.  this command actually creates a symbolic link to your external drive.   Yes, that slash "\" just after the "My" is necessary to account for the space in "My Passport".
Launch Bitcoin-qt from Applications in Finder and let the "Reindexing blocks on disk.." process complete.  It should not be downloading anything until this completes and then will download only those blocks since your last synchronize to the Bitcoin network.
Once this completes, delete the BitcoinOLD folder using finder. "~/Library/Application Support/BitcoinOLD".


Difference between RPC calls addmultisigaddress and importaddress I am trying to import a 2-of-3 multisignature address into my bitcoind wallet, watch-only. I have the public keys, but not the private keys. Two potential bitcoind JSON-RPC calls that seem to fit are:

bitcoin-cli addmultisigaddress 2 ["pubkey1", "pubkey2", "pubkey3"] "my_account"

and

bitcoin-cli importaddress "multisig-ed_address" "my_account"

Assume "multisig-ed_address" == multisig("pubkey1", "pubkey2", "pubkey3")

Are these equivalent? Would they both work?

The only difference I can find is that importaddress has an option to rescan the blockchain for transactions that might have involved the imported address. Does addmultisigaddress rescan or not?

The difference between these two is that with addmultisigaddress, bitcoind stores the redeem script and the second one, bitcoind has no idea what the redeem script is and only stores its hash (which is essentially the p2sh address).

For watching the address, the two are essentially equivalent since you'll still know when bitcoins get sent to that p2sh address. The redeem script is necessary if you want to spend from the p2sh address to some other address. Even if you had the private keys in the multisig p2sh address, you wouldn't be able to spend it using importaddress since you still need the redeem script in order to be able to spend it.


OP_RETURN using python I'm trying to make a simple program that can reliably upload an OP_RETURN transaction. I have found some examples online, but so far they don't work consistently. The ones that go through seem to be random. Here are the transactions that went through

https://blockchain.info/address/1Eoo7G7u97EMwptSxjYjpvdx9zYcqJBn9y

It is very hit or miss every time I try. I have been entirely unable to upload any transactions using the script, however once in a while if I upload the raw transaction using blockchain they go through. Any ideas? Here is the error message.

Traceback (most recent call last):
  File "/Users/JC/Documents/DevelopmentStuff/programming /Python/bit/op-return_test2.py", line 51, in <module>
    print(pushtx(tx))
  File "/Library/Python/2.7/site-packages/bitcoin/bci.py", line 237, in pushtx
    return f(*args)
  File "/Library/Python/2.7/site-packages/bitcoin/bci.py", line 192, in bci_pushtx
    return make_request('https://blockchain.info/pushtx', 'tx='+tx)
  File "/Library/Python/2.7/site-packages/bitcoin/bci.py", line 23, in make_request
    raise Exception(p)
Exception: None Standard Script Output OP_RETURN 48656c6c6f

Here is the code. I would really appreciate any help. Thanks

# coding: utf-8

from bitcoin import *
import binascii
from test import *

priv = "Private key"

pub = "1Eoo7G7u97EMwptSxjYjpvdx9zYcqJBn9y"

addr= "1Eoo7G7u97EMwptSxjYjpvdx9zYcqJBn9y"
inputs = unspent(addr)

message = "Hello"
FullLen = format(len(message)+2,'x').rjust(2,'0')
MessageLen = format(len(message),'x').rjust(2,'0')
ID = binascii.hexlify(str(message))
#snd = "6a4c28"+ID
snd = "6a"+MessageLen+ID
print hexlify(chr(len(message)))
print MessageLen
print snd
#snd = "6a4c"+MessageLen+ID
#print snd
newScriptPubKey = "6a" + hexlify(chr(len(message)))+ hexlify(message)
#print newScriptPubKey

outputs = [{'value': 50000, 'address': addr}, {'value': 0, 'script': snd}]

fee = 10000

tx = mksend(inputs, outputs, addr, fee)

dt = deserialize(tx)
ins = dt['ins']

#print addr
#print ins

print tx
for ind, elm in enumerate(ins):
    print elm
    tx = sign(tx, ind, priv)

print tx

print(pushtx(tx)) # Error is raised on this line


Confusion over BTC value - MtGox vs CoinDesk I'm trying to find the current value of BTC.

If I go to MtGox the ticker at the top says the average price is about $950 but at CoinDesk.com the daily high, low etc are all $100 cheaper...

Both are in USD.

The CoinDesk seems to be the accurate one but why are the MtGox values so much higher?

MtGox is an exchange: people trade Bitcoin for USD there. The value they report is what the exchange rate is on MtGox.

CoinDesk calculates its Bitcoin Price Index based on a number of factors, including MtGox's price, and the prices on other exchanges. This appears to be a much better indicator of the true market value than MtGox's exchange rate.

You might wonder, if the price difference is so large, why don't people buy on one and sell on the other to make a profit? People do, in something called arbitrage trading, but how close this will bring the markets depends on the overall costs of the transactions (fees, etc.). Since getting USD out of MtGox is not easy (or even possible?) at the moment, the gap can be quite large.


Manually checking for credited bitcoins If I have the bitcoin address, the private key and a transaction ID from Bitcoin (regtest mode) in shell variables, what Python code do I need to run to claim the Bitcoins are indeed intended for this private key?

I have been following this excellent article - Bitcoins the hard way : Using the raw Bitcoin protocol. I hope to replicate this with Bitcoin in regtest mode as part of a larger design.

To begin with, I had to ensure that the code mentioned in the article (available here) can generate Bitcoin address with m or n as the prefix and uses 111 as the network ID. See here. I made the following code changes to generate addresses for regtest mode:

keyUtils.pubKeyToAddr

def pubKeyToAddr(s):
    ripemd160 = hashlib.new('ripemd160')
    ripemd160.update(hashlib.sha256(s.decode('hex')).digest())
    return utils.base58CheckEncode(111, ripemd160.digest())

utils.base58CheckEncode

def base58CheckEncode(version, payload):
    s = chr(version) + payload
    checksum = hashlib.sha256(hashlib.sha256(s).digest()).digest()[0:4]
    result = s + checksum
    leadingZeros = countLeadingChars(result, '\0')
    return 'm' * leadingZeros + base58encode(base256decode(result))

Then, with bitcoin-qt, I transferred some BTC to an address generated from above. The transfer goes through and is confirmed when a new block is created.

However, I am unable to see the amount credited to this new address with the getreceivedbyaddress command. I am running this command in the Debug Window console (for some reason, bitcoin-cli wouldn't connect even after configuring bitcoind). I think, the reason could be the fact that, the private key and the bitcoin address was generated elsewhere from command line rather than the default --data-dir location that bitcoin-qt used when it was launched. I understand this.

I am unable to see the amount credited to this new address with the getreceivedbyaddress command.

There is no by-address index of the blockchain in Bitcoin core.

For bitcoin-core to track an address you must, for example, add an address to the wallet as a watch-only address.


Bitcoin.conf & JSON-RPC options What does it mean in the bitcoin.conf file when it states:

  server=1 tells Bitcoin-Qt to accept JSON-RPC commands?

If all one needs to do to solo mine is type setgenerate true in the console, then what is at stake with accepting JSON-RPC commands?  Does this allow other software to interact with Bitcoin-Qt, or something akin to that?  Can someone explain?

The JSON-RPC API can be used by other programs to communicate with the Bitcoin client.  That could include external mining programs, "e-commerce" software to automatically make and receive payments, or any other software that wants to interact with the Bitcoin network.

It is true that you do not need this feature simply to solo mine using setgenerate true.  However, you should be aware that setgenerate true enables an inefficient CPU miner which is obsolete technology and should be used for testing only.  It will cost you far more in electricity than you can ever expect to earn in mining revenue, and with very high probability you will never successfully mine a single block.  The current state of the art in mining is dedicated ASIC hardware.  Such hardware would normally be controlled by a separate piece of software, which would then communicate with the Bitcoin client over the RPC API.


Would it be feasible to attack the bitcoin network by buying and deleting large amounts of bitcoin? Could a government, determined to stop bitcoins, just buy a lot of bitcoins and delete the wallet afterwards? Are the bitcoins gone then?

The bitcoins are still there, but without the private keys they would be unspendable and it would be highly unlikely that anybody would ever rediscover the private keys.

However, such an attack would not hurt the bitcoin network: The previous owners would already have been compensated through the sale, and as the total value of the network remains approximately the same, the network's value would then redistribute to fewer units of bitcoin, increasing the value of each remaining unit. The attack would only make the bitcoin users wealthier.

Even if all but a single bitcoin were lost, the network could carry on: It has been discussed many times (see money-supply, divisibility), that it would be simple to adapt the bitcoin protocol to divide into smaller subunits. Currently Satoshi are the smallest subunit and there are 10^8 Satoshi per Bitcoin, but if the protocol were adopted to allow bitcoin to be divided to 10^16 units, there would again be sufficient money supply to serve a global market to make payments in any amounts.


Cannot build circuits because we don't have enough directory information I'm developing a bitcoin wallet app using BitcoinJ framework. While deploying the app using Tomcat 8, I get the following stack of errors,

12-Jun-2017 14:18:12.511 INFO [PeerGroup Thread] com.subgraph.orchid.TorClient.start Starting Orchid (version: 1.0.0)

12-Jun-2017 14:18:12.514 INFO [Thread-12] com.subgraph.orchid.directory.DirectoryImpl.loadFromStore
Loading cached network information from disk

12-Jun-2017 14:18:12.516 INFO [Thread-12] com.subgraph.orchid.directory.DirectoryImpl.loadFromStore Loading certificates

12-Jun-2017 14:18:12.518 INFO [CircuitManager worker-0] com.subgraph.orchid.circuits.CircuitCreationTask.checkCircuitsForCreation
Cannot build circuits because we don't have enough directory information

12-Jun-2017 14:18:12.601 INFO [Thread-12] com.subgraph.orchid.directory.DirectoryImpl.loadFromStore Loading consensus

12-Jun-2017 14:18:12.917 WARNING [Thread-12] com.subgraph.orchid.directory.consensus.ConsensusDocumentImpl.verifySingleAuthority
Consensus signed by unrecognized directory authority: 0232af901c31a04ee9848595af9bb7620d4c5b2e

12-Jun-2017 14:18:12.943 INFO [Thread-12] com.subgraph.orchid.directory.DirectoryImpl.loadFromStore Loading
microdescriptor cache

12-Jun-2017 14:18:13.160 INFO [Thread-12] com.subgraph.orchid.directory.DirectoryImpl.loadFromStore loading state file

12-Jun-2017 14:18:15.662 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying
web application directory [/Applications/Tomcat-8.5.15/webapps/manager]

The last 2 lines of the stack,

org.bitcoinj.core.PeerGroup: 06/12/2017 14:53:36 - Tor ready
org.bitcoinj.core.PeerGroup: 06/12/2017 14:53:36 - Localhost peer not detected.

I believe Tomcat deployment is fine and one of the errors is crucial informing -com.subgraph.orchid.circuits.CircuitCreationTask.checkCircuitsForCreation Cannot build circuits because we don't have enough directory information

I use maven as the build tool and get the RELEASE version of the BitcoinJ as dependency in the project.

<dependency>
    <groupId>org.bitcoinj</groupId>
    <artifactId>bitcoinj-core</artifactId>
    <version>RELEASE</version>
</dependency>

I recently loaded RAM in the system and upgraded to the OS Sierra. I had the surprise, I couldn't use maven from the terminal afterwards and set that up manually. Current Maven information,

$ mvn -version

Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T01:39:06+06:00)
Maven home: /Users/Chaklader/apache-maven-3.5.0
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.4", arch: "x86_64", family: "mac"

How to approach to the problem properly ?

Solved by itself. I guess the info Localhost peer not detected was behind the scene. Now, after finding the peers I have the app synchronized to the blockchain


How do market cap websites obtain their list of coins? Do they manually research and enter them into the database or do the coin developers contact the websites?

They will usually scrape various exchange APIs/websites for tickers and names.


Proof of stake fork problem I have a doubt with Proof of Stake. As I have watched some tutorial videos and websites, there is information that: with Proof of Stake, in order to make a double spending attack, a node has to own at least 51% stake of all the network.

Because with pure Proof of Stake, only a single miner can append a block at the same time. So what I wonder here is: with Proof of Stake, how can fork happen to make the double spending attack?

Thanks in advance :-)

a node has to own at least 51% stake of all the network.

This is correct. Note: you should own 51% of network, not 51% of emission.

  only a single miner can append a block at the same time

Not true, but it does not matter.

  how can fork happen to make the double spending attack?

Assume you have large stack.

backup your database at some checkpoint
sell your stack for "anything else"
restore from backup and create a private network which is not connected to main network
leave your chain mining until the cumulative difficulty become larger than in main network
connect your network to main net and force it to reorganize mainchain to your chain where you still have your funds and 100% mining rewards

voila


Do checkpoints in the block chain help to avoid a 51% attack that rewrites the entire blockchain? I have read sometimes in the web, that in the blockchain are checkpoints, so that an 51% could not the blockchain before that checkpoint even with over 51%. Is this true?

In this answer this is missing completely:
Can an attacker with 51% of hash power change old blocks?

For this question i would assume that the 51% attacker would change the client he uses any way that would help to do this attack

Cheers!

Checkpoints are features of certain clients, not inherent to the blockchain itself. So, if an attacker did re-write the chain all the way back to a popular checkpoint, he could maybe get the network to disagree. Some would go with the 'chain with most work wins' approach, and some would go with the 'chain that meets my checkpoints with the most work' rule.

Checkpoints do not inherently help prevent a 51% attack though. In fact, their usefulness is predicated on the assumption that a 51% attack all the way back to a checkpoint will never happen. For example, some clients skip ECDSA verification for anything older than a certain checkpoint, so it's useful to have these checkpoints because initial-block-download syncing will be faster.


What was the last block before BIP91 activated? https://www.xbt.eu/ says:

  BIP91 ACTIVATED!

  Non-SegWit signaling blocks will be orphaned.

What was the last block before BIP91 activated?

The last block that did not have BIP91 rules active was the one with height 477119, with hash 00000000000000000022552c92fdc5ac6c31a95f54d9ed9fcdf0fe00ff134773.

BIP91 uses BIP9, but with modified period sizes and threshold. It uses windows of 336 blocks, and requires 269 blocks to signal on bit 4. The window that ranged from block 476448 to 476783 (inclusive) had 284 blocks that signalled on bit 4. As a result, BIP91 locked in, and the next window of 336 blocks, ranging from 476784 to 477119 (inclusive) was spent in the locked in state. As of block 477120, BIP91 transitioned to the active state, and nodes that implement BIP91 will require signalling for bit 1 as of that block.


Who to rent virtual private server from accepts bitcoin? Have preferences for service. Desirable that machine hosted in nation disagreeable with United States. Standard linux images available.

Will create webpage which lists links to youtube videos, expect accusations of copyright infringement. Good if host tells Hollywood companies where to stuff court papers. Service in Russia, former Bloc nations, China all good.

You can find a list of VPS hosts on the Bitcoin Wiki page for Trade. Some of them list what countries they come from. There is also a neat list of all the VPS servers. At the time of writing, only CINIPAC appears to be anywhere close to your desired locations, being from Romania.


Why does a larger block size infer a bigger attack vector I have read this in several articles that larger block sizes makes adversarial attacks easier. What I wonder is why is that so obvious? is it because in a larger block the number of transactions could increase to a number that it becomes hard to validate each one of them?

Usually Denial Of Service(DoS) attack may take place on larger sized blocks.So to avoid this condition initially block size Bitcoin was chosen to be 1Mb. Because attacker sends a lot of data in the network to make it busy so that the actual transactions are not able to take place.
Along with reducing block size other methodology which is adopted in Bitcoin are:

No forwarding of orphaned blocks
No forwarding of double-spend transactions
No forwarding of same block or transactions
Disconnect a peer that sends too many messages
Restrict the block size to 1 MB
Limit the size of each script up to 10000 bytes


Is the scripting system an incalculable security risk? Why does Bitcoin have a complicated scripting system?
https://en.bitcoin.it/wiki/Script
https://github.com/bitcoin/bitcoin/blob/master/src/script.cpp

I guess because it makes fancy contracts possible: https://en.bitcoin.it/wiki/Contracts Could even be kinds of contracts that we would never think about today.

Still, from what I understand currently there are only a handful of scripts in popular use.

Would it not be wise to restrict the scripting engine to a limited number of well understood scripts? It seems like an invitation for trouble. New scripts could be added over time.

New scripts could be added over time.

And how would you do that (without breaking old clients / getting all bitcoin clients to work the same way with the same scripts / etc) ?

I think the script language will let bitcoin evolve, without having to make any (fundamental) changes to the protocol. It's a futurewise smart decision (just like bitcoin has some protection against quantum computers, even though they ain't "dangerous" yet - and might never be). IMO it's one of the thing that make bitcoin 'better than the rest'.

Ofc having a less complex script language would minimize any potential attack vector, but I think the complexity of the language already is low enough for it not to be of any concern. At most we will probably see DoS attack (e.g. transactions which loops endless), but this should be easily fixable with an update (and the currently client already have lots of "anti-DoS" checks, to protect against this).


@Sunny, looks like you just broadcast a valid TXN on those UTXOs, so I assume you figured it out.

For those reading at home, the problem was that there were three addresses in the redeem script:

48'/0'/2'0/0
48'/0'/3'0/0
48'/0'/1'0/0

But only one address is used (twice) to sign the TXN

48'/0'/2'/0/0

The result is that your script hash is correct, since you used the proper three addresses, but you don't meet the 2 of 3 requirement to spend since you've only proven ownership of the private keys for 48'/0'/2'/0/0

I assume you simply corrected the error and added a second address to your script.


How can I obtain a better understanding of the P2P messages between my full node and its peers? I am interested in how my full node interacts with its peers, what messages it exchanges (e.g. gossip about other nodes on the network, transactions, blocks) and why my full node disconnects with certain peers (is it my full node making the decision to disconnect or the peer?).
I know there is an open PR from Troy Giorshev (also covered in this Bitcoin Core PR review club) to make some of this possible to do within Bitcoin Core. What insights will I be able to garner from using this tool? For example will I be able to work out why a peer disconnected (e.g. because it went offline, because my full node was asking for too much information/too demanding, because I sent it transaction(s) it wasn't interested in?) What is possible currently with this PR and what is possible for future improvements of this tool?
(Also will playing around with this tool let me answer this question on falling back unnecessarily on DNS seeds?)

Wireshark understands the Core protocol and it's one of the most popular packet capture tools.


Why am I able to export private keys using my seedless online Electrum wallet? Why am I able to export private keys using my seedless online Electrum wallet?

I thought this wallet is not meant to be able to expose any of my Bitcoin, but yet it has the option to export private keys? I have not gone to the point of actually exporting them because I'm scared it will compromise me somehow since I can't even set a password on seedless Electrum, so perhaps it is just a redundant option?

this was a gui bug; the menu did not really export private keys.

fixed here: https://github.com/spesmilo/electrum/commit/3fc7d0ef9e34465a47017ffa1f567d829aa0f2a2


Manually crafted multisig Tx: non-mandatory-script-verify-flag I'm trying to broadcast a manually crafted and signed transaction. As far as I can tell, the scripts are correct and the signatures pass BIP 66 validation.

However, I keep getting:

{'message': '64: non-mandatory-script-verify-flag (No error)', u'code': -26}

Suspecting the DER encoding, I tried different libs (plus my own ad-hoc code) to no avail. This is the raw transaction in question:

010000000185a08567ea46e4643bcace616519227876b89a364afe9410390196ba0185a7d900000000fd44010047304402202e119d14a6fd920d4444c6d73800609b8a8dfe48bc4c1fe0d2840fef40a26027022041d8f3ec7517b9773879eb5255ef30a457740fa2669f2b33d1c93c6e7894163a014730440220686531e7c640e62a860f499f9582ee72c8581b4827c0f05d9196d6b73722d56402200fa3b7132414092de23b1c7cf31874c21b7b5dea775ae677b8bd3ce5d0dca3830147304402205628c813b01bb0355309400c363c37aaa6d36d5ee6592a0793c77cfd32fd0f3d022017c68684a5748423129a60449344982b7e101aaf7882bf74958ef145631c682e014c695221023abd0b238c5e93e4d1d9f06e9d743941e5d3f23d0b5371a0f87ac56106373829210231e33da7f49dd067b556c04b07fc339b571f144bb8c51b3410e66b143b3e75202102b49c7c0f9d3026fdc3311c61bdb7b92d81ee1d4adf806e0fbfdfac5f5c9b9e7853aeffffffff01204e0000000000001976a9144c477bec69fa6f89d6effdc3b17ab53101c6fa1a88ac00000000

What's wrong with the transaction? I'll provide any additional information necessary.

I was sending an extra signature.

The transaction required 2-of-3, and I sent the 3 signatures. The extra signature was not popped off the stack by OP_CHECKMULTISIG, and the remaining stack looked like this:

EXTRA_SIGNATURE
OP_0 # null-dummy for Bitcoin Core's old bug

The extra signature took the place of the dummy, and bitcoind detected this when verifying the dummy was an OP_0.


I have my 12 word seed I put my Bitcoin into a wallet some time ago, kept the 12 words but do not remember which wallet I used.
Now I understand that all that matters is that I have my 12 words but I am having difficulty (due to lack of knowledge) in using these words to regain my coins.
Any help please?
Many Thanks
Dave

I suggest you download and install electrum. Then run and select "standard wallet" in the first step > "I already have a seed" > then enter your seed words. If your seed is a valid electrum seed it should let you proceed to the next step. If it is not then click on options and check bip39. Then see what message is displayed next to the options button. If it says "bip39 checksum ok" you can proceed to the next step where you choose the legacy p2pkh option because that is the most likely address type. Then follow on-screen instructions for the rest.

If the above doesn't work then I suggest you look at your filesystem to learn what wallets you installed in the past. Also look at your email archives in case you used a blockchain.info wallet. Make a post about what you find on the bitcoin talk forum technical support subforum or /r/bitcoinbeginners subreddit and post a link the comments so we can help you further.


Why does my wallet size increase over time? Why does the size of the output of

     bitcoin-clibackupwallet

or, equivalently, wallet.dat

increase over time?

The current wallet.dat file increases because you add new keys when you refill your keypool (get new addresses) or if you receive or send transactions. Mind that every wallet-relevant transaction is stored (together with some metadata) in your wallet.dat.


How does one install Bitcoin Core on a CentOs server? I would like to install Bitcoin Core on a CentOs server.
Where can I find instructions, or what are the exact steps to install Bitcoin Core on a CentOs Server?

There is an rpm family for Centos 7 - and remember you will need at least 300 GB of hard drive space to keep it running for a while - and the blockchain itself is approaching 200 GB alone.  it hits the cPU cores pretty hard, and then you will need good security because it will invite every hacker in the world to break in.  Within 12 hours of putting ours up - we had 59,000 attempted unauthorized log ins


NXT clone paramiters Hi am looking at creating a currency using NXT creation generator and have been looking for parts in the code to modify and test, this is more of a learning experience for myself.

Is there a way to change certain paramiters

Blocksize to increase it?
Block timing can this be increased either along side blocksize or separately?
Datacloud can this size be increased to upload larger files and also can it be changed so these are permenatly uploaded or put up and only removed when required by the person that uploaded them ?
Fees such as uploads, currency creation, asset creation can these be modified increase or decreased there base and max ?

I will probly have more questions, but I am looking were to find to modify these
appreciate the help!!

Of course there is a way to change anything. But you must carefully think over the changes you do. The source code is available here. Here are some directions:

  Blocksize to increase it?

Change the MAX_NUMBER_OF_TRANSACTIONS constant

  Block timing can this be increased either along side blocksize or separately?

It can be increased or decreased separately from the block size. In Nxt there is no constant for that. Easiest thing to do is to see how the BLOCK_TIME constant is used in Ardor and do the same in Nxt

  Datacloud can this size be increased to upload larger files and also can it be changed so these are permenatly uploaded or put up and only removed when required by the person that uploaded them ?

The size can be changed - MAX_TAGGED_DATA_DATA_LENGTH. You cannot delete data which is already announced to the network. You simply cannot force someone to forget some data. If you find a way to do this, please tell me, we will solve the double spend problem in truly scalable way :)

  Fees such as uploads, currency creation, asset creation can these be modified increase or decreased there base and max ?

They can. Search for the implementations of the nxt.Fee interface


How can one extract an address balance at a specific height? Is it possible to view the balance of an address at a specific height, without using any external web api?

Could it perhaps be done using bx or the Bitcoin client API?

This is relatively hard to achieve, because if you wish to allow querying any address at any height you deal with a LOT of data. You probably would need serve database server (cluster).

I'm pretty sure, getting a balance at a specific height from a specific address is not possible over a existing app or API.

You could try built it yourself with bitcoin-core as basis.
Maybe have a look at the >1year old address index patch from Johnathan Corgan. But it would required additional to allow a API where you could define the height.

But caching every address at every possible height (Juli 29 2015: 367456, amount of addresses ~250k) is nearly impossible.


Not totally cold but how cold and safe is it? If I put my btc in a wallet in a pc but never connect it to net unless i need to use btc, is it practically cold storage and how safe is it?

It depends!

The problem is that almost all PCs are relatively unsafe. As Bitcoin use becomes more widespread and Bitcoins more valuable, we'll probably soon see more malware looking for it. Naturally, if you limit your internet usage, you are less exploitable. Yet only one such malware need to make it onto your computer, and then connecting even once to the net may be enough for your wallet to get stolen. Also be aware that what counts may not be that you think of yourself as having connected the computer to the network, but rather that indeed no potential malware (say a rootkit able to hide its network connections or something having infected your interfaces) can talk to anything outside your computer. Think unplugging your network cable and physically removing the wireless interface, rather than "I clicked to disable it, and I think that might have done what I hope it does!"

That said, I think the scenario you describe comes pretty close to what security you can achieve with reasonable effort. After all, even with a completely offline wallet you will have a similar risk exposure at the moment you decide to bring it back into a (connected) client to spend the Bitcoins in it---unless you are so diligent as to sign the transaction from an air-gapped PC not connected to the internet at all.

One problem I do see with your suggestion is that people are really good at tricking themselves. If I were to say "I'll only connect this PC to the internet when I spend these Bitcoins," I wonder if I'd live up to this promise. I suppose for me, the only way to protect me from myself was to set up the PC to indeed never connect to the internet. You may, of course, have more discipline than I trust myself with consistently living up to.


Does checking for balance on any cryptocurrency address is same as checking if address is correct? Let assume that I do not want to check literally if specific cryptocurrency address is correct (I mean I have to deal with many cryptocurry addresses that I know of which cryptcurrency).

Does checking on balance with public APIs for that specific address (BTC, Litecoin, Doge and so on...) would give me error message for invalid addresses?

I just want to make my life easier and skip writing function to check for correctness on each cryptocurrency seperately.

Using a public API can verify that an address is valid, but only if the address is known to the Bitcoin (or Litecoin, Dogecoin, etc) network.

This will not work for cold storage addresses that have not yet been exposed to any network peers (because they are invisible to the network until used).


Can my internet provider see I'm using bitcoin core (Russia) I live in Russia and bitcoin is prohibited here. Can my internet provider see I'm using bitcoin so I will have problems?

UPD: Right now I'm still syncing bitcoin core. Is syncing as dangerous as participating in transactions?

Yes, they can.  It is quite easy to detect an ordinary Bitcoin client; it sends unencrypted messages of a standard and unique format to well-known TCP ports.  Moreover, if they monitor all your traffic, it would not be too hard for them to link you with the transactions you send; Bitcoin tries to "cloak" your transactions by sending them out along with other people's relayed transactions.  But if they can see all your incoming traffic, then when you send out a transaction that you never received from someone else, they can conclude it is one that you yourself created.

Identifying the recipient of the transaction might be harder, unless it happens to be someone they are already monitoring;  then they could see when that person spends the coins you sent.

An encrypted VPN, or proxy service like Tor, can help with this, to some extent.  However, then you have to trust the VPN provider not to cooperate with the authorities, or to monitor your traffic themselves and use it for their own evil purposes.  In the case of Tor, there might be similar problems if you connect to a Tor node which is compromised; someone who controls all your Internet traffic might be able to arrange for this to happen.


Can i still use the old address to recieve Bitcoin with Bitcoin.com Wallet I tried Cloud Minning recently And I use Bitcoin.com Wallet to register bitcoinonlinepool.com, today I accidentally press the change address button, will my account still able to recieve Bitcoin?
Btw, is bitcoinonlinepool.com a legit or spam

I tried Cloud Minning recently

Cloud mining services are scams generally

Are there any legitimate cloud mining services?
Is a cloud mining subscription worth it?
Cloud mining questions

I accidentally press the change address button, will my account still able to receive Bitcoin?

Yes. Addresses can receive multiple payments. Addresses never expire.

Address reuse questions

Address re-use is only a privacy concern and probably only a concern if you have several different people sending money to the same address or if you then pay multiple parties with funds previously received at one address.
You mention the Bitcoin.com wallet - I'm not familiar with it. If it is a custodial wallet then you'd need to contact Bitcoin.com support to ask if they have any problems associating your account with re-used addresses they have generated for you. This is because sometimes services call an account a wallet when it isn't a normal Bitcoin wallet and its up to each such business how they choose to associate addresses with customers' accounts. I'd be surprised if it was a problem but you'd have to ask to be certain. Remember that Bitcoin.com is to Bitcoin as Dollar.com is to the US Dollar - the businesses are unrelated to the currency except as users of it.

is bitcoinonlinepool.com a legit or spam

How to tell if a cryptocurrency exchange or trading platform is trustworthy?


How to connect to blockchain via a "rig" miner? I would like to connect the following rig (please see the photos) to a blockchain platform (I prefer a platform which is simpler to use :) ). Maybe this rig would not be appropriate for Bitcoin, but also Ethereum or Zcash.

What steps do I need to proceed (step by step) to connect to Ethreum or Zcach?

Do I need to connect these devices to a personal computer?

What you have here are components for a rig. They are not "rigged" yet, ie, not connected, not structured to work yet.  The main components for a mining rig such as you show are:

PC motherboard (there seems to be one in the 3rd picture, the one
with a large circular heatsink with fan & intel label) so this is in
fact the core component of a 'Personal Computer - you already have
it.
Graphical Processing Units or GPU's (you have 4  Sapphire Radeon units of some model)
Power Supply or Supplies (you show one, visible in the first 3 pictures)
The frame to physically hold the components in place.

The bottom picture also shows a Raspberry Pi connected to a small relay board, which while not strictly necessary, would be used to help reset the rig (https://cryptomining-blog.com/tag/raspberry-pi-3-relay-control/)

Step-by-Step instructions would depend on exactly what blockchain you wanted to mine, and the exact models of the components you are using, but in essence, you run a computer (the PC motherboard or 'mainboard') which gives mining work to the GPU's (usually connected to the mainboard via PCI-e cables).
The mainboard will be running some mining software (cgminer, bfgminer or similar) on top of the OS (Linux or Windows usually) and "connecting to the blockchain" you mine by communicating with a mining pool, which itself is running a full node on the blockchain's P2P network.


Given a private key, how do you get a public address Possible Duplicate:
  How are public & private keys in an address created?

I am scanning in a private key from a QR code in an app I am writting to handle the import of physical bitcoins.

Given a private key, how can I get the public key so that I can lookup its value on the block explorer?

In ECDSA public keys are usually generated from a random private key. The simple answer then would be, that instead of using a random private key, you use the given private key and it should generate the public key. After that, perform the steps listed in the Wiki to find out the conventional notation for the public key you can use anywhere.


Can you specify more than one output index in a transaction's input? It looks to me like each input to a bitcoin transaction has an index that specifies only one output from the input its spending. Is there a way to specify more than one output index, or do you have to create a second input line that contains the same input ID with a different index? It seems like that second way is wasteful of blockchain space - I would have thought there would be a way to simply specify multiple indexes. Is there a way to do that?

It looks to me like each input to a bitcoin transaction has an index that specifies only one output from the input its spending.

That is correct.

  Is there a way to specify more than one output index, or do you have to create a second input line that contains the same input ID with a different index?

You have to add an extra input, which repeats the txid.

  It seems like that second way is wasteful of blockchain space - I would have thought there would be a way to simply specify multiple indexes.

It is wasteful, but only slightly. In your hypothetical system, you still need a signature/scriptSig/witness for each of the coins being spent (unless you also want to incentivize key reuse), which are generally larger than a repetition of a txid.

  Is there a way to do that?

No.


Password not working in Bitcoin core wallet I am trying to transfer my BTC to another wallet and it is saying my passphrase is incorrect when I know it is not and use this password for a few things. Any ideas to get around this?

Any ideas to get around this?

Check the computer for viruses.
Disconnect the computer from the network
Type the password/passphrase into Notepad (etc) where you can see it, then cut&paste into the wallet prompt.
Restore the wallet from one of your recent backups and retry.
Restore the wallet from one of your older backups and retry.
Restore the wallet from one of your offsite backups and retry.
Fetch one of your written notes of the private key from the safety-deposit box at the bank or from your floor-safe, use it to re-create the wallet and then create a new password.


Pushing a large signed transaction (testnet) using Python I have been trying to send a signed transaction using pybitcointools (Python) using the blockr_pushtx function, however it consistently returns Exception: {"status":"fail","data":"Could not push your transaction!","code":500,"message":"Did you sign your transaction?"}. The signature isn't the issue. It is likely to be an issue with the size of the transaction.

How does one go about pushing a sizable raw transaction (Testnet, in this case, but both mainnet/testnet answers appreciated) without needing to use Bitcoin Core?

Isn't it possible to switch pybitcointools to another service?

Try http://webbtc.com/api/relay The API should be similar (I haven't tested both)

It is also possible to check tx for validity (by send attempt) here: http://webbtc.com/relay_tx

(There are testnet API there, my links are for mainnet)


What is the correct algorithm to calculate worker & pool hashrate I need to display the pool and worker hashrates on my website.
The pool uses PSQL.

hashesPerSecond = math.pow(2, 32) * proofsOfWork / secondsElapsed

where proofsOfWork is the number of difficulty 1 proofs of work (aka shares) that the user or pool has found during secondsElapsed seconds.

If you use variable difficulty, then you can count a proof of work from someone mining at difficulty X the same as X proofs of work at difficulty 1.

For mhps divide by 1e6. For ghps divide by 1e9. And so on..

math.pow(2, 32) == 4294967296


How does "rounds" compare to "blocks"? I'm digging for Dogecoins at Hashfaster (Wow! To the moon!), and I'm trying to understand the statistics page. What is the difference between a block (my cpu miner software detects new blocks all the time) and "rounds" (which seems to be some metric on the Hashfaster dashboard)?

A share is a proof of work at the expected difficulty, and can be used in the scope of the pool or of dogecoin.

The difficulty is rather straightforward, if the difficulty goes from 10,000 to 20,000 it becomes twice as difficult to find a block on that network. Pools will accept shares at lower difficulties (say difficulty 1) expecting certain odds on that share being a valid block (in the case of 10,000 difficulty the odds of a difficulty 1 share being a valid block are 10000:1). There are various methods of computing how to pay out rewards for such a share, I will use Bitminter as an example, which like the pool you describe uses rounds to payout, which is referred to as a PPLNSG (Pay Per Last N Groups, or shifts) style pool.

A round will last until a certain expectation of finding a block is met, with bitminter, when a block is found, you are paid proportionally to your shares against those of others in the pool for the last 10 rounds, with a round duration of 0.4 or 40% of the difficulty. If bitminter was a dogecoin pool and doge difficulty was at 10,000, a round would last 4000 difficulty 1 shares. Whenever a block is found, you will be paid for the amount of difficulty 1 shares you submitted over the last 40,000 submitted in the pool.

The numbers change from pool to pool but hopefully this gives you a little idea on how it works. For more info on other pool payout schemes, check out the top of this article: https://en.bitcoin.it/wiki/Comparison_of_mining_pools


Is offline Bitcoin transaction signing safe? How can offline transaction signing ever be safe? I'm relativly new to bitcoin and this is one part that I cannot understand.

Lets say I create a transaction at my watching-only wallet. Then I sign it on my offline wallet. That means I just "toggle something"/"add some data that says signed" when I'm signing my transaction at the offline wallet.

Isn't that easily hackable so that everybody can easily sign transactions without knowing the private-key? I mean the watching only wallet has no clue of the private key so there must be some information that is != private-key in the data that comes back from the offline wallet.

Even if I sign it at the online-wallet somebody could just change the sourcecode of the client that he does not need the private-key to sign something.

Lets say I create a transaction at my watching-only wallet. Then I sign it on my offline wallet. That means I just "toggle something"/"add some data that says signed" when I'm signing my transaction at the offline wallet.

That is not how Bitcoin or digital signatures work. By your logic wallets (online or offline) wouldn't work in general. Private keys are not broadcast to the network or given to anyone unless the person who generated them (and thus owns them) does something.

Digital signatures work via mathematics to generate a proof. With a specific message and public key, only the person who controls the private key that corresponds to the public key is able to generate a valid proof. That proof is the signature, and that is what is added to a transaction. Signatures do not require the signing device to be online. Signing is an entirely offline operation that only does math, nothing else.

  Even if I sign it at the online-wallet somebody could just change the sourcecode of the client that he does not need the private-key to sign something.

The signature validation operation is a consensus rule. Every must follow that exact rule otherwise you will be forked off of the network. Sure you can make a client that doesn't do that validation, but then you aren't using Bitcoin, and if no one uses your client and its forked blockchain (as that will happen), then your transaction and coins on that chain are completely worthless.


How do I use Vanitygen on Fedora 20? (openssl restrictions) I have seen several methods for building bitcoin from source on Fedora, but I have not seen corresponding information for vanitygen.
It builds, and it starts up, but then it gives me the error:
"pattern.c:164: vg_exec_context_init: Assertion `vxcp->vxc_key' failed."
Of course, the cause is easily searchable: the Fedora implementation of OpenSSL does not include the algorithms that bitcoin depends on. Bicoin got around this, but vanitygen does not seem to be able to.
I downloaded and built the most recent version of OpenSSL from their website.
Using "make -rpath [path to the openssl I built]", however, does not change anything.

So my question is: How do I get vanitygen to point to my OpenSSL rather than the default OpenSSL? I don't want my entire system to use the custom OpenSSL because I trust the Fedora implementation more than the one I downloaded; however I don't intend to use the generated addresses for more than small bitcoin amounts, so they don't have to be as safe.

References:
How do I build Bitcoin in Fedora 18?

EDIT: For reference, the procedure referenced in the accepted answer below is:

NOTE: In both this and the accepted answer below, REPLACE openssl-1.0.1g WITH THE LATEST VERSION OF OPENSSL. 1.0.1g may have security flaws that are patched in future versions - it is current as of this writing, but probably will not be in six months.

mkdir ~/devel
cd ~/devel

wget http://openssl.org/source/openssl-1.0.1g.tar.gz
tar xfz openssl-1.0.1g.tar.gz
cd openssl-1.0.1g

./config --prefix=/opt/openssl-1.0.1g zlib-dynamic shared
make

sudo make install_sw

First, you need to compile OpenSSL from the sources. I assume that you've compiled it as it is described in the Bitmessage Forum. That way, OpenSSL including elliptic curves support is installed in /opt/openssl-version. As for the Heartbleed bug that has recently been published, please use the very latest stable version of OpenSSL.

Following this description, I will now assume that OpenSSL including elliptic curve support has been installed unter /opt/openssl-1.0.1g

Now coming to vanitygen: Download the zip file and extract it to your hard drive. Then modify the Makefile: At the very top of that file add the following line:

export LD_RUN_PATH=/opt/openssl-1.0.1g/lib

After that, go to the line where CPFLAGS is set. Modify it, so that it looks as follows:

CFLAGS=-ggdb -O3 -Wall -L/opt/openssl-1.0.1g/lib

Basically, the line is unmodified, except for the library path to the custom OpenSSL library, which has been appended.

That's it! Now you can compile vanitygen in Fedora as well:

make
./vanitygen 1TEST


Where does the change go in blockchain.info when using a paper wallet? When using a paper wallet as watch only  via block chain.info and you send partial amounts out from it. Where does the change go?

I've read you can lose all your coins if the client doesn't handle change properly. What's a scenario that could lead that to happen? Which apps don't handle change properly?

(I assume here that you have a simple single-address paper wallet, like the ones from BitAddress.org. I also seem to have understood that you use the Blockchain.info app to make the payment.)

You should be able to decide yourself where the change goes (using the web-apps's Custom Send feature), but Blockchain.info's default behaviour is to send it back to the original address.

Especially if you have a paper wallet with only one address, Blockchain.info won't generate new change addresses for you.

So this is what happens:

  Let's say you received two transactions on your paper wallet. One for 2 BTC and one for 3 BTC. When you try to send 1 BTC to someone, the Blockchain.info app will:

  Take an output that has at least 1 BTC. This can be done randomly, but I suppose it will take the oldest one. If you don't have an output large enough, it will combine multiple ones until they have at least 1 BTC all together. Suppose the 3 BTC output is chosen.
  It will make a new transaction with the 3 BTC as input. It will create an output for the 1 BTC you want to send to another address. It will then have to specify what to do with the other 2 BTC.
  Considering that it only knows about one of your addresses, it will use this address for change. This means an additional output is created for 2 BTC, sending them (back) to your paper wallet address. (Note that Blockchain.info charges the minimal transaction fee by default, so this will be deducted from the 2 BTC change.)

So basically, you don't have to fear for losing your coins. And you will be able to spend the change from your paper wallet automatically.

However! This type of use, is not what paper wallets are intended for. Using Bitcoin, you are supposed to use a new address for every transaction. This is to ensure your privacy. When you use your paper wallet like this, everyone you ever made a transaction to or that ever made one to you will know your balance. This is obviously not what you want. Paper wallets are originally intended to store an amount of coins safely offline. When you want to use them again, your privacy ensured only if you send them back to a regular wallet that uses change addresses like it is supposed to.


How to retrieve extended private key from extended public key + master seed / root private master key I have a master seed (I use a hardware wallet).
I know how to transform it into a (root) private key.
I have also several public keys, which all was obtained by derived a private/public keys of the root private key.
Questions:

How can I get all the private keys corresponding to the public keys mentioned above?
What is the best tool to do this thing ?

In otherm term, I want to retrive derivated private key like that:
derivated private key = function(derivated public key, master root key)

My ultimate goals is then to import all these private keys in a Electrum wallet for instance.

If you already have the seed phrase (aka mnemonic) then all you have to do is import that into Electrum.

Click File > New/Restore (ctrl+N)
Set a name
Select Standard wallet
Select I already have a seed
Enter seed phrase then click option and select BIP39 seed and the other checkbox only if you had used a passphrase to extend this seed
Choose the address type that were created by this seed and modify the derivation path if needed

Now if you want an individual private key, simply go to Addresses tab and select any address there, right click and choose Private key.
If you want to know the underlying methods used to derive the keys then check out BIP-39 and BIP-32.


Is this how to generate a bitcoin address with python? So I have already the public key. My question is if I'm applying correctly the b58 encoding, since bitcoin uses b58check, and also adds x00 prefix. Can somebody explain me that? Thanks.

import hashlib
import base58

# ECDSA Public Key
base64_str = 'MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAE7P0EE5amecnYKMlq96RUL3Q+mZJCQrta6iHyjQWtsbbgcBMayhR/CTzDi5j4Fb/wD9EclHt3dpYRyJcl9Rtmug=='

hex_str = base64_str.decode('base64').encode('hex')

sha = hashlib.sha256()
rip = hashlib.new('ripemd160')

sha.update(base64_str.decode('base64'))

rip.update(sha.hexdigest())

# Get address
print base58.b58encode(rip.hexdigest())

If the public key were correct (see Mark's answer), the code is not complete (lacks signature) and contains a hash of an ASCII hexdigest which is not correct.
I'd like to contribute with this implementation of bitcoin address from public key.
It covers the case of both uncompressed and compressed bitcoin addresses (just changing compress_pubkey boolean value).

#!/usr/bin/env python2
# https://en.bitcoin.it/wiki/Protocol_documentation#Addresses

import hashlib
import base58

# ECDSA bitcoin Public Key
pubkey = '0450863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b23522cd470243453a299fa9e77237716103abc11a1df38855ed6f2ee187e9c582ba6'
# See 'compressed form' at https://en.bitcoin.it/wiki/Protocol_documentation#Signatures
compress_pubkey = False

def hash160(hex_str):
    sha = hashlib.sha256()
    rip = hashlib.new('ripemd160')
    sha.update(hex_str)
    rip.update( sha.digest() )
    print ( "key_hash = \t" + rip.hexdigest() )
    return rip.hexdigest()  # .hexdigest() is hex ASCII

if (compress_pubkey):
    if (ord(pubkey[-2:].decode('hex')) % 2 == 0):
        pubkey_compressed = '02'
    else:
        pubkey_compressed = '03'
    pubkey_compressed += pubkey[2:66]
    hex_str = pubkey_compressed.decode('hex')
else:
    hex_str = pubkey.decode('hex')

# Obtain key:

key_hash = '00' + hash160(hex_str)

# Obtain signature:

sha = hashlib.sha256()
sha.update( key_hash.decode('hex') )
checksum = sha.digest()
sha = hashlib.sha256()
sha.update(checksum)
checksum = sha.hexdigest()[0:8]

print ( "checksum = \t" + sha.hexdigest() )
print ( "key_hash + checksum = \t" + key_hash + ' ' + checksum )
print ( "bitcoin address = \t" + base58.b58encode( (key_hash + checksum).decode('hex') ) )


Miners Create Their Own Work? Conceptually, even if the network doesn't have any "real" transactions, the very act of mining creates new transactions to be mined. Self fulfilling prophecy.

So, what is the real purpose of mining if the network is virtually dead? I suppose at that point the currency would be worth nothing and no one would mine it.

This is a bit of a philosophical question :-)

Likewise, is this similar to how pre-mining works? Where the creators mine the coin ahead of it's release?

The goal of mining is essentially to (i) create new coins out of thin-air and (ii) to secure the network from double-spending attacks.

So no, the act of mining does not create new transactions to be mined, and it does not create work for itself. It validates transactions and keeps the nodes of the network on the same state.


Bitcoin Newbie Explaination Mining Now if the question is stupid forgive me.

From what i have understood so far( i could be wrong )

Bitcoin is a digital currency service.

Q : What is difference between coinbase.com,blockchain.info and thousand other sites who give me a unique bitcoin address upon registration ? Also are those bitcoin address unique globally or per site ?

You can earn money by bitcoin mining ( letting a software solve some complex mathematical problems in your computer)

Q : why do we need to solve a problem ? cant it have like a database which checks id/password combination like paypal and others on a server ?

Q : What is difference between coinbase.com,blockchain.info and thousand other sites who give me a unique bitcoin address upon registration ?

These websites are competing web wallet providers. You can also use a mobile wallet or a desktop wallet. bitcoin.org has a list of good options.

  Also are those bitcoin address unique globally or per site ?

Each generates their own addresses, but you can send money to someone who uses a different wallet provider by sending it to one of their addresses.


Lost usb with wallet backups I was hoping someone would be able to help please?!!

I backed up my litecoin core wallet and neo wallet to my usb- today i took that usb out with me since I had other stuff on it too and needed to use it. I lost the usb like an idiot- is there a way to change the seed for my neo wallet and address for litecoin wallet so if someone finds my usb, they can't get into the wallets. I know I have backed them up on the USB but I am not sure what other info I have left on there.

I know I am an idiot- please help this idiot!!

If someone finds your USB and it has a full backup, they’ll be able to recreate your current wallets and steal all the funds. If you still have a working instance of those wallets, then you should immediately transfer all funds out of them and into new wallets. Do not use the original wallets to store funds ever again, create a brand new wallet (ie new seed) and use that from now on.

Be careful with your backups, if someone stole your coins you would likely have no recourse at this point.


Is it possible to set up an Antminer S3 using a a Raspberry Pi? Hey everyone I am new to mining and just getting into it. I have done loads of research and haven't found the answer to my question. I have seen an Avalon 6 being run through a raspberry pi and I really like the idea of doing this. This being said I haven't seen the ability to do this with an Antminer S# series, and I am unsure why. I understand that it has its own controller and is more of a plug and play. I would like to run this through the raspberry pi though as it is more mobile and in general takes less space. Below is the video of the Avalon 6 being integrated: Avalon 6 w/ raspberry pi

Thanks for the help!

An Antminer S3 operates as a stand alone computer, so you need no controller. The device is configured and managed through a web browser interface, so you can configure it from any web browser.

The only downloaded tool from Bitmain for the Antimer that runs on a PC is their "IP address finder" app, and you can use any of hundreds of apps to discover the IP address of devices on your LAN, including Fing.


Does using centralized services defeat the benefits of a distributed blockchain? I'm reading about the blockchain concepts and there is one big thing i don't get: why in fact you need blockchain services such as https://www.ibm.com/blockchain/ or https://azure.microsoft.com/en-us/solutions/blockchain/?v=17.23h

The entire concept of blockchain is that it is decentralized, doesn't going to a blockchain service break that idea entirely?

Why would someone need blockchain as a service?

I'm new to this but learning as fast as I can. Here's my understanding.

  Why would someone need blockchain as a service?

There are many applications for a decentralized database. Crypto currencies are one notable use, and (I believe) where the concept started. Blockchains could also be useful for transaction processing, identity management, logistics, medical records, etc.

  The entire concept of blockchain that it is decentralized, isn't going to a blockchain service breaks the it entirly?

It depends on the purpose of your blockchain. In the case of Bitcoin, decentralization is a core concept which the entire project depends upon. If a small business wants to use this as a way to store transactional data then a couple of servers in the US may be all they need. Hence these service offerings.


Could there be a "run" on Mt Gox? Does Mt Gox use my balance for other purposes behind the scenes? It's conceivable that Mt Gox would re-use the outstanding balances (USD or otherwise) in other investments (BTC or otherwise).

How much liquidity does Mt Gox have in BTC and Fiat dollars in case a large group of users decides to withdraw their cash (outside of trading)?

I want to make sure that Mt Gox has sufficient liquidity to handle transfers in the event they (or one of their associates/banks) repurpose stored values (in wallets etc) into other investments.

I think your question is based on the false assumption that there is some 100% safe way to store money that doesn't cost anything. Mt Gox can't stuff your money in their mattress, and even if they did someone could come along and steal the mattress. They have to sensibly balance risk and cost -- zero-risk is not a sensible or achievable goal and is not available for free.

There is always a chance that an exchange will not have sufficient liquidity to meet withdrawal demand. When that happens, they have to process withdrawals more slowly. But the alternatives are more expensive and would mean the exchange would have to charge higher commissions. Exchanges like Mt Gox have strong incentives to get this balance right -- a reputation for slow withdrawals will hurt their bottom line and, of course, high commissions drives away customers.

So you can tell how good a job they're doing by looking at how their customers rate their withdrawal experiences and what their commission rates are. If you think they're not balancing cost and risk right, use a different exchange.


What are mastercoins used for in Mastercoin? What are mastercoins used for in the Mastercoin system?

In Bitcoin, bitcoins are the only store of value and are spent as fees that the miners earn. In Ripple, ripples are used as a meta-currency accepted by everyone and are spent as fees that decrease the supply of ripples.

Does Mastercoin use any of those models? Are mastercoins the primary store of value in the Mastercoin system, or can one use bitcoins? Are they used for paying fees? If so, is anyone earning the fees and how?

From our FAQ

  The initial value for mastercoins came out of the fundraiser
  "anchoring". People were willing to "sacrifice" 1 BTC in exchange for
  about 100 MSC, so it anchored the initial value of MSC in at least
  0.01 BTC per MSC.

  The more general answer is that Mastercoin provides a set of features
  that only work with MSC or Mastercoin-based currencies, and there is a
  limited number of them. So, in order to enjoy these features, you have
  to own some mastercoins, giving them an independent value. The more
  real world usage Mastercoin sees, the higher the value of each
  mastercoin. In addition, as always, a lot of its value is currently
  driven by speculators executing a price discovery process.

  Specifically, mastercoin tokens are used for:

  Creating derived currencies and smart property are used to create
  and/or promote smart property tokens as an anti-spam measure.
  Mastercoins are used as the liquidity layer for Contracts for
  Difference The distributed exchange between Mastercoins and user
  generated currencies is more efficient than BTC<->MSC or BTC<->Derived
  exchanges - the latter require a 2 step commit process. As the
  protocol evolves, more direct usages for Mastercoins may be created.

I added this last bit about token usages to the FAQ following your questions - thanks ThePiachu for this questions!


How BitcoinJS sync bitcoin blockchain/transaction data? I see the reference code in BitcoinJS website about 'Creating a Transaction':

var tx = new bitcoin.TransactionBuilder()

// Add the input (who is paying):
// [previous transaction hash, index of the output to use]
var txId = 'aa94ab02c182214f090e99a0d57021caffd0f195a81c24602b1028b130b63e31'
tx.addInput(txId, 0)

My question is how it get the data about tx(like its inputs/outputs)? Does it link to some nodes or API like blockchain.info?

BitcoinJS does not link directly to the bitcoin network, it is simply a collection of bitcoin-related functions.

Taking your example above, if we wanted to create a transaction with BitcoinJS' transaction builder function, we would have to find the inputs ourselves via API's (or asking your own full node if you have one) and add then it with tx.addInput(txId, 0).


What does the Bitcoin community need the most now? The Bitcoin project has grown many-fold since its creation, but since we haven't taken over the world yet, there is still some room for growth;). Is there some consensus on what does the Bitcoin project need the most at the current moment? That is, if I had some manpower or money to spend, where would they be best applied to help it grow?

Be it contributing to the main client, developing alternative clients, miners, pools, exchanges, shops, or simply letting more and more people know about the Bitcoins, what are your thoughts on what is the best thing to do?

PR is the most important thing for growth right now.  There's enough basic services that you can use with bitcoin, but not enough people to use them.


How is "additional information" stored in the ledger and which blockchain projects don't allow it? So there have been these rumours going around about child abuse information being stored in the bitcoin ledger, that might make bitcoin illegal to possess.

How is this infirmation stored and are there any other blockchain projects (Ripple, Ethereum, etc.) that don't allow it?

In Bitcoin, you can use an OP_RETURN output to encode arbitrary data into a transaction output.

But there are also ways to do that without actually explicitly saying something is arbitrary data. For example, you could cut up the data into 32 byte slices and claim it is a public key. To an outside observer, it very well could be a public key. So then the person encoding the data creates a lot of P2PK outputs or a large bare multisig output with public keys which are actually the data.

In order for data to be put on the blockchain, it typically has to be transformed in some way (e.g. slicing it up) and it has to be interpreted specially in order to get the encoded data out. That someone has encoded illegal information into the blockchain is not a new idea, but in order to actually get the illegal information, you need a special decoder, otherwise it is just arbitrary bytes.


How do I submit hashes to a stratum URL? I have block hashes mined from bitcoind. I want to submit it to a pool. How do I do that?

If you are mining with bitcoind then you are your own pool. If you find a valid block then you have to submit it to bitcoind. You got the block template with bitcoind's "getblocktemplate" and now you submit the complete block with bitcoind's "submitblock".
If you want to mine in someone else's pool then you use the stratum protocol to get the work and then you submit the work results back with the stratum protocol. You don't need bitcoind when you are mining in someone else's pool.
You can't mix the two. You can't work in your own pool and send the block to some other pools to get paid there. They will not pay you for working on your own blocks in your own pool.


Eligius pool and 'generated' bitcoins I mine at Eligius pool and sometimes a new transaction appears in my bitcoin client labeled 'Generated'. Why does this happen? Do I also get these 'Generated' bitcoins if I use an e-wallet's address for mining?

Generated coins mean you are getting new bitcoins that were generated with the block.  Eligius has the pool setup to pay you out when you have over a certain amount of work put in at an address.  Rather than having all 50 coins go to his address and then pay you out, he pays everyone out directly by having the coins paid out upon generation.


Does getrecievedbyaddress work for all addresses? In previous versions getrecievedbyaddress api call returned 0 for external addresses (not included into local wallet) and it was described in the docs. However, right now documentation for getrecievedbyaddress doesn't mention externall/local addresses.

Does this mean that I can use this api call for any address?

No, it only works for wallet addresses. You can add watch-only addresses without key via importaddress, though.


Is the keypool erased when changing wallet password? In Bitcoin-qt, when a previously unencrypted wallet is encrypted, the keypool is erased and replaced with new keys.

Does this also happen when the password of an already encrypted wallet is changed?

No, because the encrypted keys don't change in that case.

When you encrypt a wallet.dat file, a random master key is generated, the master key is encrypted using your passphrase, and the actual address keys are encrypted using the master key.

When you change the passphrase, only the encrypted master key is changed.


How would the Bitcoin protocol be impacted if nodes only stored the blocks they cared about? Right now, full clients of the Bitcoin network store every block ever generated (while "thin" clients instead rely on a node which does so).  This greatly increases first-time initialisation for the client, and also has significant implications for network overhead, amongst other things.  How would the network be impacted if nodes instead stored only the headers of most blocks in the blockchain until or unless they "needed" the actual block?

These situations are fairly common, such as:

verifying the validity of each new block as it is found and transmitted to the network
any time the client is sending or receiving bitcoins
etc.

so that in general clients would still download all blocks broadcast when they were online.  However they would be able to:

purge blocks they "don't care about" if storage space is limited
in the typical case, start sending and receiving bitcoins after downloading only the few most relevant blocks (and all the headers of course)
etc.

Note that there are usually several entities "invested in" the continued availability of a given block, such as the original miner, who wants their 50 btc earned to remain valid, and anyone who received bitcoins from transactions in that block.  However, one intriguing consequence of this scenario would be that miners are incentivised to include as many transactions in their blocks as possible (currently one can mine without including any transactions if one so desires).  What would the other impacts on functionality and security be?

Edit:
I'm looking for a better answer than "I think it would destabilize the network" here--I want to see some estimated impacts on block availability, network overhead up or down once the lower amount of downloading is contrasted with re-downloading later, etc.  Some statistics on how inter-dependent blocks are alone would go a long way towards a solid answer.

Edit 2:
Right now this bounty's going to Shadders in a couple of hours.  But if anyone had more detailed info on the information I asked for in my first edit, they could definitely snipe it.  Any takers?

There is proof of concept work in progress right now to solve this problem.  Basically by creating hub nodes capable of handling many thousands of connections.  These hub nodes are in fact a proxy backed by a real satoshi bitcoin daemon.  This will relieve standard bitcoin nodes from a lot of the connections being used up by these 'selfish' nodes and allow them to continue operating as do now.  Mining pools will have a strong incentive to run hub nodes as it will speed up propogation of their generated blocks as well as ensure they have the best chance of getting new blocks as quickly as possible.


What is the minimum that has to be backed up on a cryptocurrency wallet (technically)? Is the seed enough? Doesnt it require the seed AND the adresses to access your assets, since the root key and therefore all private keys are generated by the seed?

Does it generate the private key for each adress by seeding the root key and the adress?

Thanks for any enlightment.

technically the minimum you must backup are your private keys.

Is the seed enough? if you used a program which generates a wallet by a passphrase/seed it should be enough to save the passphrase/seed. test it to be sure.

i don't think you must really backup your public key or adress because it can be generated by your wallet with your private key/passphrase/seed.


How to figure out the coordinates of a compressed G point? I really can't get my head around this ECDSA thing... So far I know that it's used for validating transactions by having a private key sign its signature to the transaction. I've come to the math part of ECDSA, but I just can't find any sources that are newb-friendly or explain everything to detail. I've checked out the datasheet for the secp256k1 and all the recommended values for the different variables. In the datasheet there's the G point, which is in both compressed and uncompressed form, but I just don't get how I figure out the X and Y value, the actual coordinates, the location of the base point?

Does anyone have any SUPER well explained guide or something on how the math behind it works? It's for a really important assignment due thursday.

Thanks in advanced.

Actually the compressed form in hex is 02 + X_coordinate if Y coordinate is even, or 03 + X_coordinate if Y coordinate is odd; comparing to the uncompressed form is 04 + X_coordinate + Y_coordinate.

So to retrieve the coordinates from the compressed form, just calculate the Y coordinate by curve equation Y^2 = X^3 + a*X + b, there will be two Y values, then choose the correct one by the prefix which is 02 or 03.

You will get the actual coordinates of the point.


What is a brief summary of the ECB's report on virtual currency? On 29th Oct 2012, the European Central Bank released this report on virtual currency.

What is a summary of its comments on Bitcoin?

In the ECB's view,  (Bitcoin) can be used by business (criminals), customers (fraudsters) and savers (money launderers) to perform legal (illegal) activities, but lets ignore it until volume reaches a level where comparison with sovereign currencies reflects negatively on our reputation. The public will then expect us to regulate such digital (rogue) systems (schemes).


Mining Theory: A theoretical mining based attack Okay, so, here is my scenario:

Imagine a group of miners who are mining a coin are responsible for a large portion of the hash rate on the network (let's say not quite 50%). Looking at the parameters of a coin, one can easily deduce when difficulty re-targeting will occur.

So let's say the group of miners stop mining the coin for the duration of a difficulty re-targeting window, causing a sharp decline in the hash rate, and thus very likely the rate at which blocks are being found, ultimately causing the difficulty to drop. They then all band together and start mining the coin again, with the significantly reduced difficulty and are able to mine blocks much faster for the duration of the difficulty re-targeting window.

Is there any known cases of this occurring, and what preventative measures could be taken to avoid this? I realize this is akin to a 51% attack, with a few key differences. Any thoughts/comments would be appreciated!

Schwifty

Is there any known cases of this occurring

Yes, see Bitcoin Cash. While Bitcoin Cash had their "Emergency Difficulty Adjustment" algorithm in place, many miners would game that to cause the difficulty to significantly decrease and then quickly mine many blocks again to generate Bitcoin Cash much faster.

  what preventative measures could be taken to avoid this?

You could use an algorithm which does more than just the simple difficulty adjustment algorithm that Bitcoin uses. If you do something that adjusts more frequently or has overlapping windows, you can avoid this issue as the difficulty would ramp up and down more quickly to compensate for the sudden influx of miners. However, such an algorithm could cause the difficulty to oscillate and generally behave strangely, so you will want to do simulations and study the algorithm before deploying it to an actual coin.


I have my public key and my recovery passphrase. How do I get my private key to that address Hi I have my public address and my recovery phrase how do I create my private key for the public Bitcoin address.

As long as you have the recovery phrase, you can recover it on whichever software you generated the seeds on.

If you forgot the software or service that generated your seeds then you will have to quickly use the most trusted seed recovery service (such as blockchain.info or electrum) and after you recover the seed, immediately generate a new address or wallet and send all your coin to that address to avoid getting your coin stolen unless you planning to use that most trusted software.

Never have anyone to manually recover for you or use the untrusted source as your coin may immediately get stolen before they give you the key.


How do I build Bitcoin source in Windows 7? I am trying to build the current Bitcoin source in Windows 7x64 - Does anyone know of an idiot-proof tutorial? Some of the steps in the included doc give me errors.

When I try to tar openssl with msys, I get symlink errors.

Is there a better walk-through?

Take a look at Windows Build Instructions By Matt Corallo, it's outdated, but has some additional comments to the included doc.

  Install:

  MinGW Automated Installer from
  http://sourceforge.net/projects/mingw/files/OldFiles/mingw-get-inst/mingw-get-inst-20110316/.
  Install with the C++ and MSYS options checked.
  Activestate Perl (for building openssl) from
  http://www.activestate.com/activeperl/downloads.  You don't need
  anything except ActivePerl and Perl, none of the other fancy crap.
  You do want to add Perl to your PATH (its an option in the
  installer).

  Download:

  WxWidgets 2.9.1:
  http://sourceforge.net/projects/wxwindows/files/2.9.1/wxWidgets-2.9.1.zip/download.
  Unzip to C:\wxWidgets-2.9.1-mgw
  OpenSSL 1.0.0d:
  http://www.openssl.org/source/openssl-1.0.0d.tar.gz.     Untar  to
  C:\openssl-1.0.0c-mgw (yes bitcoin is designed to build with
  1.0.0c, but might as well use the latest version since it works right?) Hint: untar using the tar binary which is included in MinGW (do not use 7-zip, it will not handle symlinks correctly) using cd \c\ && tar xvvf\c\Users\Matt\Downloads\openssl-1.0.0d.tar.gz && mv openssl-1.0.0d openssl-1.0.0c-mgw in the msys shell
  Berkeley DB 4.7.25 NC: http://download.oracle.com/berkeley-db/db-4.7.25.NC.zip.  Unzip to C:\db-4.7.25.NC-mgw
  Boost 1.43.0:
  http://sourceforge.net/projects/boost/files/boost/1.43.0/boost_1_43_0.zip/download. Unzip to C:\boost-1.43.0-mgw
  Boost Jam:
  http://sourceforge.net/projects/boost/files/boost-jam/3.1.18/boost-jam-3.1.18-1-ntx86.zip/download. Unzip wherever you like, I used C:\bjam
  miniUPnPc binary
  http://miniupnp.tuxfamily.org/files/download.php?file=upnpc-exe-win32-20110215.zip.
  Unzip to C:\upnpc-exe-win32-20110215
  miniUPnPc source
  http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.5.20110215.tar.gz. Untar to C:\upnpc-exe-win32-20110215\miniupnpc (you only need *.h, but the others won't hurt) untar with cd \c\upnpc-exe-win32-20110215 && tar xvvf \c\Users\Matt\Downloads\miniupnpc-1.5.20110215.tar.gz && mv miniupnpc-1.5.20110215 miniupnpc

  Note that the reason for using the binary miniupnpc release is that I
  was unable to get it to build on my system.

  Add C:\MinGW\bin to your PATH environment variable (Google is your
  friend as it depends on your Windows Version).

  In the DOS Shell:

  wxWidgets:

cd \wxWidgets-2.9.1-mgw\build\msw
mingw32-make -f makefile.gcc

  Boost:

cd \boost-1.43.0-mgw
\bjam\bjam.exe toolset=gcc --build-type=complete stage

  In the msys Shell (MinGW shell in your start folder or
  C:\MinGW\msys\1.0\msys.bat):

  OpenSSL:

cd /c/openssl-1.0.0c-mgw
./config
make
perl util/mkdef.pl 32 libeay enable-static-engine > libeay32.def
dllwrap --dllname libeay32.dll --output-lib libeay32.a --def libeay32.def libcrypto.a -lws2_32 -lgdi32

  Copy the libeay32.dll file
  to the folder where you are building/running bitcoin.

  Berkeley DB:

cd /c/db-4.7.25.NC-mgw/build_unix
sh ../dist/configure --enable-mingw --enable-cxx
make

  Bitcoin

  If you wish to use git to pull keep a local repository, you'll have to
  download msgit from
  http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.4-preview20110204.exe&can=2&q= . Otherwise, you can download the latest zip of bitcoin from
  https://github.com/bitcoin/bitcoin/zipball/master In the msys shell,
  cd to the unzipped location and

make -f makefile.mingw

  Run with ./bitcoin.exe (make sure you have the libeay32.dll in bitcoin
  folder)


is it necessary to stay connected to internet it could be a basic question for you guys, but i'm new in this.

is it necessary to stay connected to internet while doing solo-mining ?

is there any method to keep mining without permanent internet connection (i mean offline mining)?

thatnk's

You need to be online because mining is sort of like a mathematical race: whoever finds the hash of the next block (with value less than the current target) wins. And in order to prove that you found this value before anybody else, you need to be online in order to broadcast it to other users.


Multisignature: what happens if the number of signatures exceeds the "threshold" number of public keys? Let's say a coin has been locked with a 2-of-3 challenge script. In other words, spending the coin requires two signatures, each of which matches one of three designated public keys.

Now I try to spend the coin with a transaction containing, not two signatures, but three. All three signatures are valid and match a different designated public key.

The complete validation script will contain eight values:

<3>
<PK1>
<PK2>
<PK3>
<2>
<SIG1>
<SIG2>
<SIG3>
<0>

AFAIK, the only way for the interpreter to know the number of signatures is the value <2>, which was provided by the challenge script, not my response script. It seems that the only way for OP_CHECKMULTISIG to know how many signatures to pop is the value <2>.

However, popping only two values leaves the stack like this:

<SIG3>
<0>

Then the interpreter checks to see that the next value on the stack is 0, which it is not:

https://github.com/bitcoin/bitcoin/blob/0.10/src/script/interpreter.cpp#L894

As I understand it, this scenario should lead to failure of the verification script.

Is this correct?

Then the interpreter checks to see that the next value on the stack is
  0, which it is not:

I am not sure, but pushing OP_FALSE is not a requirement, but some kind a mumbo-jumbo to fix the bug in the very first (and still current) implementation of OP_CHECKMULTISIG :)

In fact, you can push 3 or even more signatures redeeming 2-of-3 multisignature output. Not all miners will accept this transaction, because it is non-standard. But it will be valid.


ECDSA transaction signing on a smartcard? I know that the underlying digitial signing method Bitcoin uses for transactions is ECDSA (sep256k1 if memory serves). I've also read a few papers about performing ECDSA signing on certain kinds of smart cards. Has anyone merged these concepts and made (or attempted to make) a smart card that can sign a transaction with an internally-held private key?

Yes, there is Smart Card Wallet project, though there seems to be no clear indication on what stage the project currently is.

There is also hardware wallet by Slush. It's not smart card based, but works pretty much the same way. Also still in development.


Can I recreate a wallet using on my priv/pub keys only? If I lose my wallet (let's say it is hosted with a company that went bust) can I recreate that same wallet with another provider using only the private/public key pair I had with my original wallet?

Yes, you can create a wallet with your key and will have access to the coins at the key's address.
Since a wallet typically contains many keys (=bitcoin addresses), however, you will not be able to reconstruct the whole wallet file.


How can i send bitcoin using c# and the nbitcoin library? I am using NBitcoin library to create my private keys and addresses, but I can't find an example of how to send Bitcoin.

Does anyone have a c# example code to send Bitcoin using the NBitcoin library ?

You can find an example here.

Specifically, see the first example where Alice sends bitcoins to Satoshi:

Transaction aliceFunding = new Transaction()
{
   Outputs =
   {
       new TxOut("0.45", alice.GetAddress()),
       new TxOut("0.8", alice.Key.PubKey)
   }
};
Coin[] aliceCoins = aliceFunding
                    .Outputs
                    .Select((o, i) => new Coin(new OutPoint(aliceFunding.GetHash(), i), o))
                    .ToArray();

Notice the outputs (Alice's initial coins). The first uses GetAddress() to get the bitcoin address corresponding to Alice's private key (i.e. P2PKH) while the second uses Alice's public key (i.e. P2PK).

And the transaction is constructed here:

var txBuilder = new TransactionBuilder();
var tx = txBuilder
    .AddCoins(aliceCoins)
    .AddKeys(alice.Key)
    .Send(satoshi.GetAddress(), "1.00")
    .SendFees("0.001")
    .SetChange(alice.GetAddress())
    .BuildTransaction(true);
Assert(txBuilder.Verify(tx)); //check fully signed


List of different unknown mining pools A miner can identify himself when he receive  his coinbase transaction, we can view them on website offering block explorer like https://www.blockchain.com/charts/pools
Some of these miners are listed as Unknown because blockchain.com has been unable to identify them

A large portion of Unknown blocks does not mean an attack on the network, it simply means we have been unable to determine the origin.

But when we click on one of those block mined by an Unknown miner we can see that most of them reuse the same addresses for their coinbase transaction but blockchain.com does not seem to list those reused Unknown address, is there a place to see a listing of those unknown reused addresses so that we can know how concentrated those miners are, or at least what they want us to know because I guess each time it could have been the same miner using a different addresses.

Source: https://btc.bitaps.com/blocks
blockchain.com mentioned unknown for block 649390
Whereas btc.bitaps.com shows "Huobi" as mining pool for the same block: https://btc.bitaps.com/649390
Coinbase text: =h_HZ/HuoBi/mmwta@F,Cn3ǐIK(


Bitcoin library vs script to develop application I'm curious about the development of application of Identity management in Blockchain platform, but I'm a bit confused about the technologies to use.
In short words, when is more convenient to develop an application coding in script and when is it better to use a high-level library like BitcoinJ or a service as Blockchain.info API?
I'm a Java developer and I'm more confortable using a Java Library like bitcoinJ, but I don't understand if, in this way, I can lose something in performance or expressivity or "semantic power" in regard to most raw-level scripting system of Bitcoin (that is a kind of assembler).
Thanks you in advance

Before you take on trying to use Script I recommend doing whatever you can with an existing API. I've used Blockchain.info's which has worked well.

Here's another API package for Java that might work for you https://github.com/blockchain/api-v1-client-java

Once you have gotten comfortable with the abstracted interface, and have a need to go lower level, go for it. That being said, you may find Blockchain to propagate transactions more quickly than your own server since it has many many peers.


What exchanges support Tenebrix? Where can one exchange Tenebrix (a CPU-friendly cryptocurrency) for Bitcoin?

BTC-E.com currently supports trading pairs of BTC/USD, GG/BTC, SC/BTC, SC/USD and TBX/BTC. At the moment I believe it is the only exchange currently supporting Tenebrix.


Where can one find the Bitcoin core roadmap? Is there a site where it shows the current Bitcoin core roadmap on what features will be implemented in the future?

Refer to https://bitcoincore.org

It contains plans for releases, features (sometimes ) announced on the blog, IRC meeting notes and you can also subscribe to announcements here: https://bitcoincore.org/en/list/announcements/join/. Note that if you want to see which issues and PR's are scheduled for the next release, you can search by milestone. Eg. is:open is:pr milestone:0.17.0

Potentially the most up to date (and accurate) would be the Bitcoin Github Repository. Potential features and bugs can be found on the Issues page as well, and code that is proposed for merging on the Pull Requests page. It will usually also include comments from collaborators that can give an idea of when it might be implemented.