Was bitcoin the first to use SEED phrase for recovering account? I am trying to recall/determine if the coins I had on a USB stick was indeed bitcoins or not.  I sold an Item a long time ago (Either 2006ish or 2009-2010) and someone offered to pay me in coins.  Of course I laughed about it back then but decided to do it since it was like 100 bucks.  He gave me two types of coin, first one he called old and he gave me around 12-14k of it and then he also gave me a new type of coin 3-4k of them.  I recalled it had a Japanese name cause I thought he was joking.  Years later I eventually found that USB stick and saw a folder with the old coins which at that point from what I read online had zero value and was shutdown by the govt.   But there was another file with random words on there.  I recall a few of these words and they are all in the Legacy ELECTRUM dictionary.  At the time I forgot that I had gotten two types of coin and ended up deleted everything.  Recently I the piece of paper popped up out of no where and once again I was forgot about it and ended up throwing it away.   I took pictures of it but it was so blurry I deleted them as well.
I have been trying to backtrack my timeline to see if I really did lose millions in bitcoins due to pure stupidity.  I have been dealing with an overwhelming feeling of grief and guilt recently and I am hoping with the help of you nice folks I can put an end to this.  At this point I would rather hear what I had was not bitcoins.
So really the questions that needs to be answer to know the truth.

Was bitcoin the first to use a seed phrase design.

Going by the amount of coins I got it would mean the value of bitcoin at the time was still very low.  If it is bitcoin then the only timeframe that make sense would have been around 2009 up to mid 2010.  When you create a bitcoin account by then, do you get a seed phrase or was it just a private key back then.  From what I read the first wallet to use seed phrase was ELECTRUM so if that is true then what I had can't be bitcoins.

Was there a timeframe when 2 types of virtual coins existed at same time.  values for these coins were really low..  14k = 100 bucks or so..

The things that points to what I had was bitcoin - seed phrase and a sheet of paper with what looks like a private key.  Also the words I recall in the text file are in the legacy ELECTRUM seed phrase dictionary.
The things that do not point it as bitcoin.  Per info online, ELECTRUM did not come out till 2013 so there is no way when he sent me those coins they were bitcoin.  Assuming no seed phrases were used for bitcoin prior.
I have try to look online for any info that could prove or disapprove these questions but I feel a lot of info has been lost over time.  Hopefully someone on here that has been around for a long time knows the answer.  Thanks in advance!

Was bitcoin the first to use a seed phrase design.

I've no idea whether Bitcoin was the first cryptocurrency for which there was a wallet that supported a system of seed-phrases.
Not all Bitcoin wallets support seed-phrases. Notably the reference implementation Bitcoin- Core does not yet support seed phrases.
BIP39 - Mnemonic code for generating deterministic keys was defined or published on 2013-09-10.
According to Electrum their seed-phrase system was introduced two years earlier?

When you create a bitcoin account by then, do you get a seed phrase

Not in general.
Nor do you create a bitcoin account in general.
The archetypal process is to download a wallet program such as Bitcoin core and the first time you run it, it will generate a private-key. Wallets that support seed-phrases will instead generate a seed-phrase when first run and generate a private key from that.

Was there a timeframe when 2 types of virtual coins existed at same time.

Probably. I suspect the number of cryptocurrencies went from one cryptocurrency to thousands of cryptocurrencies in a very short period of time.
See

Some notable cryptocurrencies
A list of cryptocurrencies

Note that questions about any cryptocurrency other than Bitcoin would be off-topic here.


Alternatives to OP_RETURN to store data in Bitcoin blockchain I am working on iOS camera app and would like to store hash of photos inside blockchain for the "proof of existence".

AFAIK transaction with OP_RETURN in output has some disadvantages

non-refundable. so every transaction burns coins and removes something from a finite resources. forever.
can be rejected by miner/can be subject to reject because of low fee and negative impact of burning coins
subject to change. OP_RETURN field used to be 80 bytes and has been changed to 40 bytes.

I appreciate any ideas

For a proof of existence, you do not actually need to store the data in the blockchain. Merely commiting to it, by using its hash in way that is later provably used, is enough.

One such way is using a mechanism originally described as pay-to-contract.

Warning: elliptic curve math follows.

You start with any public key X (yours or someone elses). Then construct the modified key X' = (X + H(X || C)*G) [with H a hash function, || concatenation, and G the secp256k1 generator point], and send a transaction (possibly as part of an actual need to send money to X) to the address corresponding to X'. The receiver (which can be yourself if you do this for a change output) will need to add the value H(X || C) to his private key corresponding to X, to be able to spend the coins.

However, revealing X and C, plus the transaction in the blockchain you used to send to X', is a proof that C was actually known at the time of the transaction.

This scheme has the advantage of not requiring any data in the chain more than the transaction would already consume, and additionally that it is indistinguishable from a normal transaction, making it harder to censor or be subject to changing policy of nodes on the network.

An alternative possibly exists which works without modified addresses of transaction, but is not well studied yet.


Scaling fee solution for Bitcoin lightning? Currently it cost $0.000116736 USD  (1 satoshi) fee to make a transaction on lightning. What are some other scaling solutions to lower the fees? Can we just increase the decimals and have sub-satoshi fees for lightning?

Currently it cost $0.000116736 USD (1 satoshi) fee to make a transaction on lightning.

This is incorrect; there is no set price for sending a LN transaction. Each node can define its own policy for forwarding a payment through the network (base fee rate, plus a small percentage of the amount forwarded), so the fee paid will depend on the payment route taken.

In some cases (eg you have a channel open directly with your counterparty) there will be no fee for the LN payment itself.

Anecdotally, I think the most fees I have paid for a LN transaction is still in the range of single digit satoshis.

  Can we just increase the decimals and have sub-satoshi fees for lightning?

LN nodes already track sub-satoshi amounts, with a resolution of 1/1000th of a satoshi. Note that these sub-satoshi amounts cannot be reconciled onto the base chain in the event of a channel closing, but they are still tracked by LN nodes, and in aggregate many sub-satoshi amounts can add up to whole satoshi values (which could then be settled on-chain).

  What are some other scaling solutions to lower the fees?

The current LN fees are entirely defined by the network’s nodes. So it is a free market, wherein nodes can charge a small amount for the use of their liquidity in forwarding payments. If you want, you can run a node with zero fees, but many users will likely want some compensation for their liquidity availability.


What is the difference between PoW and PoS regarding computations when determining a new block? According to Buterin there are 600 trillion computations done per second using SHA256. He and other sources say that PoS solves the issue of not requiring so many computations but I do not completely understand why.

From what I understand, PoS also requires the participants or forgers to compute a hash value (which is always the same though), which is lower than a certain target value (which varies with time in seconds, a random factor depending on the current block and the balance). But this also requires some computations, so is it just that due to the more or less fixed time and balance factor PoS requires way less computations than PoW, or is there more to that?

I think you pretty much got it. It's hard to give more than a rough explanation, because there is no standard PoS model. But my understanding is that given the most recent block the only thing that will increase your chance of mining the next block is time passing. If something like timestamps is the only thing to check, the number of possibilities worth any one miner computing is limited.

PoS does not have a difficulty target max, but there is a range of possible answers, say 0-N. The last block is used to compute some new target(not a max, but an actual target), say T. A PoS algorithm will define a stake holder's chances differently, but there will be some function that gives them a range on the spectrum proportional to their stake(M...M+S). As time passes either that range grows, or is recomputed given each new timestamp. When a miner's range includes the target, it is there turn to mine the block, at which point a new target is determined.

00:00 > 0___M...M+S____T_______________N

00:01 > 0______________T___M...M+S_____N

00:02 > 0____________M.T.M+S___________N < Chance to mine a block

A miner could get better chances by acquiring more stake, but that would require new blocks to be mined for stake to actually transfer. More to your question, a miner could also increase the number of computations they have to do by breaking stake up into multiple accounts, but that would not increase their actual odds. It would just increase the number of accounts they have to check.


Keep Wallet Safe While Entering United States I'll be traveling to the United States soon, and I've read that civil asset forfeiture laws may allow customs agents to take/keep crypto currencies.  Is there an easy way to keep my wallet safe from confiscation? I have a Trezor, but I'm not sure how best to travel with it. Should I keep coins on an exchange while traveling? Move them to a paper wallet or my laptop?

The Trezor (and other hardware wallets) use the BIP 39 specification for the recovery mnemonic. If your device is confiscated, you can use the recovery mnemonic to restore your wallet to another Trezor, hardware wallet, or software wallet. From there you can access your Bitcoin.


How to make a persistent SPV wallet? (bcoin) I created a wallet on a SPV node. The wallet is initialized from a mnemonic. After receiving some transactions, the wallet's balance looks like:

{ account: -1, tx: 3, coin: 3, unconfirmed: 136300, confirmed: 0 }

But when I re-initialize the wallet, it looks so:

{ account: -1, tx: 0, coin: 0, unconfirmed: 0, confirmed: 0 }

On the each initialization the wallet have the same address.

Here is my code:

const bcoin = require('bcoin');
bcoin.set('testnet');
const KeyRing = bcoin.keyring;
const Mnemonic = bcoin.hd.Mnemonic;
const HD = bcoin.hd;

const node = new bcoin.node.SPVNode({
    config: true,
    argv: true,
    env: true,
    logFile: true,
    logConsole: true,
    logLevel: 'debug',
    db: 'leveldb',
    memory: false,
    persistent: true,
    workers: true,
    listen: true,
    loader: require,
    network: 'testnet'
});

// Temporary hack
if (!node.has('walletdb')) {
    const plugin = require('./node_modules/bcoin/lib/wallet/plugin');
    node.use(plugin);
}

process.on('unhandledRejection', (err, promise) => {
  throw err;
});

const walletdb = new bcoin.wallet.WalletDB({ memory: false, network: 'testnet', prefix: '/Users/alestsurko/.bcoin/spvchain' });

(async () => {
    await node.ensure();
    await node.open();
    await node.connect();
    await walletdb.open();
    const mnemonic = new Mnemonic('uncover cash coral neglect upon nurse argue deal right song hood tennis');
    const masterKey = HD.fromMnemonic(mnemonic);

    const wallet = await walletdb.create({master: masterKey});

    console.log('Created wallet with address %s', await wallet.receiveAddress());
    const bl = await wallet.getBalance();
    console.log(bl.toJSON());

    // Add our address to the spv filter.
    node.pool.watchAddress(await wallet.receiveAddress());

    node.startSync();

    node.on('error', async (err) => {
        console.log(err);
    });

    node.pool.on('tx', async (tx) => {
        console.log('------ New tx. Adding to walletdb...');
        console.log(tx);
        await walletdb.addTX(tx);
    });

    wallet.on('balance', async (balance) => {
        console.log('Balance updated.');
        console.log(balance.toJSON());
    });
})().catch((err) => {
    console.error(err.stack);
    process.exit(1);
});

As commented here, the cause of the problem is that I

  sorta have created two wallets. The first is instantiated by the plugin statement towards the top, and then you also create a new walletDB right after.

So the solution is using WalletClient:

const {WalletClient} = require('bclient');
const {Network} = require('bcoin');
const network = Network.get('regtest');

const walletOptions = {
  network: network.type,
  port: network.walletPort,
  apiKey: 'api-key'
}

const walletClient = new WalletClient(walletOptions);
const id = 'primary'; // or whatever your wallet name is
const wallet = walletClient.wallet(id);

Instead of walletdb.create().


Byte array to hexadecimal and back again in JavaScript I can generate a byte array with

var myByteArray = window.crypto.getRandomValues(new Uint8Array(16))

and I get

181,143,16,173,231,56,63,149,181,185,224,124,84,230,123,36

I can then turn this into a string with

cryptoHelpers.convertByteArrayToString(myByteArray);

and i get

µç8?µ¹à|Tæ{$

But what I really want is a 128 bit hexadecimal like...

6a3e52297b2e593f4d506f7164

And I want to be able to go back from hexadecimal to a byte array.

Is there a copy and paste function or library to make this magic happen?

Here's something you can copy-paste in.

byteArray = new Uint8Array([181,143,16,173,231,56,63,149,181,185,224,124,84,230,123,36]);
function toHexString(byteArray) {
  return Array.prototype.map.call(byteArray, function(byte) {
    return ('0' + (byte & 0xFF).toString(16)).slice(-2);
  }).join('');
}
function toByteArray(hexString) {
  var result = [];
  for (var i = 0; i < hexString.length; i += 2) {
    result.push(parseInt(hexString.substr(i, 2), 16));
  }
  return result;
}
hexString = toHexString(byteArray);
byteArray = toByteArray(hexString);

From here/here.


What is the largest company that has ceased accepting fiat payments in favor of Bitcoin? We know there are many large companies that now accept Bitcoin transactions (Dell, Overstock, Expedia, etc) however they still accept fiat payments from legacy credit card systems.

Which large companies that have integrated Bitcoin transactions have now stopped supporting fiat payments?

Please exclude companies that never accepted fiat payments and were founded with solely Bitcoin support.

The largest company that accepts Bitcoin, and no longer accepts fiat, is BackPage. However they didn't stop accepting fiat of their own choice, but because Visa and MasterCard blocked them from accepting fiat.


Is the order of transaction inputs malleable? I'm looking to track transactions in a non-malleable way. To achieve this I've read the recommendations in this answer, but I don't understand how the order of transaction inputs isn't malleable. It's my understanding that each separate input is signed by the private key it's address is associated with, and thus a malleability attack could just swap the order of inputs and a tracking hash dependent a specific order would be rendered useless. Am I missing something here?

The signature associated with an input doesn't just sign that input, it signs the entire transaction payload - basically every part of the transaction except the signatures themselves. (Technically, it appears to actually sign a hash of a serialized version of the transaction.)

It has to be that way. Otherwise, you could take someone else's signed transaction and modify the outputs to pay it to yourself instead of the intended recipient.

So if you modify the order of the inputs, you modify the signed payload. The signatures will no longer verify and the modified transaction will not be accepted as valid by anyone.

The malleable transaction attack worked by modifying the signature itself to a different but still valid alternate version. The payload of the transaction never changed.


What are the implications of Schnorr signatures? Adam Back (adam3us) explained in March, 2014, but it is all math. There's another short post with advantages, though.

This answer on crypto.SE claims that Bitcoin considered using Ed25519 which is based on Schnorr signatures, but decided against it. Even if it is not going to get used, I'd still like to know the implications.

There's a pull request adding them to libsecp256k1. [edit 2019: that pull request used a flawed approach]

Gavin mentioned them on his wish-list for Bitcoin.

Warning: I've never actually worked with the Schnorr signature scheme.  The
following is my analysis based on reading the Wikipedia
article, the ed25519
page, and some discussions between devs in
#bitcoin-dev.

Likely Changes

Changed op code behavior: we will need an op code to check
Schnorr signatures. With a hard fork, we can redefine
op_checksig and
op_checksigverify to also check Schnorr signatures. With a soft
fork, we can redefine one of the reserved no-op op codes to check
Schnorr signatures.
Increased P2SH usage (maybe): I think it's highly unlikely
that a new address format will be introduced to do the same thing
for pubkey scripts paying Schnorr public keys that
P2PKH does for
ECDSA public keys. That means people who want an address to use
Schnorr even with just one key (non-multisig) will have to use
P2SH. Of course, for applications that don't need addresses (like for
mining or when using the
BIP70
payment protocol), they can just use op_checksigverify_schnorr (or
whatever) directly in their pubkey scripts.
Smaller multisig transactions: one of the most widely touted
advantages of the Schnorr scheme is that it can allow multiple
signers to combine their signatures into a single signature which can
be authenticated against a single public key created by all the
authorized parties. This accomplishes the same thing current Bitcoin
multisig does but uses fewer bytes. This may be especially useful if
dozens or hundreds of signatures are required, such as in a
crowdfunding situation.  Note: if I understand correctly, this is
also possible also with ECDSA, but in a less flexible way. (2018 note: there's now a paper out that details how to do script-less scripts on ECDSA, including 2-of-2 multisig)
Slightly smaller for all transactions: assuming Bitcoin uses the
ed25519 curve, which has a similar key
strength to the secp256k1 ECDSA curve Bitcoin currently uses,
compressed Schnorr public keys and signatures will be (respectively)
32 bytes and up to 64 bytes compared to current compressed Bitcoin
secp256k1 public keys and (non-compressed) signatures that are 33
bytes and up to 75 bytes.
Plausible deniability for multisig: using Schnorr threshold
signatures it
may be easier to prevent multiple signers or third-parties from knowing who else
signed or didn't sign. That's because the individual signatures are
merged into a unified signature that doesn't directly reveal who
signed it. This can be used in situations where the signers are
afraid of reprisals for spending funds in a particular way.
Plausible deniability of authorized parties using a
third-party organizer (which doesn't need to be trusted with private
keys), it's possible to prevent signers from knowing whether their
private key is part of the set of signing keys. Although not
directly relevant to Bitcoin transactions, I seem to recall[1] Greg
Maxwell saying he'd like to see this property used for distributed
forum moderation: choose a bunch of senior forum members, get a
public key from each of them, create a threshold public key from
some of the individual public keys, and then let individuals submit
a signature when they think a post should be removed. The
third-party organizer (probably an automated program) will combine
the signatures without leaking whose signature actually contributed
towards meeting the threshold. If nobody knows whose signature
actually matters and the pool of possible moderators is large,
effective reprisals against moderators become very expensive. [1]: #bitcoin IRC about 4 months ago; unfortunately that chatroom is not
publicly logged.
Theoretical better security properties: the experts agree general
Schnorr signatures have better theoretical security
properties
than equivalent ECDSA signatures. The most notable of these
improvements is that the hash function used in Schnorr doesn't need
to be as collision resistant as the hash function used in ECDSA.
(Bitcoin would likely use the same hash function for Schnorr that it
uses for ECDSA: SHA256.) Also, the ed25519 page linked above
describes several ways it is resistant to side-channel attacks, which
can allow hardware wallets to operate safely in less secure
environments.
Faster signature verification: it likely takes fewer CPU cycles
to verify an ed25519 Schnorr signature than a secp256k1 ECDSA
signature. This is probably only a tiny improvement for Bitcoin:
Bitcoin Core verifies signatures before adding a transaction to its
mempool. When a block is received containing transactions already in
the local mempol, Bitcoin Core does not re-verify those transactions,
so as long as the local node and the mining node have identical
mempools, no signature verifications need to be performed. (Recall the
coinbase transaction doesn't have a signature.) However, signature
verification is currently a bounding factor for nodes during initial
blockchain download (assuming a high-speed connection and Bitcoin
Core 0.10.0), so "faster would be better."
Multi-crypto multisig: with two (slightly) different
cryptosystems to choose from, high-security users can create 2-of-2
multisig pubkey scripts that require both ECDSA and Schnorr
signatures, so their bitcoins can't be stolen if only one
cryptosystem is broken.  Unless we hardfork in Schnorr (see point #1),
they won't be able to use standard op_checkmultisig---but they can do
something like <ecdsa pubkey> OP_CHECKSIGVERIFY <schnorr pubkey> OP_CHECKSIGVERIFY_SCHNORR

Uncertainties (To Me)

Maybe changed TXIDs: I'm not familiar enough with Schnorr
signatures to know how they might be malleable (changeable by
third-parties without invalidating them), but crypto expert Adam Back seems to think they'd be pretty malleable. His solution would be to change how TXIDs are calculated from hash(<whole transaction>) to hash(<almost everything except the signature>).  This would fix some current malleability-based problems, such as slow micropayment channel creation, but it also be a major hard fork that affects effectively all Bitcoin software.  The last fork of that scale---the soft-fork P2SH implementation---still doesn't have support for it from all Bitcoin programs after three years of discussion, two years of implementation, and fairly widespread use.

Public key recovery from signatures: I don't know whether a Schnorr public key can be recovered from a Schnorr signature the way an ECDSA pubkey can be recovered from an ECDSA signature.  This could be important: the Bitcoin Core verifymessage RPC uses key recovery to verify messages signed with the signmessage RPC or by another client's sign message implementation.  (Note: this point left unnumbered because it was added after the original posting.)

Non-Changes

Just to be clear, here are some things that don't change.

Deterministic signatures: there has been a drive towards
deterministic ECDSA signatures
in Bitcoin software. For example, Bitcoin Core will begin using them
in the upcoming 0.10.0 release. Schnorr signatures can also be
generated deterministically. With deterministic signatures, you
don't need a high-quality source of entropy (randomness) to create
secure signatures. However, you do still need high-quality entropy
to generate private keys or root seeds (see point below).
HD wallets: it looks to me like the hierarchical deterministic
(HD) key generation
protocol
will work for Schnorr key pairs with a few small modifications. You
can even use the same root seed for both ECDSA and Schnorr
hierarchies.
Key (address) reuse: as with properly-implemented ECDSA, it's
possible to securely create multiple Schnorr signatures for different
transactions, meaning it's secure to receive multiple outputs to the
same address or public key. This is in contrast to
some signature
schemes which
only allow you to securely use a one signature per public key.  However, key reuse
can still be less secure than using unique keys for each transaction,
and key reuse will always be much less private for you and your
trading partners.

Priority

Just as a matter of my opinion: Schnorr seems to provide some nice
advantages over ECDSA for power users, but nobody seems to be begging
for those features---so adding Schnorr signatures is probably low
priority. I'd guess that Schnorr signature support might be one of the
first improvements that will be fully tested in a sidechain (PDF
link) before being ported back
to Bitcoin.

P.S. Sorry for the long post, but thanks for asking such a fun question!


Is it possible to use bitcoind as a private blockchain? For development or test purpose, is it possible to setup a bitcoind as a private bitcoin blockchain?

When run with no arguments, all Bitcoin Core programs default to Bitcoin’s main network (mainnet). However, for development, it’s safer and cheaper to use Bitcoin’s test network (testnet) where the satoshis spent have no real-world value. Testnet also relaxes some restrictions (such as standard transaction checks) so you can test functions which might currently be disabled by default on mainnet.

To use testnet, use the argument -testnet with bitcoin-cli, bitcoind or bitcoin-qt or add testnet=1 to your bitcoin.conf file as described earlier. To get free satoshis for testing, use Piotr Piasecki’s testnet faucet. Testnet is a public resource provided for free by members of the community, so please don’t abuse it.

https://bitcoin.org/en/developer-examples#testing-applications

If you need absolutely private network - just made it. Run a few clean wallets on few computers, generate bitcoins and so on.. It will be incompatible with bitcoin network, but will be completely functional in your private local network.


How does a proof of work limit of `~uint256(0) >> 20` translate into a difficulty of `1 / 2^12`? In the Litecoin source it is written:

static CBigNum bnProofOfWorkLimit(~uint256(0) >> 20); // Litecoin: starting difficulty is 1 / 2^12

How does that compute? ~uint256(0) >> 20 is 0x00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff. Hashes have an equal probability of being any given number, so the chance of getting a valid Litecoin hash (i.e. one that is smaller than this number) is 0x00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff = 1 / 2^20, not 1 / 2^12. Is this a typo in the Litecoin source code or am I misunderstanding something?

To use the terminology on Litecoin's wiki, ~uint256(0) >> 20 is the target, and 1 / 2^12 is (approximately) the difficulty. You can see that by running the following in Python (or anything that can handle calculations on large numbers).

target = 0x00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff # or 2**236-1
diff = 0xFFFF * 2**208 / target
print(diff) # 0.00024413689970970154
print(1/2**12) # 0.000244140625

I believe the 1 / 2^20 figure you calculated is the probability that each hash will succeed, which is not the same as (although related to) the difficulty.


If I lose my wallet and private key does that effectively remove bitcoin from the market forever? If I lose my wallet and private key does that effectively remove bitcoin from the market forever?

I understand that if I lose my wallet and have no record of my private key then I won't be able to re-establish my wallet. Does this mean that effectively the content of the lost wallet is lost forever to myself and the market?

If you permanently loose your keys, the short answer is essentially yes. Your loss, a deflation, will cause the value Bitcoin being held by others to go up proportionately.

With a 100% efficient quantum computer (not likely at all), the amount of energy required to brute force compute the private keys will cost ~$100M each in electricity (assuming 5 cents per KiloWatt-Hour) if the public keys associated with the private keys are published on the blockchain.


Delete a specific private key from an Electrum 3.3.8 wallet via the command line? I imported a few private keys into my electrum wallet via the command line. Now I want to delete these specific private keys from electrum 3.3.8 - What is the command to delete these keys from my wallet?

When you use importprivkey() with electrum it makes you create a new wallet for the key import. You can't do it on the command line but you can delete the wallet file from your PC (assuming that new wallet you created during import only has that key on it).

   C:\Users\YOURNAME\AppData\Roaming\Electrum\wallets


Is there a list of countries that are not likely to persecute bitcoin businesses? It seems that at some point countries will start cracking down on Bitcoins.  And Bitcoin is designed to handle that.  However, are there some countries that are openly friendly to bitcoin businesses and/or have a history of permitting additional currencies.

To put this question in another way, are there countries that are to Bitcoins like Switzerland is to banking?

One possible location would be Nowhereisland - a new nation born from an arts project. It is extremely liberal in it's views and is still in formation.


How do i can track all my own transactions in ripple.Whether any user is submitting or withdrawing ripple Thanks in advance.

I have one fixed address on ripple and user will be submitting and withdrawing ripple currency in my site.

I need to track all the transaction happening with all my users.

Please tell me the better way to handle such problem.

There is an API https://ripple.com/build/data-api-v2/#get-transactions which will give all the transaction in the descending order.

But I am unable to track transaction which is occurring to my users only.

Thanks

If you want to use an api, then there are few methods you could use as:

Get Account Transaction History

Get Account Payments

Get Transaction By Account And Sequence

Also, you could use Ripple accounts explorer to check your account history with user interface.


Cannot get the same address format from zeroMQ and Bitcoin Core I use nodejs with this npm library:

const bitcoinjs = require('bitcoinjs-lib');  // version "^5.1.6"

I received a rawTx from zeroMq, then extract it:

const tx = bitcoinjs.Transaction.fromHex(rawTx);

the txID is 8dba72608cbfca197b55d86aae2817d11f829b9361eb421fb005616f48ce8401

if I take the first output:

let output = tx.outs[0];

then I try to get the address:

const scriptBuffer = Buffer.from(output.script);
const address = bitcoinjs.address.fromOutputScript(scriptBuffer);

I get:

  37XE9EYzix7S42fLMxutrNaPfDbCccLhiT

But from bitcoin core I get:

  2My5SCyV2LQcnFpHt36XmUKZesZoNRQRPa5

My question: how do I convert the address to the same format as bitcoin core ?

Raghav Sood: you are right: here the correct code:

const addresses = bitcoinjs.address.fromOutputScript(outputScript, bitcoinjs.networks.testnet);

Thanks :-)


How do I know if a transaction is legit? A sender confirmed by email that he sent out bitcoins and even provided a link to the transaction on blockchain. I was never able to find it on blockchain. Just like it doesn't even exist. I talked to him and he told me it was suspended by miners.
I don't know much about this but this just sounds like a huge scam.

Can anybody help me please? Thanks

Blockchain was: 5a48441b1c47812d3a2ba01f30316c2ec6ee8969634ff304650560689a7cf3a3

I've just checked on three different blockexplorers, and none of them knew about this transaction. Your sender may have tried to pay you, but they definitely didn't succeed, so it's up to them to remedy that.

You know that a transaction is legit when it was confirmed in a block and the money has actually been transferred to you. Before the transaction is confirmed, it's merely a payment promise.


How can we run regtest without transaction fees We have setup a bitcoin network using regtest mode and found that there is transaction fee charge on each sending Bitcoin.

Is it possible set the payment fee to zero for each transaction?

We found that there is a setting in the conf file called paytxfee. We have tried to uncomment it, but the client complains that its missing.

We are using ver 0.11. How to get rid of the fee for each transaction?

I enclosed is the error message too.

  Pay an optional transaction fee every time you send bitcoins.
  Transactions with fees are more likely than free transactions to be
  included in generated blocks, so may be validated sooner.
  paytxfee=0.00

This is a duplicate - see also  Does the Bitcoin Qt client have a minimum transaction fee?

Bitcoin-QT will protect you from sending transactions that are very unlikely to ever be included in the blockchain.  If you really want to try sending with 0 transaction fee, you will need to use another wallet software or patch and recompile the code.

It is highly recommended to include some transaction fees.  See estimates at https://bitcoinfees.earn.com/ (former "cointape") to figure out how much is needed.  Keep in mind that the estimates are very uncertain, they count it's like 90% probability that the transaction will go through within the estimated window - but then there is also a 10% probability that the estimate is off.  There have been times where transactions that should have gone through within hours have taken days or weeks to get through, though it's rare.

I often also consult https://jochen-hoenicke.de/queue/ to see what's going on, particularly the "mempool size in MB"-graph may be relevant.


How do I Transfer Bitcoins If I have a watch-only account with the Private Key How do I transfer bitcoins over from a watch only electrum account if I have the private key and its address?

Transfer control to a new Electrum wallet

If you have the private key you can, in principle, either import the key into a new wallet or sweep it into a new wallet.

Electrum supports sweeping and doesn't encourage importing.

Importing doesn't involve a transaction or transaction fees but is more vulnerable to subsequent loss. The recovery-words also known as recovery-phrase or seed-phrase, cannot be used to recover control over money associated with an imported key. You'd need to make regular backups and test recovery from backup.

Sweeping involves a transaction but is regarded as safer.

Transferring Bitcoins

Note that you are not really moving bitcoins. The record of who controls what money is recorded in the public Blockchain which every full-node wallet has a copy of.

A watch-only wallet lets you observe transactions relating to money controlled by other people (or by other wallets). So there's no sense in which your bitcoins are in a watch-only wallet. You could as well say that everyones bitcoins are in every full-node wallet.

Electrum account

Electrum is a wallet, not an account. Your money is not stored by, managed by or controlled by Electrum.org. You control your money using software you install on your own computer.

Watch-only

Watch-only wallets are a useful feature if you keep your private-keys in cold-storage - such as in a hardware wallet.

They are also a favourite method by which scammers trick people out of money.


Should i mine with gaming pc? i want to ask should i start mining with my gaming pc spec:
(cpu) i7-6700K 4gh
(gpu) 1060 3gb
and will i get more bit than wasted power?
and what miners you use ?

BTC mining is not a real option anymore for home miners. It's not profitable as it was before. The only way to be profitable with BTC mining these days is custom made computers that are made for BTC mining.

The most people with a normal or gaming pc lose money instead of making profit when mining BTC.


Which crypto currencies have their own stack exchange site? I believe a coin has a solid community backing if they have their own stack exchange site. Which other crypto currencies aside from Bitcoin has their own stack exchange?

Stack Exchange Sites for Cryptocurrencies:

Bitcoin
https://bitcoin.stackexchange.com/

Ethereum
https://ethereum.stackexchange.com/

Monero
https://monero.stackexchange.com/

Other Proposals:

NEO-Blockchain
http://area51.stackexchange.com/proposals/110921/neo-blockchain

Augur
http://area51.stackexchange.com/proposals/106367/augur

Factom
http://area51.stackexchange.com/proposals/114019/factom

Sia
http://area51.stackexchange.com/proposals/114211/sia

Golem
http://area51.stackexchange.com/proposals/109578/golem

These are the present list to the best of my knowledge.


Bitcoin Mining Through VPN I'm fairly new to bitcoin and mining and am currently using a very restrictive ISP(port forwarding is not permitted). Therefore, it is not possible to connect to the bitcoin network(port 8333 is blocked). I also have a work station, in a different network, which doesn't share the above limitation.
I am using ubuntu 12.04 and went for the OpenVPN package. I can connect to the remote machine but don't know how to route mining traffic through it. Also, I don't want to delegate mining tasks to the remote box as it is a low end machine.
Is mining through a VPN tunnel possible in this context?

Yup.  Most of the common VPN services would work with it, it's a normal TCP/UDP sort of system.  I use torguard VPN, but I think most would work.


How to recover funds from a force-closed Lnd lightning channel? I lost my Lnd channel backup in a boating accident, but I still have the mnemonic. I had one freshly opened channel to my own c-lightning node which has never been used. I force closed the channel from the c-lightning side.

The funds are now in a P2WPKH address which I've imported into Bitcoin Core. Now I need to figure out the private key in order to sweep it. This requires knowing how to derive it, and then how to dump it.

There is wallet utility pull request that I could tweak in order to dump the key I need once I know how to derive it.

I also know the funding transaction id, the channel id and all the other channel details c-lightning spits out with listfunds.

Key derivation is explained in derivation.go:

m/1017'/coinType'/keyFamily'/0/index

The coinType for Bitcoin is 0, and I believe the key family is 3: "used in scripts that pay directly to us without any delay"

My guess is that the index is 0 since it was the first channel.

BOLT 3 then explains how to do tweak this key for a commitment transaction. Because the other side closed this channel, I need the to_remote output, which requires the remotepubkey.

pubkey = basepoint + SHA256(per_commitment_point || basepoint) * G
privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)

The spec says "the remotepubkey uses the remote node's payment_basepoint". Is that the key we just derived?

So that leaves the per_commitment_point to be figured out, derived from per_commitment_secret. I'm confused where that comes from.

What Go incantation should I use to dump the private key I'm looking for?

In c-lightning the per commitment point is derived from the hsm_secret using per_commit_point from:

The node id / public key (can be found with listfunds, until the channel is purged some time after closing)
The channel database id (can be found with cat ~/.lightning/debug.log | grep $node_id), shown as chan #$node_id
The commitment number (0 when opening the channel, increases during fee negotiations and other channel updates, |  grep commit)

We care about the commitment point, not the secret, because the private key we need is derived as follows:

privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)

I created a tool for c-lightning to dump this point (with help from @cdecker): https://github.com/ElementsProject/lightning/pull/3115

Back to Lnd... One easy place to dump a private key is in the lnwallet walletinfo command. Add something like this to commands.go:

basePointSecret, err := keyRing.DerivePrivKey(keychain.KeyDescriptor{
  KeyLocator: keychain.KeyLocator{
    Family: keychain.KeyFamilyPaymentBase,
    Index:  0, // Same commitment index as used in c-lightning
  },
})

// Parse per_commitment_point dumped by c-lightning:
bytes, err := hex.DecodeString(".........")
commitPoint, err := btcec.ParsePubKey(bytes, btcec.S256())

// Obtain SHA256(per_commitment_point || basepoint)
h := sha256.New()
h.Write(commitPoint.SerializeCompressed())
h.Write(basePointSecret.PubKey().SerializeCompressed())
commitTweak := h.Sum(nil)

// Obtain and dump private key
tweakedPrivkey := TweakPrivKey(basePointSecret, commitTweak)
commitmentWif, err := btcutil.NewWIF(tweakedPrivkey, &chaincfg.MainNetParams, true)

fmt.Printf("Dump commitment priv key: %s\n", commitmentWif)

Where TweakPrivKey() is lifted from script_utils.

Import the resulting private key into Bitcoin Core et voila!


How are the requirements of the hash for mining a new block determined? How are the requirements of the hash for mining a new block determined? Is it published or a message is sent?

The difficulty calculation is part of the consensus rules that nodes on the network follow. It can be calculated at any time by a node and is calculated every 2016 blocks (two weeks, on average). When the correct number of blocks has passed, the node calculates it based on the last two weeks and adjusts in order to maintain a 10 minute block time (on average). The calculation is in CalculateNextWorkRequired.

Miners can request a block template from a node, in order to start mining, which contains the hash target (i.e. difficulty), see getblocktemplate.


Is the Bitcoin network slowly closing down? Consider the following graph:

This chart shows the total number of hosts on the network that were connected in the previous 24 hour period. We collect this by listening to Address messages that are broadcast over the network and I got it from bitcoinstatus.rowit.co.uk. This graph and a number of other graphs on that site show significant reduction in the number of hosts on the network.

Does this mean that the Bitcoin network is slowly closing down? I can see that the graph seems to be quite level at the end, but the trend seems to be downwards.

Thank you jim618 for providing me with the link in this answer.

It could be that this host specifically is getting less connections, although that might not be the case.

There has been a similar drop in hashing power and stock price. The most likely cause of this is the lack of press-attention and a low amount of things you can do with Bitcoins. Another possible explanation is the increased usage of online-wallets reducing the need for locally running clients and therefore the total number of hosts connected.

Overall, no need to worry about the Bitcoin network closing down. In fact it seems to be about to grow faster again.

Some backing for my claims is here:
http://bitcoin.sipa.be/

Although it's hard to say anything from these charts


bitcoin-qt importaddress not working using bitcoin-qt 0.19.0.1 on mac, I type this in console:
importaddress someaddress "" false
After I hit enter, the output is "null". What's wrong ?

This is normal - importing an address does not produce any output, and you will see null in the debug console.


Is it smart to just create wallet and then delete it, writing down the address? What are possible downsides of practice where I download a bitcoin wallet on my phone, write down the seed and the address, purge the app into nonexistence and continue my happy life, sharing my address, using it like, for example, a savings account?

I would then check the balance every few years.

If you only generate a limited set of addresses before you delete your wallet, it is likely you will run out of fresh addresses to receive funds on, meaning multiple spendable transactions will be linked together via the receiving address. This is a privacy disadvantage.

Secondly, your mnemonic key phrase back-up follows an off-chain deterministic key derivation standard (BIP32/43/44), and even if all consensus rules do not chain, there is no guarantee that wallets continue to implement the same key generation method that they currently do (depending on your timeframe). If you cannot use a wallet application with the same key derivation standard later, you will have to derive your used keys yourself using the BIP32/43/44 standards.


Will the transaction fee economy in Bitcoin follow the commission model? I've been analyzing the long term results of the block chain. In the process I realized the relationship between the distribution of coins over time, transaction fees, and coins being lost. The full paper is available here and is about 3 pages long:

https://docs.google.com/document/d/18RirEreHjr8AVrxeL6_MeN_pQPCxWnoj1s_qPunMLX8/edit#

If this is accurate would the transaction fee system we transition to be a commission model?

Not entirely. In a commission model you generally pay a percentage of what the transaction is, whereas in Bitcoin you just pay for the bytes the transaction requires. The setup is less like a commission model and more like a bank transfer fee model - banks generally don`t charge you for how much you transfer, but for the transfer itself.


Are there any revenue sharing blog websites that pay out in Bitcoin? There are plenty of revenue-sharing blog websites out there (ie they share advertising revenue with the bloggers) but it would make a lot of sense for payments to be made out in Bitcoin, as transaction fees would be very low and the minimum payment amount could be kept small. It would also easily allow participants of any nationality.

Are there any blog hosting sites that share revenue and payout in Bitcoin?

You can use https://anonymousads.com/ on a blog site. They pay in Bitcoin but don't host anything themselves as far as I know


Is the public address for Tesla's wallet known? I understand if this isn't likely the place.
It has been all over the news that Tesla has bought 1.5 billion in bitcoin. I'm curious if tesla's public wallet address(es) are known?
If they are not known, what is the most likely culprit? shouldn't it be public information?

No, it's not known, and information like that generally won't be publicly released. Bitcoin addresses aren't generally publicly associated with the real-life identities of their owners.
I would expect a company like Tesla to have the bulk of their cryptocurrency assets stored in institutional custody regardless, for liability and regulatory reasons.


Anyone know how to configure pybitcointools to bitcoin testnet? Anyone know how to configure https://github.com/wizardofozzie/pybitcointools
to bitcoin testnet?

thanks,

There is blockr_fetch(txindex, "testnet") and blockr_push(signedTx, "testnet"). Note the need to use "testnet" as the 2nd parameter.

Reference


Bitcoin core datadir over NFS I am going to run a bitcoin core on a Linux server (Ubuntu 20.04). I don't have enough storage to store blockchain data. Therefore, I want to save the data over an NFS server (CentOS release 6.10). However, I get an error when I set the -datadir to the shared folder.
The content of /etc/exports file in the NFS server (I've seen the configuration from here):
/home/storage/  BITCOIN.CORE_IP(rw,sync,no_root_squash,no_subtree_check)

I mounted the remote shared directory in the Ubuntu 20.04 Linux server using the following command:
mount NFS_SERVER_IP:/home/storage/ /root/blockchain/

everything works fine, and the file system disk space usage report is: (df -h)
Filesystem                   Size  Used Avail Use% Mounted on
NFS_SERVER_IP:/home/storage/  1.0T  682M  1.0T   1% /root/blockchain

After running the following command to change the data directory to the shared directory:
./bitcoin-0.20.0/bin/bitcoind -datadir=/root/blockchain

I get the following error:
Error: Cannot obtain a lock on data directory /root/blockchain. Bitcoin Core is probably already running.

I should note that the shared directory is empty before running the bitcoind, then after that, it contains an empty file, which name is .lock. Moreover, If I set the -datadir to any local folder, it will not return any error!
Thanks.

In my view, we cannot move LevelDB index files such as chainstate, etc. to an external slow storage.
According to this link, we should only move the blkxxxxx.dat and revxxxxx.dat files to an external storage. These files are inside ${datadir}/blocks/ by default. Since the index directory (${datadir}/blocks/index) contains high i/o-frequency LevelDB index files, moving it to an external storage will increase the initial blockchain synchronization time.
So take the following steps (I followed the instructions of the link):

run bitcoind.

Let it run for a few minutes, or long enough that it has started synchronizing [ref]

Then kill the bitcoind.

Next, Move the "index" folder up one level (so that it may remain on the local storage):

mv -f ~/.bitcoin/blocks/index ~/.bitcoin/

Move the blocks folder to the shared directory:

mv -f ~/.bitcoin/blocks ~/blockchain/

Create a symbolic (soft) link to the local index directory at blocks directory in the shared storage (use absolute path):

ln -s /root/.bitcoin/index /root/blockchain/blocks/index

Now, create a symbolic (soft) link to the blocks directory at .bitcoin in the local storage (again use absolute path)::

ln -s /root/blockchain/blocks/ /root/.bitcoin/blocks


I've tried everything from mining bitcoin to litecoin to other altcoins....why do I have no luck? I am a beginner in the blossoming culture of crypto-currency, and unfortunately, it's beginning to feel as if 2015 is too late of a year for a laptop-user such as I to be able to start mining.

I'm running an Intel HD Graphics 4000 GPU, and an Intel Core i5-3230M CPU at 2.6 GHz. No, I do not have an ASIC, but I figured I'd at least be able to scratch out a few cents per month with what I have, not taking into account electricity or what not.

Immediately upon beginning to mine Bitcoin (BTC) using Slush's pool, which when I tried to mine was actually the newly updated stratum server 'bitcoin.cz'. I only got a hash rate of about 2-12 Mh/s, and the pool did not even recognize that the worker I had registered was mining. I have heard of people with relatively similar specs getting a rate of even 100 Mh/s, but I figured that this was just an issue of Bitcoin's colossal difficulty at this point of its lifetime.

So, I then looked into Litecoin (LTC). This time, my GPU was not even recognized by any mining software that I would try. I looked into updating the drivers and SDK's, and still I had no luck.

Finally, I decided that perhaps I could get away with mining some unique Altcoins, and due to the over 300,000% increase in profitability over Bitcoin at the time of writing, I chose to try to mine Diamond (DMD) and then try to exchange my profits for a fraction of a bitcoin. At this point I was not even mining for profit, but for the satisfaction that something was working. I configured my miner, and of course, my hash rate displayed at about 2 Kh/s on my GPU. Again, the mining pool (Danbi's pool) I had chosen to use did not even register that I was mining, and even after hours I made absolutely no profit.

So, after giving you all of this information, I ask of you this: Is it too late to mine any crypto-currency without spending huge amounts of money in mid-2015? At this point I do not even need to make profit, I'd just like to see that I have a fraction of a coin in a wallet somewhere (I did set up wallets for each and every coin I tried, mind you). Does anyone have suggestions as to what I'm doing wrong? I understand that what I'm doing is not profitable, but is it to the point that whenever I mine I really can only make 0.0000000 BTC/month (I'm not joking, that's the stat I keep getting)?

I would pay you for your help in Bitcoin, Litecoin, or some other currency...but due to the suddenly centralized nature of mining, I can't.

Sincerely,

A very discouraged Bitcoin enthusiast.

Laptop mining worked well in 2009. It is no longer 2009.

Your integrated Intel GPU has the speed of a CPU, not a fast gaming GPU. Even in 2011 when CPU mining was dying and people mined on GPUs your GPU would be too slow.

Yes, "even" people with 100 MH/s can't mine anymore. That's because 1000x that speed (100 GH/s) is slow at this point. 1 TH/s (1 000 000 MH/s) is OK for a small mining-at-home operation.

If you go way beyond laptops with Intel graphics integrated in the CPU, to small USB sticks with ASICs, even those are useless now. Some people pay $5 or $10 for a 1 or 2 GH/s USB stick (much much faster than your laptop). Not only is this incredibly slow, but it will never break even because the price per GH/s is extremely high.

What you need is a 1 TH/s ASIC machine, or faster, and electricity at a good price. You need to get this machine at a good price per GH/s or it will not break even. Make sure you take the price of a power supply into account as well if it is not included.


Blockr.io - how to decode a transaction via API I've read through the documentation on decoding a transaction via API on Blockr:

http://blockr.io/documentation/api

I have the hex code, which correctly decodes on http://blockr.io/tx/push

Thus it can decode.

Please show me where I am going wrong trying to follow the API documentation which states:

My attempt includes adding the path to postman (as a post):

http://btc.blockr.io/api/v1/tx/decode?hex=010000000117f244eba4...

Hex is request body param not query param.


Different hash while creating genesis block I've created a genesis block following this instructions:

https://bitcointalk.org/index.php?topic=181981.0

Using this data:

./genesis 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f "The Times 2018/03/16 Detectives de bots: como desenmascarar a las cuentas falsas" 486604799

I've got:

Coinbase: 04ffff001d0104505468652054696d657320323031382f30332f3136204465746563746976657320646520626f74733a20636f6d6f20646573656e6d617363617261722061206c6173206375656e7461732066616c736173

PubkeyScript:     4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac

Merkle Hash: c029ee7dc05c55da997e0e1a0a926470d163ea1a795222e05e3f39a14f990499
Byteswapped:         9904994fa1393f5ee02252791aea63d17064920a1a0e7e99da555cc07dee29c0
Generating block...
1479761 Hashes/s, Nonce 94652275
Block found!
Hash: 000000006263afe74f41e4260a88bc16493f775ea5c3401c41b05b5d21db45d2
Nonce: 95416095
Unix time: 1521311547

But when I run it in Bitcoin code I get a different hash. I did changes here:

static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward)
{
    const char* pszTimestamp = "The Times 2018/03/16 Detectives de bots: como desenmascarar a las cuentas falsas";
    const CScript genesisOutputScript = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
    return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward);
}

And here:

// Creating genesis block with Unix time, nonce, nBits, version, and coin reward
genesis = CreateGenesisBlock(1521311547, 95416095, 0x1d00ffff, 1, 100 * COIN);

Hash I get from Bitcoin source:

b89d3d49beff21a6da00c8dc15ff82dfdba548e860ccaaf34669ecd94e9d1134

Hash I should get:

000000006263afe74f41e4260a88bc16493f775ea5c3401c41b05b5d21db45d2

I guess I'm forgetting to set something, or maybe the genesis code is outdated.

Maybe this is useful for someone: I didn't find why the hash was different, it's possible that the code I used for generating the genesis block is outdated.

Finally I used https://github.com/lhartikk/GenesisH0 and it worked, the only caveat was that I only was able to change the timestamp, when I tried to change other stuff (e.g. nBits) it failed.


Why does Antpool mine so many empty blocks? AntPool, the largest mining pool mines a lot of empty blocks (quick stat over the last 100 blocks they mined at time of writing shows 20% <10kB).

While I understand that sometimes it is useful to mine an empty block when one has not had time yet to validate all transactions in the previous block. This validation should be very quick compared to the average 10min block time (validating a full block of like 2000 transactions should not take more than a few seconds on a modern PC, no?).
So, why the hell is Antpool mining so many empty blocks???

Just to compare, the same stat for the 2nd largest pool, F2Pool, gives only 4% blocks <100kB and 0% <10kB.

EDIT: I pulled out some more stats over the last 500 transactions as of 16/12/2006 11:25 CET
- 18 blocks < 5kB (3.6%)
- AntPool mined 98 blocks, out of which 16 < 5kB (16.3%) covering almost 90% of empty blocks
- Empty blocks came on average 6.6min after the last block so yes faster than the overall average 10mins but still plenty of time to include transactions
- Only 16% of these 18 were very quick empty blocks <1min

This article gives a nice summary of potential causes and solutions to empty blocks mining: https://bitcoinmagazine.com/articles/decline-empty-blocks-has-increased-bitcoins-transaction-capacity/.
AntPools may just be late at implementing the solutions...


Is there a known way to export my wallet private key from the "Bitcoin Android" app (com.bitcoinandroid)? A while back, I installed the Bitcoin Android app and moved 5 BTC on it. Fast forward to now, new phone, new ROM, and the app seems completely unwilling to update its blockchain, meaning I have no way to move my BTCs  elsewhere.

Looking at the source, it's built on an early version of BitcoinJ, where the wallet file is essentially a serialized Wallet class.

A look at the wallet file itself isn't too friendly, although I'm sure the private key is somewhere in there in a relatively straightforward form.

So, that leaves me with the following possibilities:

write a little Java app that links against the same version of BitcoinJ, load the Wallet file, grab the private key and print it.
write a really dumb script that extracts every 32 bytes sequence from the wallet file, treat it as a private key, map it to a public key, check blockexplorer.com for any activity associated with it. Or just import every one of those sequences into a bitcoin client and let it suffer.

Before I embark on my Quest For Five Bitcoins, is there already something out there that can parse BitcoinJ wallet files and export keys from them?

I would try option 1 first, if you can find the right version of the library.  I'd be willing to try making a general purpose tool to do it, but don't have an Android phone.  Is there any way you can make a new, empty wallet and put a copy online somewhere along with a corresponding bitcoin address or two?

If you're attempting option 2, you probably know at least one of the addresses in the wallet, and so wouldn't need to hit blockexplorer for every guess.  You would expect the private keys to be evenly spread through the wallet, so once you've found a few you can make smarter guesses about where the rest are.


bitcoin stuck with no confirmations I'm quite new to this. I have transferred coins to a wallet 4 hours ago and I'm still stuck with no confirmations. I do have a Bitcoin wallet on blockchain.info. I transferred from Bitcoin market website straight to another wallet if mine and now its stuck. How can I reverse it or get it moving again? I have tried looking for the trusted peer option and all that, but can't get my head around it. This is my block number on blockchain.info: a8abd5243ac486822577208f87e46f6864baeb1250c1434b3a1811a017ce6e2f

Any help would be appriciated.

This transaction is unlikely to be confirmed for a long time.

It has very low priority because it is spending an output which is unconfirmed. None of the parents of this transaction are confirmed either, going back 5 generations.
Each transaction in the chain pays a very low fee of around 0.00000259 BTC, which is below the recommended amount and below what other people are paying to get into a block.


How does Bitcoin know if enough BTC are available for an account to allow a transaction? Let's consider this simplified blockchain:

BLOCK 108
address ddd111 received 2 BTC by mining block 108

BLOCK 109
address abc123 received 2 BTC by mining block 109

BLOCK 110
address xyz999 created with 0 BTC
address fff555 created with 0 BTC
address abc123 =>  xyz999   1 BTC
address abc123 =>  fff555   1 BTC

BLOCK 111
address ddd111 => xyz999    1 BTC

BLOCK 112
address xyz999 => bbb888    5 BTC

How does Bitcoin Core knows there's a problem in the last transaction? How does it know that xyz999 cannot send 5 BTC to bbb888 because xyz999's balance is not enough?

Bitcoin doesn't track a balance on an address.  You can get a balance but that is for humans and isn't how the protocol really works.  What bitcoin nodes do track is a list of unspent transaction outputs.

Here is your scenario reworded a bit.

BLOCK 108

address ddd111 received 2 BTC by mining block 108 in transaction A:0
(By this I mean transaction A has one output (index 0) that is 2 BTC to address ddd111)

Transaction A:
Inputs: coinbase
Outputs: A:0 - ddd111 2.0 BTC

BLOCK 109

address abc123 received 2 BTC by mining block 109 in transaction B

Transaction B
Inputs: coinbase
Outputs: B:0 - abc123 2.0 BTC

BLOCK 110

The network knows nothing about address with no funds, this doesn't happen

address xyz999 created with 0 BTC
address fff555 created with 0 BTC

address abc123 spends B:0, sending 1 BTC to xyz999 (C:1)  and remainder to self (1 BTC) (C:0) transaction C

Transaction C
Inputs: B:0 (signed by abc123)
Outputs: C:0 - abc123 1.0 BTC
         C:1 - xyz999 1.0 BTC

address abc123 spends C:0, sending 1 BTC to fff555 transaction D

Transaction D
Inputs: C:0 (signed by abc123)
Outputs: D:0 - fff555 1.0 BTC

BLOCK 111

address ddd111 spends transaction A sending xyz999  1 BTC and 1 BTC back to self - transaction E

Transaction E
Inputs: A:0 (signed by ddd111)
Outputs: E:0 - xyz999 1.0 BTC
         E:1 - ddd111 1.0 BTC

BLOCK 112

address xyz999 spends transaction E:0 and C:1 to send bbb888 2 BTC - transaction F

Transaction F
Inputs: E:0 (signed by xyz999)
        C:1 (signed by xyz999)
Outputs:
        F:0 - bbb888 2.0 BTC

(xyz999 couldn't form a valid transaction sending 5 BTC because there aren't 5 BTC of unspend outputs for it to use)

Note: A transaction can have multiple outputs which can be spent independantly.

Now we have this list after block 112:

Unspent after block 112
D:0
F:0
E:1

Each node's job is to import the block by marking the spent outputs as spent and tracking the new unspent outputs.  This is part of why it takes time to sync the blockchain, not only do the blocks need to be downloaded but they need to be validated and the local database needs to be updated.

Note: if you run a node that prunes, it will just keep the unspent outputs. If you don't prune, it will keep all blocks and the unspent outputs.


When did the ASIC mining era begin? I am trying to figure out when the ASIC mining era began. A Bitcoin magazine article from January 23rd 2013 announces the imminent arrival of the first batch of Avalon miners in early February.

Is there more accurate information: What day did the first ASIC miner become operative?

Jeff Garzik received an Avalon miner on january 30th, 2013 and posted pictures at http://garzikrants.blogspot.com/2013/01/once-upon-time-in-china-package-shipped.html and http://garzikrants.blogspot.com/2013/01/avalon-modular-room-to-expand.html

The next day he posted a review at http://garzikrants.blogspot.com/2013/01/avalon-asic-miner-review.html

For many this was a milestone that you might call the beginning of the ASIC era. Of course the manufacturer had the first bitcoin ASIC chip operative long before this. Also, this did not mean that you could just order an ASIC miner and receive it within a reasonable timeframe. But it did mean that the first bitcoin ASIC machine had shipped. For better or worse, it had begun.


Is the value of "satoshi" fixed or dynamic? BitCoin Wiki (Transactions) states:

  ...1 BTC = 100,000,000 Satoshi...

Yet BitCoin Wiki (FAQ) states:

  ..."satoshi"... is smallest denomination currently possible

In the future when the protocol decides to support more decimal places, will the value of "satoshi" change to match the smallest denomination then possible?

Or will the value of "satoshi" fixed at 0.00000001 BTC?

The value of a Satoshi is fixed.

The key word is "currently" (smallest currently possible).

If the divisibility is ever increased, a Satoshi will still be exactly 0.00000001 BTC, even though there exists unit representing an even smaller amount.

There would need to be new names for these new denominations that are even smaller than a Satoshi, but dSatoshi (1/10th of a Satoshi), cSatoshi (1/100th of a satoshi), and mSatoshi (1/1000th of a Satoshi), would likely suffice.


What do pruning nodes contribute to the network? Pruning nodes are described in the sourcecode thusly:

  -prune=<n>: Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan.

I’ve watched that my node has been consistently uploading less than it has been downloading since I set it to run in pruning mode.

What services do pruning nodes still perform?
Do they upload blocks and transactions?
Can they service thin clients?
What can a pruning node not do, that a non-pruning node does?

From release notes https://bitcoin.org/en/release/v0.11.0 :

  For now, block pruning disables block relay. In the future, nodes with block pruning will at a minimum relay “new” blocks, meaning blocks that extend their active chain.

In the current version pruning nodes don't advertise themselves as having any blocks, so they don't upload blocks. So that explains your big reduction in upstream data. A future update will re-enable block relay in such a way that your nodes can efficiently let its peers know which blocks it owns and which it doesn't.

Yes your pruning node will do full validation and it will service lightweight nodes.


How to check where I recently sent some Bitcoin Cash using Copay wallet Hey sorry but i'm totally new to this. i bought serval different currencies. i have sent bitcoin and bitcoin cash to my copay wallet. i can see the bitcoin but not the bitcoin cash. the balance has left my coinbase account. i don't understand enough to decipher what im looking at. i see input consumed and outputs created. and i see a load of confirmations. i copied and pasted the address from my wallet so i don't think i could have pasted them wrong. what are my next steps to take. ho do i check where i have send them.

how do I check where I have sent them?

View Recent Transactions.

If they are not there, you may be able to refresh the history from the Copay servers

  "Settings" > "Wallet" > "More Options" > "Transaction History" > "Clear cache"
  "Settings" > "Wallet" > "More Options" > "Wallet Addresses" > "Scan addresses for funds"

You can paste the address or transaction ID into any BCH clockchain explorer (example) to check another view of the transaction in a different copy of the blockchain ledger.


Can you mine remotely Is it possible to set up a rig in a location where you will only be once a few months, antminer. In summer temp may reach high 80s during day otherwise cooler temps... I wasn't sure what would go down if there is a power outage or if it gets too hot...

It's certainly possible, there's nothing stopping you from doing so. You can easily manage mining hardware remotely with SSH. You can even leave the hardware unattended, but you might have some problems if there are issues that you have to actually start/stop the machines or deal with physical issues.

An option for remote management is colocation. With colocation, you let someone else manage your hardware and be physically on location with it. The hardware is anaged with other people's miners as well (hence the "co" part). Some colocation services will also allow you to remotely manage the hardware through SSH too and the people on location only deal with physical issues.


How can one embed custom data in block headers? Some mining pool admins put custom data in block headers, like prayers. How do they do that? Where can I see that data for myself?

When you generate a block, the generation transaction (the one that creates new coins) has an attribute called coinbase. It's a special value you can put anything you want in to make the block unpredictable to others (and this is good).

So, naturally, you can put text in this attribute, although most just put mining-related information that is not human-readable (nonce and extra-nonce).

You can read this coinbase by using a patched bitcoin node that can dump blocks, for example with the "dumpblock" or "getblockbyhash" patches.

Or you can just print every string in the blockchain database directly :
strings -n 20 blk0001.dat

Example for the 1st block:

Coinbase: 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73

ASCII-translation:
ᝣᝣᝣᝣᝣᝣᝣEThe Times 03/Jan/2009 Chancellor on brink of second bailout for banks

This is what is used by the Eligius pool ; it puts prayers in this field.


Will bitcoins be devalued by competing digital currencies? Bitcoin is becoming more recognizable and trusted. But as it's popularity increases, the supply isn't going to change significantly because the supply is fixed to the internal mining algorithm. This is good because it removes the inflationary effect on the currency. Or does it?

Couldn't I just start a new "bitcoin" on a new network, and call it "bitcoins", and therefore double the amount of bitcoins in existence?

That example seems trite, but it gets to a worry I have, that the limited total number of possible bitcoins may be rendered worthless because it is open source and you can just create a secondary bitcoin network to create more bitcoins.

Is this an actual hazard to the value and future growth of the currency? Why, or why not?

You could easily create a bitcoin2, bitcoin3, ... you could create an infinite number of bitcoin currencies having different parametric spaces. These would live in separate mathematical spaces however, so you wouldn't for example be able to create bitcoins in bitcoin2 that affect bitcoins in the original bitcoin: it would be a completely separate system.

But we don't need to be so theoretical about this; there are many alternative digital currencies already in existence:

https://en.bitcoin.it/wiki/Category:Digital_currencies

I would also add other forms of popular credit such as paypal credit, and the new Amazon coin that is coming out to that list.

These can co-exist and there is no problem in this.

I think as a challenger of bitcoin however, it would be difficult, as bitcoin is the most established and most popular digital currency so far. People tend to invest in what is already the most popular, so you get a compounding effect due to this. But this isn't to say that something like something like Amazon coin couldn't eclipse bitcoin for popular use.

Note that these currencies also vary in anonymity and liquidity, which will also affect how popular they become.

But I think in summary I have to say that nobody can predict the future for this kind of thing, so we'll just have to wait and see.


How to add a signature to a transaction which I can broadcast I am using ledger and multi sig to sign a transaction I got signature hash where both party signed the transaction. How can I attached this signature to the transaction so that I can broadcast it to network?
any code reference will be welcome. Currently I am referencing electrum code.

How can I attached this signature to the transaction so that I can
  broadcast it to network?

This is more agnostic to any particular wallet software, but I hope it's helpful. When you sign a transaction, you then put the signatures in the scriptSig field of the input it corresponds to (the tx may have multiple inputs).

For a m-of-n multisig transaction, the scriptSig format is:

0 <sig1> ... OP_m <pubKey1> ... OP_n OP_CHECKMULTISIG

To broadcast it to the network, you can use the broadcast command in electrum:

cat signed.txn | electrum broadcast -

If successful, the command will return the ID of the transaction.

Alternatively you can use the sendrawtransaction RPC on a node running Bitcoin core.

sendrawtransaction "hexstring" ( allowhighfees )

Submits raw transaction (serialized, hex-encoded) to local node and network.

Also see createrawtransaction and signrawtransaction calls.

Arguments:
1. "hexstring"    (string, required) The hex string of the raw transaction)
2. allowhighfees    (boolean, optional, default=false) Allow high fees

Result:
"hex"             (string) The transaction hash in hex

Examples:

Create a transaction
> bitcoin-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"
Sign the transaction, and get back the hex
> bitcoin-cli signrawtransaction "myhex"

Send the transaction (signed hex)
> bitcoin-cli sendrawtransaction "signedhex"

As a json rpc call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendrawtransaction", "params": ["signedhex"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/


Blockchain parser for transaction level details I'm looking for transaction level data for both inputs and outputs. The znort block parser returns the type of data I'm looking for, however it doesn't seem to detect multisig transactions. Has anyone updated the code?

There's another parser written by John Ratcliff which properly detects the multisig transactions, however this does not return transaction level data. Has anyone modified this code to return individual inputs and outputs?

Are there any other parsers available to return transaction level data for inputs and outputs?

Thanks

I guess you're looking for a blockchain explorer. Insight, by BitPay, works pretty well and is open-source: https://github.com/bitpay/insight


On Bitfinex, what is FRR? On Bitfinex under Lending it has a check box for FRR and FRR Delta
What do these option do? (Flash Return Rate)

Its the return rate. So instead of just setting a return rate at lets say 0.019%, you're return rate is the market rate. It updates once an hour. It makes it easier for you so you don't have to log in all the time to adjust you're rate.

Imagine. You set a rate to the current market rate of 0.049%. Then you get a few loans but the market rate drops to 0.019%. You no longer get loans so you have to adjust your rate. FRR adjusts your rate automatically.


Are transactions verified in chronological order? I've seen that blocks include timestamps which are updated "Every few seconds", but who updates the timestamps, and are the timestamps used to verify transactions in chronological order?

If a block with a certain timestamp is added to the blockchain, will any block with an earlier timestamp be rejected?

How is the timestamp used by the protocol?

According to the wiki, there is some tolerance in the accepted timestamp for a new block:

  A timestamp is accepted as valid if it is greater than the median timestamp of previous 11 blocks, and less than the network-adjusted time + 2 hours. "Network-adjusted time" is the median of the timestamps returned by all nodes connected to you.

The reason, as explained in an answer to a related question, is that "without a central authority, it's impossible to know for sure what the current time is" (in the sense that, while there might be standards that set the "correct time", you can't prove that an operation that happened in a computer somewhere in the world actually happened the time it says it did).

So, answering your doubts:

Who updates the timestamps?

The miner that produced the block assigns the timestamp, and the other peers in the network endorse it.
Are the timestamps used to verify transactions in chronological order?

What matters is the order of blocks in the blockchain, not the order of the timestamps (since to produce a block you need a previous block "done", it follows that the transactions in that block happened after the transactions of the previous one).
If a block with a certain timestamp is added to the blockchain, will any block with an earlier timestamp be rejected?

Only if it falls outside the margin of tolerance mentioned above.
How is the timestamp used by the protocol?

I'm not sure of all the reasons it exists, but you can start by looking at this and this questions. My understanding is that it's unfeasible to know exactly when a transaction happened, but you still need a rough knowledge of the time at the very least, for several reasons.


How to get xpub or mpk(bip32) for my bitcoin core wallet? I m not getting any such option in bitcoin-core Ui and documentation
http://bitcoindaily.org/bitcoin-guides/bitcoin-core-tutorial/

Bitcoin Core (since 0.13) uses HD after BIP32 with only hardened private key derivation. Exporting the xpub would be useless, because other apps could not derive public keys (hardened derivation requires the xpriv).

Though, you can export the xpriv with dumpwallet <filename> (RPC or Debug Console). But be careful with that.


What is a good analogy (which a layperson would understand) for the process of Bitcoin mining? I will be explaining Bitcoin to a non-technical group and I am hoping somebody can provide me with a very basic visual analogy of the crypto-currency mining process.

My half-baked idea, was to somehow describe the mining process as partaking in a complex word search. Hopefully getting my group to visualize a large pool table sized word search (block) and have them imagining searching for a 30 alphanumeric character identifier (wallet). Describing the blockchain as a city sized word-search on top of 21 million pool tables?

Is this a good analogy to use, or is there a better/more applicable one?
Using (and adding to) the best analogy, how can I explain the difference in mining with CPU/GPU/ASIC and why the ASIC hardware is the quickest?

I wrote a blog post called Bitcoin by Analogy that captures the best analogy I've seen for explaining Bitcoin:

The nation of Yap in the South Pacific uses a unique form of money called Rai stones, which are circular disks carved out of limestone, with a hole in the middle, that can be up to 12 feet in diameter and weigh up to 8,800 lbs!

Trading stones of this size is difficult: no one wants to cart around a 4 ton stone every time they make a purchase. As a result, the Yapese came up with a clever solution: they decided to determine ownership by verbal agreement. Whenever there was a trade, the parties involved would communicate to the rest of the tribe the amount of stone that had been exchanged. The stones wouldn't actually move from one house to another, but the knowledge of who owned what was memorized and handed down through oral history.

It turns out that this model of money is an excellent analogy for Bitcoin: the ownership of money is determined through collective memory (similar to Bitcoin's global ledger, known as the block chain), money is exchanged by telling everyone in the village about transactions (much like sending out messages in Bitcoin for each transfer), and new money enters the system through the time consuming and randomized process of mining (Bitcoins are created through digital mining).

It's a fairly long blog post, so I'm not sure it makes sense to copy it here; see Bitcoin by Analogy for the rest of the explanation.


How do you set the price of a new Coin at the beginning? When starting a new coin, how do you know what to set the initial value of the coin?

Can you set it at something like 1.00 if not listed on a exchange?

The people of this coin will only be trading it for a year before they start to sell it at market value.

Just need to know how to put an initial value for the coin

If the coin relies on a decentralized proof of work based blockchain like Bitcoin the price is set by the free market (supply and demand).

If coin issuance is centrally controlled because of a premine by the issuer, then the controlling entity will have more control. There are many different ways to structure ICOs each with different economic, security and legal considerations. If you are the coin issuer referenced in this question you will need to answer these questions on your own or be more specific in describing your question(s).


Where does bitcoin-qt store it's initial settings I installed bitcoin-qt (v 0.12.1) on Kubuntu 15.10. When starting it the first time the GUI asked me for the datadir. I set it to an external disk.

Where are this settings stored? There is no bitcoin.conf file in my /home/<user>/.bitcoin/ directory.

I know, that I can manually create the bitcoin.conf file. But I'm just curious, where the settings are stored, if no such file is present?

Bitcoin-Qt stores its own modifiable settings outside of bitcoin.conf (which is intended to only be read).

The location and format of that file is platform dependent, but on Linux it is ~/.config/Bitcoin/Bitcoin-Qt.conf.


What are the mechanics of verifying that an output transaction is not spent? I am trying to understand the mechanics of how a bitcoin transaction works. When the output gets consumed by a later transaction, who and how prevents this output from being consumed a second time? Do we go over all the transactions after to make sure it hasn't been used?

I am not sure what are the right tags for this kind of questions

When the output gets consumed by a later transaction, who and how prevents this output from being consumed a second time? Do we go over all the transactions after to make sure it hasn't been used?

Full nodes keep track of all unspent outputs in the blockchain, known as UTXOs (unspent transaction outputs). This is the UTXO set. When a transaction in the blockchain spends a UTXO, it is removed from that set, and new UTXOs are added for the new outputs from that transaction. This happens every time a new block is received. If a transaction tries to spend a UTXO which isn't in the set, the node sees it as invalid. To that node, there is no difference between spending from a transaction which has already been spent, or one which never existed. Either way, there is no valid UTXO to spend from in the UTXO set, so its an invalid transaction.


Could I mine a non-final transaction? I know that non-final transactions (locktime in future and sequence number < MAX_UINT) are not "accepted by miners". However, I could not figure out the exact behavior.

If I mined my own block with a non-final transaction, would that block be considered valid, i.e., would clients add it to their copy of the chain and would other miners build on top of that block?
(I suppose the answer is "no" because otherwise attacks on contracts could be possible.)

No.  In the reference client, main.cpp runs this check during "AcceptBlock":

    // Check that all transactions are finalized
    BOOST_FOREACH(const CTransaction& tx, block.vtx)
        if (!IsFinalTx(tx, nHeight, block.GetBlockTime()))
            return state.DoS(10, error("AcceptBlock() : contains a non-final transaction"),
                             REJECT_INVALID, "bad-txns-nonfinal");

which rejects your block if it contain a non-final transaction.  A client that accepts a block containing a transaction with a locktime in the future and sequence number less than std::numeric_limits<unsigned int>::max() would be on the losing side of a fork.


Multibit application on Mac only showing 2/7 wallets I've got 7 wallets created in Multibit. Since today, when i open Multibit it is only showing 2 wallets out of the 7 that exist.

I've checked the files stored in user/Library/Application Support/Multibit and all the .wallet are still there.

I don't know how to solve this issue...

Regards,

Ok, after trying different things and updating multibit software i managed to recover my missing wallet by creating new wallet with the exact name of the .wallet that existed in the Multibit Application. If i had a garbage.wallet and was not showing in Multibit, i created manually a new garbage.wallet and that recovered my old multibit wallet.


Validate 3rd party transactions on Bitcoin-qt debug window Is there a way to validate a random transaction via transaction ID on the debug window? Imagine I want to validate a transaction between 2 wallets I don't control.

I believe its possible to check if such a transaction exists on the mempool "getmempoolentry" but can I also check the confirmations without having to decode a whole block like with "getrawtransaction"?

Finally figured it out.

Once you have your node up and running, make sure you synced with txindex enabled. If you already synced without it, you need to reindex with txindex=1 in your bitcoin.conf file. Restart and wait a couple of hours.

Once its re-synced, open the debug console and type:

getrawtransaction "TxID" true

Example:

getrawtransaction "bf585491b06630a94e06798fdfdf1809cc64741cd5bc0d41a50e69ba5b8ddbc5" true

This will return a decoded raw transaction like this:

{
  "txid": "bf585491b06630a94e06798fdfdf1809cc64741cd5bc0d41a50e69ba5b8ddbc5",
  "hash": "bf585491b06630a94e06798fdfdf1809cc64741cd5bc0d41a50e69ba5b8ddbc5",
  "version": 1,
  "size": 225,
  "vsize": 225,
  "weight": 900,
  "locktime": 559545,
  "vin": [
    {
      "txid": "089fd283bc8e012eaa0203ebc40bb1b8888b2f0d0f0bac6664b26b250b15847c",
      "vout": 0,
      "scriptSig": {
        "asm": "304402206163b24284d24e03dc650a86e93d5dbec2dc7d66d4bf71f94ab03b147994160202202a236c07ff469ab2fa8aa2c416a467ad8845c2b5697c18ddabbda31ae7e6289e[ALL] 03e35ef46f9517547c2005c1c941c7651ecf59b44625d1239b78cc01eb2be7a72b",
        "hex": "47304402206163b24284d24e03dc650a86e93d5dbec2dc7d66d4bf71f94ab03b147994160202202a236c07ff469ab2fa8aa2c416a467ad8845c2b5697c18ddabbda31ae7e6289e012103e35ef46f9517547c2005c1c941c7651ecf59b44625d1239b78cc01eb2be7a72b"
      },
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 0.11233558,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 48167b6d7c9ae260d2f1c494705f9557c89bc3c7 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a91448167b6d7c9ae260d2f1c494705f9557c89bc3c788ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "17aAau6cUvT6WCWkwGWHiTqvsVKHfZowW5"
        ]
      }
    },
    {
      "value": 0.25392682,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 c109fb3bab724bda053409ca9230f3a0f750aa22 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a914c109fb3bab724bda053409ca9230f3a0f750aa2288ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "1JbhNYR96VG7Do6UZjrnrt3KaXrrrZzJ6i"
        ]
      }
    }
  ],
  "hex": "01000000017c84150b256bb26466ac0b0f0d2f8b88b8b10bc4eb0302aa2e018ebc83d29f08000000006a47304402206163b24284d24e03dc650a86e93d5dbec2dc7d66d4bf71f94ab03b147994160202202a236c07ff469ab2fa8aa2c416a467ad8845c2b5697c18ddabbda31ae7e6289e012103e35ef46f9517547c2005c1c941c7651ecf59b44625d1239b78cc01eb2be7a72bfdffffff021669ab00000000001976a91448167b6d7c9ae260d2f1c494705f9557c89bc3c788ac2a768301000000001976a914c109fb3bab724bda053409ca9230f3a0f750aa2288acb9890800",
  "blockhash": "00000000000000000023c227de45c3eb30b0f9727da4fee7b6e22b66c5d2b9da",
  "confirmations": 5,
  "time": 1548119868,
  "blocktime": 1548119868
}

Here you can verify confirmations of the transaction if you're checking for transactions from a third party to a cold wallet without having to trust online block explorers.


parsing bitcoin input and output addresses from scripts can someone walk me through the process of combining script inputs and outputs to reveal the base58 encoded input and output addresses. take for example, block 728. this has two raw script inputs:

493046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01

and

493046022100a2ab7cdc5b67aca032899ea1b262f6e8181060f5a34ee667a82dac9c7b7db4c3022100911bc945c4b435df8227466433e56899fbb65833e4853683ecaa12ee840d16bf01

the first byte of each (49 hex = 73 dec) is the instruction to push 73 bytes onto the stack. according to the wiki each of these input scripts consists of a signature and a public key.

the raw output script is

76a91412ab8dc588ca9d5787dde7eb29569da63c3a238c88ac

which translates to the instructions

OP_DUP OP_HASH160 OP_PUSHDATA0(20 bytes) 12ab8dc588ca9d5787dde7eb29569da63c3a238c OP_EQUALVERIFY OP_CHECKSIG

so given this information, how can i extract input addresses (as shown in blockexplorer.com)? is this even possible?

1Miuw7ifaTYY5qrzKYFcTDiojSFxRfAqwP and 18KrJNtPVu6LWRNPQReqF29iFm7vDhirMk

and output address

12higDjoCCNXSA95xZMWUdPvXNmkAduhWv

the output address is derived solely from the output script starting from step 4 in the wiki like so:

first add leading zeros:

0012ab8dc588ca9d5787dde7eb29569da63c3a238c

then hash with sha256 (if you look in the wiki this is actually part of the OP_HASH160 operation) to give:

e158c4be10913422dadcf1c36843020ebb3ffe9d0cb13fb9e8c0a564a53c7832

then hashed with sha256 again (the wiki is wrong here - it says to use ripemd160, but actually sha256 is required again) to give:

96bf1d277213bbcd91145138e4c7ad8dcd6e1de1c39884fcbc1f5a6d4d7aee93

then grab the first 4 bytes of this result (96bf1d27) and stick them on the end of the original hash160 public key with leading zeros:

0012ab8dc588ca9d5787dde7eb29569da63c3a238c96bf1d27

convert to decimal:

457790304922245030616719694560989441716273193824169172263

base58 encode to give:

2higDjoCCNXSA95xZMWUdPvXNmkAduhWv

and stick a 1 in front of it all to get the bitcoin output address:

12higDjoCCNXSA95xZMWUdPvXNmkAduhWv

now to figure out how to get the input addresses...

thanks to this answer, we can see that both the signatures are der encoded in the following format:

0x30: a header byte indicating a compound structure
a 1-byte length descriptor for all what follows
0x02: a header byte indicating an integer
a 1-byte length descriptor for the r value
the r coordinate, as a big-endian integer
0x02: a header byte indicating an integer
a 1-byte length descriptor for the s value
the s coordinate, as a big-endian integer
a hashtype byte

so, decoding the raw script signatures:

493046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01

0x49 = OP_PUSHDATA0 - push 73 bytes onto the stack (script command not part of the signature value)
0x30 = header byte
0x46 = length descriptor (70 bytes)
0x02 = header byte
0x21 = r value length descriptor (33 bytes)
00e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b the r coordinate as a big endian integer
0x02 = header byte
0x21 = s value length descriptor (33 bytes)
00b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d the s coordinate as a big endian integer
0x01 = hashtype byte

and the second raw signature has the same format too:

493046022100a2ab7cdc5b67aca032899ea1b262f6e8181060f5a34ee667a82dac9c7b7db4c3022100911bc945c4b435df8227466433e56899fbb65833e4853683ecaa12ee840d16bf01

0x49 = OP_PUSHDATA0 - push 73 bytes onto the stack (script command not part of the signature value)
0x30 = header byte
0x46 = length descriptor (70 bytes)
0x02 = header byte
0x21 = r value length descriptor (33 bytes)
00a2ab7cdc5b67aca032899ea1b262f6e8181060f5a34ee667a82dac9c7b7db4c3 the r coordinate as a big endian integer
0x02 = header byte
0x21 = s value length descriptor (33 bytes)
00911bc945c4b435df8227466433e56899fbb65833e4853683ecaa12ee840d16bf the s coordinate as a big endian integer
0x01 = hashtype byte

so this confirms that the signature values in the transaction inputs actually do not contain public keys at all. the input addresses actually come from the previous transaction outputs which can be identified through the input hash and input index in the current tx.


How to solo-mine bitcoins with bfgminer? I'm completely new to Bitcoin, so my understanding of mining is still improving.
I downloaded BFGMiner, and now I would like to perform some solo mining.
(I would rather have it use my GPU, but if a CPU is noticeably easier than I'll go that route first.)
How can I use BFGMiner to perform solo mining?

What arguments do I give to bfgminer on the command line?

What information do I need, aside from my BitCoin wallet address?

What other program(s), if any, do I need?

Again, I know very little about mining at this point, so please assume no prior knowledge -- all I know is basically my wallet address. :)

This is covered in the included README document.


Why we must reference the entire txid for each output we want to spend? Suppose I want to spend from 3 unspent outputs. I must reference the txid of these unspent outputs. Suppose they are:

eb36eca9a06fbe68278ad3e7d16d10ed02e22ad891ed59ef2b84ed4a49e8a6d2

e912d1d29c2daa30cee47a89329426d254aa1ca59927b2d2ae0a2c561a30c4ad

aec43a6a925e55a4f5aa3fdfa2df308912ae06636a7c92b2e19ba55e7d7fc689

Instead of pointing to the entire txids, couldn't I point to just like the first 7 digits of each, so it'd be eb36eca, e912d1d, aec43a6?

Of course, it's easy to generate a txid that matches just the 7 first digits of each of the used txids. But what if we also included the information that, once you find these 3 txids in the database that start with eb36eca, e912d1d and aec43a6, the hash of these 3 entire txids must be equal     hash(eb36eca9a06fbe68278ad3e7d16d10ed02e22ad891ed59ef2b84ed4a49e8a6d2 + e912d1d29c2daa30cee47a89329426d254aa1ca59927b2d2ae0a2c561a30c4ad + aec43a6a925e55a4f5aa3fdfa2df308912ae06636a7c92b2e19ba55e7d7fc689) (where + here is concatenation).

So instead of including all 3 txids, we just include the first n digits of each and the hash of these 3 txids concatenated.

Wouldn't it free a lot of space? It's just one hash + n*k, being n the number of first digits, and k the number of inputs.

Also, wouldn't Schnorr signatures make it possible to sign all these outputs with just 1 signature? Wouldn't it make all transactions have almost the same size? Today, each new output adds to the transaction size at least: it txid and signature, which are the biggest parts.

By compressing the txids to a shorter fingerprint, you're reducing the unique identifiability. For example, there are three transactions that match the prefix eb36eca: tx1, tx2, tx3.

So, essentially, this is creating a combinatorics puzzle, especially considering that the txid is only part of the outpoint, you also have to add the output, otherwise you could be referring e.g. to any of the 51 outputs of the above tx3.

It seems to me that this would make it more complicated to operate thin clients safely, which don't have the complete UTXO Set at their disposal. For relay, similar compressions are already used, but while a such a system might be possible to implement for blockchain data, I'm not sure if the overall effect would be desirable.


How to unlock colored coin? In chapter 12 in Mastering Bitcoin it is talking about bitcoin application and one of them is colored coins.

There is an example for colored coin output:

The second one is colored coin output. It is just a "OP_RETURN {some encoded value}". I understand that in the output, we can decode and get some information, but how can they transfer assets represented by the encoded value to others?

Because there is no signature or other information in the output can be used as a unlocking script, the output, whatever it is, cannot be certified as it is owned by someone.

Why there is no signature information in output?
Can you give an example or a real colored coin output?

bitcoin wiki states that
OP_RETURN:

  "[...]Marks transaction as invalid. A standard way of attaching extra data to transactions is to add a zero-value output with a scriptPubKey consisting of OP_RETURN followed by exactly one pushdata op. Such outputs are provably unspendable, reducing their cost to the network[...]"

There's no point in a signature of an unspendable output I guess but I might be wrong here.

I found chapter 7 of mastering bitcoin helpfull where it explains the
"Data Recording Output (RETURN)."

Also check this blog post for a different spin on it.

I'm very interested in the colored coins idea but noticed that active implementations are rare from what I could find.

Coindesk reported coinprism shut down in 2018 and the underlying protocol open asset hasn't had any commits in years.

Same goes for colored coins by Colu github repo.  Colu announced a colored coin lightning integration in 2016 which I'm also starting to investigate as an alternative but their demo site is also down.

Counterparty makes use of op_return so you might want to check that out.

You should also check out this post which gives a colored coin example for the  Omni Layer that @Murch mentioned in his answer.