How to generate new address wallet ? I want to use it per customer

First of all, there are two ways to accomplish that.

Create an account at http://www.block.io, generate an API there and they will give you some endpoints to query the blockchain, generate new addresses for your wallet, broadcast transactions and so on.
You can create your own endpoint if you run a full node of bitcoin, there you can create your own transaction, query the mempool for unconfirmed transactions, query blocks to find out if your address is in any of them.

The second way is kinda tricky since you will need to understand how the transactions are stored in the blocks, maybe some parsing, but if you are starting I really recommend you to stick to the first way.

Developing an exchange is complicated, there are a lots of factors to account for. When I was developing mine, I got several issues with transaction checks and confirmation.


Is it possible to have my blockchain on a different folder than that of my wallet files?

For safety and integrity reasons, the wallet file must be held within the datadir. You can choose a different file with -wallet=<file> (config or startup argument). But only a filename not a path.
Don't try to share your wallet between multiple bitcoin-core instances.

What you really want to do is multisig.

You could have a bip32 watch-only wallet with a 2of2 multisig (you can watch the funds, but not spend/sign).
With additional hardware wallets (like an USB stick), something like Trezor or digitalbitbox.com you could – in theory – sing the desired transaction and therefore complete it and make it ready for broadcasting.

But, unfortunately, it's not possible with current version of bitcoin-core without entering the RPC world and also patching and self-compiling bitcoin-core.


How can a reciever verify that transaction data was not altered by 3rd party?

All sensitive operations must be performed on your side. You cannot perform them on the client side and trust the client to pass you the correct information. If you need to call some API to get wallet information, your server needs to make that call.


How many BTC have been paid in fees, in total?

https://www.blockchain.com/en/charts it's for you. In addition to being graphs of any kind, if you scroll to the bottom of the page you will find the Total Transaction Fees chart.

The total as of 2019-08-15 was 66967,60 BTC or 0.37% of the total coins in circulation on that day.


What went wrong transferring my BCC out of Bitcoin Wallet?

Your start with BIP39 was good.

You can check your Bitcoin Cash funds according to the explanation at: How to sweep private extended key from mycellium into coinomi for bitcoin cash coins?

There you can understand your funds in internal and external addresses and how to sweep them into a wallet which in this case is Coinomi.


2.43 TH/s is 2430.00 GH/s. The conversion chart you have is correct.


Is there a fixed total amount of Bitcoin cash?

Is this true with Bitcoin Cash?

Yes, the same.

  Is the only difference between Bitcoin Cash and the original bitcoin a larger block size?

There's one more difference: Bitcoin Cash uses BIP-143 to solve the quadratic hashing and to add replay protection. (BIP-143 is also enabled by SegWit on main chain.) (the formula is hashType | SIGHASH_FORKID (0x40) while it's hashType | SIGHASH_FORKID (0x40) | 79 << 8 (20,024) on Bitcoin Gold)

As @jnewbery said, transactions are now being signed differently, and there's an emergency difficulty adjustment algorithm that makes difficulty lower by 20%, if the blocks come too slow. (More info about it here)

UPDATE November 13 A hardfork has occured. EDA was disabled and a new difficulty adjustment algorithm (cw-144) came. Also the 3rd person malleability (a.k.a. transaction malleability) is fixed. More info: https://www.bitcoinabc.org/november or https://github.com/bitcoincashorg/spec/blob/master/nov-13-hardfork-spec.md


A clarification about Wallet and Addresses (In Armory)

Your understanding is mostly correct, the only thing that is incorrect is that there would be only one transaction that would be sourced with ten different inputs. You only have to input your password, you don't have to manually enter any private keys, unless you are importing new private keys to your wallet.

Since there would only be one transaction that would be accessing all ten addresses for inputs, the ten addresses would be known to be belonging to the same owner.

Also, strictly speaking the BTC aren't "in" the wallet: Rather, the wallet only contains the keys, while the BTC are stored decentrally on the blockchain. The BTC are "in the wallet" only in so far that they can be sent with the keys from the wallet, and that the wallet software keeps an account of what your balance is.

This results in the distinction that you only have to keep safe the keys to protect your spending power, the "history" part of your wallet is only for your information.


Getting transactions and time from Block Chain Info Api

You could use an online JSON viewer like http://jsonviewer.stack.hu (there are many others).

Just paste the return JSON into their text box and click the "viewer" tab. you will then see the JSON data in a formated expandable tree view, making it much easier to identify the transaction ids, times, and blockheights.

The transactions start under the [txs] tab in the tree.


ecdsa - Create Private key and Bitcoin Address

I solved the problem. This is the code:

import os
import hashlib
from hashlib import sha256

def ripemd160(x):
    d = hashlib.new("ripemd160")
    d.update(x)
    return d

P = 2 ** 256 - 2 ** 32 - 2 ** 9 - 2 ** 8 - 2 ** 7 - 2 ** 6 - 2 ** 4 - 1
G = (0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798,
     0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8)
B58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"

def point_add(p, q):
    xp, yp = p
    xq, yq = q

    if p == q:
        l = pow(2 * yp % P, P - 2, P) * (3 * xp * xp) % P
    else:
        l = pow(xq - xp, P - 2, P) * (yq - yp) % P

    xr = (l ** 2 - xp - xq) % P
    yr = (l * xp - l * xr - yp) % P

    return xr, yr

def point_mul(p, d):
    n = p
    q = None

    for i in range(256):
        if d & (1 << i):
            if q is None:
                q = n
            else:
                q = point_add(q, n)

        n = point_add(n, n)

    return q

def point_bytes(p):
    x, y = p

    return b"\x04" + x.to_bytes(32, "big") + y.to_bytes(32, "big")

def b58_encode(d):
    out = ""
    p = 0
    x = 0

    while d[0] == 0:
        out += "1"
        d = d[1:]

    for i, v in enumerate(d[::-1]):
        x += v * (256 ** i)

    while x > 58 ** (p + 1):
        p += 1

    while p >= 0:
        a, x = divmod(x, 58 ** p)
        out += B58[a]
        p -= 1

    return out

def make_address(privkey):
    q = point_mul(G, int.from_bytes(privkey, "big"))
    hash160 = ripemd160(sha256(point_bytes(q)).digest()).digest()
    addr = b"\x00" + hash160
    checksum = sha256(sha256(addr).digest()).digest()[:4]
    addr += checksum

    wif = b"\x80" + privkey
    checksum = sha256(sha256(wif).digest()).digest()[:4]
    wif += checksum

    addr = b58_encode(addr)
    wif = b58_encode(wif)

    return addr, wif

print("=========================")

from ecdsa import SigningKey, SECP256k1

sk = SigningKey.generate(curve=SECP256k1)
vk = sk.get_verifying_key()
addr, wif = make_address(sk.to_string())
print("Address: " + addr)
print("Privkey: " + wif)


What happens if I send small amount of btc lesser than fee?

The money has been placed under the control of the recipient.
There is no way to undo a transaction. Even when the recipient declines to perform the service being paid for.
If you overlooked or misunderstood their terms and conditions, they may feel it is for you to bear the costs of rectifying your mistake.
You cannot get back the money directly yourself, but the recipient could choose to make a payment to you of an equivalent amount after deducting the costs your mistake has caused them. It would cost them money in people's time and in transaction fees to do so. For example, no one will want to spend 2 mBTC of their own money just to send 0.1 mBTC back to someone who made a mistake.
Maybe you could ask them whether, if you make a separate payment that itself exceeds their minimum, they will credit your localbitcoins account with the sum of both amounts? Don't be too surprised if they decline.
Alternatively, perhaps you could consider it a donation to a good cause?


Transaction fees when a block chain is discarded

The blocks on the chain that loses are essentially forgotten. (It's better to call them losing blocks, than "bad" blocks, because they were legal and offered in good faith. They just lost a network race.)

Thus on the winning chain, there's no record of the losing-block reward, or the transaction fees. If there's no record of it in the common history, you don't have it. It's as if the reward and fees on the losing branch never happened.

Many transactions likely already existed in both blocks. (Most redundant blocks happen by accident, and can already contain most of the same transactions.) Despite these transactions, with their fees, appearing in two places for a time window of uncertainty, since only one set of consistent blocks will eventually win, those fees are only meaningfully spent, and then re-spendable, in the winning chain.

Any transactions missing from the winning chain are still eligible for inclusion, as long as they're still consistent with the cemented-history. Anyone building on the winning chain, who still knows about the unverified transactions, might add them on a subsequent block. Anyone interested in ensuring they're still widely-known may continue to broadcast them to peers.


You would likely spend as much buying a couple of decent GPUs as you would buying a small mining rig for sha256/scrypt (i.e. Bitcoin/Litecoin).

You can use "riser cables" to connect a PCI-E GPU to your computer's motherboard without it being inside the case but there is a limit on how long these can be (safety / fire risk).. I think 12-15" is about as long as they get realistically.

FYI:  GPU mining doesn't need a powerful computer, any old computer will do so long as it has suitable PCI-E ports and a few Gb of RAM.


blockchain.info: "No operations allowed after connection closed."

A few minutes ago they restarted the servers, and they won't allow you to make transactions while they're not connected to the network. Since a restart implies a temporary disconnect, you just have to wait a few minutes.


Problem mining Genesis Block in Dash Clone

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

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


How can I use a hardware wallet with a pool

The hardware wallet will have a public address that you use to send coins to. Each coin will have a specific public address. BTC will have it's own. It is the address generated when you open the BTC wallet on your hardware device and elect to 'receive'. Copy and add that into the mining program.


Does a long time storage wallet need to be online?

You don't need the 3rd step for long-term storage. You don't plan to spend your bitcoins any time soon when you're looking for long-term storage. If you download the blockchain now, it will long be outdated when you want to spend your money and you may as well only download it then. Or you choose a wallet which doesn't require you to download the entire blockchain.

Technically, the computer holding your private key doesn't have to be connected to the internet as a transaction can by signed by software running on that computer, then be transferred via a thumb drive to computer connected to the internet, and be broadcast from this second computer. This has the disadvantage that the blockchain has to be downloaded to the point where the transaction which was made to the long-term storage address has been confirmed. So you'll have to decide between [downloading the blockchain and being able to spend your money without the computer holding the private key being connected to the internet] and [not downloading the blockchain but having to transfer the private key to an online computer when finally spending the money].

Electrum can do this. I don't know whether other wallets can do it, too, because I only use Electrum.

Note that you don't even have to have any computer hold the private key. A private key is just a 256 bit number (default case; few restrictions on the range of values it can take, but almost all 256 bit numbers are valid private keys and that's really all there is to them, no magic involved). Numbers can be written down on paper.

Alternatively, you can use a brainwallet.

All 3 have things you can lose to lose your money:

Wallet on computer:

Malware can delete the wallet or encrypt it. (Can happen through infection via thumb drive.)
Your hard drive (+ backups) can break.
Some larger damage (e.g. house burning down) can break the entire computer, including the hard drive.

Paper wallet:

You can lose the piece of paper.
Damage can happen to your piece of paper. (The writing can fade, a fluid can be poured onto it, etc.)
A member of your family might find it and throw it away.
If you print it, a part of the private key may not be printed. This actually happened to someone who asked for help on this StackExchange site. They printed their private key in wallet import format but it didn't entirely fit on the page.
If you write it down by hand, you might make mistakes.

Brain wallet:

You can forget the passphrase.

Combination is possible:

If you have a private key on a computer, you can write it down. Again, the private key is just a number.
If you have a private key written down, you can make it a wallet on a computer.
If you have a brainwallet, you can write the private key down or make it a wallet on a computer.¹

¹ You can't go in the opposite direction without actually remembering the private key (which is absolutely not recommended). Remembering an Electrum seed (which looks like this: "constant forest adore false green weave stop guy fur freeze giggle clock") reliably may actually be possible but I still advise you to use the standard method of creating a brainwallet if you want to use one.


Transactions can have multiple outputs, and multiple inputs. The valueIn field is the sum of all of the inputs of the transaction, not the amount going toward the address you're interested in.

Instead of summing valueIn, you should make a list of all of the outputs, then filter out the ones that aren't sent to the address you're interested in, then sum those up.

  Fun fact: blockexplorer.com returns a value of totalReceived that is different from a value returned by blockchain.info.

The meaning of 'total received' is not well-defined. For example, if I take money at address A, and send it to address A, has address A "received" money? Different APIs calculate this differently.

Note: I assume you're intentionally not looking to find the balance of the address, which is well-defined.


Asking this question on Super User might have resulted in a quicker and more response as this is strictly speaking not limited to Bitcoin.

Sipa's bitcoin-seeder allows you to run the DNS node on a port other than 53, so that you could set up a DNS seed for each of the networks you want to support. In order to receive incoming queries and respond to them you'd then set up a BIND server that acts as a slave for the individual subdomains and then delegate incoming queries to the corresponding bitcoin-seeder. The zone configuration of the BIND daemon does allow you to specify ports other than port 53.


Speculation on rate differences between different exchanges

I think that time prevents people from exploiting your schema. It takes from few days to may be a month to withdraw money from mtgox. Delay from transactions sounds negligible in comparison to this.


Check the transactions section in you dashboard else contact the technical support.
here is the answer i found in their website : https://www.simplex.com/faq/

Usually, payments are processed within the hour; however, some cases require more attention and can take up to 24 hours to be approved.  You will receive an email once your payment has been reviewed.

If your transaction is still pending, it might be because you have yet to submit to a verification request.
In such cases, an email is sent asking for proof of identity or card ownership – which can land in your spam folder. In case of delays, please check your spam folder for a verification email.


Miners submit shares to the pool to prove that work has been done. Shares are easier hashes than blocks (by default, one in 2^32 hashes will be a share), and there is no way to find shares without doing the work needed to find blocks. See also What is a share? Can I find it while mining solo, or only when pool mining?

However, a miner can do the work but still refuse to send valid blocks if he finds them. This is called block withholding and can be used in several attacks.


How to get the private key in hex from the output of dumpprivkey

OK, I managed to do it with the excellent bitcoin-tool by matja
https://github.com/matja/bitcoin-tool

git clone https://github.com/matja/bitcoin-tool.git

cd bitcoin-tool

make test

./bitcoin-tool --input-type private-key-wif --input-format base58check --output-type private-key --output-format hex --network bitcoin  --input "KzRVLwCuCi2tH2PpSNZnwUqPwg6gaqXAM2LWobUurzAsNdC5JesE"

which gave me
5f92519eef7ec4e37cbcd25f9ba4a82e5acf9a8cd274d4d3aa3aa727fd7b6969

as a result.


Sequence numbers aren't shown on the Bitcoin Block Explorer HTML pages because they are not used by the network currently. Non-default sequence numbers would be shown on raw block/tx pages, but I'm not sure whether this has ever happened.

Sequence numbers are intended to be used for replacement. Replacement is currently disabled, but how it would work is:

You send a transaction with a LockTime in the future and a sequence number of 0. The transaction is then not considered by the network to be "final", and it can't be included in a block until the specified LockTime is reached.
Before LockTime expires, you can replace the transaction with as many new versions as you want. Newer versions have higher sequence numbers.
If you ever want to lock the transaction permanently, you can set the sequence number to UINT_MAX. Then the transaction is considered to be final, even if LockTime has not been reached.

This is useful in several cases. For example, two parties can use it to set up a "prepared transaction". Once the prepared transaction is created, the parties can move money between each other instantly, securely, and without fees. So you could set one of these up with an exchange and withdraw and deposit without waiting for confirmations.

Since replacement is not used currently, all transactions Bitcoin creates have LockTime = 0 and Sequence = UINT_MAX. This is the case with the genesis block's generation transaction.


The estimate is 2140 based on the block reward halving frequency of four years. According to math and knowledge that there are 32 halving events, in 2136, the block reward will yield 0.00000168 BTC per day, which is 0.00000042 BTC per block. That's 42 satoshis.

It's arguable that there could be one additional halving, to a block reward of 0.00000021 BTC, but that would require a major protocol modification since the number of Bitcoin would then exceed 21 million. Additionally, to go past that, there'd have to be a protocol modification to extend divisibility past eight decimal places. It is far, far to early to worry about either of these, because we're more than a century away from this problem.


Technically, this is possible. However, it would be a hardfork, so all users would have to upgrade. In such a large ecosystem that exists around Bitcoin today, this would be rather disrupting.

Such change would also have unclear security implications. Miners would be naturally eager to accept as many transactions as possible, so a spammer may gradually push block size limit up to increase the time it takes the network to process new blocks. This would lead to an increase in orphan rate, which would make it easier to mount a 51% attack, especially with the help of selfish mining.

This idea was discussed many times on Bitcointalk. While most of the developers agree that a change would be necessary eventually, any specific plans have yet to be announced.

By the way, some altcoins, such as Monero and Cryptonite, have variable block size limit using rules similar to the ones you propose.


An unspent output is simply an output of a transaction which isn't yet an input of another transaction.

To take the example from ripper234's answer (in which generated coins are immediately spendable, and we don't have to wait 100 blocks for them to mature), where:

The first block contained 50 mined BTC in address A (A = 50)
The second block contained 50 mined BTC in address A, a transaction sending 20 BTC to address B, and putting the change in address C (A = 50, B = 20, C = 30)
The third block contained 50 mined BTC in address A, a transaction sending the 20 BTC from address B to address D (A = 50 + 50, C = 30, D = 20)

So, after three blocks, there are four unspent outputs:

A has two unspent outputs worth 50 BTC each
C has a single unspent output worth 30 BTC
D has a single unspent output worth 20 BTC

And there are two spent outputs:

the 50 BTC generated in the first block, spent in the 2nd block
the 20 BTC output created in the 2nd block and spent in the 3rd block

Note that unspent outputs don't merge together.  The two unspent 50 BTC outputs at address A are separate, and will remain separate at least until they are spent in a transaction


What advantages and disadvantages does Ethereum have over Bitcoin?

I'll answer the middle question from the White Paper. Bitcoin can allow simple scripting and a weak version of smart contracts. The scripting that you can do has these limitations (quoting from the white paper, where UTXO means "unspent transaction outputs")

  Lack of Turing-completeness - that is to say, while there is a large subset of computation that the Bitcoin scripting language
  supports, it does not nearly support everything. The main category
  that is missing is loops. This is done to avoid infinite loops during
  transaction verification; theoretically it is a surmountable obstacle
  for script programmers, since any loop can be simulated by simply
  repeating the underlying code many times with an if statement, but it
  does lead to scripts that are very space-inefficient. For example,
  implementing an alternative elliptic curve signature algorithm would
  likely require 256 repeated multiplication rounds all individually
  included in the code.

  Value-blindness - there is no way for a UTXO script to provide fine-grained control over the amount that can be withdrawn. For
  example, one powerful use case of an oracle contract would be a
  hedging contract, where A and B put in $1000 worth of BTC and after 30
  days the script sends $1000 worth of BTC to A and the rest to B. This
  would require an oracle to determine the value of 1 BTC in USD, but
  even then it is a massive improvement in terms of trust and
  infrastructure requirement over the fully centralized solutions that
  are available now. However, because UTXO are all-or-nothing, the only
  way to achieve this is through the very inefficient hack of having
  many UTXO of varying denominations (eg. one UTXO of 2k for every k up
  to 30) and having O pick which UTXO to send to A and which to B.

  Lack of state - UTXO can either be spent or unspent; there is no opportunity for multi-stage contracts or scripts which keep any other
  internal state beyond that. This makes it hard to make multi-stage
  options contracts, decentralized exchange offers or two-stage
  cryptographic commitment protocols (necessary for secure computational
  bounties). It also means that UTXO can only be used to build simple,
  one-off contracts and not more complex "stateful" contracts such as
  decentralized organizations, and makes meta-protocols difficult to
  implement. Binary state combined with value-blindness also mean that
  another important application, withdrawal limits, is impossible.

  Blockchain-blindness - UTXO are blind to blockchain data such as the nonce, the timestamp and previous block hash. This severely limits
  applications in gambling, and several other categories, by depriving
  the scripting language of a potentially valuable source of randomness.

Ethereum is designed for contracts and in fact implements a Turing-complete virtual machine on the blockchain.


Why does P2SH-P2WPKH use DER encoded signatures?

Segregated Witness was already a large collection of changes that impacted several parts of Bitcoin (P2P, validation, fee estimation, sighashing, script execution, ...).

Many small improvements could easily have been added to the proposal (including the signature encoding, the superfluous stack pop in OP_CHECKMULTISIG, the signature algorithm, various script extensions, new sighash flags, ...). However, we wanted to avoid letting the scope grow too large, to avoid bikeshedding and review burden. Instead, a script versioning system was introduced that would make it possible to later pretty much enable adding in any other change as a softfork).

So the answer is that DER is still in use in P2WPKH simply because it was in use in P2PKH and it didn't change. However, I expect that future proposals will come soon enough to change it to pure 64-byte signatures.


Accepting micropayment donations via Lightning Network - what is the most efficient / recommended architecture?

I was able to signup and accept Lightning payment in 2 minutes: https://www.opennode.co/

  OpenNode is the easiest way to accept bitcoin.

It was easy. Looking no further. And they offer API: https://developers.opennode.co/

I admit I've spent a little bit too much analyzing which VPS and what hardware requirements. The process of configuring everything from scratch is daunting, wish there was a 1-click install: https://github.com/lightningnetwork/lnd/issues/3159

Something similar to: https://medium.com/lightning-power-users/windows-macos-lightning-network-284bd5034340 (unfairly easy, no excuses not to run a full node)


None of the values mentioned are linkable in any way to the software that generated the address. Bitcoin Addresses are standardized, and all wallets follow identical rules for generating them.

Your only option to determine which software an address originated from is to have some backup of the wallet file, or some other indicator, such as an email confirmation.


Can someone explain how the Bitcoin Blockchain works?

If you are completely new to Bitcoin, you may find my second answer more accessible, which is a less technical description.

As you said, the blockchain is a log of all transactions that were ever verified on the Bitcoin network.

The transactions are collected in blocks, which are found approximately every ten minutes in a random process called mining. As transactions transfer ownership of Bitcoin balances, each of these blocks represents an update of the user's balances on the network.
By following the blockchain from the Genesis Block and applying all transactions that were validated in each block in the correct order, you arrive at the current status quo.

Each block header contains:

 [Illustration by Matthäus Wander (Wikimedia)]

Timestamp:
The time when the block was found.
Reference to Parent (Prev_Hash):
This is a hash of the previous block header which ties each block to its parent, and therefore by induction to all previous blocks. This chain of references is the eponymic concept for the blockchain.
Merkle Root (Tx_Root):
The Merkle Root is a reduced representation of the set of transactions that is confirmed with this block. The transactions themselves are provided independently forming the body of the block. There must be at least one transaction: The Coinbase. The Coinbase is a special transaction that may create new bitcoins and collects the transactions fees. Other transactions are optional.
Target:
The target corresponds to the difficulty of finding a new block. It is updated every 2016 blocks when the difficulty reset occurs.
Nonce:
An arbitrarily picked number to conveniently add entropy to a block header without rebuilding the Merkle tree.
The block's own hash:
All of the above header items (i.e. all except the transaction data) get hashed into the block hash, which for one is proof that the other parts of the header have not been changed, and then is used as a reference by the succeeding block.

As many miners compete to find the next block, often there will be more than one valid next block discovered. This is resolved as soon as one of the two forks progresses to a greater length, at which any client that receives the newest block knows to discard the shorter fork. These discarded blocks are referred to as extinct blocks (sometimes also referred to as orphaned blocks, although their complete ancestry is known).

When a transaction is submitted to the network, it is passed on peer to peer by all clients. Upon discovery miners will put it on their list of transactions that they want to verify and update the Merkle Root.

On Blockchain.info you can track a transaction either by requesting the page directly with the transaction hash

http://blockchain.info/tx/<transaction-hash>
e.g. http://blockchain.info/tx/37df28642f97db7003a7bc6663467eb1e9cb4493b6c94bf089ee77f87acdae3d

or by calling one of the involved addresses through

http://blockchain.info/address/<address>
e.g. http://blockchain.info/address/1DrZtRNsSu9BqGcY4D9etFno4H95DqNmKb

Either way for each transaction you will see a line with a big arrow that shows you which addresses' were used to fund the transaction and what addresses received which portions of the transaction.


There is no simple algorithm to estimate the difficulty. Doing that requires you to first determine the cardinality of the intersection between the regular language expressed by the input regular expression, and the set of all valid public keys.


Why is a 51% attack guaranteed to outpace the rest of the network's miners? Doesn't 51% hashing power give only a slightly higher chance?

With any probability distribution, a larger sample size will converge onto the expected probabilistic outcomes.

So if you had 51% of mining power, there is a chance the other 49% of miners will outcompete you on a short time scale, but over longer time scales we’d expect you to win.

Really, the threshold for this is just >50%, but a ‘51% attack’ has become the colloquial term for this.

Note that a 1-2% of an advantage may not sound like much, but that’s the house favour on many casino games, and casinos generally seem to have no problem staying in business (despite sometimes paying out big to lucky players). Over long enough time scales, we reliably see a regression to the mean.


Can I have multiple OP_RETURN outputs in one transaction?

Can inject multiple OP_RETURN outputs in one transaction?

At the protocol level, absolutely nothing prevents you from doing this. However, such a transaction would not be considered a 'standard' transaction and would not be relayed (propagated) through the network.

Let's say, though, you were a miner yourself. Then you could mine a transaction with 100 OP_RETURN outputs in it, and no one would reject your block because of it.


You may run bitcoin-qt the very first time just executing bitcoin-qt.exe (I assume you are windows user) and make changes later

Yes, there are some useful options. For example, I do not like that this program creates database on my disk [C:] under the \users\user...\folder

I like to keep my bitcoin database in D:\bitcoin

So, I have created file bitcoin.bat with the following contents:

start bitcoin-qt.exe -datadir=d:\bitcoin

There are other options, but I think that you will find them yourself later. Default options are quite good.


Bitcoin.conf doesn't exist in my Windows 10

In Bitcoin Core, go to Settings > Options and click the button labeled "Open Configuration File". This will make a bitcoin.conf file and open it in a text editor. Add the lines that you want (probably prune=550) and save the file. Then restart Bitcoin Core.


If you can self-compile bitcoind/Bitcoin-Qt (or find someone who can compile it for you) you could use REST:

https://github.com/bitcoin/bitcoin/pull/6013 (adds mempool information to the REST API)

Or maybe have a look at the RPC call getrawmempool true (mind the true for verbose information).


Can an attacker use a modified Bitcoin node to pass fake transactions into the mempool?

[The miner] edits code of bitcoin software to set his own verification rules for transactions so that he can bypass all the invalid transactions from his accomplices to mempool. Is it possible?

Yes and no.

Yes, it is entirely possible to modify the code to include whatever sort of transaction validation rules you want.

No, you cannot use this to trick the rest of the network into accepting your invalid transactions. Your node would be banned by other nodes in the network, since it is not following the rules of the network. The network is formed by the connections of thousands of individual nodes, that all follow the same rules. If a node breaks those rules, then the rest of the network will simply ignore them.

By changing the validation/consensus rules, you would effectively be creating a new altcoin network.


Is there a website / api where I can access historic coinbase data?

You can request this data via the API.

A request could look like that
https://api.pro.coinbase.com/products/BTC-EUR/candles?granularity=60&start=2018-11-09T17:11:08Z&end=2018-11-09T18:11:08Z


can I run bitcoin core with public key only

That would be a watch-only wallet - usually achieved by importing an externally derived address.

  deploy bitcoin core online with public key only that I believe should be enough to generate new addresses

In principle you can derive addresses from a public key but, as far as I know, Bitcoin core doesn't provide any way to import a public key and derive addresses from it. But I haven't tried.

See

How to import an extended public key into bitcoin core 0.16
https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/importpubkey/

You could always generate addresses from a public key externally and then use the Bitcoin core API to import those addresses. There are many Bitcoin libraries for popular programming languages.

How bitcoin addresses are generated?
https://godoc.org/github.com/btcsuite/btcutil#NewAddressPubKey


Disabling GreenAddress 2FA ∵ Google Authenticator doesn't generate the correct OTPs for it

The only reason I can think of that would result in the above with a valid OTP seed is invalid OTP settings (but default should work for Google Auth) OR incorrect time on the device OR invalid time (drifted) on the GreenAddress service clock.

I checked for the last one personally and the services clock is fine: in my experience most of the time is time/synchronization on the device.

There is no way of disabling GreenAddress 2FA without 2FA however users that created 2of3 subaccounts can use their two keys to spend/recover and users that enabled email notification with nlocktime can bypass the 2FA after a period of time (by default 90 days, min 1 day, or maximum nlocktime allows)

Thanks


I used a BTC mining site and paid the fees but never got paid

To give this a clear answer, so it can stop being bumped:

You have been scammed.

You are not going to get paid, and it is very unlikely you will be able to recover the money you have sent.  Accept that your money is lost, and don't send them any more.


Receive unconfirmed transactions using Insight API

It is relatively easy to build a simple program that connects to some peers in the network and receives transactions that are being broadcast. You do not need a third party service to do so.

Pycoin includes some simple examples that connect to the network and receive inv messages, all you'd have to do then is to send getdata to the peer announcing the transaction. Disclaimer: I am the author of pycoin.


You cannot determine the software used to create an address wallet, and this is by design. Anything else would be a serious security flaw: everyone you transact with would be given information about how you store your bitcoin.

  wallet name(1fac700f695d9d63)

I assume this comes from an explorer site like OXT. If so, then it is simply an index created by their system to group transactions according to certain heuristics, it does not provide any info about the wallet software used in the first place.

I hope you are able to locate your coins, but the information you’ve provided is not sufficient to do so. Best of luck.


Transactions confirmed on Blockchain but nothing received to my Blockchain wallet

The final balance and total received sit at:

  Final Balance  $ 395.48

So I assume you haven't been able to access the coins yet. What wallet are you using? Is it possible that you have multiple addresses in your wallet and you need to manually find the privatekey/balance of 14kQfsxstFMjhL1RJAngoiEU13BaVUVjbS? Because from the Blockchain everything seems fine.


MultiBit won't open, says "Java not installed"

Define a JAVA_HOME environment variable with the path to your jre/jdk installation in it. That worked for me.


Using the output of listtransactions how can I calculate the balance of certain addresses?

How do I calculate the balance of addresses.

You don't.

There is nothing interesting about the balance of an address.

You may care about how much money you have in your wallet overall; for that, there is the getbalance RPC call.

You may also care about whether a particular payment was received (identified by the address you gave out for that particular invoice). You can use the getreceivedbyaddress RPC.

  Add up the amounts from all transactions of the receive category for a given address and filtering out transactions that have less than the minimum required confirmations. Is there anything I'm missing or any gotcha's here.

That will work, but essentially do the same as getreceivedbyaddress. It won't give you a balance, just how much was received.


If you know Python, pycoin might be a good place to start for a hd wallet implementation.


Can i do mining with a normal PC?

Yes, you can.

  I don't have too many expectations. Maybe 0,1 in one week?

No, not possible. You will effectively compete against all computational resources on Earth, that are now cracking this nut. If I can estimate, a humble home PC will produce around 1 - 100 MH/s, based on CPU or GPU mining stats. This range covers different CPUs and single-GPU computers. You can compare hash rate with the profit estimate using this calculator. Based on the hash-rate, your electricity bill will much out-weight any profit from mining.

To achieve a 0,1 BTC/week you'd have to invest in a pretty expensive, power-hungry ASIC box that can produce tens of GH/sec, subject to ever-increasing complexity.


Is there an API with which I could obtain the exchange rate of bitcoin to dollar some time in the past by giving the desired time as parameter?

You can use winkdex.com api, it accepts a unix timestamp as a parameter.
http://docs.winkdex.com/#price


Someone might have a copy if they have a long-running node - they  would have had to have upgraded while the hard fork took place to be synchronized today

The transaction was executed by someone who knew of, and wanted to demonstrate the issue. The overflow meant the summed output value was less than the total input amount, despite actually minting billions of bitcoin out of thin air.

It's unlikely the problem would have happened accidentally, the amounts would have been crafted to trigger the bug: two outputs with amounts exceeding the 21 million limit are required to trigger it, so with just one, it would have been rejected.


How are mined blocks broadcasted in a distributed environment?

Miners operate nodes (as do many non-miners). These nodes make connections to each other. When a node receives a block or transaction from another node, it will check the block or transaction and then send it to the other nodes it is connected to. In this way, a block or transaction reaches every node in the network.

The miners do not connect to some central server or service in order to broadcast blocks to the network. They simply send the blocks to the nodes that they are connected to and the blocks are then relayed to all nodes.

As for how a node figures out who to connect to, please see this question: How does the bitcoin client make the initial connection to the bitcoin network?


Is it possible to transfer BitCoins from BlockChain to CoinBase?is there any transaction fee invloved?

There will be a fee because the transaction will be broadcast and saved to the Bitcoin blockchain. You can probably start the transfer process on Blockchain and they will show you a preview of what they estimate the fee to be. It all depends on the size (in bytes) of the transaction. For more see their explanation about bitcoin fees


To accept a Bitcoin transaction, you only need to give out a hash of the public key also known as the Bitcoin address. That said, if you are a merchant then the recommended practice is to give out a new bitcoin address for every transaction to make it easier to distinguish between orders from different people.

Assuming that whatever Bitcoin client you choose is honest, then it doesn't matter what client you use. Underneath it would be the same message broadcasted by the Bitcoin network. You don't need to have a client open at all times to send or receive payment, but if you use Bitcoin-Qt then you would need to have an up-to-date blockchain database in order for client to scan through the blockchain to show all received/sent transactions and display the correct balance.


Are bitcoins really immune to inflation?

Specifically, bitcoins are immune to M0/MB inflation, meaning that the money supply itself does not inflate, except at the very beginning (which we're still in) while the original 21 million BTC get distributed via the mining process. Once 21 million coins exist, they become deflationary since no new coins are issued and, as naturally occurs, money falls out of circulation as wallets are lost.

Bitcoin could still suffer the kinds of inflation most currencies see in M1/M2/M3/MZM such as fractional-reserve banking, but the idea of a publicly published block chain is that at any moment it should be trivial to audit a bank and ensure their deposits are correctly recorded. Essentially, any institution practicing fractional reserve banking should be much easier to spot and those who dislike such practices can more easily walk away from them. There are complications to this model, but that's the ideal anyway.


Can Bitcoin Days Destroyed be a better resolution mechanism for competing blocks?

Thanks to Murch, I'm answering my own question; Yes!

Murch made the point that using BTCDD enables a selfish miner to mine a non-broadcast transaction that spends old coins rather than having to rely on a network propagation advantage.  I understand this objection.  That advantage is easily removed by excluding from your BTCDD calculation transactions that you didn't see until you got this new block.  Now the selfish miner has to broadcast his old-coin transaction.

(edit due to comment:) While it is true that some BTCDD-heavy transactions will have gotten to one miner and not another, making the tie-breaking strategy arbitrary, because neither will have the BTCDD-heavy transaction privately mined by the selfish miner, it is still more effective at discouraging selfish mining than letting the network choose randomly, if and when you can assume that most miners will have seen both blocks around the same time.  BTCDD is arbitrary because of incomplete propagation of transactions, but because of fully propagated transactions, it is less arbitrary than first-seen.

Also, you can't spend just a part of an input.  I submit that it's harder to have (enough) old coins than it is to set up a global network of tightly connected nodes for cheating.  I suppose I could be wrong, but old coins is always a dwindling resource and global nodes willing to help cheat is probably a growing one.

The only purpose for orphaning a block is that you've already been mining on top of your replacement for it. This point was made soon after Sirer and Eyal described their selfish mining vulnerability, though quite indirectly.  Using a "later block" to do that would severely diminish the advantage.  The point is to discourage sitting on solutions by making the later block more likely to be accepted.  Would you consider throwing away any seconds of your own mining when you see an alternate solution?  To discourage selfish mining, I'd do a few seconds, I guess.

I also very much like discouraging empty blocks, but who mines empty blocks just to do a selfish mining attack?  Oh wait, that's probably the best way to do it!  Hmm...


BITCOIN SCRIPT: Write the bitcoin ScriptPubKey script for a transaction that can be redeemed by anybody who supplies a square root of 1764?

decodescript 769502e40687
{
  "asm": "OP_DUP OP_MUL 1764 OP_EQUAL",
  "type": "nonstandard",
  "p2sh": "3JQspThZ3pAdZZjUfb6hni5f8rW9yYonJv"
}

https://bchsvexplorer.com/address/3JQspThZ3pAdZZjUfb6hni5f8rW9yYonJv


Do vanity addresses lower the security of my key? (reduced complexity)

No they do not.

A vanity adress is only trying to pattern match a specific part of an address. The complexity remains the same.

To generate the vanity address it usually takes millions of attempts per second to find a public key which matches your pattern. This is done by cycling through private keys and and checking the corresponding public key.

If an attacked was to do the same thing then they would still need to cycle through every combination of your pattern aswell, which is just as extensive.


Can bitcoin transactions be modified during mining

Generally, no. Most transactions contain a digital signature which signs a hash of the transaction. Usually this hash includes the entirety of the transaction, so changing any part of the transaction would invalidate the signature and thus invalidate the entire transaction.

There are some exceptions though. There are some signature hash types which don't include specific parts of the transaction thus allowing output to be changed, inputs to be added, etc. There are also some transaction output types which don't require a signature. However these signature hash types and output types are not created by wallet software. Making them requires you to know exactly what you are doing and either make it by hand or use custom software. The vast majority of users will never need to use or make such transactions.

Whoever told you that transactions can be modified in a block and then the blockchain extended to make that transaction valid is completely wrong. Besides the fact that transactions cannot be changed like this and still be valid, including a transaction in the blockchain does not automatically make it valid. It must be valid to be included, and if it is invalid, the block is invalid and nodes will reject it so it isn't actually added to the blockchain that everyone is following.


A bitcoin node is a user which is connected to the network through a client. This node can perform transactions, try to build a block inside a mining pool, or just exist in the network. Are there any further actions for a node?

Nodes also relay blocks and transactions to other nodes. They also validate incoming blocks and transactions and keep track of the current, longest valid blockchain. That's pretty much it.

  If a node exists inside the network how can he verify the transactions?

There are a set of mathematical rules that determine if transactions are valid. The nodes check the transactions against those rules. If they meet the rules, they are valid.

  Furthermore is there a paper or something that explains things in a lower level of how exactly the system works in case of transactions and mining? I do not want a description but something more technical.

Almost every question you can think of is answered, in technical detail, somewhere in the Bitcoin wiki.


Yes there is a luck factor - mining is just probabilities, it is all about luck and probability. Technically every miner, no matter how big, has a chance of mining the next block. But more powerful miners have a higher chance, like they've bought more lotto tickets, than those who have only smaller mining rigs. This makes the probability of mining a block using a GPU so tiny that it's almost certainly never going to happen.

See this answer for more info: In the ASIC-age, is it worth starting mining Bitcoin at home?


How hard is it to alter a block after it was found?

Once a miner has found a block, how easy it is for him to add or remove a tx included in that very block?

It is impossible. The solved block depends on every byte of transaction data, nothing can be changed. It is important that it be this way. What if I could broadcast a solved block but leave out the transaction where I sent coins to someone else, essentially reverting my spend? That would make for an insecure system.

  Would he have to solve the modified block from the scratch or is there a point he can resume the solving process?

It is basically like starting over. This is mainly because of the merkle root in the block header. Think of it like a function that depends on every single byte of the transactions, and if any of the transactions change then the function output changes completely.

See this for more info on merkle trees in bitcoin: What is the Merkle root?

EDIT: I wanted to add this mining analogy that I find useful.

Each hash that the miner computes has a chance to solve a block. Mining is basically like taking a video of yourself flipping 256 coins, trying to get a long string of heads. How long the string of heads needs to be is determined by how many other coin flippers you are competing with. If you get a long enough string of heads, you show the proof (video) and get the reward. Otherwise, you just try again. You essentially start over each time you do a new hash (so billions of times), and changing your block data doesn't make you any more or less unlikely to flip the coins successfully.

Notice how it takes a lot of work to flip the heads successfully (it would take you many tries, where each try is really easy), but very little work to verify that a video of coin flips is legitimate.


How do I find the public key of a bitcoin address?

Get the private key of your address, then go to brainwallet.org, and switch the tab to Generator->Private Key, then paste in your private key. Your address should show up on the right. If it doesn't try switching it to Compressed. Your public key (in hex) will be the thing marked Public Key (SEC).


Does the unique ID of an Armory wallet give any information about it?

According to the source code the wallet ID is an address byte and the last 5 bytes of the first address, encoded as base 58. The last 4 bytes of the address are part of a SHA-256 hash of the first part of the address. The address itself is the private key hashed once with SHA-256 and once with RIPEMD-160. So the only information contained in the Wallet ID is checksum information, which is also contained in your publicly available address. The address is available since it is the one you transferred your coins to.

I'm pretty certain that having the wallet ID visible isn't going to leak any information.


The Wallet Service requires the from option to be specified when sending from an account. It's only optional when your BTC is located in your normal, imported addresses.

Assuming you received funds to your first wallet account, you would set from: 0 and the send should succeed.


What precautions should i do to avoid being scammed for Bitcoins?

Always be alert and take the IP address and other social media details of the buyers before making any trade or exchange.Use middleman services and also trade with trusted buyers on regular basis.Never go first with new buyers.Many more.


Generating bitcoin wallets for my customers

You can do this easily using bitcoincore. Brief overview of process (Source: bitcointalk thread)

Generate unique address using getnewaddress
Register on walletnotify to get txid as notification
Call gettransaction with txid from step 2 to get details/address of payment received


Why am I getting payouts from 6 blocks with only 1 share found with a LTC P2Pool pool?

The payout method in p2pool is based on PPLNS. In this method, every share is rewarded for each block found within the next N shares. Depending on the exact value of N and the luck in finding blocks by the pool, this can mean several blocks.


Send an email when there is activity on a NXT / Ardor account address in php?

you can write up a PHP script to grab all the transactions within a set timeframe of the account. Save them in a file.

schedule a cron job to run the PHP every few minute, when it runs, compare the new transactions with the saved one.

If it's new, send an alert email, and update the file.


I would highly recommend using Ubuntu Server for this, as long as you know what you are doing without a GUI. Not having a GUI at all means smaller OS size and much less OS tasks. This translates into more power savings. If you are using graphics cards, a non-GUI OS will improve your mining performance. If using an ASIC/etc. you probably will not see performance improvements, but you should definitely see power consumption improvements.


Is it possible to edit Bitcoin Core to broadcast non-standard transactions?

Is it possible to edit bitcoin core to remove the IsStandard function and broadcast non standard transactions?

Yes, it is definitely possible. But I suggest not to patch core client, but create a small separate program for this task.


How exactly do I run the -rescan command for bitcoin-qt from console on a Mac?

Method 1

Open "Finder".

Press Cmd + Shift + G

Paste this:

~/Library/Application Support/Bitcoin

Edit bitcoin.conf with TextEdit

Add this line:

rescan=1

Save it, then run Bitcoin-qt.

After you the rescan ends and you quit don't forget to revert the bitcoin.conf

Method 2

Right click Bitcoin-qt

Choose "Show package contents"

Go to  Contents/MacOS/Bitcoin-Qt

Run Terminal.

Drag the file to terminal

Type -rescan

Press Enter.

Don't quit Terminal before the rescan ends and you quit Bitcoin-qt

It's done.


Have a look to https://blockchain.info/tx/055f9c6dc094cf21fa224e1eb4a54ee3cc44ae9daa8aa47f98df5c73c48997f9?show_adv=true

At the bottom of the page you can see "disassembled" output scripts. Yes, outputs 0, 1 and 2 have the form of 1 pushdata33 pushdata33 2 CHECKMULTISIG so these outputs are 1-of-2 multisig outputs. But you should look even deeper! The compressed form of public key is 33 bytes long and must start with 02 or 03 in hex representation. What do you see on that page? The lines

20434e545250525459000000140001a9e0e85838b5000000174876e800010053b6
20a3c3000000000000000000000000000000000000000000000000000000000000
100000000000000000000000000000000000000000000000000000000000000000

do not start with 02 or 03 so they are not public keys. It may be some garbage or another protocol layer like a counterparty. I do not know.

The modern Bitcoin Core client does not try to convert these chunks of bytes to a public keys and does not try to create human readable addresses. So, you see only one address 1FrbMcddiM1v3HMpUqygjZYCamBykWCWao in console. This is not a bug, this is a feature.


bitcoind (JSON-RPC) returned HTTP 403 error, i don't know why

Your rpcallowip setting is 10.0.2.0, but you listed 10.0.2.2 as the host OS's IP. That could be your issue.


How are wallets updated with new balances?

your question is unclear on verification. I think you are asking for this process: You create an address, give it to your friend, he creates a tx, and sends it to you. At this point in time the transaction is not yet mined, but you anyhow get within seconds a message, saying someone sent you some funds.

In the background the wallet software is constantly looking for updates on the network, and here for s.th. like "my address". This eventually triggers the  "funds sent to my address" message on the wallet. At this point in time it is unconfirmed. Roughly after 10minutes it should get its first confirmation, which means it is also included in a block (and verified in all details).

SPV wallets don't do verifications in the same way as full nodes. Full nodes verify each transaction, as described here.


Worth investing in to a cloud mining companies?

Yes, profit will be even lower. Hash rate has grown from 540 PH/s to 1800 PH/s in the last year. At that rate it will take much longer than 13 months for your ROI.


What technologies one should learn to become mature in cryptocurrency

Studying Bitcoin and it's core protocols is the best place to start if you want to take the 'blockchain train'. Almost all cryptocurrencies today are bitcoins code forked and changed for their respective implementations However, for the concepts required in understanding bitcoin, I suggest the following pre-requisites.

Mathematics

Probability: Basic probability theory for understanding the calculations about the probabilities of deriving private keys using brute force. Although you might not be able to fully understand whats given in the white paper, for which you might need some more knowledge.
Permutations and Combinations: Basic knowledge to calculate the numbers involved in finding the probabilities.
Byzantine General's Problem: Understand the problem and the possible solutions

Cryptography

Cryptographic hash functions (SHA-2, RIPEMD160): In depth knowledge would obviously help, but just a gist of what they do would suffice
Digital Signatures: After getting a grasp over what they are, you should take an in depth look into ECDSA's which would help you in appreciating the mathematics and the sort of 'invincibiltiy' of the underlying algorithm and further strengthening of the same in the bitcoin implementation

Data-Structures

Linked Lists: Basic knowledge of linked lists
Trees: Basic knowledge of trees, different kinds of trees. Concentrate more on binary trees and later on what merkle trees are
Stacks: How stacks work and some basic implementations of the same

Networking

Basic knowledge of networking like IP, broadcasting/multicasting, P2P networks (torrents) would suffice

After getting a good grasp on the above topics you can continue with the book you have mentioned, or if you want videos, then there is a playlist on youtube by Princeton University on Bitcoin and cryptocurrencies, the first three lectures would be enough for you to start programming and getting your hands dirty with the Bitcoin Core software


The link you provided seems dead by now but there is an online documentation available at http://counterparty.io/docs/about_counterparty/.


How can a light client be certain he got all relevant transactions?

It can't. However, it is sufficient to request the information from a single honest peer, as the proof does work in the other direction.

This is one of the major drawbacks of using BIP37 for learning about transactions (other downsides include terrible privacy and high load on the servers you're fetching from).

Several proposals exist to improve this, including Committed Bloom Filter and committed adress-indexed UTXO sets. None of them have been implemented, however.


Can I use Antminer S7 PSU to supply the Antminer D3+?

In theory it should work. The Antminer D3+ uses less than 500 watts whereas a S7 power supply provides over 1000 watts.

You should make sure that the power supply is compatible in other respects. You need to make sure the S7 power supply and the D3+ that you are considering are made for the same voltages and frequency (which vary across the world)


Could you open a lightning channel in a confidential transaction?

Short answer: yes.

However that depends on the question if liquid supports segwit and creation of a lightning network. I have not looked at the details of liquid but I believe it does.

The lightning network protocol itself is pretty agnostic to the underlaying blockchain. If you look at the channel announcement messages defined in BOLT7 you will see that every message has the following data fields

[64:node_signature_1]
[64:node_signature_2]
[64:bitcoin_signature_1]
[64:bitcoin_signature_2]
[2:len]
[len:features]
[32:chain_hash]
[8:short_channel_id]
[33:node_id_1]
[33:node_id_2]
[33:bitcoin_key_1]
[33:bitcoin_key_2]

in particular the 32 Byte field [32:chain_hash] is supposed to state the hash of the genesis block (which could be the genesis block of the liquid network). In this way payments can be routed through channels supporting different assets (Bitcoin, litecoin, ...). I don't see any reason why liquid would not be supported.

Actually liquid would make more sense than other assets as 1 LBTC should still be the same value as one BTC. As for varying assets there is an issue pointed out by ZmnSCPxj last december regarding the problem with switching the asset during the routing process.


Values for txid and vout for create a coinbase transaction

The coinbase transaction contains a single input, which has  txid set to 0000000000000000000000000000000000000000000000000000000000000000 and vout set to 0xFFFFFFFF.


Bitcoin-qt taking forever to acquire the blockchain

I don't think you have a problem, but are seeing expected behavior.
Bitcoin Core is downloading and verifying about 80 GiB of data. Even with all the improvements that have been added, this will take several hours to days depending on your hardware.

Bitcoin Core is a full node. It mirrors all the information of the blockchain, and checks it first hand. By running Bitcoin Core, you become part of the users that verify and provide the network's data for others.
You could take a shortcut and acquire an already verified set of data, but then you'd be trusting a third party that they didn't add incorrect information to trick others in the network. However, that's exactly the point of why you'd run a full node in the first place: When you do, you can be certain that you have a correct copy of the blockchain.

If you don't require full node security or feel that it is too much hassle to synchronize with the network, you might find it more comfortable to run a user oriented wallet. You can find a comparison at Choose your wallet.


How can I prove that I destroyed some bit coins?

If you just want to make it clear that you no longer own them you can just send yourself 1 santoshi and put the rest up as a fee. If you want to destroy them there are a couple decent address to send them to in What is the Bitcoin equivalent of /dev/null?

EDIT: there are better answers here: How to generate a valid bitcoin address for destroying bitcoins?


Opening Lightning network channel: who is paying?

Because a fee is part of a transaction, the fee must be paid by whichever party creates the funding transaction.

Don't think of it as paying a fee to open a channel, think of it as funding a channel with a transaction.  The fee just happens to be part of the transaction.  I believe the current spec has just a single party funding a transaction, but I see no reason why this could not be modified for parties to share the funding cost, in which case both would likely contribute to the fee.


Joinmarket

One group of participants (called market makers) will always be available to take part in CoinJoins at any time. Other participants (called market takers) can create a CoinJoin at any time. The takers pay a fee which incentivizes the makers. A form of smart contract is created, meaning the private keys will never be broadcasted outside of your computer, resulting in virtually zero risk of loss (aside from malware or bugs). As a result of free-market forces the fees will eventually be next to nothing.

https://github.com/JoinMarket-Org/joinmarket-clientserver
https://youtu.be/hwmvZVQ4C4M
Wasabi
Used Zerolink earlier.

WabiSabi is a protocol for constructing CoinJoin transactions with the aid of a centralized coordinator. It utilizes keyed-verification anonymous credentials, homomorphic value commitments, and zero knowledge proofs to achieve privacy and flexibility.

Coordinator will keep a registry of the separate inputs and outputs, ensuring that a user can only claim the amount of Bitcoin they are entitled to, but without learning about the links between these.

WabiSabi builds on Chaumian Coin-
Joins, adding support for arbitrarily variable amounts.

https://github.com/zkSNACKs/WabiSabi/releases/latest/download/WabiSabi.pdf
https://github.com/zkSNACKs/WabiSabi/blob/master/explainer.md
Whirlpool

Whirlpool theory is based on a fork of the original ZeroLink framework which was originally co-written by nopara73 and TDevD, with thanks to Adam Gibson and Chris Belcher from JoinMarket, Ethan Heilman from TumbleBit, Dan Gershony from Breeze Wallet and Kristov Atlas from Open Bitcoin Privacy Project for their reviews, suggestions and feedback.

Whirlpool is a fully modular CoinJoin implementation based on a heavily modified fork of the ZeroLink theory. You can review the theory or review the architecture in further detail.

https://code.samourai.io/whirlpool/Whirlpool


Why is it impossible to derive public key from address?

The address is only 160-bits. The public key is 257-bits. So there's no way to go from an address to a public key -- information is missing.

The shortest hash with sufficient security is 160-bits. So Bitcoin uses a 160-bit hash as an address to make the address as short as possible. However, there is no known public key scheme that is sufficiently secure with only 160-bit public keys. So the public key couldn't be used as an account address without making the account longer.

However, the public key is needed to verify a signature. So when you perform a transaction to claim coins sent to an account, you must provide the public key. When validating the transaction, the public key is checked to ensure it has the correct hash (matching the account) and then the signature is checked to ensure it is valid for the transaction and made with the supplied public key. From that point on, the public key corresponding to the address is publicly known.


I found the problem, in the bip143 tx digest preimage, the scriptCode needs to be preceded by the length of the scriptCode. In this case 0x47


Constantly monitor bitcoin wallet using Python/Django?

Use wallet notify. You can set it in your bitcoin.conf file and have it call some python or django script.

Or another solution would be to constantly poll for new transactions, though I would not recommend this.


Can spent transactions that get pruned lead to false payment claims?

Sure, but so what? I can make all kinds of false claims that nobody can disprove.

We only care about two things:

1) Can someone who actually has funds prove that they have those funds?

2) Can we ensure that somebody who does not have funds cannot prove that they have funds?

So long as we meet these two criteria, there is no problem. It's perfectly fine if people can make claims to have funds that we cannot disprove, so long as they cannot prove them.


Could the Ripple protocol be modified to allow funding your initial account with BTC?

The problem is that you need an account to hold BTC in the Ripple network. There is no known practical way to allow Bitcoins to transact directly on another network without a central authority to hold the keys that release the Bitcoins on the Bitcoin blockchain.

Hopefully, this should only be an issue for a short period of time. Once billions of XRP have been given away, there shouldn't be any significant difficulty in getting enough XRP to open an account.

Update: The gateway protocol could be used to do this, allowing you to do your initial account funding right from a Bitcoin account.


Just wait for the 6 confirmations. It looks like it is there: https://blockstream.info/address/1Fhpf5bA95zBPzsPezozDYf9h2jCYD31TA
Just a bit patience.


The times when one could mine Bitcoins with a laptop or graphics card are long gone. You would never even cover the cost of the electricity used. Bitcoin mining is done with ASICs now.


Mining a primecoin based currency (datacoin). How do I find out how much hash power im doing?

Base on your screen shot, in theory, you are contributing 808 hash per second (primepersec), but this may not realistic, though.

How you get that screen shot? That is the correct command.

If you are using Qt, click on help > debug window > console then enter getmininginfo at the bottom ">" prompt. type help for other command.

HTH


Is there a correlation between Technical Analysis predictions and actual prices?

If you are talking about Technical Analysis in general, we would need to write a book to answer that.

As for Technical Analysis applied to Bitcoin, just look at the date when the predictions were made, look at the graphs and compare. During the last couple of months:

He wrongly predicted a short term rally starting at $14 at the end of July
He correctly predicted the short term fall to $6 at the beginning of August
He has been predicting a long term up trend for two months that hasn't happened yet

Overall, I think his analysis are well documented and based on market indicators that work very well in other markets. However, I am not sure if the Bitcoin market got to the point where Technical Analysis plays an important role for price movements. No one can really tell because this is not an exact science.


You yourself have stated that your boards are failing to hash.
It looks like some form of system test against the boards is failing.
I know I am being captain obvious here.
chain[6]: some chip cores are not opened FAILED!
Test Patten on chain[6]: FAILED!
Until you can find the point of failure with a volt meter, or replace the failing boards.
You can try tuning the voltage / frequency of the miner to see if this helps stabilize them.


How nodes verify if the hash on a P2SH output is from a valid script?

A cryptographic hash function projects an arbitrary amount of data to a limited image space. In the case of P2SH, the hash is a RIPEMD160 hash, projecting the redeem script to an hash digest of exactly 20 B (160 b) length.

This is a trapdoor or one-way function that cannot be reverted (if it can be reverted, it's broken and therefore not a cryptographic hash function). Thus, a recipient cannot tell what redeem script was hashed to produce the P2SH address, and consequently cannot evaluate the validity of the redeem script.

If the recipient makes a mistake and provides the hash of an invalid script, there is no recourse.


Bitcoin is secured through proof-of-work mining using SHA256 as the mining algorithm. Bitcoin Cash uses the same algorithm, so the specialized ASIC hardware used to mine one coin, could also be used to mine the other.

PoW coins are susceptible to ‘51% attacks’, which are possible when a bad actor controls a majority of the network’s hashpower.

So generally, when considering ‘how secure’ a blockchain is, we consider how possible, or likely, it is for a single entity (or a group of colluding entities) to gain control of a majority of the hash power available for a coin. The more hashpower a coin has pointed at it, the more secure we can consider it to be. This is because an attacker would need a larger amount of hashpower under their control in order to enact an attack.

From fork.lol, we can see that over the last 7 days, the BTC hashrate has been approx 47.3 exahashes/second, while the BCH hashrate has been approx 1.6 exahashes/second.

By this measure, Bitcoin Cash is most certainly not ‘more secure’.


There are several definitions with overlapping meanings.
The first is perhaps best called extinct blocks. These are blocks that were produced by building on a block that is no longer the active tip of the chain. Some nodes may have considered it to be the best block at some point, but they switched to another chain which does not contain the relevant block anymore. They are valid, verified, and their ancestry up to the genesis block is fully known - they're just not currently 'active'. They are sometimes called stale blocks (typically in the context of mining software realizing it built on old data) or orphan blocks. The latter name originates from the fact that payouts from extinct blocks are denoted as "orphaned" in the reference client (referring to the fact that their coinbase transactions are now orphaned).
However, there also exist real orphan blocks, with orphan in its original meaning of "having no parent". These are blocks received by a node that does not have its entire ancestry (yet) and thus cannot be validated. Nodes keep such blocks in memory, while asking their peers to fill in the gap of their history. The client does not show these, so when people talk about orphan blocks, they are most likely referring to extinct blocks. Note that since Bitcoin Core v0.10, there are no such orphan blocks anymore, due to a significant change in the download mechanism.
Terminology is confusing here :)


First step in understanding lightning network

The ledger entry is indeed a single multisig 2-of-2 transaction that is included in a block.

Then, both parties create a 1-of-2 multisig transaction that is not yet published to the network, but kept in reserve. This transaction is updated every time you make a transaction between both parties. Once either of the parties decides to close the channel, he or she publishes their second transaction and it is included in the blockchain.


When you make a transaction, you need to unlock the outputs you’re trying to use. This is done by showing that you “own” the output, and you do this by showing that you know the private key of the address the output is locked to.
Digital signatures are used in bitcoin transactions. The goal of a digital signature is to prove that you’re the owner of a public key. Signing is an application of cryptography but in fact not a form of encryption.

You combine the private key + transaction data, and use some mathematics to create a digital signature.

You can then take the digital signature + transaction data + public key, do some more mathematics with them, and the result will confirm whether a legitimate private key was used to create the digital signature.

https://learnmeabitcoin.com/beginners/digital_signatures


What all the addresses are in my Electrum wallet?

They are indeed all your addresses. The addresses labeled receiving in green are meant to be given to people from whom you wish to accept a payment and the yellow change addresses are there for Electrum to use when you make a transaction with an unspent output.

About receiving addresses

Using a separate address for every incoming transaction is better than using the same address all the time for a couple of reasons:

It increases your privacy. If you used only one address, all your transactions and your balance would be easily known to everyone who knows your address, so for everyone who has ever paid you or received a payment from you. If you use different addresses, it's much more difficult to relate the different transactions to the same person.
It allows you to discern between different sources of funding. Because in Bitcoin there is no "transaction title" or any other description, if you simultaneously await two payments, let's say for the same amount, you would have no way to know who paid you if not for having given different addresses to different payers.

If you want to use an address multiple times, as for example if you publish a donation address on your website, you can do it of course, Electrum won't stop you. In some cases it's not a problem at all, but you have to understand that you sacrifice a little bit of your privacy, e.g. other people can find out what's your balance on this donation address. just It's useful to label any address you use (publish or give to anyone) so that you know where from each transaction comes.

About change addresses

The change addresses work like this: let's say you have an address 1Abc with 0.5 BTC and another address 1Xyz with 0.5 BTC. Now you need to pay someone with an address 1Pay 0.7 BTC. Electrum would handle this by creating a transaction with inputs from addresses 1Abc and 1Xyz (which sum up to 1.0 BTC) and the outputs would be 0.7 BTC to the address 1Pay and 0.3 BTC to the address 1ChA, which is one of your change addresses. Each change address is used only once. The reason for the existence of change address is the same as reason 1. above: it increases your privacy.


All you need to do is to add two lines to oclengine.c:

vg_ocl_device_getstr(vocp->voc_ocldid,
                           CL_DEVICE_NAME);
                           CL_DEVICE_NAME);
+           if (!strcmp(dvn, "Tahiti") || !strcmp(dvn, "Barts") || !strcmp(dvn, "Pitcairn"))
+               quirks &= ~VG_OCL_AMD_BFI_INT;
            if (!strcmp(dvn, "ATI RV710")) {
            if (!strcmp(dvn, "ATI RV710")) {
                quirks &= ~VG_OCL_OPTIMIZATIONS;
                quirks &= ~VG_OCL_OPTIMIZATIONS;
                quirks |= VG_OCL_NO_BINARIES;
                quirks |= VG_OCL_NO_BINARIES;

Add the lines starting with +, but don't copy the plus sign.

This code adds optimizations for AMD HD 68XX, 69XX, 7XXX

Thanks to Kevin Pan for his patch!


How does one calculate the profitability of GPU mining?

Using the Bitcoinx calculator, I found that a $1,000 rig with a 300 W power draw would need to have 750 MHash/s just to break even on power at $0.20/kWh at the current difficulty (3,438,909), exchange rate (13.13), and block reward (25).

You'd never break even on the rig itself. Thus why GPU mining is on its way out.

For a more absurd example, I priced out a reasonable rig for ~$1,405 with three Radeon HD 7970s, the best mining card combo - 2050 MHash/s - on the market at the time of this writing according to the Mining Hardware Comparison chart. Its power draw would be around 850 W, according the MHC and a quick review of the parts. This rig would never be profitable at $0.20/kWh. Hell, at my electric rate of $0.07/kWh, it'd take nearly three years just for a return on investment. Prior to the recent halving, this same rig would make a return after just ~260 days.

More proof that GPU mining is on its way out.


To put it simply: digital things are infinitely reproducible with very little cost, and so if we are attempting to create a digital money system, we need to make sure that users cannot simply copy & paste their money, to create (infinitely) more money. Functionally, this means that we need to solve the double-spend problem, and to do that, what we ultimately need is a way to give all transactions an explicit ordering. If we can reliably determine the order of transactions, then we can keep track of the network's state, and ensure that no user is allowed to spend their funds more than once.
With centralized systems, this is easy: you just trust the network admin to decide what the order is, and all other participants must follow suit.
But with a decentralized system... how do you create this ordering, in a way that all participants will reliably agree upon? The solution to this problem, as provided by Satoshi Nakamoto, is the bitcoin blockchain. It is a clock, with each block being the next 'tick' forward in the network's ongoing history.
This is the crucial point that allows the network to prevent users from double-spending their funds.

I don't quite get the importance of the time aspect, since the timestamp header field seems not to be very important.

The timestamp in the block header is more or less a sanity check, and it is used to help calculate network difficulty. More info can be found here.
This timestamp is not used to order transactions though, the blockchain itself is the 'clock' that provides that functionality.


What wallets are affected by the NPM package vulnerability?

Only Copay is affected by this vulnerability.

Although the package was included by many, many projects (both within and outside the crypto space), the attack payload was encrypted, and used the package description as a decryption key. They key in question was found to be (via brute force) A Secure Bitcoin Wallet, which is the npm description for the copay-dash package.

Thus, packages which did not have that as their description would be unable to decrypt, and hence execute, the payload.

Note that such attacks are feasible on any package that does not verify and pin its dependencies, even outside the nodejs ecosystem. Developers should work to ensure that they are importing vetted code, and pin (or even vendor) their dependencies. This is especially important for programs that deal with private keys.


Bitcoin arbitrage, what do exchange office alows you to cash out?

Every exchange has its own rules, but generally they allow you to import bitcoin from any source and sell it. Where they tend to differ greatly is the amount that they will let you withdraw to your bank account either daily or weekly. For example, gdax/Coinbase greatly reduces the amount you can withdraw if your account is not verified, meaning, you need to upload identity documents. I believe they limit you to $1000 per day, buy/sell, and additionally limit you to $1000 per day withdraw. However, if verified, buy/sell is unlimited and withdraw is $50,000 per week.


What is the network mempools unconfirmed transaction expiration time?

Assuming most of the nodes on the network run with the default configuration of maxmempoolexpiry, most of the network mempools will drop your transaction after 336 hours (2 weeks).
You should have crafted your transaction such that it signals BIP125 replaceability (by having at least one of the input nSequence <= 0xfffffffd).
At this point, you could use CPFP (spend the output you just created with a high fee-paying transaction paying for the whole package) or use a pool "transaction accelerator" to send a new version of your transaction paying higher fees.
See also Why is my transaction not getting confirmed and what can I do about it? .


How to import say 1million bitcoin privkeys in bitcoind / bitcoin-qt?

Well...
You could automate it using the JSON RPC and slowly work through the keys, however this will be kinda slow. If you actually need to work with 1 million keys, you may need to consider an alternative option.

What is it you need to do with the keys?


How to improve bitcoin-qt when downloading blockchain? (very technical, dev views appreciated)

Short and simple answer to my initial problem regarding downloading the blockchain: You might need better hardware! :)
In summary bitcoin-qt runs out of the box.
So do not fumble around. Unless you really need to.
Pruning saves disk space but increases disk I/O.
Increasing dbcache can help but not so much for pruning.
Both can be done in config-window. Thus, no need to change bitcoin.conf.
Plus, ... I haven't mentioned it lately, have I? ... don't use USB-Sticks! :)
Having that out of my way let's dive into my "real" question.
If we look at it from a queueing theory point of view we have three fields to consider.

Input that are the nodes you are feasting on.
Processing where your hardware and configuration comes into play.
Output writing to disk in our case.

Input side
At first glance it look like I had problems connecting to responsive nodes.
Looking deeper into it, I found the sending side was never really an issue.
The sending behaviour of nodes in average over a long period made me distinguish three main types.
A few are sending MB, some a few KB and a lot just 150 Bytes then drop out
Over time responsive nodes lower their data rate.
Data is usually coming in bulks. All nodes send in parallel many MB/s and then stop for several minutes. While my CPU and disk are constantly busy. So it looks like they are filling one input queue.
This is generally a usual behaviour for queued systems. They are pumping. That's why you have buffers.
Looks like increasing buffers will not help on my machine, since there is already plenty of headroom.
Sending at high data rates and slowing down over time makes sense for the nodes to distribute load on other nodes. From a clients view this is a preferable behaviour too.
Although my view as a user is bitcoin-qt can improve its dropping strategy, to not bother nodes who did their fair share and focus more on still very responsive nodes.
Sending KB even somewhat erratically at low data rates isn't really helpful.
Since in a free network you can't tell a node what to do, clients need a strategy to drop those nodes early.
Why do some nodes just show up to say hello and leave 150 behind?
Probably a kind of handshake. But do we actually need to hold them for a while?
In short: Yes, technically there is room for improvement. But is it worth the effort?
Processing side
I'd say everything is fine. Neither memory nor CPU are problematic.
Output side
Disk I/O is an issue, at least for me.
As Pieter pointed out pruning prevents optimal caching.
I'm reluctant to judge on this topic without thorough understanding.
But my first approach would be reducing the number of files involved.
Many thanks to Pieter and Murch for their quick response. Helped a lot!
Feedback and corrections highly appreciated!


Can we design the protocol, so that an address can only be used once as an output in a transaction?

Alice gets her computer hacked by Mallory, and she steals her wallet. Fortunately, Alice had encrypted it with a strong passphrase. Alice wants to sue Mallory for breaking into her computer, so she gets a lawyer, Bob.

Alice's address, 10BTC --> Bob's address

Unfortunately for Alice, Mallory controls a node on the Bitcoin network, not too far from Alice, that quickly sees the transaction is from Alice (she has all her addresses), and instead relays, to hundreds of nodes at once, the transaction:

Mallory's address, 1000 satoshis --> Bob's address

Which is incompatible with Alice's honest transaction.

Now, three things happen:

1) Alice tries to send the bitcoins to a different address given by Bob

2) Alice's nodes see her transaction as a double spend, and refuse to relay any transaction spending that coin to a different address

3) Mallory's transaction eventually gets mined. Back to trying to spend the coins to Bob.

Mallory can do other mischievous things with her position, such as allowing Alice to spend her bitcoin at a church fundraiser but not an abortion clinic (assuming she knows the address of both).

The main way people lose their privacy in bitcoin today is through heuristic analysis of the blockchain, not address reuse. Introducing a new network rule to protect users against their own stupidity will not significantly improve privacy (most wallets don't reuse addresses by default anyway), and opens up users to some interesting attacks.


Is there a Bitcoin service that works like Western Union?

I don't think you'll easily find a service of the kind you describe.

But using Bitcoin directly shouldn't be too difficult. You can install a wallet on your computer such as https://electrum.org/. Then you can buy some bitcoins (the best way will depend on your location), and send them to the recipient.


how to solve this error ? and use detachdb?

back up all the files in .bitcoin.  then delete them all restart the wallet see if it errors.  If it does, re-download / re-install the client otherwise corupt configs.


How many transactions can a bank/person make per block

The cost of a Bitcoin transaction doesn't scale respective to the amount that is being sent, but according to the amount of data that the transaction occupies on the blockchain. The Bitcoin blockchain produces about one block every 10 minutes which can (depending on the transaction composition) carry about 2,000 – 4,000 transactions.


What mobile wallet software is available for BlackBerry?

The Blackberry World (app store) shows two wallet apps:

Bitcoin Wallet by Andreas Schildbach
Bitcoin Spinner (unofficial release, so I'ld check first on the Bitcoin Spinner forum thread to see if it is verified as a straight port with no wallet stealing code injected)]


Yes, Bitcoin transactions have transaction fee. It is not proportional to amount of Bitcoins sent, but it is proportional to the size of transaction and it is measured in satoshi/byte. (10^8 Satoshi is 1 Bitcoin)

The fees changes from time to time because of market conditions. You can find a good idea of what fees to pay on this site https://bitcoinfees.21.co/.


PayJoin privacy only works with specific output sizes?

we can postulate a rational coin-holder would never construct a transaction with more inputs than required."

I don't think this is necessarily true, a user may create transactions with unnecessary inputs in order to confuse such privacy-attacking heuristics. It is in the user's interest to retain some privacy, after all.

Privacy is complicated, but if payjoin transactions became more common-place, and wallets also created pseudo-payjoin transactions some fraction of the time, then the general idea is that some of the heuristics used to group addresses would become much less effective.


How can I reclaim my Bitcoin Cash from my Greenaddress wallet?

Unfortunately, if your wallet/exchange does not support BCC, then you have probably forfeited it i.e. left it to their disposal. The only way to find out would be to message their support and see if it is supported. If it is, you will automatically have a balance of both. There are a few exchanges supporting BCC trade including bitrex.com (or have a look at coinmarketcap.com →     Bitcoin Cash →     Markets)


Bitcoin can't directly check the outcome of real-life events. However, it is possible to make conditional transactions with the help of third parties. This can be achieved with multisignature addresses. A multisignature address is an address which is controlled by several different people. To spend the money from such address, signatures from specific number of those people is required. For example, to spend from a 2-of-3 multisignature address, at least two of the three owners must agree on a transaction.

How can this be used to make conditional payments? Well, there are three parties: the sender, the recipient and the party which determines the outcome of the event, which we will call the oracle. The oracle provides a public key which corresponds to the event which is the condition of the payment. If the event happens, the oracle would reveal the corresponding private key, so anyone would be able to use it to make signatures.

Now, suppose that the sender sends his money to a 2-of-3 multisignature address with the owners being himself, the recipient and the public key provided by the oracle. Until the oracle reveals his private key, the recipient can only spend the money with the assistance of the sender. Afterward, the recipient can use the key revealed by oracle to spend the money as he wishes.

This scheme, however, has a few problems. Firstly, if the event doesn't happen, the sender can only take his money back with the assistance of the recipient. Secondly, if the event does happen, the sender can take his money back if the recipient is not fast enough to move it first. The first problem can be solved by having the recipient sign a transaction returning money back to the sender before the sender broadcasts the first transaction. Here is an example of how this feature can be used. The second problem can be solved by using more complex script than 2-of-3. For example, it is possible to make a script which lets the money to be spent by sender+recipient and recipient+oracle, but not sender+oracle.

By the way, when doing research on this question, I found an actual website which offers to reveal private keys based on the outcome of real-life events.


Can R/r in Musig be derived from only seeds and message hashes?

The construction you're suggesting will likely work as long as you don't sign more than one message. By effectively choosing the R points ahead of time, you've constructed a single-show signature.

However, the derivation you're using for the different R values is pointless. It's not enough that you don't reuse R values; you can't use multiple related R values either. All the R values you are constructing are related through a single linear equation. That is sufficient for an attacker (who knows about the relation) to derive the private key from seeing two signatures.


Yes, it is marked .old to indicate it is safe to delete. The blocks have been copied and  imported into the main blockchain that you store. The process took time because the client was verifying the blocks.


There is no transaction showing for the wallet you have provided. Do you have txID by any chance or anymore information to check the transaction by?

In the past I have reasonable success with https://www.btcaccelerator.net/transaction-accelerator-viabtc ,but to be able to use it you would also need txID.

Also if transaction is not confirmed it will return to the wallet it was send from automatically, but it take quite a while (not sure exactly).


How can I claim my BCH if my BTC is held with Block.io, a multisig address?

There is a solution. I've got my BCH today from block.io which was already empty but it had a BTC on the day of fork.
So what you have to do is:

First of all you should get from security settings of you block.io profile: "Redeem Script Hex", and two private keys. (actually you will have some more strings and values but only these three required to claim your BCH.

After that:

Go to http://www.motelmaya.com/BCH/BCH.html

I know this seems strange and may cause doubts and believe me I wasn't sure too. But the real deal was: getting BCH (I had 0,5 of BTC at block.io wallet) or getting nothing.

So, then:

Click +TX or New -> Transaction.
Enter the redeem HEX that you received from block.io in the first box (Address, WIF key or Redeem Script)
Click on "Advanced options" -> "Network" -> Settings and change the network to "Bitcoin Cash (mainnet)"
Click New -> Transaction once more.
Put in the amount you want to transfer and the address you are sending to (your new BCH wallet I guess - I've used my blockchain.info wallet address), make sure that the fee is not too high (I've entered something like 0.000317
Click "Submit", you will get a long HEX string. copy it
Click "Sign", paste the copied string, paste the first private key from the  block.io to the "Private key" field, click "Submit", copy the string.
Paste the string into the second box (below the "Private key" field), paste the second private key from the block.io, click Submit, copy the output
Go to "Broadcast", paste the string and click "Submit".

That's it. You will recieve TXid which you will be able to check at https://bitcoincash.blockexplorer.com

Actually all regards should go to ohad serfaty but I can't comment the post where he advised this method because of low reputation.

Good luck!


I couldn't find a good one. So I made one:

Demo: https://xcubicle.github.io/memorypaperwallet/

Source: https://github.com/xcubicle/memorypaperwallet

Most paper wallet generators just generate bitcoin and derived coins. There wasn't one that generated non-btc ones like ethereum and monero. And the artwork is user changable too! Feedback welcomed.

enter image description here


how is the private/public keypair for spent bitcoins connected to the private/public keypair which corresponds to my address?

Spending bitcoins costs me to sacrifice (i.e. can only be used once) a private/public keypair, am I right?

No that's not correct. Key pairs can be reused but it is not recommended for privacy reasons. All transactions are public and reusing the same address over and over again make it easy for people to build a profile about you.

  Receiving does not use up a private/public keypair, am I right?

You need an address to receive bitcoins and behind that address is a key pair. But you can reuse it like I said above.

  Creating a new address also uses up a private/public keypair, right?

See above.

  When I spend bitcoins, how is this connected to my address, if it uses a new private/public keypair everytime, that has nothing to do with the original keypair of my address?

It doesn't use a new key pair everytime.

You need to read up on asymmetric cryptography. The gist of it is that the private key and public key are mathematically related. Bitcoin spend transactions are signed by your wallet using the private key and that signature can be verified by everyone using your public key. Private key does not have to be exposed in order to spend or receive bitcoins.

A bitcoin address is a hash of your public key and that hash operation is also repeated by nodes to verify that you indeed own the bitcoins and have the right to spend them.


Did you do these steps to make sure stratum had the correct stuff compiled?

  sudo apt-get install python-twisted python-mysqldb python-dev python-setuptools python-memcache python-simplejson
  easy_install -U distribute
  git clone http://github.com/Tydus/litecoin_scrypt.git
  git clone http://github.com/ahmedbodi/stratum-mining.git
  git clone http://github.com/ahmedbodi/stratum.git
  cd stratum-mining
  git submodule init
  git submodule update
  cd externals/litecoin_scrypt
  sudo python setup.py install
  cd ~
  cd stratum-mining/externals/stratum
  sudo python setup.py install


Do HTLCs get "carried over" in the subsequent commitment transactions?

How then further transactions can happen without waiting for the secret R? Does it mean that the HTLC contracts get simply "carried over" in the subsequent transactions between A and B?

Yes, that is correct. You go on adding HLTC outputs in the commitment transactions as more and more HTLCs are added, and delete those HTLCs that are either fullfiled with a successful pre-image or those that are failed. Every time, you add/delete an HTLC, a new commitment transaction has to be signed and the previous commitment transactions have to be revoked.

For that reason, lightning network specification puts a limit of 483 HTLCs for a commitment transaction, so that even if both sides send the maximum number of HTLCs, the commitment_signed message will still be under the maximum message size.