Why does vanitygen ban certain letters on testnet?

The rules are the same, but the available range is different. In the testnet the address prefix is 111 (https://en.bitcoin.it/wiki/List_of_address_prefixes).

To deduce the address you write in base58 the prefix concatenated with a 160 bit (20 bytes) hash of the public address and a checksum of 4 bytes (https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses). This makes a total of 25 bytes.

With a 111 prefix you have all the numbers between 111*2^(24*8) and 112*2^(24*8)-1. In binary form you have values from

1101111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
to

1101111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

which is 111 (in binary 1101111) and all the possible combinations of the hash and checksum values.

If you write the numbers from 111*2^(24*8) to 112*2^(24*8)-1 in base58 encoding (https://en.bitcoin.it/wiki/Base58Check_encoding) you have the range from:

mfWxJ45yp2SFn7UciZyNpvDKrzbhuzkU7H
to
n4rZHAPGXCu8bYchjzJhK3V7VVredELJRc

All your proposed addresses are below the first possible one.


Currently, the only functional bitcoin bridge the client directly uses is operated by Bitstamp. The time until they issue a matching bitcoin transaction is completely dependant on how well Bitstamp's automation and bitcoin transaction batching is working.

The Ripple side of the transaction completes within seconds. When Bitstamp is operating "correctly" the bitcoin transaction is initiated within seconds or a couple of minutes. Then of course you'll need to wait for however many bitcoin confirmations the receiver requires.

Once the Ripple side of the transaction completes, if there are any further unexpected delays or problems the sender will need to enter a support ticket with the brigde operator (Bitstamp for now) to have someone there look into the issue/problem. For example, a week or so ago, their automation stopped processing most Ripple transactions and it took quite a long time for their support to straighten everything out.


How to avoid "single point of trust" in online bitcoin exchange sites

The Bitcoin Wiki (in the linked article for multisig) cites a post on BitcoinTalk describing nearly the same problem that you did:

Suppose I am working with a company that wants to accept Bitcoin for international trades.
The company, for security reasons, would not want a single one of its employees to have access to the company BTC wallet's password. Any transaction would have to meet the approval of more than one employee.
Is this possible already? If not, how could it be implemented with public-key cryptography?

One common solution to this problem is multisignature (commonly abbreviated as multisig).
Most Bitcoin transactions (the ones created by users like you and me) require only one signature — that of the owner of the private key that corresponds to the Bitcoin address. Multisig comes into play by requiring a certain number of signatures for a transaction to be verified. The Bitcoin Wiki gives a few examples of this. The following examples use M-of-N transactions, meaning that M users (out of N users who are able to sign the transaction) must sign the transaction for it to be verified:

1-of-2: Husband and wife petty cash account — the signature of either spouse is sufficient to spend the funds.
2-of-2: Husband and wife savings account — both signatures are required to spend the funds, preventing one spouse from spending the money without the approval of the other
2-of-3: Parents’ savings account for child — the kid can spend the money with the approval of either parent, and money cannot be taken away from the child unless both parents agree

Specifically in regards to your question, 10 executives or employees of a Bitcoin exchange may have the private keys associated with a multisignature address; a combination of any 5 of those private keys may be required to send bitcoins from this address (this is a 5-of-10 transaction in the M-of-N transaction format).
This doesn't guarantee the bitcoins won't be stolen. 5 "evil" employees could collude to steal the bitcoins without the other 5 "good" employees knowing. However, this is a much more trustworthy system than a single employee being able to steal all the bitcoins (as could happen with a "standard" bitcoin address if an "evil" employee had access to the private key).
However, you might notice some flaws with this in regards to a Bitcoin exchange. Wouldn't it get tiresome for the 5 employees to constantly sign a transaction to provide withdrawals to users? The answer is yes, which is why companies implement a "hot wallet" — a wallet that holds a fraction of the bitcoins the company actually owns (the rest of the bitcoins are in a "cold wallet", which would probably be the multisig address). I'm not sure of the exact process exchanges use to send bitcoin from the cold wallet to the hot wallet (and I'm sure it differs from company to company), but I would guess that every once in a while, if the hot wallet is running low on bitcoin, M employees would verify a transaction from the multisig wallet to the hot wallet.
The hot wallet is totally susceptible to being stolen by a single "evil" employee (since it's most likely not a multisig wallet for efficiency, and thus has only one private key), or to being stolen by a thief, but companies would much rather only lose a fraction of their bitcoins (a hot wallet) than all of their bitcoins (a cold wallet).


Find sender's public key in SegWit Transaction

The public key that you mentioned is indeed the key that was used to derive the P2SH(P2WPKH) address: 35yfMa3CRBiWny8DFdb4tUu9fn7fcdvVp9. The way in which a P2SH(P2WPKH) address is derived is as follows:

1. witness_script = hash160(pub_key) #this is equal to '4b9d2d3dd1174ad656754a0c664e7a129b131f3b'
2. witness_version = 0x00  #current SegWit version
3. scriptSig = witness_version + OP_DATA(0x14) + witness_script
#Above is equal to '00144b9d2d3dd1174ad656754a0c664e7a129b131f3b' and is the one you are seeing in the scriptSig in the explorer.
#0x14 tell the script to push the next 20 bytes to the stack
4. public_address = hash160(scriptSig)
5. bitcoin_address = base58check(public_address) #with prefix of 0x05
result = 35yfMa3CRBiWny8DFdb4tUu9fn7fcdvVp9

Native SegWit transactions works by locking an output with scriptPubKey: version + OP_DATA (bytes to push) + witness_script. For older clients, this looks as if it is any one can spend transaction, as it does not have an opcode verifying anything. So in order to take advantage of lower fees of spending SegWit transaction, but at the same time be compatible with wallet software that are not SegWit aware, we use the scriptPubKey as the script and create a P2SH locking script out of it. So the locking script is: OP_HASH160 <public_address> OP_EQUAL. (public_address convention is same as the one I mentioned when deriving the address above). So a customer can send you bitcoins without upgrading his wallet software to be SegWit aware, but when spending the bitcoins, you can take advantage of lower fees of SegWit.

Now, in terms of verification when this output is spent in a transaction: Older clients verifying the transaction will just look at the scriptSig, take its has160, verify with the public_address and consider this transaction to be valid. Newer clients will realize that the scriptSig is in itself a SegWit and will look for signatures in the Witness part of the transaction. There the clients will verify that the hash160 of the public key is equal to the witness_script and then the signature matches the public key when signed with the transaction as a message. The signature message digest is described in BIP 143.


Why can't I participate on bitcointalk.org?

You should first make some posts on the Newbies forum. This post explains the restrictions.

  Newbie Restrictions You can only post in the Newbie and Local
  sub-forums till you have 5 posts and at least 4 hours on the forum.
  The other two restrictions are you need 1 post to be able to send a PM
  and 10 posts to put a link in your sig.


What is the address format of a lightning network address?

The Lightning Network does not use addresses for payments within the network.

When you want to pay someone, you will be given a Lightning Invoice (specified in BOLT 11) which will look like a very long address. These invoices specify various parameters of the payment you will make except for the amount itself. It provides the information necessary to route a payment to the recipient.

However Lightning invoices are different from addresses. Besides being very long, they are actually one time use as you can't use the same hash preimage for multiple transactions over LN. They are also much longer than addresses; these invoices aren't things that you would want to read out to someone. Although they still use Bech32 for encoding, Lightning invoices are completely separate from Bitcoin addresses and unrelated to Bitcoin addresses.


For every new block, does the miner need to read through all historical transactions?

The super naive implementation would require the miner to go through the entire blockchain. However software developers are smarter than that. Each node instead maintains a chain status. This includes it's blockchain tip (the most recent valid block), the UTXO set, and the verification status of all previous blocks. When a new block is created, the node only needs to consult its internal chain status. Using the UTXO set, it can verify whether each transaction in a block is valid. It also knows the previous blocks validity, do it does not need to go back through the blockchain and reverify those blocks.

There can be further optimizations too. Since most transactions in the block would have been unconfirmed, the node is likely to have seen them before. When it receives an unconfirmed transaction, it will verify it too. So once it receives a block, it can just check whether a transaction was one it had seen and verified before and skip its verification if it has.


How does the Electrum wallet encryption work?

Looks like only the private keys are encrypted. Your addresses are stored unencrypted, so the software can show your balance without requiring a password.


You are correct in your understanding: the arguments to the RPC call are just public keys (or addresses, which are hashes of public keys), and if you don't hold all the corresponding private keys, you won't be able to spend coins sent to the resulting address.

But it's far from useless.  The main application of multisig addresses is to require the approval of multiple people in order to spend them, rather like needing two signatures on a check.  In that case, it's desirable for no one person or computer to ever be in possession of all the corresponding private keys  (because then anyone with sufficient access to that computer could spend the coins unilaterally).  Rather, when it's time to spend the coins, the key holders affix their signatures one by one, without ever sharing their private keys with one another.  So in fact, if addmultisigaddress required all the private keys to be available, it would be nearly useless.

For further details on multisig addresses and how to use them, see the rather extensive answer by almel to How will multisig addresses work? And as with any open-source software, the ultimate documentation is the source code.


On my first shopping via bitcoin I get "The fee for this transaction seems unusually high. (20%)" What to do about it?

This is expected, given the current mempool situation.
There are over 100k transactions pending as of this answer's writing. This has resulted in the fees rising significantly, up to 10x of what you might pay normally.
As your overall transaction value is small, this results in the warning showing up. The warning itself was added to prevent people from paying absurdly large fees. In your case, as the amount is small, the fee is proportionally considered large.


How does one programmatically "walk-back" on the block chain?

The "blockchain" is a conceptual structure that is not directly represented in a program. If you were writing a program to work with the blockchain, you get to choose how you would implement it in a data structure.

If your data structure is a linked list, you would follow the back link pointer to the previous block
If your data structure is a hash table, you would look up the previous block hash in your table to find the previous block
If your data structure is an array, you would look in the previous array slot to find the previous block

As you can see, there are many possible choices one could make when representing the blockchain in memory. This is further complicated by the fact that the blockchain is probably too big to load into memory all at once, so you would probably need to involve some kind of on-disk storage too (a database perhaps).


Use BitWasp Bitcoin-php library
https://github.com/Bit-Wasp/bitcoin-php

<?php
use BitWasp\Bitcoin\Bitcoin;
use BitWasp\Bitcoin\Key\PrivateKeyFactory;

$network = Bitcoin::getNetwork();
$privateKey = PrivateKeyFactory::create(true);
$publicKey = $privateKey->getPublicKey();
$address = $publicKey->getAddress(); // returns AddressInterface
echo $address->getAddress($network); // prints address for $network as string

If you want to create Bitcoin address from Public key string check documentation for Factory classes

or newer versions:

<?php
use BitWasp\Bitcoin\Bitcoin;
use BitWasp\Bitcoin\Address\AddressCreator;
use BitWasp\Bitcoin\Key\PrivateKeyFactory;
use BitWasp\Bitcoin\Key\KeyToScript\Factory\P2pkhScriptDataFactory;

$network = Bitcoin::getNetwork();
$privateKey = PrivateKeyFactory::create(true);
$publicKey = $privateKey->getPublicKey();

$addrCreator = new AddressCreator();
$factory = new P2pkhScriptDataFactory();
$scriptPubKey = $factory->convertKey($publicKey)->getScriptPubKey();
$address = $addrCreator->fromOutputScript($scriptPubKey); // returns AddressInterface
echo $address->getAddress($network); // prints address for $network as string


outputScript in 78203a8f6b529693759e1917a1b9f05670d036fbb129110ed26be6a36de827f3:0 is PUSH {pubkey} OP_CHECKSIG (p2pk) so you should put only signature in final transaction without public key


I have several savings accounts that earn bitcoin on bitcoin (Magnr, BTCPop, exchange lending, etc) and I do not convert earned bitcoin back to US dollars (for now). I do keep records of the total earned bitcoins for the accounts, but those are still in bitcoin. Since this hasn't been converted to US dollars or any other fiat, what is owed on taxes at what cost basis, or do I wait until I convert these gains to US dollars?

The cost basis is zero since there was no cost for you to acquire the bitcoins. It's just like interest. You have ordinary income equal to the fair market value of the bitcoins at the time you acquire them. When/if you sell them, your basis is also the fair market value at the time you acquired them.

  Example: I earn 5 bitcoin on 100 bitcoins saved at BTCPop, but since I haven't sold those 5 bitcoins, there isn't an official US dollar cost basis that I'm aware of. How are these 5 bitcoins taxed, or are they taxed when I finally sell them to US dollars or other fiat?

They are taxed based on their fair market value, just like any other income. The amount you paid taxes on becomes your basis.

  I buy a bitcoin at $400. I take that bitcoin and swap it for Monero at $4. I had 1 bitcoin that I swapped for 100 Monero. Do I owe taxes when I swap from bitcoin to Monero, or when I swap back to US dollars or another form of fiat?

You owe taxes on that trade if you had a gain. If you bought the bitcoin for $400 then that's your basis. If the Monero is worth, say, $1,000, then you have a taxable gain of $600. Your basis in the Monero would then be $1,000.


What is the best consumer grade hardware for litecoin mining?

Given that I already have a desktop, and with the investment of < 500$ for GPUs, what is the best hardware to mine litecoins?

You would probably want to invest in 1 AMD Radeon card, for example 280x or 290. This is private opinion based, but AMD seems to provide good hash rate for money. Have a look at litecoin hardware comparison site for the estimated hash rate.

  Is it worth mining litecoins with such hardware?

If you can get around 750 KH/s, this would yield around $130 over 30 days (source). Note the price is fluctuating a lot, so by no means this is set in stone.

  Are ASICs available for litecoin mining?

No, there aren't at the moment. It takes time to develop and test custom circuit. Not advertising here, but this company appears to offer two models: 5 MH/s (£1350) and 25 MH/s (£5450) with the release date due in Q2-Q3 2014. It's up to you if you would trust them and pay a deposit. Obviously, there will be many others cooking similar stuff in the next half a year (Q1-Q2 2014).


You'd have to get creative here.

Step 1) Get unspent outputs. https://bullpay.com/docs#GetUnspentOutputs
You can build your unspent outputs from multiple wallets. As long as you have the private keys, it can be done.
Step 2) Build your signed transaction. https://medium.com/coinmonks/how-to-create-a-raw-bitcoin-transaction-step-by-step-239b888e87f2
Step 3) Send your signed transaction. https://bullpay.com/docs#SendTransaction or use a node.

The part you'll want to repeat is in step 2. Building out the inputs each using their own private keys. The tricky part here is waiting long enough to have multiple outputs to warrant going through all this.


What will happen to Bitcoin when it takes years to complete a calculation?

Mining is a self-adjusting system. The difficulty only rises in accordance to the available mining power. Hence, it can neither go to a difficulty where it will take months for a block to be found, nor can it become prohibitely expensive to mine.

Also see How is difficulty calculated?.


Where are getnetworkinfo localservicesnames explained?

You can find a list of the assigned (through the BIP process) service flags in the wiki protocol documentation.
The service flags supported by the reference client are defined in src/protocol.h .


How long does it take to recieve bit coins?

The amount of time it takes for your transaction to be processed all depends on the rate at which blocks are being mined.

When you spend your bitcoins, they go into the mempool, a place where all incoming transactions wait to be picked up by miners and put into a block. Sometimes, your transaction can get verified immediately, just because a miner is lucky and finds the golden nonce extremely fast. Other times, it can take miners tens of minutes to find the nonce.

While this probably does not apply to your case, if you are spending a large quantity of bitcoins to purchase an item from a vendor, the vendor will often wait till your transaction is 6 blocks deep in the chain to make sure it does not get orphaned or someone attempted to create a fraudulent chain.


Why is my Bitcoin transaction taking so long

The transaction appears to have a very low "fee per byte" of 20.09 satoshis per byte.  A transaction I just completed got confirmed 5 times within 30 minutes or so with a fee per byte of 298 satoshis/byte.

You need to make sure the fee you specify for the transaction is attractive to miners, otherwise it will take a long time for the transaction to be confirmed.

Earn.com has a great bitcoin fee tool at https://bitcoinfees.earn.com/ (I'm not associated with Earn in any way)


MultiBit Password Protection - How Secure is it?

The password is required to spend the coins.  This is the purpose of the password.

Multibit does not consider it to be a security problem if people who steal your wallet can see the balance.  If you have a problem with that, you should encrypt your wallet with a program such as TrueCrypt.


When you mine bitcoin, where does it come from?

Short answer, but it really only scratches the surface:

The same process that is called "mining" also creates those Bitcoins. Meaning, you actually create them yourself but it can only done by solving a very difficult mathematical problem. The first one to solve that problem will get the reward. It is also important to mention that by solving of that mathematical problem the integrity of the Bitcon network is created (in terms of secure transactions).
There some exchanges, like Mtgox, BTC-e, Kraken, to name only a few where you can exchange Bitcoin for real money though the process of actually getting the money to your banc account can be very lenghty. There are also also a few Bitcoin ATMs, for instance in Canada of Finland and there are also sites where you can find people in your area who are willing to exchange your Bitcoins for real money.
This is hardcoded in the software used by the computers which creates the Bitcoin network. Roughly every 10 minutes, a new "transaction block" is created and as fixed reward is issued for this task. Currently this reward is 25 BTC but it will get lower continuously until around the year 2140 it will drop to practically zero. At that point 21 million Bitocins will have been created and that is the total sum of all Bitcoins that will ever be created (unless the software used by the Bitcoin nodes is changed in that aspect).

The most important point to realize about Bitcoin and what many people get wrong in the beginning is that there actually is not thing like a "Bitcoin". You do not have some kind of encrypted files in your wallet that represent a Bitcoin. The Bitcoin network essentially is a kind of distributed ledger system that keeps track of all transactions made within that system resulting on certain amounts of "Bitcoin" associated to a certain address (or account number). If you send somebody Bitcoin, you will actually transfer it from one address to another. Do be able to do that, you need to be in the posession of the private key for that address. This private key is what is stored in your wallet.

But you should really check out some of the great resources about that topic. For instance, check these out:

Primer:
http://www.youtube.com/watch?v=Um63OQz3bjo

More In-Depth:
http://www.youtube.com/watch?v=O0oDDIy0P2s


What does blockchain.info wallet need your email for?

From the wallet settings in mobile app:

  Your verified email address is used to send login codes when suspicious or unusual activity is detected, to remind you of your wallet login ID, and to send bitcoin payment alerts when you receive funds.


people requesting to connect and mine on facebook are legit?

I would stay away from all of these. Nigerian princes are on facebook too. Their tactic is probably to:

Find a person who is interested in bitcoin, but has little technical know-how about the system.
Convince them that they can make easy money. Throw in some buzzwords, make it seem like they are doing something nobody else is doing.
Gain access to their private keys by convincing the user to share them. If this does not work, convince the user that they need to install a bit of software to get the mining to work / to work faster. This software is most probably a keylogger and a mining tool that mines crypto without the user's knowledge.
Profit and Repeat.

Never trust something told to you by a single user on the internet. Even this post. Always verify the information at different parts of the internet. In this case: the stackexchange page, the bitcoin subreddit, the bitcointalk forum. These are hubs for people with the same interest and deep technical knowledge.


How do Bitpay invoices hide the Bitcoin address to pay to? I want to pay with another wallet.

Bitpay uses the BIP 70 Payment Protocol. This protocol does not use addresses, which is why they are able to now show an address. Rather, the Bitcoin URI that you are given (either you scanned it with a QR code reader or you entered it into your wallet) points to a place where your wallet can download a PaymentRequest. The Bitcoin URI format for pointing to the PaymentRequest download location is specified by BIP 72.

The PaymentRequest that is downloaded contains a list of outputs (amounts and scriptPubKeys) that Bitpay wants you to have in your transaction. These outputs do not contain addresses; instead they have directly the scriptPubKey that should be in the output. This allows for forward compatibility with other new script or address types that did not exist at the time of BIP 70's writing.

  but I'd like to extract the Bitcoin address from the bitpay invoice manually myself.

You can download the PaymentRequest as a file from the URL specified by the PaymentRequest. That PaymentRequest encoded using Google's Protocol Buffers with the fields specified in BIP 70. So using a Protobuf decoder, you can get each specific field of the PaymentRequest, and from there, each field of each output, and then convert the output scripts to addresses if those scripts even have addresses. I have a slightly outdated project that runs locally to do all of this for you.


People who don't broadcast their IP address?

Sure. Install Tor and add tor=1 to your bitcoin.conf.


Why is the Winklevoss ETF decision so important, when this tracker certificate already exists?

This ETF is for US people and would be traded on BATS exchange. US is a big financial market. Plus it's a hot topic because famous Winklevoss brothers are behind it.


Is it considered safe to create a wallet on blockchain.info?

Web wallets in general don't really make sense by bitcoin principles.

But to not make this into a service review: the wiki is managed in a git repository at guthub. Discussions happen there before changes are made. One such discussion happened here: https://github.com/bitcoin-dot-org/bitcoin.org/pull/663

Note that there may have been newer pull requests in the meantime.

Edit: per request, the gist of above link, the complaints about bc.i are:

  Bugs and losses: BC.i has suffered from concerning issues during the
  past year (e.g. iOS denomination bug, weak key stretching, sizeable
  number of users losing funds, and more issues I haven't verified yet)

  Backup/Password Security: BC.i hasn't adopted security features which
  are slowly becoming standard in other wallets (e.g. BIP32, random
  passphrases, backup on setup, rotating addresses, 2FA by default).

  Transparency: Source code of the app has been reset or not updated
  repeatedly, making bitcoin.org often relay the false claim that the
  app is open-source.


Why was this transaction allowed on testnet?

For example, bitcoin core 0.10 enables only 40 bytes in OP_RETURN, but I'm not sure if 0.10 is the latest version allowed on the testnet.

40 bytes in OP_RETURN has always been legal. It was just non-standard, meaning that the standard client wouldn't mine or relay those transactions, but would allow them if they were already in a block.

However, testnet disables all standardness rules.

  Is the code for the testnet differences within the most recent bitcoin github repo, or is it a separate repo I must download, compile, and point towards the testnet?

It's the same program with the -testnet switch passed at the command line. (Or in your bitcoin.conf. Either works.)


what file/method is block reward processed?

The function is called GetBlockSubsidy now and it can be found in validation.cpp.


Size of Blockchain for huge smart contracts database

Yes. But smart use of smart contacts means you don't need to put all the data on the blockchain. You can keep the actual data offline or only shared between actual participants.

Lightning Network is a nice example of such a system.

Many other examples can be done using simply multisig and a bit of time locking if necessary. More op-codes and more flexible and more efficient scripting execution are in the works too.


Why can not use an exchange address for p2p mining?

Many exchanges don't have a fixed deposit address for each client.

This means that when you want to make a deposit, it will give you an address and it will log that you are depositing to it. However, when they don't receive anything on the address, the address expires and might be reused for another client.
So when you use the address for mining, it's possible that the coins you get from the pool and are send to that address will never end up in your wallet.


Correct syntax for Bitcoin URI: bitcoin://1xxx-etc or bitcoin:1xxx-etc?

The correct format is bitcoin:<address> as defined in BIP21 and extended in BIP72.

The format with the slashes is mimicry of the HTTP URL format.  Tim Berners-Lee has apologized for inflicting those extra slashes on the world. :-)


If you follow the procedure at How to download bitaddress.org to use offline? for creating a paper wallet on an offline / airgapped computer, you can be fairly certain that your private key will not be compromised during the process.  For more info, see https://en.bitcoin.it/wiki/How_to_set_up_a_secure_offline_savings_wallet


Could the creation of bitcoin change create irreversible bitcoin "dust"?

The theory is this:

There is a notion of unspendable coins, whereby a minimum fee would be greater than the amount available to spend from a single address in a single payment. I believe as it is still possible to send zero fee transactions these can always be spent.

However if the network decided that there should be a minimum fee you would see unspendable amounts in wallets.

It is much more complex than this however - most wallets try to group together unspent coins in order to spend them, and in this way you could have multiple dust inputs to a larger transaction, which may result in a large amount of change going to one change address. You could consider this to be a theoretical consolidation of small payments received into a larger address.

There are privacy issues with this, and as always there is a trade-off somewhere.


Solo vs Pool mining for new crypto-currencies?

Yielding literally "more" units of one currency compared with another isn't necessarily a good thing. Would you rather have 5 Japanese Yen or 5 US dollars?

The choice between mining solo or pooled is mainly one of variance; would you rather take a chance on trying to solve a block yourself, trying for a full block reward, or would you rather earn an amount roughly proportional to the work done (and probably pay a small fee for the privilege)? Unless you have a large amount of mining capacity, you may end up with nothing if you mine solo. Most people choose to pool mine for that reason.

You may find this question of interest, discussing solo mining vs pooled.

When it comes to time to solve a block, that's a completely different question, but this might help you. It will differ depending on the currency you choose (difficulty and perhaps hashpower will be different for each).


The simplest miner would work like this:

Request a new Getwork from a given pool/bitcoind with specified credentials
For nonce=0;nonce<0xFFFFFFFF;nonce++

Set Getwork Data nonce
SHA-256 hash the Getwork Data (block header)
Check if hash result is smaller than Getwork Target, if so, submit a share
If more than 1 second passed since you received Getwork, stop the loop

GOTO: 1

Now, if you want something that could rise up to par with currently used miners, you need to consider:

OpenCL calculations, without this you will never get the high hashrates of graphic cards.
Midstate, or in other words hashing optimization. First half of Getwork Data doesn't change, so no point in calculating midstate for each hash.
Longpolling, makes you calculate less stale blocks.
Rollntime, minimizes communication with the pool.


How big is the NXT blockchain in disk usage compared to the Bitcoin Blockchain as of June 2014? And rate of increase?

As of today June 29, 2014. NXT Blockchain takes up 512MB. and the value is at 5-7 cents per nxt.


This is called steganography. Invented in Greece two and a half thousand years ago.
Usually, to make the embedded data inconspicuous the embedded data is distributed throughout the whole image as small variations in hue or luminance etc.
People viewing an image would notice an ugly and obvious rectangular patch in a corner. Especially as wallet data might result in noticeable patterns within that patch when interpreted as image data.


How does a Cryptocurrency Exchange Start

For example, in order for an exchange to function, there needs to be both bids and asks simultaneously. If there is no asks, then no one can buy that specific cryptocurrency therefore there is no volume/trades.

No problem. One customer places the first bid. Later, someone places the first ask. If the prices cross, a trade happens. If not, then you now have an exchange with some liquidity.

  Would an exchange have to simply front some money and place ask orders themselves in order to get the volume jump started and then having the market take over?

I don't see why. If I saw a new exchange with no offers at all, I'd happily place both a buy and a sell at prices I'd be happy to exchange at. The next person to come along may beat both of my offers if they're not generous enough. Now, the two of us are in a bidding war, the spread is getting tighter, and soon the prices will be attractive to people who need to buy or sell.


Double-SHA-hash duration is dependent linearly on the size of the template?

Yes, of course.

So, increasing the count of inputs twice we also increase the size of each template ~twice and the work for signing/verifying whole transaction increased quadratic


What is the program in Python that print information about the current block?

To take the information of the bitcoin blockchain, you can use the bitcoin core RPC Framework, for use it, you must have all blockchain on your computer

Download Bitcoin core
aligns the bitcoin node
Configure rpc framework
Use the API to take the information, I prefer using this library with python, this is an example for using it

You can use this documentation for study API

also for a response to the last comment, you can use the API for call the Mining commands but is difficult understand your question "I can print information about the block they're mining now" because the mining is a war for the node and each node can have different information


No, you do need a mixer. Even if you were to generate a million random transactions with your wallet, 100% of the value in the unspent output from the mixing could be linked to the original wallet through simple breadth-first search.

Transactions are value-preserving (except for the coinbase), have one or more inputs, and have one or more outputs. So you can trivially construct a transaction graph, which is a directed graph with transactions as nodes, inputs as head ends of edges, and outputs as tail ends. You also know the graph is acyclic, like a family tree: a transaction A can't both be the ancestor and descendant of B. With that in mind, if you start at transaction B, which pays your bank and is traceable to you, and go backwards one level at a time (follow edges in the opposite direction of the arrow), all paths from B to their respective coinbases go through A.

This is strong evidence that A and B belong to the same person, just like ending up with a briefcase full of marked bills is strong evidence that you got those bills all at once and just shuffled them within the briefcase, as opposed to getting one marked bill as change from every cash purchase you made for three years, out of pure bad luck.

This is the same as saying you have a bottle of vodka that you want to dilute. Pouring it into 100 glasses, then pouring it back into another bottle, doesn't hide the fact that it's vodka.

Mixers work because the inputs they receive are from different sources. If you're the only one pouring vodka into the punch bowl, and everyone else is pouring fruit juice, then when you take back the same volume of liquid you put in, it has less vodka, maybe not enough to even be detectable.

Of course, if an adversary wants to know you used a mixer, it's fairly trivial: they deliberately send coins they control directly to the mixer, and see if any of your addresses has ever been tainted by these coins. The analogy is someone pouring blue ink into the punch bowl, then the cops arresting anyone under 21 exiting the party with blue lips. They still can't know whether you put vodka or fruit juice into the bowl, but using a mixer may itself be considered money laundering in your jurisdiction.

Another issue is the other users of the mixer. Those who use a mixer at all likely have something to hide, and some proportion of the coins you get may come from shady sources. Of course no one would get rid of perfectly good fruit juice, but they want to get rid of their extra cough syrup, rat poison, lead paint, and drain cleaning acid. Sure, you got rid of your bootleg vodka, but what you got back isn't exactly safe for kids.


I have solved the problem by going back to Windows 10. Bitcoin Core no longer crashes, and my node has in fact been running nonstop for days.


How to run bitcoind in a low memory environment

The largest consumers of memory are:

The memory pool (reduce with -maxmempool, or disable entirely with -blocksonly if you don't care about unconfirmed transactions).
The UTXO cache (reduce with -dbcache, at the cost of potentially much slower syncing).
The signature cache (reduce with -maxsigcachesize).

In addition, you can also reduce the maximum number of connections (-maxconnections) or the number of RPC threads (-rpcthreads).

A viable minimum configuration without mempool could be -blocksonly -dbcache=20 -maxsigcachesize=4 -maxconnections=4 -rpcthreads=1.


Project on modelling Bitcoin blockchain data

As to how to convert anonymous transactions to "users" (at most a statistical attempt, as Bitcoin is in principle anonymous), which could lead to your requested "users balance" info, there are papers available that describe the process. These for example could serve as a start point (with good descriptions and images):

"An Analysis of Anonymity in the Bitcoin System" by Fergal Reid and Martin Harrigan
"Analyzing the Bitcoin Network: The First Four Years" - Matthias Lischke and Benjamin Fabian, Institute of Information Systems, Humboldt-Universität zu Berlin, Spandauer Str. 1, 10178 Berlin, Germany (CC BY 4.0)

Basically, citing the latter:

  ... a “user” is a grouping of public keys that were used as inputs into a single transaction (user owns the private key to each address) ...

As for the troubles using Python directly to treat raw data, you can use, perhaps as template or to get ideas, this post which uses Python to convert binary block header data to a CSV:

#!/usr/bin/env python
# convert binary file http://headers.electrum.org/blockchain_headers
# to CSV ASCII

import binascii

STRUCT_OF_BLOCK = [ 4, 32, 32, 4, 4, 4 ] # blockchain_headers does not contain always "0x00" txn_count
BLOCK_SIZE = sum(STRUCT_OF_BLOCK)

FILE_OUT= open('blockchain_headers.csv','w')

FILE_OUT.write( "version,prev_block,merkle_root,timestamp,bits,nonce,txn_count\n" )

with open('blockchain_headers','rb') as FILE:
    block = FILE.read(BLOCK_SIZE)
    while block != b'':
        position = 0
        for i in STRUCT_OF_BLOCK:
            FILE_OUT.write( bytearray(binascii.hexlify( block[position:(position+i)][::-1] )).decode('ascii') + ',')
            position += i
            if position >= BLOCK_SIZE:
                FILE_OUT.write("00\n") # blockchain_headers does not contain always "0x00" txn_count
        block = FILE.read(BLOCK_SIZE)


How does the daemon get a transaction via a hash

It depends on how you have configured your bitcoind and what commands you are using.

getrawtransaction first searches the mempool for your txid. The transactions in the mempool are held in memory and can be looked up by txid. If the transaction is not in the mempool. then you need to either provide the hash of the block it can be found in, or you need to have the transaction index enabled (by starting with -txindex or adding txindex=1 to your bitcoin.conf).

If you provide the hash of the block the tx can be found in, then the block's location on disk is looked up in the block index. The block is then deserialized and searched linearly for the tx.

If you have the transaction index enabled, then the txid is looked up in the transaction index. The transaction index maps txids to a location on disk (similar to how the block index maps block hashes to a location on disk). So this database allows for fast lookups too.

The gettransaction RPC is different from getrawtransaction. This is a wallet only RPC. The wallet stores entire transactions. So gettransaction just looks up the txid in the map that stores the transactions.


Can a coinbase transaction have a segwit output?

Other than the total value needing to be correct (no more than the block reward plus fees), the outputs of a coinbase transaction are completely unrestricted and act the same as any other transaction.


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

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

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


In ECDSA, why is (r,−s mod n) complementary to (r, s)?

ECDSA signatures are pairs (r,s) such that r = x(m/sG + r/sP) mod n, where P is the public key and m is the message digest. x() in that equation means "the X coordinate of".

In that equation, if you substitute s = -s', you get *r = x(m/(-s')*G + r/(-s)P) mod n, or *r = x(-(m/s'*G + r/s'P)).

However, it is true that for any point Q, x(Q) = x(-Q), as negating a point only affects the Y coordinate. Thus, *r = x(m/s'*G + r/s'P) mod n, or (r,s') is valid signature whenever (r,s) is.


Premining just means you can mine at your own at a very low difficulty before normal users have connected to your network. The size of the reward is determined by the protocoll so you cant change it until the procotol allows it (For Bitcoin it halfs ever 210000 Block).

For example:

You can mine with a few hashs per second for a week. For bitcoin you get  a block every 10 minutes getting a reward of 50 BTC. This will give you 1008 Blocks and 50400 Coins. If you now  let other people connect they will start mining and the difficulty will increase.


Why doesn't the Bitcoin-qt client ask for the Wallet passphrase upon startup?

When you encrypt the wallet, only the private keys are actually being encrypted. You will be prompted to enter your encryption passphrase when the private keys are needed.

Public keys in the keypool, transaction information, and other metadata remain unencrypted because they are either public information or have no effect on the security of your Bitcoin. This means that you will be able to get new addresses (they come from precomputed public keys in the keypool) and receive transactions. It is only when you try to spend any of your Bitcoin or when the keypool runs out that you will need to enter your passphrase.

It is actually safer to prompt for the passphrase when needed because then the actually important things that are encrypted (i.e. the private keys) are unencrypted in memory for as little time as possible. This reduces the risk of them being exposed.


Since bitcoind/Bitcoin-qt 0.8, no transaction index is kept anymore by default, as it is not necessary for validation in the new database model.

Instead, there is only a database of unspent transaction outputs, which has enough information to (slowly) locate transactions in block files. getrawtransaction uses this, but it only works for transactions that are not yet spent in the block chain.

If you want to be able to look up historical transactions, you need to set the txindex=1 configuration option (or start with the -txindex command line flag). As this setting can only be set when the database is created, you'll need to rebuild it from scratch (using -reindex).


Where are statistics data about stolen bitcoins and successful attacks?

There is no evidence that Mtgox has been hacked, it may be a fraud.
There is only one bitcoin theft that is fully documented. You can find details here


Running Bitcoin on command-line-only system

To run it as a daemon type:

$ bitcoind -daemon
bitcoin server starting
$

You can then use the API calls to do whatever you want:

$ bitcoind getblockcount
153407
$ bitcoind getconnectioncount
20


If the first coins were not spendable, how was Satoshi be able to transfer the first 10 BTC for pizzas?

It wasn't Satoshi (it was Laszlo Hanyecz, 1.5 years after the genesis block), it was 10000 BTC for 2 pizzas, and they were simply not the first coins.

  Where did these first 10 BTC come from, if the first 50 BTC reward were not spendable?

They were mined. Simply not in the first block.

  And how could then there be more coins, if you first need some transactions in order to fill the blocksize and mine the next block?

There is no such requirement. Blocks do not have to contain any transactions (apart from the coinbase transaction, which creates the new coins).


Blockchain download extremely slow at 200 blocks per hour

"version" : 32400

Oh my goodness. That is a very old version.

New versions dramatically improve chain synchronization times. Update from your current version of 0.3.24 to 0.8.5.

https://bitcoin.org


This table isnt part of the MPOS schema you have to create it yourself, my schema for this table is:

mysql> show columns from shares;
+-----------------+--------------+------+-----+---------+----------------+
| Field           | Type         | Null | Key | Default | Extra          |
+-----------------+--------------+------+-----+---------+----------------+
| shareID         | int(11)      | NO   | PRI | NULL    | auto_increment |
| rem_host        | varchar(100) | YES  |     | NULL    |                |
| username        | varchar(100) | YES  |     | NULL    |                |
| our_result      | varchar(255) | YES  |     | NULL    |                |
| upstream_result | varchar(255) | YES  |     | NULL    |                |
| reason          | varchar(255) | YES  |     | NULL    |                |
| solution        | varchar(255) | YES  |     | NULL    |                |
+-----------------+--------------+------+-----+---------+----------------+
7 rows in set (0.00 sec)

I keep this in a seperate db to MPOS but there is no reason you cant add it manually to the MPOS table.  I will also add that while this works I'm not certain if varchar is the correct datatype to use here.


Is there already reached consensus on network upgrades like Taproot, Submarine Swaps?

MAST/TAPROOT
SCHNORR

These improvements are specified in BIP340, BIP341, and BIP342. These documents are fairly mature, and there seems to be community traction for them (though, disclaimer: I may be biased as I'm a co-author), but it's inherently hard to predict when activation will happen.

Submarine Swaps

This is a Lightning feature, as far as I know. It requires no Bitcoin protocol changes, and as far as I understand it, no Lightning protocol changes either - it's usable today.

Drivechain Sidechain, by Paul Sztorc

I haven't paid much attention to this.


Cancelled: You need some ETH in the same address as your token to pay the gas to send it

TokenCard is an ERC20 token issued on the Ethereum platform.
In order to transact on the Ethereum blockchain, you must have some Ether in your account to pay for the transaction. Once you have a small amount of Ether in your account, the transaction will go through.

Check the latest transactions using Etherscan here:
https://etherscan.io/txs

In the TxFee column, you will see the fees for the latest transactions.
The fee goes to miners. Transactions are sent to the Ethereum blockchain and miners gather the transactions into blocks. The fee is the reward they get for doing this work. The Ether will be deducted from your account.

Ether is the name of the currency used within Ethereum.
It is used to pay for transactions on the Ethereum blockchain.
This is done indirectly by purchasing gas for ether as explained in gas here:
http://www.ethdocs.org/en/latest/ether.html#gas-and-ether


Altcoin confirmations and safety - wait ~6 confirmations, or ~1 hour?

See https://bitcoil.co.il/Doublespend.pdf. What matters is the number of blocks, not time elapsed or average time for this many blocks.

Also, the idea of "wait for 6 confirmations or 1 hour" in Bitcoin is a myth. If 1 hour passes with 3 confirmations you're less secure than if 30 minutes passed with 3 confirmations, because the attacker would have had more time to build his competing branch.


Transaction processing is a function of mining.  Each time a block is found observed transactions become included in the block chain and get one confirmation.  The Bitcoin protocol is designed to have an adjusting difficulty to ensure that blocks are not generated at a speed greater than that>   This ensures the gradual distribution of new coins into the economy as well.  So long story short this is the model that Bitcoin uses and it is one of the few shortcomings of performing transactions.


Can you explain to me how this transaction work?

Bitcoin uses a UTXO (unspent transaction output) model for transactions, see here for why. This means each time you spend a coin you create an output that is assigned to an address (or multiple outputs to different addresses), and those outputs must references previous unspent outputs to your address. You have to spend all of the coins from the utxo, so usually there is a change output that goes back to the original owner (usually a different address that they own, for privacy reasons).

  Because each output of a particular transaction can only be spent
  once, the outputs of all transactions included in the block chain can
  be categorized as either Unspent Transaction Outputs (UTXOs) or spent
  transaction outputs. For a payment to be valid, it must only use UTXOs
  as inputs. - https://bitcoin.org/en/developer-guide#block-chain-overview

You are seeing many unspent outputs on the left that the address 16ftSEQ4ctQFDtVZiUBusQUjRrGhM3JYwe is using to add up to the values on the right that it wants to send.


When thinking about e-currency in a general sense, what features discourage black market usage, but promote anonymity?

The issuing of currency by a central authority discourages black market usage in a sense that all coins in the system can be tracked by the central authority - with AML and KYC policies.


How to make a pay-to-rawmultisig transaction?

No, Bitcoin Core doesn't have any RPC calls which allow you to create a bare multisig pubkey script.

Yes, you can create your own pubkey script and insert it into a transaction.  This isn't hard---but it is dangerous.  One mistype and your bitcoins are lost forever.  Note also that greater than 3-of-3 bare multisig pubkey scripts are non-standard, so they won't be relayed or mined by standard clients.

What might be challenging is spending the output at a later time---you will need a program that understands how to correctly sign Bitcoin transactions using an arbitrary private key.  Bitcoin Core can do that if it either has stored or is given all of the private keys necessary, but not all wallets can.


Review of "equitable" proof-of-work systems

This is actually an economic issue, not a cryptographic one.

Suppose hypothetically that I'm mining, and I'm making a good healthy profit.  I'm naturally going to keep adding more and more computers, to get more and more profit.  But of course, the cryptocurrency can't let me expand forever, because it can't afford to pay me an infinite amount.  It has to lower its payout, to get me to stop gobbling up more and more profit.  I'll finally stop expanding when the cryptocurrency lowers my profit margins to almost nothing.

But, if my profit margins are tiny, then everyone else's are too.  Then that means there's no room for inefficiency.  Anybody who's in a place where electricity is expensive, or where they have to pay for cooling, or where land to build a datacenter is expensive, is not going to be able to make money.

That's why it's rough for home miners to make any money: a home-based mining operation generally isn't as efficient as a carefully optimized datacenter.

However, home-based miners have one advantage: they usually already have a computer that's already paid for, and whose cost can be considered "free" considering that the computer would probably have been doing nothing otherwise.

Memory-based proof of works don't change the basic economic reality that profit margins are going to be super-tight.  But they do make it possible to leverage that "free" computer to get a slightly higher return, insofar as the cost of the computer was a meaningful part of the cost to begin with.

Unfortunately, in my opinion, memory-based proof of works have a flaw: they make it possible to hire a conventional datacenter (say, an Amazon EC2 datacenter) and use it for mining.  That makes it inexpensive to temporarily bring a lot of hashpower online for use in attacks.

For instance, imagine that I had a cryptocurrency with 100,000 nodes, each with a single powerful CPU doing mining.  How much does it cost to rent 101,000 powerful CPUs for an hour, to do a 51% attack?  Answer: a few million dollars.  Very much within the reach of any significant organization.  You couldn't launch a 51% attack against an ASIC-based cryptocurrency for anywhere near that price.

I'm not honestly sure how big a risk 51% attacks are: I'm not sure many people are actually motivated to do that.


Will my bitcoin wallet take prohibitively long to sync as daily transaction volumes grow?

The points mentioned in this answer apply here. The key points are:

End users won't be expected to run full nodes such as bitcoin-qt, but rather lightweight clients such as Multibit or Electrum.
Not all Bitcoin payments need to take the form of Bitcoin transactions; most will probably take some form of trustless, instant, off-the-chain Bitcoin payments


How can I export a single wallet from bitcoind?

To clarify, what you exported is a private key for an address. A wallet is a collection of addresses and their private keys.

The amount that you think is associated with that address is most definitely not the actual amount. What has most likely happened is that you have made a transaction in the past which spent some of those coins and the remainder has ended up in a change address. When you make a transaction, the change Bicoin always goes to a newly generated change address that is part of your wallet.


Recent Bitcoin fork/why didnt I get credit?

If you had your coins in coinbase, you won't be credited as coinbase owns your private keys. To get your hard fork credits, you needed to have your funds in a external wallet with access to your private keys. After a fork happens, you can download a wallet that supports the new coin and import your private keys into it.


It seems like you simply haven't installed bitcoin-qt, if you install that then you can run it :)

I'm unsure exactly how the power outage and the datadir command at the end relate to the question though


What’s the difference between a validation by nodes and a verification by miners?

The rules by which a full node verifies a transaction are defined here in the Wiki, and here.

Full node or mining node both validate against the same set of rules. If they don't follow the rules, they have to carry the consequences and might get blocked/banned, if forwarding wrong information to the network.

Independent from Bitcoin, there is a difference between the two words, be it in software development or project management. verification is like a check list, were each parameter is checked against some specs ("the system complies with specification"). And validation is more process oriented ("the system meets the intended needs for a user").

In the  case of full nodes/mining node, both follow the verification in the same way, just after verifying against the specs, the miner follows  additional steps, and is eventually lucky to get the tx in the block and find the reward.


First of all I thought that you were using a bitcoin pushpool as your primary software for a litecoin pool. But I guess you've checked that?
Otherwise, try this recomended pushpool fork instead, which worked for me: (For LTC) https://github.com/ArtForz/pushpool

This one works for me, but ideally you would want to use the stratum software for mining purpose. (If you have clients connecting with LP/Getwork, you can add the stratum-proxy locally on your server)


Removing all block chain and retrieving it again solved this problem. I guess -rescan should help too.


Here is the example
of the transaction from the question

the redeem script is: 514104398184a2cef0d7b73ed7a3a1d4ad16296c3c6986bed0bd72775060aae9891979eaea1efb28d7eb1da3304ec38a98b42086e3be2ceba82b0e932128ec422a6fc2210250504b2d4245544120506565722d506565722d6e6574776f726b2062657461212102553432353135362e31323234202020202020202020202020202020202020202053ae

to derive the P2SH address we do the following:
sha256(redeemScript)
using PHP:

$sha256= hash('sha256',hexStringToByteString($redeemScript));
SHA256: 8b1c6ece53385d6ae3cf3c40fc6239389a7006d9f46047d5d67c3fa78dd2afcc

ripemd160 the resulting hash

$ripemd160=hash('ripemd160',hexStringToByteString($sha256));
RIPEMD160: c25497b8a9bcc393f47abd19a435d1af440916ac

prepend "05" and hash twice

$hashTwice = hash('sha256',hexStringToByteString (hash('sha256',hexStringToByteString ("05" .  $ripemd160))));
double hash: 479ce4efc25c4195ef3cc015d74c45034a2c72f21e322ba30f5c26d872e58b38

first 4 bytes is the chscksum

$checksum=substr($hashTwice,0,8);
checksum: 479ce4ef

compose the address as:

  base58-encode: [one-byte version][20-byte hash][4-byte checksum]

$addr= "05" . $ripemd160 . $checksum;
address: 05c25497b8a9bcc393f47abd19a435d1af440916ac479ce4ef

base58 encode

$p2sh=base58_encode($to_encode);
base58: 3KQYMMqMBTv8254UqwmaLzW5NDT879KzK8

and we get the correct P2SH address: 3KQYMMqMBTv8254UqwmaLzW5NDT879KzK8


How to implement cold storage payments using bitcoind

Using bitcoind, sendrawtransaction is one of the steps normally performed.  So to not broadcast, simply omit that command.

For an alternative, you might want to look at SX>

SX is a set of modular Bitcoin commandline utilities that admin types can engage with Bitcoin functionality without having to write code.

http://sx.dyne.org
http://bitcoinmagazine.com/6234/what-libbitcoin-and-sx-are-and-why-they-matter/

Using the Mycelium mobile app has to be the easiest method to spend funds from a paper wallet. From the app, select Cold Storage. Then scan the private key from the wallet. Then scan the QR code for the Bitcoin address to send the funds to.


Can I still claim the pre-fork BCH even though my current wallet balance is 0?

Despite your bitcoin wallet balance being 0, your cash balance on the same address should be non-zero. Check that with a cash blockchain explorer and then import your private keys into a cash wallet to access the coins.


Does running an alternative full node implementation benefit the Bitcoin network?

If all bitcoin nodes run the Satoshi client then they are all affected by the same bugs. So other implementations of the protocol will certainly help in this regard. Imagine that the Satoshi client was affected by a bug that when a certain date is reached or a certain event occurs, it somehow causes the blockchain data to be corrupted or even deleted. The bitcoin network could even grind to a halt. This is quite an extreme case but it's just to give you the idea.
If alternative implementations were widely used, only part of the network would go down.
All implementations only have to agree on the bitcoin protocol, so they would still be vulnerable to bugs in the bitcoin protocol itself, but there are hardly any bugs in it, and even those could be fixed by changing or extending the protocol.
There are some known bugs in the bitcoin protocol, like for example its inability to handle dates bigger than 2106, but it's not considered a serious problem and by the time that date approaches a solution will probably be found.


I'm sorry to say that you were scammed. Do not ever give someone your wallet identifier, password, private keys, seed phrase, etc!

  later told me to give him my id and password so he can connect to a miner i asked y he said to make it possible to profit

This is not how mining works at all. The scammer enticed you with 'profits', but in reality there were no mining profits. The scammer simply wanted you to think there was, in an effort to get more btc out of you.

What likely happened: When the scammer logged into your wallet, they made a copy of your wallet's seed phrase. With that phrase alone they can re-create your wallet on any other device, and they will have full access to your bitcoin. Your password protects the login to blockchain.info, but if you use the seed phrase to re-create the wallet on another device using different software, the password will not be required.

The second thing the attacker did was add a 'watch-only' bitcoin address to your wallet. Your wallet shows you the balance of that bitcoin address, but your wallet does not have the private key for that address, and thus cannot spend the bitcoin located there.

Once that is set up, the scammer will send some bitcoin to the watch-only address, and tell you it is 'mining profits'. This is a lie, while you thought you were generating profits, the real story is the scammer was just slowly adding bitcoin to that address, while telling you to deposit more btc to your wallet. Once you deposited more bitcoin, the attacker could use the seed phrase to recreate your wallet, and steal your bitcoin.

Sorry for your losses :(

At this point, abandon that wallet, do not ever use it to store bitcoin again. Create a new wallet, and be sure to guard it carefully.


Can any current consumer grade computers mine any alt coins?

As mentioned almost any is able to mine coins - the question just arises about profitability.

There are some mining pools, that offer to switch the coin mined automatically depending on which coin is the most profitable at any point in time.

Examples of those pools are:

Multipool.us
Middlecoin.com


Getting individual block by height from Bitcoin P2P network

To request an individual block from a p2p peer, consider the get_data message, indicating what type of block (witness/compact/filtered).

Since you do not wish to do full block download and validation, you can first build a header chain to the most recent height, and then verify the block you are requesting is in the header chain. This would ensure that it would be expensive to falsify the block data you receive from a peer. You can also determine the block header hash corresponding to the height index you are interested in, as blocks cannot be uniquely referred to by height over the p2p network (two branches can have same height).

To build a header chain, consider the GET_HEADERS message, which also provides information (so-called block locator) about your current header branch so the peer can provide the headers for your node to catch-up to its header height.


Can I spend my bitcoin without knowing how to get into my bitcoin wallet?

Technically the Bitcoin can only be spent if you have the private key for the address. The private key is stored in a wallet. If you do not have access to that wallet then you will not be able to spend the money.

Try to contact the customer service of CoinBase to see what you can do with the information you have, also tell them if you have made any backups or wrote down any initial parameters (do not give away the exact parameters as it might be used to recover your wallet, just the fact that you have it or not).

Update:

In the comment below you mentioned they told you to never tell anyone the "Long"# you received, this is good, it is very likely to be a private key (about 51 random lowercase and uppercase letters and numbers) or some kind of "seed" (English words).

In case of the former you need to download a client and try to import that key. If you have the disk space (133 GB) I suggest using the official Bitcoin Core client, then after the initial synchronization finishes load your private key in the debug window follownig the How do I import a private key into Bitcoin-Qt? question. (Note: you are really likely to need to skip step 5 as your wallet is not encrypted.)

For the latter (if the "Long"# is a "seed") you need to use the same website/software you used when generated it but I really cannot help you out more than directing you to the customer service.


How can you create a transaction with multiple inputs from the Blockcypher API?

Blockcypher API shows only the example of how to compose a transaction with a single input, therefore, it might look like the array of addresses will do the job, but no. If you'll do this by passing addresses into one array of inputs:
curl -d '{"inputs":[{"addresses":["addr1", "addr2"]}],"outputs":[{"addresses":["addr3"],"value":100000000}]}' https://api.blockcypher.com/v1/btc/test3/txs/new

You'll have only zero element grabbed from the addresses array from the inputs:
"tx": {
    "block_height": -1,
    "block_index": -1,
    "hash": "002407bd35a6d0026cf0f5a018bd27311702560c03f1f64478105a547c91d895",
    "addresses": [
      "addr1", (inputs.addresses[0])
      "addr3" (outputs.addresses[0])
    ] ...

(Please note that I haven't included the whole tx blocks, only the ones containing the addresses.)
API will consider that you're using only one input, and may throw you an error if the value will be too big than the input's wallet balance.
"Not enough funds in 1 inputs to pay for 1 outputs, missing -X"

To create the tx with several inputs,  you'll have to pass arrays of addresses separately:
curl -d '{"inputs":[{"addresses":["addr1"]}, {"addresses":["addr2"]}],"outputs":[{"addresses":["addr3"],"value":100000000}]}' https://api.blockcypher.com/v1/btc/test3/txs/new

This will give you the correct response, and the correct amount of inputs:
"tx": {
    "block_height": -1,
    "block_index": -1,
    "hash": "ebcc8132c33a672cdd695a8953db503954abefa18bfd4727ea44f67b92c5ab6c",
    "addresses": [
      "addr1",
      "addr2",
      "addr3"
    ] ...

In conclusion, it seems that the API itself is designed that way, at least at the moment of writing this answer.


How can a bitcoin exchange prove its solvency while maintaining privacy?

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

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

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

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

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

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


There are existing solutions that handle payment processing for you. You can use BTCPayServer which has an API that is similar to BitPay's API.


Can I use Electrum on my everyday computer?

There's nothing stopping you from using Electrum on an online computer. If you have a lot of coins and want to have better security, you should use an air gapped setup where the offline computer has the private keys and has never been online nor will ever be online. Or you could use a hardware wallet. But using Electrum on an online computer and using a strong password (on your computer and on your Electrum wallet) is also fine.


How to reward mining in a blockchain that doesn't store currency?

There are several blockchains that already do this. Colored Coins (on bitcoin blockchain), Counterpary (on bitcoin blockchain), NXT, BitShares, Ethereum and others allow to represent any asset you wish like land, cars, consultancy hours, etc., using digital tokens (e.g. the "data" of the system as you called it) which is irrespective/decoupled of the reward they get.

See Colored Coins for how you can use metadata in a bitcoin transaction to achieve that result. It is especially easy to implement using Counterparty.

So, you can already store the kind of data you want in parallel to a digital token that rewards the miners.

If you meant, only having the asset in the blockchain and no reward then the answer is no, you cannot: you always need something in digital form that can be securely shared to the contributors**.

Hope this helped.

**For an internal reward, you have to give something of value to the contributors within the system. Say, that you don't want to give money/currency but instead some service. In order to keep a proper count of the rewards for each contributor you would need a digital way of representing the reward, ie. by using a digital token. To securely keep track of the rewards you need to also put them in an immutable structure, ie. the blockchain.

Thus, whether you want to give money or chickens or some kind of service to the contributors you have to digitally represent it (tokens) and secure it (blockchain). The token represents the reward and it does not need to be money. However, it is very practical to think about it as money since this is the unit of exchange that most of us are used to.


Testnet Bitcoin Connection refused (111)

Connection refused means there's something prevents reaching your server.

make sure that your firewall allowing connections to your port and try to add this line to your bitcoin config:

rpcallowip=0.0.0.0/0


Import multisig change addresses into Bitcoin Core using "importmulti" + descriptor

The keypool (currently) is not an address pool, it does not hold individual addresses, it holds keys. Those keys are then converted to addresses when you want them. Because of this, you cannot import P2SH or P2WSH addresses into the keypool as you are trying to do.


Is the Trusted Third Party an advantage or disadvantage in regards to wallet security?

Security is, of course, an issue and when using Bitcoin you should exercise caution. That being said, it is important to remember that the Bitcoin community is rapidly evolving, and new technologies, systems, and services are being developed.

As Bitcoin continues to evolve, companies and computer programs will come up with new solutions to challenges and problems. For example, as you point out wallet security is a major issue.

Already, companies are coming up with more secure wallets, that are hacker proof, and larger exchanges and service providers are being established. For a major company like Mt. Gox there is no incentive to steal Bitcoins, they have a profitable business model and any blow back from theft would far outweigh the incentive to steal.

Over time, companies will probably grow in size so that they can provide third party security comparable to a bank or credit card company for Bitcoins. Of course, it's relevant to wonder if they can do so while maintaining confidentiality.

Security companies will also likely grow in size past that point that they would consider trying to launch any type of scam. Think about it, do you think Norton Anti-virus would ever try to launch a virus program? Most likely not. Currently, most Bitcoin security companies are pretty small, but over time a few brand names will likely emerge.

So to get to the point: No I don't think that the security issues you present will hold back Bitcoin. The Bitcoin community is creative, dynamic, and able to respond to challenges. Companies and programmers will see these challenges as opportunities, and will respond appropriately.

My guess, Bitcoin will eventually be able to provide a sort of third party security, much like a bank, to those who want the extra layer of security, most likely for increased fees. Those who do not want or need that extra layer of security won't be forced to accept it.

So, is the lack of a third party an advantage or disadvantage? Honestly, I think that depends on the situation. If you want to have a highly confidential way to store and transfer money, having a third party involved means someone will be looking into your transactions, at least to some extent. If your biggest concern is having a secure way to store money, than third parties can provide extra security. That being said, there are ways to secure your Bitcoins, and as I stated I believe Bitcoin will eventually be able to provide similar levels of protection.

On a separate note since you are new to Bitcoin, if you are using Bitcoin, I would personally advise that you not keep all of your funds in one account. Divide your bitcoins into several accounts, and if possible keep the bulk of your funds secured offline. If you have a large amount of funds, you could even consider something like a safety deposit box at a bank.

Also, I advise going with trusted brand names, like Mt. Gox, or using service providers backed by Silicon Valley funding, things like that. These sites and services should be more secure.


You don't need to be running two wallets at the same time. Funds can be received while offline. Do the following:

Create a backup of your current wallet.
While Bitcoin-QT is NOT running, remove your wallet from the Bitcoin-QT folder.
Start Bitcoin-QT and create a new wallet.
Copy a receiving address from the new wallet to somewhere.
Close Bitcoin-QT and move the new wallet to the USB stick.
Restore your Wallet backup, and start Bitcoin-QT
Send the amount to be gifted to the receiving address you saved before.


I made a Bitcoin Core deposit and don't have a big enough HDD to download data

Or you can buy a cheap USB 1Tb harddisk. Plug that in and then at startup elect to put the datadir (AND THE WALLET) on that.

If you do this and then send any coins make sure you backup the wallet.


How did Satoshi manage to mine so many bitcoins being the first user of the system?

Blocks can include transactions, but it is not necessary for transactions to occur in order to create blocks. The only transaction that is required in a block is the coinbase transaction which is the transaction that creates new bitcoins and collects the transaction fees. This transaction is created by each miner individually for their block attempts (as it sends money to their own address which is different for each miner), so it'll surely be available. In fact, the first transaction other than a coinbase transaction occurred in block 170.
So, since transactions are not a requirement, block creation is limited differently, it happens by means of the difficulty. Miners create block candidates continuously, and then check each whether it fulfills the difficulty requirement. Whenever they find a block that surpasses the required difficulty, they have successfully mined a block. As the difficulty resets regularly to adapt to changes in the hashrate of the mining network, the blocks work out to be discovered approximately every ten minutes.
In the very beginning of Bitcoin, mining difficulty was very low as there were few people running their home computers to mine Bitcoin. Satoshi Nakamoto was the first one to run a computer for mining, and thus was able to mine a large portion of the early blocks.


What programming language should i learn if i want to implement its technology in the future?

Bitcoin is primarily C++, but you can work with Bitcoin in any language you like.

If you want to learn how to make web applications, I would recommend PHP or Ruby.

Your best bet is to go for the language that looks most interesting to you, and get something working with it.


What prevents someone from tainting the coin tumbling pool of the Wasabi wallet?

There are a number of reasons why this kind of blacklisting is problematic in practice, but take it with a grain of salt, because I'm the creator of Wasabi,  so I am biased.

This Elliptic report identifies 0.65% of all Bitcoin transactions are mixing transactions. This means, if that kind of blacklisting would happen, they would have to blacklist most bitcoins in existence.
The same report states, 50% of DNM users don't use any mixing, but directly send to exchanges (mind blowing, I know) and these are the coins being blacklisted.
From another point of view, Wasabi's anonymity set will be constant 100, and if a coin from it is tainted, would they really blacklist all mixed coins, where every coin has exactly 1% chance of being the tainted one?
The user base of Traditional Bitcoin Mixers is limited to a certain type of user, who is in desperate need of privacy and in order to get it, he is willing to risk losing money. Since coin loss, and other issues are architecturally impossible with Wasabi, our target user is not limited to them, the target user of Wasabi Wallet is everyone, because everyone needs privacy.
If someone is extremely paranoid, he can just spend coins to himself a couple of times before sending it to the desired "legitimate" place. This is what Samourai's Ricochet is doing.
Speaking of legitimacy, zkSNACKs, the company behind Wasabi is a legitimate company. Privacy is not only not a crime, but a fundamental human right and if an entity would blacklist a mix output, they would be looking ahead of legal trouble. If such a thing would ever happen, please notify us.


What are the most notable cases of Bitcoin scams?

Here's a list of the most notable scams, thefts, and hacks:
https://bitcointalk.org/index.php?topic=83794


Who needs a copy of the entire blockchain these days?

Running a full node (downloading the blockchain) allows a user to interact with the network, without having to trust any other network participant.

For some users, this may not be important, but for many users it is very important. For example:

You are a business, and you need to ensure that txs you send and receive are in fact being communicated across the entire network.
You run an exchange, and want to make sure large deposits are not going to be double spent or orphaned
You hold a large amount of cryptocurrency, and want to maintain security and privacy of your funds
You live somewhere with heavy financial/economic restrictions, so access to webwallets, etc is banned outright. So to interact with the network you have to run your own node.
You are a believer in the philosophies behind cryptocurrency, and want to run a node just to help the network grow and remain robust.

This is not an exhaustive list, I'm sure there are more reasons than I have listed. In general it is important that users remain capable of running their own nodes, as otherwise they will have to trust someone else to do so for them.


What are the difference between a segwit and legacy wallet

There are, broadly, three types of addresses in use at the moment:

P2PKH - Pay to public key hash addresses start with a 1, and should be accepted by essentially any service in the Bitcoin ecosystem
P2SH - Pay to script hash addresses are commonly used for multisig, but as of the segwit activation, they are also used for wrapped segwit addresses. These start with a 3. In the wrapped segwit version, you get the advantage of lower fees, while still being able to send to the address from nearly all services.
Bech32 addresses - Starting with a bc1, these are also known as native segwit addresses, and offer the greatest savings in fees. However, a sizable number of services do not support withdrawals to these addresses.

Generally, P2SH segwit addresses offer the best of both worlds at the moment.

When sending coins to a service, your choice of address does not matter. It only plays a role when receiving coins.


Is there anything preventing Lightning Network from passing embedded data in OP_RETURN?

Not sure if I might miss a point of your question. But to me it seems that what you suggest is conceptionally not possible.

Lightning payments work fundamentally different than Bitcoin transactions. In particular lightning payments themselfes don't have any Bitcoin script inside them. The onion format for the payment is really just an amount, a payment hash and a next hop.

The lightning nodes themselves use the data from the onion to construct htlc outputs in their respective local channels (commitment transactions) this is where Bitcoin transactions are used to fulfill the contracts needed for lightning. The sender however has no influence on the used scripts. So there is no way to squeeze in any OP_CODES


Where in the source code of the Core Client is the GetBlockValue() function?

GetBlockValue was renamed to GetBlockSubsidy, and main.cpp was renamed to validation.cpp.  So you should now look at GetBlockSubsidy in src/validation.cpp.

You can search on Github for GetBlockValue; you won't find any hits in code but you will find some in commits.  That's how I found this.


This is exactly how a normal stock exchange works.

The quoted rate and the Buy and Ask prices are just driven by the supply and demand of people wanting to trade on that exchange.

BTC-e operates an order book. Sellers add Sell orders with an Ask price which they are happy to sell at (This is called a Limit order)
Buyers places Buy orders with a buy (or bid) price they are willing to pay.

The difference between the two prices is called a spread.

So if you place a Limit Buy order, but it is below the lowest Sell order then your order gets placed in the order book. If it was higher than the highest order, already in the order book, then the quoted Bid price will increase to the price you Bid at. Now if later someone else places a sell order at or below your bid price, then the order book will match your order and it will become a trade. (and vice versa).

When this happens. your orders are taken off the order book* and the next lower Buy order and next higher Sell order will become the new Bid and Ask prices.

Now if you want to make a Buy (or Sell) Trade right now:
You can place a Market order which you say you want to Buy (or Sell) X number of coins (or shares on a stock market) i.e., you don't give a price.
When you do that, the BTC-e order book software will match the lowest sell limit order (or highest buy order when you are selling) and create a trade right away.

Which is the right order type to place, that depend on your trading strategy and is a whole other topic.

The rate quoted is normally the last price that a pair of orders that was matched at.

*It is slightly more complex than that, because you have partial fills, but you get the idea.


ECDSA x,y coordinate validity verification doesn't seem to work

The plain text format of this equation only makes sense when you understand the theory behind it.  y ^ 2 = x ^ 3 + 7 mod P means "do all math in this equation using the finite number field with definition P".  It might better be written (y^2 = x^3 +7) mod p.

To keep the math simple, lets simply subtract one side from the other to see if that evaluates to zero.  This lets us avoid roots. Here's code using the Python interactive shell, e.g. python from a command prompt):

>>> x = 55066263022277343669578718895168534326250603453777594175500187360389116729240
>>> y = 32670510020758816978083085130507043184471273380659243275938904335757337482424
>>> p = 115792089237316195423570985008687907853269984665640564039457584007908834671663
>>> (x**3 + 7 - y**2) % p
0


Keeping wallet addresses outside bitcoin core

Does using this architecture have any disadvantages over running a full bitcoin core to keep addresses?

Yes.

  The "bitcoin core" will be some trusted public node that I don't control.

That is a huge disadvantage.

As Satoshi Nakamoto wrote:

  What is needed is an electronic payment system based on cryptographic proof instead of trust,
  allowing any two willing parties to transact directly with each other without the need for a trusted
  third party.

(my emphasis)

Every time someone tries to undo this they are kicking the founder of Bitcoin in the teeth!

Other references

Thin Client Security


What you are looking for is a type of smart contract.  But be aware, that smart contracts in Bitcoin are generally comprised of multiple transactions, rather than a single transaction confirmed in a block.  You would need this initial transaction to "fund" the contract, and then further transactions that spend the outputs of the funding transaction, based on your conditions.

For example, your initial transaction can be written as to say:

"This money can be claimed by the recipient after a certain amount of time OR it can be reclaimed by me right now if I have some piece of provided information."

Now if the time period expires, it can be assumed that the recipient will create a transaction spending the outputs of the first, thus claiming the money.  However, if the sender has this special information you speak of, he can spend the outputs immediately before the recipient gets a chance.

You can use either nLocktime or OP_CHECKLOCKTIMEVERIFY for the time restriction, and you can use Lightning Network style hash locks for "when this information is provided".  Keep in mind this is just a simple example of what a potential smart contract solution would look like for you.  You would certainly need to design your own to meet your own requirements.


Source code: Where is address encoding performed?

firstbits.com provides a service that links short values to longer addresses, which might be close to what you're looking for.

You could easily shorten addresses by extending the character set that addresses use, but any non-standard way of sharing an address has to be usable by whatever person or software receives it. I'll leave it to someone else to point you to the line of code though.


Electrum: "restoring" a wallet from a seed

Electrum uses a gap limit to stop looking for addresses in the deterministic wallet. The default gap limit is set to 20, so the client get all addresses until 20 unused addresses are found.

Change addresses have a gap limit of 3 and this is not modifiable by the user.


In bitcoin core, how to avoid the dust exception?

The current dust limit fee rate is 3 satoshis/byte. If, at 3 satoshis per byte, an output would cost more in fees to spend that it has in value, then that output is considered dust. If you are sending to non-segwit addresses, this limit is 3 sat/byte * 148 bytes = 444 sats. If you are sending to P2SH-segwit addresses (the default address type in Bitcoin Core), then the fee limit is 3 sat/byte * 91 bytes = 273 sat. If you are sending to bech32 addresses, then the fee limit is 3 sat/byte * 68 bytes = 204 sat.

You can lower your dust limit by setting -dustrelayfee to something lower than 0.00003 BTC/kB (equivalent to 3 sat/byte). However I do not recommend that you change this as even though your node will accept transactions with outputs that are otherwise dust, other nodes will not and your transactions will not be relayed.

Furthermore, you should not set your transaction fee rate to be less than 0.00001 BTC/kB (equivalent to 1 sat/byte) as this is the default minimum relay fee and transactions that have a fee rate less than this will not be relayed. Just because your node accepts a transaction does not mean that other people's nodes will.


How can I get address's balance that doesn't belong to my Bitcoin core wallet?

Import addresses in bitcoin core and use listunspent or scantxoutset (scantxoutset doesn't require importing addresses as mentioned by sipa in the comments)

OR

Setup open source block explorers that use bitcoin core and use their API to get the required results:

https://github.com/dgarage/NBXplorer
https://github.com/Blockstream/esplora


Multibit balance does not match blockchain balance. Weird extra bitcoins appear. Now the are gone plus some?

What version are you on ? If you have earlier than 0.5.9 I recommend upgrading. The latest code also picks up pending transactions when you do a reset.

Also, you might want to do a reset blockchain from before when you created the wallet to make sure you have all the transactions on the blockchain.


Questions about bitcoin(or other crytocurrency) to satisfy my feeble mind

Cloud mining is generally only profitable for the Operator (otherwise they would mine themselves instead of selling their hash power).
Your account or the exchange getting hacked, or the exchange deciding to suddenly close (perhaps also claiming to be hacked) and taking your funds. If you buy coins on the exchange always use 2FA and take the coins off of the exchange (send to your own cold wallet) as soon as possible.
You can start with as little as you wish. Focus on learning at first. Large, quick profits are very unlikely for a beginner with limited funds. Most "traders" lose money because they are less informed than coin developers/promoters. Focus on code you can see in GitHub, not what developers are promising to deliver in the future.


Is there a difference between the multi-signature and Shamir's secret sharing?

The most fundamental difference is that Shamir Secret Shares shares... well, a secret. Multisig shares the ability to sign, but does not share the private keys directly.

You could use SSS to implement a sort-of multisig scheme. Multiple people come up jointly with a single key, split it into pieces, and then separate them. Now they want to produce a signature... the only way to do that is to first reconstruct the original key, as no signing is possible without it. This implies that to sign, at some point, someone needs to see the full key. If he makes a copy of that key, he can sign any number of messages afterwards. In short: SSS for multisig is only usable if you ever only sign one message. Afterwards, its security advantages are broken.

This is not the case for typical multisig schemes (including Bitcoin's). In that, everyone has their own independent key, and the private keys never need to leave the ownership of their holder. They merely each produce a partial signature, and all partial signatures are combined into a full one. However, a partial signature does not reveal the secret key at all.


What exactly does "trustless" mean in terms of Bitcoin?

Bitcoin is untrusted, in that you don't need to trust a third party to use Bitcoin. Bitcoins are signed over directly from you to the recipient. This is binary, either the bitcoins remain under your control, or they have been signed over to the recipient. You can observe the state of your payment by running a full node, i.e. a Bitcoin client that enforces all rules of Bitcoin independently on the data it received from the Bitcoin network.

As you've suspected, you still trust the software that you're running, the community to continue operating Bitcoin under the same rules, and your recipient not to try to swindle you.

Each of those can also be mitigated to some degree, i.e.

you can review open-source software yourself (or pay someone to do it for you)
you are part of the Bitcoin community that maintains the rules of Bitcoin
if the recipient sent you a bill that specified the amount and the recipient's address, you can prove a confirmed payment by means of the blockchain even if the recipient denies receiving it.


Being paid in Bitcoin from another country

Sure, as long as it's a legal transaction in your country.


What are the consequences from the leak of xpub and child private key?

If the above two keys are leaked, then your master private key at the account level (m/44'/60'/4') can be back-calculated. That means, any private key (both receiving and change) that you derive from that account is compromised.

To elaborate, BIP 44 uses non-hardened derivation to derive private keys after the account level. The child private key derivation equation is kchild = kpar + hash(Kpar, cpar, i). Here k represents private key, K represents public key, c is chain code and i is the index. Now, since your xpub at m/44'/60'/4' is leaked, the attacker has Kpar (first 256 bits of xpub) and chain code, c (latter 256 bits of the xpub). Since your child private key (m/44'/60'/4'/0) is also leaked, that means the attacker has kchild. Using the above equation the attacker can simply back-calculate kpar. Even if he doesn't know the index number (0 in your case), the attacker can simply run an iteration (just a space of 231 to exhaust).

Since your parent private key at the account level is compromised, you cannot use any addresses derived from the m/44'/60'/4' account unless you want to lose your bitcoins. However, you can safely use m/44'/60'/5' or other accounts.


Transfer BTC from online wallet to paper wallet

My paper wallet will still be secure? because i've only used the public key online - correct?

Sure, if the wallet was created securely in the first place then sending to it's public key (address really) poses no threat to it.

  How can I confirm that the BTC's are in my paper wallet?

You can use a block explorer like blockchain.info or blockexplorer.com to check the balance of your paper wallet address.

Might not hurt to do a trial run with a small amount first.


How to recover Bitcoin Cash from Multibit Wallet?

Export the private keys from the Multibit wallet, then import them into a Bitcoin Cash wallet. How to import them will depend on which wallet you choose to use.

Don't use the public addresses associated with those private keys again for Bitcoin transactions (I think you know that already though since you've already shifted your bitcoins away... which is the safe thing to do).


Export keys from MultiBit to Android Bitcoin Wallet?

The format used for exporting the keys is the same for Andreas Schildbach's Bitcoin wallet and MultiBit so basically the answer is yes.

I have done it from my phone to MultiBit by emailing the private key backup from my phone and then importing it into a new wallet created in MultiBit.
The encryption used is the same so the password you use to encrypt it on your phone is the one you use in MultiBit when you import it.

(You get an extra address in the newly created wallet in MultiBit by default - I just label it 'do not use' and never use it.)

I expect you could export it from MultiBit, copy onto an SD card and then import it on your phone to go the other way.


A mobile connects to a node using rpc.

Nodes don't connect each other using RPC. RPC is for node owners, and usually has a long password.

  The mobile then asks the node, to give him a set of transactions for a set of public keys.

Not exactly. First of all, block headers have a part that's named "Merkle root" that allows clients to check if a transaction was in the block. In theory, as described in the whitepaper, SPV nodes can keep block headers, and ask other nodes for Merkle proof of their transaction. In practice, it's more complicated. Currently 99% of the SPV nodes use BIP 37. Besides, better SPV methods such as BIP 157 and Neutrino are being researched.

  Also, when the node receives a request, it needs to scan the blockchain all over again, to get the transaction history?

Nodes do need to scan the whole blockchain for a transaction if they don't know its block height, unless they use txindex=1, etc... If they do, accessing it is trivial.


Can sendtoaddress use account other than ""?

Accounts are deprecated and labels are the alternative for accounts.
I'd recommend using latest Bitcoin 0.17.0 which has multi wallet features which can isolate each user, further read:

https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#Multi-wallet_RPC_calls
https://github.com/bitcoin/bitcoin/pull/13058


paytxfee vs maxtxfee which one overrides the other

One is per kilobyte, the other is a limit on the total.

The second will prevent a transaction from happening if it, following the first, has a too large fee.


What is current size of various databases in Bitcoin Core as of July 2014?

Only the size of the blockchain itself is the same for everybody. You can find graphs that show this size, for example Blockchain Size.

All the other files you mentioned are databases and indexes that your specific client uses to find blocks in the blockchain, or to keep track of transactions or unspent outputs. The sizes of these files are client-specific.


Historical intraday data for altcoins that can be exported?

You can try my website at cryptodatasets.com which has raw and sampled historical data for BTC, ETH and LTC in .csv format.


How do you track the participants of a multisignature transaction?

a multisig tx (e.g. 2of3) has a redeem script, which is basically the hash of three bitcoin addresses. This hash is included in the bitcoin transaction. As per today's knowledge, this hash can only be reproduced, if you have the three initial adresses. If you don't have them, then you can't know, which adresses were initially involved. A hash is a one way. Easy to generate a hash, but extremly difficult (or even impossible) for today's computers, to revert back.