bitcoind getnewaddress: Why I can see the generated address on Blockchain.info without broadcast?

If you notice the message on the page:

  "No transactions found for this address, it has probably not been used on the network yet."

So blockchain.info just verified that the address you searched is a valid address and gave you a message telling you that it doesn't have any record of the address being used anywhere yet. If you look into what addresses really are (https://en.bitcoin.it/wiki/Address), then you will see what I mean by "validating" the address. Essentially, there are some checksum (not exactly, but close enough to convey the point) digits put on the end to make sure everything was transposed correctly.

The log you posted is not a broadcasting log, it's just debug info recording that there was a request for a new address. You're address is not known to anyone, except to everyone since it's posted on here now. :P


Where is data folder for Bitcoin Core in Windows 7?

The default directory would be %APPDATA%\Bitcoin

If you can't find it you may hit the Windows-Key+F and enter "wallet.dat"

You can also export your wallet from within Bitcoin-QT: File>Save Wallet


How do exchanges decide on cryptocurrency trading pairs?

Exchanges generally choose a few base currencies and build trading pairs on top of them. It has multiple reasons:

The exchange needs to find a base currency where people can understand the value of X from X/base. BTC/USD is $1350 that gives you a clear idea of how much BTC is worth in USD. That is different from LTC/DRK = 0.98. What did that tell you? Not much. You are in need of a base currency you are familiar with. Most people have a good feeling for the value of USD. Therefore, it is a good denominator.
The exchange needs to find a base currency which people are most likely to deposit/withdraw for trading. After you are done with trading numerous altcoins with each other, you want to exit the trading platform in a currency that has a meaning to you. To make that easy, base pairs are usually BTC.
This is probably the most important, if an exchange has BTC LTC USD, they will most likely not create BTC/LTC pair because that will decrease the liquidity of LTC/USD pair. They will most likely only offer BTC/USD and LTC/USD. On top of that, the extra pair will have maintenance cost to the exchange.


Can bitcoin system get itself into resonant oscillations

Yes, there are protections.

For example, Bitcoin restricts both the frequency and size of difficulty changes: the difficulty is re-assessed after each 2016 blocks, and is adjusted by no more than a factor of 4.

The adjustment is also reactive rather than proactive: it looks at how fast the last 2016 blocks were generated, and sets the difficulty to the value that would have generated those blocks in 14 days, rather than trying to guess at a difficulty that will generate the next batch in 14 days.  Assuming that trends in available mining power are consistent over the short term (generally decreasing or generally increasing), this means that the adjustments are uniformly too small rather than too large, preventing oscillations and giving the historic trend that blocks are mined about every 9 minutes rather than the 10 minutes the system was intended to produce.


Could a transaction hex on testnet theoretically be valid on mainnet?

Yes, it is theoretically possible for a transaction to be valid on both mainnet and testnet. Transactions don't contain any network specific information other than the previous txid and output index.


Has anyone proposed a human only proof of work system?

PoW needs to be hard to do but easy to verify (by a computer). There is very little left that humans are better at than computers (OCR, face and image recognition, IBM Watson [1] etc.). And probably nothing is easily computer verifiable.

One example are captchas. The ones that don't get read by OCR, simply get outsourced to children in our countries. You might say: still proof of human work, but there is no way for a computer to verify the result. On top of that that captchas don't satisfy some other requirements for PoW.

One such requirement is that the work is progress-free. Another: whatever the "puzzle" is, it must not be known beforehand as that would allow people to start the race early. This also implies there may not be one person or group of people that have access to the puzzles in advance as they would have to be trusted to not cheat (i.e. the system would not be trustless).

[1] https://en.m.wikipedia.org/wiki/Watson_(computer)


Checking the first and last characters of a cryptocurrency address?

When confirming that an address entered on a site/app against what I expect it to be, I often check the first and last 3-4 characters to see if they match.

This is a good practice, it will help protect you against attacks which do things like highjack your clipboard data, to paste an attacker's address instead of your intended recipient's address.

Relevant info: bitcoin addresses are base58check encoded, so the last few characters of an address are deterministically generated, using the beginning of the address as input. Altering just one character at the beginning (or end) of an address will make the checksum invalid. So an attack which alters just one character of an address will not work (even if this sort of attack didn't steal funds, an attacker could force you to burn funds otherwise).

If an attacker can find a way to just outright present you with a malicious address, then checking digits won't be of use. But for the sake of your question we'll ignore those situations, and just consider how easily an attacker could create a 'copy-cat' address, in order to thwart any quick references to the legitimate payment address.

Generating a bitcoin address has a very low cost, so it is possible for attackers to generate many, many addresses quite easily. Only a small percent of those addresses will be similar to the desired output, and every extra character you verify increases an attacker's costs of creating a copycat address by 58x (since there are 58 characters used in base58check address encoding). So we see that by verifying enough characters, the attack becomes computationally infeasible, as the attacker would have to check an impossibly large number of addresses before finding one that matches.

As an example with numbers: near the end of Mastering Bitcoin: Chapter 4, Andreas highlights that vanity addresses can be dangerous, in that an attacker can make an address that also begins with the same vanity characters. The attacker can then substitute their address for the legit one, and since it is a vanity address this substitution may be less obvious than usual (ie, the user sees that the start of the address matches, and proceeds without checking the end).

  Could an attacker feasibly generate an address that matches at the beginning and end, but is different in the middle?

If you verify enough characters, then the attacker could probably not generate a copycat address within the time constraints of the attack vector. The attacker would not be able to start brute-forcing the address until the payment address has been created (and intercepted), and then the time would run out once a user submits payment. In many real-world situations, this time period may only be minutes (or perhaps hours) long. Using the numbers in Andreas' book, we can see that checking 4 characters on the start and end of an address should be sufficient to thwart any attacker that only has <1 hour to generate a copycat address.


Is it possible/feasible to send out large amounts of small transactions without paying fees?

Individual miners have different standards for what fees they will accept. Most simply aren't going to process a transaction without fees, so you'll be waiting for somebody to generously record your transaction to the blockchain without compensation. I've never tried this, but I've seen people say that they've had to wait days. It will vary, of course. If you get impatient you could always propagate another transaction that spends the same exact funds, but allowing some of them to be used as a fee.

I've heard estimates of how many transactions the blockchain can handle that range from 3 to 7 per second. I'm really not sure what the average transaction size is, but they all have to fit in a 1 megabyte block. Even a miner who generously records transactions without a fee is almost certainly going to give priority to transactions with a fee attached, so some of your transactions might get recorded and the rest left to wait for another generous miner to get a block. Unless the inputs of one transaction require the outputs of another, you won't even be able to know which ones will get recorded first.


How many connections do I have on bitcoind?

I figured it out:

bitcoin-cli getnetworkinfo

It will tell you, among other things, how many connections you have at the moment.


where is the adjustment calculation for the target value in the source code?

The function is CalculateNextWorkRequired in pow.cpp L#49:

unsigned int CalculateNextWorkRequired(const CBlockIndex* pindexLast, int64_t nFirstBlockTime, const Consensus::Params& params)
{
    if (params.fPowNoRetargeting)
        return pindexLast->nBits;

    // Limit adjustment step
    int64_t nActualTimespan = pindexLast->GetBlockTime() - nFirstBlockTime;
    if (nActualTimespan < params.nPowTargetTimespan/4)
        nActualTimespan = params.nPowTargetTimespan/4;
    if (nActualTimespan > params.nPowTargetTimespan*4)
        nActualTimespan = params.nPowTargetTimespan*4;

    // Retarget
    const arith_uint256 bnPowLimit = UintToArith256(params.powLimit);
    arith_uint256 bnNew;
    bnNew.SetCompact(pindexLast->nBits);
    bnNew *= nActualTimespan;
    bnNew /= params.nPowTargetTimespan;

    if (bnNew > bnPowLimit)
        bnNew = bnPowLimit;

    return bnNew.GetCompact();
}

Explanation:
1. If retargeting is disabled, return the last difficulty.
2. Calculate the timespan between the last block and 2016 blocks ago
3. Truncate the timespan to no less than 1/4 of the target timespan (3.5 days) or no greater than 4x the target timespan (8 weeks).
4. Multiply the last difficulty target by the ratio actualTimespan:targetTimespan
5. Truncate to the maximum allowed target (bnPowLimit) if the resulting target is too high (very low difficulty)


Is Block Finalization a valid development to remove the threat of 51% attacks?

If ‘block finalization’ is needed, then your chain is broken. I say this because PoW is the method by which the Bitcoin network maintains consensus, and so the only reason we may introduce a ‘block finalization’ is if we worry that PoW will not be able to accomplish it’s job. If PoW cannot accomplish its job, then the system is already broken. It really is quite simple.

Consider: if 51% attacks are happening, and malicious miners are reorging the chain every few blocks, what good is ‘block finality’? The system is already seemingly broken.

Adding any sort of ‘block finalization’ can also introduce new issues and attacks:

Consider: if some nodes on the network somehow have a different history that goes back more than ten blocks, then the network will never be able to reach consensus without manual intervention.

So if a node is Sybil/eclipse attacked and fed a fake history by its peers, it will now never be able to get back onto the longest valid chain, because it will not follow a reorg of more than 10 blocks depth. In the face of a network at risk of 51% attacks, why should we assume that this would not happen? Rewinding 10 blocks could be quite easy for an attacker with a majority of hashpower, and so ‘block finalization’ just means the dangers associated with eclipse and Sybil attacks are far greater than before. Without block finalization, a node only needs one honest peer at any point in time, but with block finalization, a node needs one honest peer every ten blocks. A small but extremely important distinction.

Further, there are even situations in which this could cause issue without any malicious actors involved. If some part of the internet’s backbone infrastructure went down and isolated some portion of nodes and miners temporarily, then how would they ever get back in sync with the wider network? They wouldn’t be able to, without manual intervention.

So ‘block finality’ is not a technically sound idea. It is a bandaid for an already broken network.


https://en.wikipedia.org/wiki/Microsoft_Office_password_protection

Password protected word docs only use 128 AES encryption. An improvement you could easily make is upping this encryption level to 256. Another suggestion you could also PGP encrypt the seed words inside the document itself.

I also think putting this information in a cloud environment would be sacrificing security. I assuming you are counting on google drive being around in the event of your hard-drive crashing. Unless you need this information on the go though I would think writing the information on a piece of paper and locking that away would be more secure, depending on your locations physical security.

You should also have multiple backup points in the event of a loss, even if you are counting on google drive being there you don't want that to be a single point of failure. I would suggest at least having one paper copy and possibly a thumb-drive/DVD copy.


LogPrint and LogPrintf are very similar.

Mind the definiton: #define LogPrintf(...) LogPrint(NULL, __VA_ARGS__)

LogPrint's will only end up in your debug.log when enabling the corresponding category. Enabling works over the -debug arg.

-debug=mempool,net would output all LogPrint("mempool",...) or LogPrint("net",...) to the debug log, or to stdout if -printtoconsole has been enabled.


If your familiar with javascript then I think the easiest way to go would be to check out https://github.com/bitcoinjs/bitcoinjs-lib . They offer a client side solution for generating bitcoin address info.  Theres a few examples in the readme as well.


The address you've linked has been involved in eleven transactions already. If you don't see anything in your account, either it is not your address, or the website is not working correctly.

Looking at the website of bc-wallet.com, it looks hastily made to me. Are you sure that it is a proper wallet service and not a phishing/scam site?


Getting the wrong hashes for bitcoin core packages

You are hashing the 404 page returned by bitcoin.org. You can see this by running:

$ curl -s https://bitcoin.org/bin/file-does-not-exist | sha256sum
69b00985c84e6633cc2e518914436ce55666cc10d1edf15ee442758d9f8d5219  -
$ curl -s https://bitcoin.org/bin/file-does-not-exist2 | sha256sum
69b00985c84e6633cc2e518914436ce55666cc10d1edf15ee442758d9f8d5219  -

You should instead run

$ curl -O https://bitcoin.org/bin/bitcoin-core-0.10.0/bitcoin-0.10.0.tar.gz
$ sha256sum bitcoin-0.10.0.tar.gz # shasum -a 256 would also work

This gives me

a516cf6d9f58a117607148405334b35d3178df1ba1c59229609d2bcd08d30624  bitcoin-0.10.0.tar.gz

which is the SHA256SUM listed in the associated SHA256SUMS.asc file.


What happens to my bitcoins if lose my wallet file e.g. I suffer data loss and my computer is unrecoverable?

If a wallet file is truly lost with zero ability to recover it, then the coins it contained are lost forever.  Think of it as cash left in a burning house.

Be sure to periodically backup your wallet.dat file.  It is best to also encrypt those backups lest they be compromised giving someone else access to your wallet.


What consensus algorithm is MimbleWimble/Grin using? Does it use Zero Knowledge Proofs as well?

Understand that MimbleWimble/Grin is privacy centric. Does it use Zero Knowledge Proofs to achieve the privacy goals?

Yes. Zero Knowledge Proofs (specifically, Range Proofs. Possibly Bulletproofs in the future) contribute to the privacy goals of Grin by giving validators the ability to verify that no inflation or deflation occured in a transaction without needing know the amounts transacted.

  In addition, what consensus algorithm is MimbleWimble/Grin using?

Grin uses Nakamoto Consensus (Proof of Work) with the Cuckoo Cycle PoW system. You can find more information on that here: https://github.com/tromp/cuckoo


How can Blockchain.info query information from the blockchain faster than I from my own node?

API providers, such as Blockchain.com, are not querying a node to answer your queries to them usually. For the handful of providers that actually do offer a proxy service to a bitcoin node, they usually run several of them and spread out incoming queries so that no single node is answering a huge number.

They extract the information they need and store it in a separate database, which is optimized for quickly serving the information for all transactions and addresses.

bitcoind is optimized for running the Bitcoin Protocol, which is largely just communicating with other nodes, maintaining the utxo set, and validating blocks. While it does let you retrieve historical transaction information, it is not the primary goal. It also does not offer universal address indexing, and only indexes transactions for the known wallet addresses.

It may be worthwhile for your usecase to extract historical information from bitcoind once and use that as a source for your future queries.


Script: How to check if the top item on the main stack is numeric or not?

The best way that I know is quite involved because bitcoin-core standardness rules around Minimal representation of script ints. If you really need to do this, I can add detail in an updated answer.
Execution vs Satisfaction:
But in almost all cases, you should never really need to check such a thing. Recall that Bitcoin Script satisfaction requires Script executes successfully. At the end of the day, we are not interested in what is execution result, we are interested in whether the witness is valid or not. And the user redeeming the coins knows whether the pushed number is ScriptInt or not, they are let the interpreter know via additional boolean input.
Previous Code: where stack top is element `e`
OP_ISTOPNUMERIC # hypothetical that pushes 1 or 0 onto the stack top
OP_IF
    <process_num>
OP_ELSE
    <something_else>
OP_ENDIF

can be read written equivalently with two user input elements [e, e_is_num] where e_is_num is at stack top denoting whether e is numeric or not.
New code: with stack as `[e, e_is_num]`
OP_IF
    <process_num>
OP_ELSE
    <something_else>
OP_ENDIF


The initial Bitcoin transactions are slightly different from what we use today.

Addresses don't technically exist as far as the blockchain is concerned. They are simply a human-friendly representation of the underlying Bitcoin Scripts, that come with some properties like checksums to prevent typographical errors.

Original Bitcoin transactions were simply Pay-to-pubkey (P2PK), such as the one you see in the Coinbase above. In this, 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f is the public key (note that this is the full public key, and not hashed).

Many coin explorers choose to treat this as a regular Bitcoin address, and perform the encoding steps outlined here. You can use this tool to check the public key creates 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa as an uncompressed address (compressed keys were not known at the time of the genesis block, they were discovered later).

Modern day addresses are either P2PKH Pay-to-pubkey-hash (this hash is 62e907b15cbf27d5425399ebf6f0fb50ebb88f18 for the above key), P2SH pay-to-script-hash (this is used for multisig, and P2SH wrapped segwit), and P2WPKH pay-to-witness-pubkey-hash and P2WPSH pay-to-witness-script-hash segwit addresses (these start with bc1).

However, on the raw blockchain, all you will see is the Bitcoin Script that the addresses are encoding. Addresses are a purely human addition on top of the underlying transaction standards.


Yes. Unfortunately this is true. Using push-amt means that you send over an amount to the other side wich they own. While it takes place offhand it is final in a similar way as sending Bitcoin to an address.

The only way I see to get your funds back is if you talk to the owners of the nodes you opened channels with explain them the situation and ask to get reimbursed.


why did blockchain.info misstate the value of this transaction

The input and output totals claimed by blockchain.info are correct.  But the BTC 0.00973 output is presumably going back to another address owned by your wallet, as change.  Blockchain.info has no way of knowing which output is the "real" destination and which is the change, so it reports the total of both.

SatoshiDice knows which of the two outputs was sent to it (because it controls that address and not the other one).  So they only report the amount that actually went to them.

This has nothing to do with whether or not the transaction is confirmed.


Has the BitLicense affected other U.S. state regulators' actions?

To answer your first question, @Cointelegraph writes "burdensome and expensive process of acquiring such a license, the lack of agility as a consequence of the regulations, or customers' privacy concerns".

Companies who have left New York state because of the BitLicense include, amongst others: ShapeShift, BitFinex, Kraken, LocalBitcoins,Rebit and Genesis Mining.

The blockchain which is used as the underlying transmission component for bitcoin is modeled on the notion of a deregulated system. Attempts by players to regulate a deregulated market demonstrate inadequate understanding of the blockchain technology, while failing to acknowledge the fundamental human right of free market participation by free people.


How to parse values in block index leveldb?

A non-negative signed varint is just a normal varint but should be put into a signed integer rather than an unsigned integer as with normal varints. You just need to also check that it is a non-negative integer.

For example, instead of decoding a 32 bit varint as a uint32_t, you decode it as int32_t and check that it's value is >= 0.

Your code looks like it is decoding things as signed integers already. Instead of using Python's conversions built into the various classes, I recommend that you use the struct module so that you can specify endianness and signedness of the bytes that you are decoding.


Inside scripts sometimes you need to push an arbitrary length of bytes on top of the stack. Example: pushing public key after signature inside scriptsig. In these cases you use special operators called OP_PushDataX or OP_PushBytesX telling the interpreter that X number of bytes should be pushed to the stack. You won't find these names in any library because there isn't any. Basically we interpret any value from 0x01 to 0x4b as a OP_PushDataX operator. Remember that every operator is just a single byte starting from 0 to 255 each performing a different operation.

So in your example which is a scriptPubkey for P2PKH outputs you want to push the result of Hash160 hash of public key (which is 20 bytes) on top of the stack so you include 0x14 (=2010) before the actual bytes. And the script becomes:

OP_DUP OP_HASH160 OP_PUSHBYTES_20 [20_bytes_here] OP_EQUALVERIFY OP_CHECKSIG


How exchanges manage funds and addresses

There is no "user's wallet" when you are using an exchange. What you might think is a "user's wallet" is actually the exchanges wallet. When you deposit any cryptocurrency into an exchange, you are not depositing to "your exchange address", you are depositing to an address owned by the exchange (thus part of the exchange's wallet) and the exchange promises to give you the same amount of cryptocurrency that you deposited to that address if you want to withdraw from the exchange.

When you buy or sell on the exchange, no actual transactions happen; they just update some entries in a database. No money is transferred anywhere; it is all held by the exchange in their wallet.


Development environment requirements for Bitcoin Core

All the info you should need is here:

https://github.com/bitcoin/bitcoin/tree/master/doc


Help: I want to configure wallet.dir to be saved on aws s3 instead of locally

You'd have to rewrite the relevant pieces of the Bitcoin Core source code to do this directly.  It'll be particularly challenging because access to wallet.dat is not done directly, but through the bdb library, so you'd have to hack that as well.

Probably a better approach would be to have a script that periodically backs up the wallet.dat file to your s3 bucket.  However, you'll have to temporarily shut down Bitcoin Core to do that, because if you copy wallet.dat while it's being written to, you might get an inconsistent copy that doesn't work.

I'm not sure of the best tools these days for interacting with the s3 API.  s3cmd is one option, though I've had issues recently with it not working, which I haven't unraveled yet.


Bitcoin transaction stuck since almost 3 weeks

Your transaction has 428 confirmations. Some services are satisfied with one confirmation, while some require up to six. Anyway, with over 400 confirmations, it's clear that Bitfinex has received the deposit. If you haven't been credited for it yet, I suggest that you check that you have sent to the correct address, and then if that's the case you reach out to Bitfinex to have them remedy the missing deposit.


Is it safe to store seed phrases (private keys) in a bank vault?

The best thing to do is use a secure passphrase in addition to your 12/24 word phrase, and keep the passphrase in a separate location, or even no location at all but your head and maybe share it with one or more family members.
Using BIP-39, the same 24-words with a different passphrase will create completely disjoint wallets which cannot be linked by outside observation. You can keep reusing the same words and have different wallets by using different passphrases. Make sure passphrases are a reasonable length and complexity and not dictionary words or birthdays. However, brute-forcing these is difficult because PBKDF2 is used for hashing, so you don't need to go overboard and use a passphrase you might forget.
It might be a good idea to include a small amount of bitcoin in the wallet using your 24 words, but with no passphrase. This can serve as a 'decoy' wallet, which can be monitored for activity to discover if your 24-words have been compromised. It also serves to allow plausible deniability to the amount of bitcoin you own, because if you are under duress from a person (the State for example) trying to force the information out of you, they cannot possibly know how many wallets are created from the same 24 words. You can plausibly claim that what is in the decoy wallet is all the bitcoin you own.
Since both the 24-word phrase and your passphrase are necessary to access your funds, the security of the 24-word phrase is not as paramount as without the passphrase. You should keep a copy on a steel plate to resist natural disasters, and keep a written paper copy in another location which is more accessible to you, but which can be safely disposed of with fire.


What restrictions will be placed on X509 certificates that are used in the payment protocol?

What are the Extended Certificate rights that are required for use
  with Bitcoin? I would assume something with "server authentication"
  allows for "domain.com" payments, versus a valid email which is
  "user @ domain com" for SMIME.

answer: item - Each certificate is a DER [ITU.X690.1994] PKIX certificate value. The certificate containing the public key of the entity that digitally signed the PaymentRequest must be the first certificate. This MUST be followed by additional certificates, with each subsequent certificate being the one used to certify the previous one, up to (but not including) a trusted root authority. The trusted root authority MAY be included. The recipient must verify the certificate chain according to [RFC5280] and reject the PaymentRequest if any validation failure occurs.

Trusted root certificates may be obtained from the operating system; if validation is done on a device without an operating system, the Mozilla root store is recommended."

''I understood that digital signature is done locally, only after it is sent to the payment system and blockchain.''

font: [1];

  Does the breadth of certificate validation types allow for unnecessary
  spoofing?

answer: the RFC5280,  Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile.

already provides as digital signature has to be made, the support has to be by the software and or browser, according to RFC5280.
font: RFC5280  - version - May 2008

  Is there going to be a visual distinction for different certificates
  (Those with "all purposes", are expired, for Server Auth, or email?)
  answer:: this information does not appear in the BIP, it is only stated that the compatibility with x509 with the Root certificate will be verified. to then provide the signature and payment.

Finally, can there be a requirement for DNSSec validation when
communicating with a server?
answer:: I think there was some confusion on your part, the scope is only for ''This BIP describes payment protocol messages encoded using Google's Protocol Buffers, authenticated using X.509 certificates, and communicated over http/https. Future BIPs might extend this payment protocol to other encodings, PKI systems, or transport protocols.''
It does not leave the bitcoin p2p network.
font: [1];

  Will certificates be validated in a "normal" manner such as validating
  the Basic Constraints? (I'm pretty sure OpenSSL will do this for you
  in a platform consistent way):
  answer:: yes, but BTCCore does not use OPSSL as default:
  according: bitcoin-core.
  "On Bitcoin Core <0.12, you can start the bitcoind RPC server directly with SSL:"
  other font integral content BIP 0070


does 24-word recovery seed recover just bitcoins or all coins?

Yes, you will have access to all of your cryptocurrencies.
The 24 words seed is used to derive the master key. Keys for all cryptocurrencies are derived using BIP32 and BIP44.
You can check out the BIP44 Mapping Table.

The 24 words seed can be used on BIP39 compliant wallet like Electrum.
The private keys can also be accessed with BIP39 Tool GitHub or the online version (I don't recommend using it online.)


Mining is necessary to create bitcoins, which happens with a coinbase transaction.  But they can be transferred from person to person after that without mining.  (Mining is still used to confirm those transactions, to ensure they cannot be reversed later; but the people making the transactions aren't responsible for that part of it.)

Think about the following analogy.  Regular money is created with a printing press.  But you yourself don't need a printing press in order to make transactions; somebody gives you money, and you give it to someone else.  Sure, at some time in the past, someone had to print that money, but that isn't your concern.


How to use the bootstrap.dat in Mavericks?

I can at least tell you what I did, on my iMac running OS X 10.9.1 (Mavericks).

I ran Bitcoin-Qt, which immediately started synching.  I could see by the progress bar that if it's roughly linear, it would take 8 - 10 days to complete.  The nice thing about it was that I could see the directories it needed by what it created for itself in ~/Library/Application Support
I downloaded the bootstrap.dat.torrent file from sourceforge.net
Installed the deluge torrent app (deluge-torrent.org), and ran that to expand the bootstrap.dat file (I had never used the BitTorrent protocol before -- was pretty straightforward.).  It put the result in my home directory (14222116865 bytes).
Quit the still laboring Bitcoin-Qt ... then renamed its directory so I could see what directories it required, and in case I had to go back to pick up where I left off:

cd ~/Library/Application\ Support; mv Bitcoin BC_save
Manually created the same directories so I'd have a place to put the bootstrap.dat file

find BC_save -type d -print   # See what dirs are needed

mkdir -p Bitcoin/blocks/index; mkdir Bitcoin/blocks/chainstate

(Later Qt creates Bitcoin/blocks/database, but it wasn't there at this point.)
I'm surprised that more than just "mkdir Bitcoin" is necessary, but apparently you already tried that, so...)

Started up Bitcoin-Qt again.  It immediately "adopted" the directories I had created, and new files were appearing (e.g., wallet.dat).  The lower-left edge had a message indicating it was reading a file from the disk -- so it appeared to be working.
An overnight run -- and it's already done.


How to get all time high and low price of bitcoin and other altcoins

There is a special preset for ATH on coinpaprika.com


It will prune as it synchronizes. Disk usage shouldn't ever reach more than a few GB plus what you configured the pruning limit to.


How do exchanges handle fiat currencies?

Theses answers are going to depend on a couple of factors:
1) The particular exchange you are working with.

Each exchange is going to have its own set of policies and different levels of transparency communicating these policies to customers. Look for exchanges with more transparency/details.

2) The country the exchange assigns to you when you open the account.

Exchanges are facing financial regulations imposed by governments.
Global exchanges can have different guarantees in different countries.
For example, Coinbase and GDAX state, "If you are a United States resident, your Coinbase USD Wallet is covered by FDIC insurance, up to a maximum of $250,000." Source: How is Coinbase insured? This link Supported Countries shows the supported countries for GDAX and the supported fiat payment methods.
I made this video discussing insurance policies at Coinbase and GDAX. It may help: GDAX and Coinbase - Insuring your crypto is safe

3) If the exchange is centralized or decentralized.

If you are working with a decentralized exchange, you are in control of your funds. The Waves platform is an example of this: https://wavesplatform.com/

Summary:

In general, it's not just the fiat that you have to worry about at centralized exchanges. If the government for example seized the assets of the company, they would also be able to control your crypto. If you are super worried about this, you can send your cryptos to a private wallet that you control. The downside to the private wallet is that you are totally responsible for security, backups, etc. There is no help if mistakes are made.
Most exchanges allow you to send crypto to them after you have opened your account. The crypto can then be used for trading. Additionally, many exchanges allow you to purchase using a credit card.

See this for details on exchange vetting:
How do I know which exchanges are serious actors?
I made this playlist that goes through policies of Coinbase and GDAX. It may help: GDAX Playlist


Effect of internet connection speed on solo mining

With solo mining, all you need to get from the Internet is the latest block. Since these come once every 2.5 minutes (average) and are at most 250 KB (typically ~10 KB), you should be just fine. You'd also want to get all the latest Litecoin network traffic in order to validate all the transactions you can, but that'd be pretty small, like the blocks.

You might find (on average) a few more stale blocks than the typical high-speed user, but this shouldn't be too significant: on the order of (your latency and download time - normal latency and download time)/2.5 minutes


You are mistaking virtual size that got introduced with SEGWIT with the legacy size.

166 bytes is the virtual size. 248 bytes is the legacy one. Unfortunately, Blockchain.info shows only the legacy size.

You can check your transaction with smartbit to get the VSize.

You can also check this awesome article about SEGWIT fees calculation


It is, sort of, but some considerations have to be taken into account.

There are two ways of creating a multisig transaction: Pay-to-multisig, or a Pay-to-script-hash encapsulating a Pay-to-multisig. For how you are asking the question I guess that you are referring to the latter. However, I will give you both answers just in case.

Pay-to-script-hash (P2SH)

The scripts of a 2-3 multisig encapsulated in a P2SH transaction looks like:

ScriptSig: OP_0 [Sig 1] [Sig 2] OP_2 [PK 1][PK 2][PK 3] OP_3 OP_CHECKMULTISIG

ScriptPubKey: OP_HASH160 <ScriptHash> OP_EQUAL

As you mentioned, Bob will be able to recreate the script since the ScriptPubKey only required the hash of the generated scriptSig, and he will have all the information. However, order matters. In this case (a 2-3 multisig) Alice could have build the script in six different ways:

ScriptSig: ... OP_2 [PK 1][PK 2][PK 3] OP_3 OP_CHECKMULTISIG
ScriptSig: ... OP_2 [PK 1][PK 3][PK 2] OP_3 OP_CHECKMULTISIG
ScriptSig: ... OP_2 [PK 2][PK 1][PK 3] OP_3 OP_CHECKMULTISIG
ScriptSig: ... OP_2 [PK 2][PK 3][PK 1] OP_3 OP_CHECKMULTISIG
ScriptSig: ... OP_2 [PK 3][PK 1][PK 2] OP_3 OP_CHECKMULTISIG
ScriptSig: ... OP_2 [PK 3][PK 2][PK 1] OP_3 OP_CHECKMULTISIG

This have two consequences, the most straightforward is that if the script is not build in the same way, the hash will be different. Moreover, the order in which the keys are provided indicates how the signatures should be provided, that is, signatures and keys have to be provided in the same order.

e.g:

ScriptSig: OP_0 [Sig 2] [Sig 1] OP_2 [PK 2][PK 3][PK 1] OP_3 OP_CHECKMULTISIG

Then, in a n-m multisig, Alice will have n! ways of arranging the Public keys. If not provided in the right order, the evaluation of the script will fail, making the transaction invalid.

Pay-to-multisig

In the case of Pay-to-multisig, the solution is way more straightforward due the information that each script stores. Using the same 2-3 multisig example, the resulting scripts will be:

ScriptSig: OP_0 [Sig 1] [Sig 2]

ScriptPubKey: OP_2 [PK 1][PK 2][PK 3] OP_3 OP_CHECKMULTISIG

In this case, not just the latter, but every party involved will know how to build the ScriptSig, since how the ScripPubKey was build is accessible from the previous transaction.


Using a new address for every transaction?

My understanding was that a wallet had a 1-to-1 relationship with an address.

No that is not the case.

  Can a wallet have multiple addresses?

Yes, any good wallet software will support a hundred or more addresses.

  is this something the wallet takes care of for me?

Yes.  The wallet will handle all the addresses for you.


Can I pass values over a bitcoin bip 70 URI?

The purpose of the BIP70 is to provide a secondary URL, which, when visited by your client wallet, will provide all the details to make the transaction, and a whole lot more. It was designed to be linked to POS systems which would generate the information and produce a unique URL.

In the standard Bitcoin URI scheme, it is possible to pass the amount, but you also need to pass the pay-to address.


A child pays for parent (CPFP) transaction is based on the assumption that the child actually spends the output created by the first transaction.

In your case, your second transaction does not actually spend the output of the first transaction - this allows it to be confirmed without any relation to the previous one.

That said, your fee is not so low that it will never confirm - transactions with that feerate are cleared out every day or two, usually. You will likely be fine if you just wait.

If you are in a hurry, you can use your wallet to make another transaction spending the unconfirmed output - note that this is not an option if the address you sent the coins to belongs to an exchange or hosted wallet where you cannot control which outputs/keys are used for a new transaction.


Some question about block and block chain.....really confuse me!

The cost to abort current work is essentially zero. If you haven't found a block yet, you haven't accomplished anything you care about. So you can restart to include new transactions at near zero cost. You don't have to restart if you don't want to. Miners can either try to get new transactions into blocks as soon as possible or not bother.

In the future, people will probably work harder to get new transactions into blocks as soon as possible. Right now, the 25 BTC block reward dwarfs any transaction fees. But in the future, getting as many transaction fees as possible may be worth extra effort.

If two blocks are broadcast at about the same time, there's no good way to know which will ultimately be accepted. You have to wait to see which one gets confirmations. Everyone wants to mine on the longest chain (to increase the chances they get to keep their block reward), so as soon as one gets even a slight advantage, its advantage should grow.


it's better to get public key first then convert it to address

var publicKey = privateKey.toPublicKey();
var address = publicKey.toAddress(Networks.livenet);

address is an object, you can use it as a string. if you want to see it in console try

console.log("Address: ", address);


To get the balance of something you need an account, which is best created dynamically with PHP. You would use the getnewaddress("echo uniqid()"); in PHP as an example of generating a new account for every user.


Why does Github say that the Bitcoin project is 74% TypeScript?

That's because of the QT translation files, see https://github.com/bitcoin/bitcoin/search?l=typescript

I'm not sure why they are recognized as TypeScript (it's just XML), I guess it's because of the filename extension .ts.


How do I join the Bitcoin Core PR review club meetings on IRC?

On Ubuntu, I like weechat.
On OSX I've used Colloquy before but have recently upgraded to Textual which is not free -- unless you build it from source :-).
There is even a web interface for freenode, but I'm not sure if it requires authentication to join the channel.


Can miner pay transaction fee with coinbase (if maturity is disabled)?

If your altcoin removes the maturity check, I don't see why not. The only prerequisite would be that the fee for the transaction spending the coinbase input must be decided before building the tx, which isn't very hard.


How to recover bitcoins from personal wallet app in android which is uninstalled?

Without a backup, there is no way to recover the coins.

If this happened very recently, you might be able to enlist a data recovery service to pull the keys off the device. This is likely to cost more than $100 though.

Wallet generation is based on random data, and if you do not backup individual keys, or the mnemonic for HD wallets, you cannot recreate the keys.


Is there a version of EasyMiner for Mac?

I don't know whether EasyMiner will be ported to Mac. But there will be several other miners supporting the BitForce Jalapeno and other BFL ASIC products.

If you want a user-friendly alternative you may want to try out BitMinter client. It has been thoroughly tested with BFL FPGAs mining on Macs. Support for BFL ASICs will be added as soon as possible. This miner is available from http://bitminter.com. I am the author of this miner.


I have previously reviewed the steps for configuring the Antminer S9.

You need to register an account with a pool and add a worker.

The stratum information is what you need to put into the Antminer S9 configuration.

You need to know the IP address of your S9 on the network. If you do not know it, use Advanced IP Scanner (or similar, I do not know if you are running Windows?) and find it.

Open http://x.x.x.x/ (IP of your S9) in your web browser and login. In the Miner Configuration tab, enter your stratum information there.

URL: stratum+tcp://mine1.mpool.me:{PORT} - you have choices for PORT 4012/4112
Worker: {your worker name} - you should have configured this in the pool where it may be called Worker Username.
Password: {your worker password}

Save & Apply.

Your miner will  not start until it registers.

You may enjoy this video (the sound is quiet!):
How to setup Antminer S9, R4 GUI- Set mining pools, ECT

Enjoy mining!


No that is not possible as it will require reverse engineering the HMAC-SHA512 function or finding a double collision that will generate the same keys. The xpub key is an encoded form of the extended key which is basically the concatenation of the public key and chain code at the account level. You include this extended key along with an index number (0 for receiving and 1 for change) into the HMAC-SHA512 function to get a child extended key. This child extended key will be fed again into the HMAC-SHA512 function again along with the index number (now this will be incremented sequentially to generate number of addresses like 0, 1, 2...) to display the addresses.

Now to achieve a situation that you mentioned, the attacker will have to create a xpriv in such a way that the corresponding xpub when passed through the SHA512 function twice (with the same index numbers) will generate the first address identical to yours, but different after you increment the index numbers. This means, the attacker will have to find two collisions to get the same first address. This is an impossible feat.

  But since the printed xpub QR code necessarily transited several untrustworthy (i.e. online) computers before reaching paper, how can I be sure it wasn't tampered with in transit?

When you import such extended key into a web server or an online application, you should generate some addresses and check they match the addresses you generated on your air gapped device to see that the service/server was not compromised when importing the xpub


It is very hard to do a typo in a Bitcoin address, as the address format includes a checksum. Have you checked whether you accidentally sent to a previous business partner? Have you checked whether the address that you sent to matches the address that you were asked to? If the latter is true the error may be on the side of the recipient.

In any case, the coins are now under the control of whomever the recipient address of the transaction belongs to. If

the address is unclaimed: the coins are lost.
the address is claimed by a known entity: you may be able to retrieve them by contacting them.
the address is claimed by an unknown entity: the recipient will do whatever they want.

Try googling the (unique!) respective address to see if someone is asking about receiving an unknown payment. It wouldn't be the first time. ;)


I've done a little research on this as it was a big concern, not to worry! This is only an issue if you have a bitcoin (or altcoin) daemon set up with RPC over HTTPS. This would only be used if say, you have a daemon running on one VPS and another node which asks it to send money. Source: http://www.cryptocoinsnews.com/news/openssl-heartbleed-security-bug/2014/04/08

This is disabled by default and unless you were using RPC over SSL there is no need to worry :)

If you have been using RPC for any coin I would say a good practice would be to generate a new wallet and send funds there.


How would I hand code a Bitcoin transaction

Technically, the ScriptSig depends on the particular type of transaction output you're trying to claim, but for all standard scripts, it consists of the signature of this transaction and (usually) the public key corresponding to the private key the signature was made with. The public key must be the correct one to claim the transaction output this claims, that is, the one the coins were sent to.
Bitcoin scripts use opcodes. They're documented in the wiki.
That is the Bitcoin address that can claim this output (in raw binary form), assuming the transaction is a transfer to a Bitcoin address.


Share private data and prevent data forwarding

Nothing can prevent B from exposing or forwarding the data once he has access to it.


Why use Merkle Root (and not just concatonation of all hashes?)

The Merkle tree structure is essential for section 7 (Reclaiming Disk Space) and section 8 (Simplified Payment Verification) in the whitepaper.

With simple concatenation, the only way to be convinced that a transaction exists in a block is to have access to the hashes of all transactions, which requires a lot of storage space.

With a Merkle tree you can:

Prune large parts of the history, and still know that the data left intact is a legitimate part of the block.
Convince a specific node that a transaction exists in a block, by showing the Merkle branch.

Merkle trees are also used in pooled mining, allowing the miner to construct the generation transaction independently while the pool or another node builds the bulk of the block.

Some more details are in this answer.


What is the worst an attacker could do with full control over the blockchain?

You're correct that a miner with 100% control could not forge transactions, the nodes would just ignore them. They could perform a '51% attack' though, trading coins for another asset (confirmed in 'block x'), and then going back to re-mine a new 'block x' that does not include their transaction (so now they control the asset they traded for, and have their coins back. The network could catch on to this, but nothing 'invalid' will have happened).

A miner can censor transactions though, so they could just mine empty blocks endlessly, effectively stalling out the network.

Perhaps more profitably, they could set a very high minimum fee for a tx to be mined, essentially using their monopoly to extort users for higher fees. This could be done covertly so as not to raise suspicion: the miner could generate their own high-fee transactions to fill up a portion of the block, forcing other users to pay higher, or be excluded. The miner would receive 100% of their fees back since they control 100% of the hash power, but it would be tough to tell this is happening from the outside.


Is an attack on a local bitcoind via an img or embedded flash viable?

This page says that a Flash applet can only access the port and hostname of the URL from which it was downloaded:

  Adobe Flash, a plugin believed to be installed on about 99% of all
  desktops, incorporates a security model generally inspired by browser
  same-origin checks. Flash applets have their security context derived
  from the URL they are loaded from (as opposed to the site that embeds
  them with  or  tags), and within this realm, permission
  control follows the same basic principle as applied by browsers to DOM
  access: protocol, host name, and port of the requested resource is
  compared with that of the requestor, with universal access privileges
  granted to content stored on local disk. That said, there are
  important differences - and some interesting extensions - that make
  Flash capable of initiating cross-domain interactions to a degree
  greater than typically permitted for native browser content.

But apparently that applies to the result of a request not the request itself, so it's possible a Flash applet could send a request to your bitcoind to transfer coins, but not check to see whether it worked or not.  Using wallet encryption would help mitigate this.

I've been able to find balances using simple HTTP 'POST' requests:

$ echo '{"method":"getbalance","params":[""]}' | POST http://$user:$pass@localhost:8332/
{"result":-6203.99412537,"error":null,"id":null}

I don't know if it's possible using just a regular 'GET' request.

Edit: I just tried 'guessing' the wrong password 100 times in a row, and then getting it right.  bitcoind didn't stop accepting guesses or slow down at all, and accepted the final correct guess:

$ i=100; while ((i>0)); do ((i--)); echo $(echo $i; date;
  echo '{"method":"getbalance","params":[""]}' |
  POST http://$user:guess$i@localhost:8332/ 2>&1 | grep -i body);
  done; echo '{"method":"getbalance","params":[""]}' |
  POST http://$user:$pass@localhost:8332/
99 Tue Apr 24 09:10:10 PDT 2012
401 Unauthorized.

98 Tue Apr 24 09:10:10 PDT 2012
401 Unauthorized.

[...]
1 Tue Apr 24 09:10:53 PDT 2012
401 Unauthorized.

0 Tue Apr 24 09:10:53 PDT 2012
401 Unauthorized.

{"result":-6203.99412537,"error":null,"id":null}


Iquidus JSON settings for Blockchain Explorer

Mandatory settings.json changes

if not set correctly explorer will not work

have to dig in the code of your forked litecoind (daemon) to get them

genesis_tx
genesis_block

same settings as your litecoind daemon taken from litecoin.conf file

wallet
  host
  port
  user
  pass

mongo database, change if different than your settings

dbsettings
  user
  password
  database
  address
  port

make sure you set difficulty which for litecoin is POW

index
  difficulty

Secondary changes

meaning that the explorer can start working without them but should be changed to reflect your coin

title
address
coin
symbol
port

for the api page look here for details https://github.com/iquidus/explorer/issues/130

api
  blockindex
  address
  txhash
  blockhash

if you want to get coin value from markets set correct values for

markets

For reference settings.json.template


How can I make GUIMiner use the CPU for mining?

If you start the bitcoin-qt client from the command line with the bitcoin-qt.exe -gen 1 command, then it will generate bitcoins using your CPU. Alternately, use cpuminer. (Builds)


I'm running an antminer solo on my local bitcoind 'pool' will i get paid?

Your chances of any return whatsoever with a pool that's just you are essentially non-existent.

Pool mining works since pools can accumulate a large amount of hashpower from thousands of users. The pool's chance of finding a block is then fairly high, which then allows them to use the block reward to pay proportional amounts to all their users.

As JBackzuk's comment says, solo mining is essentially probabilistically impossible. You either find the entire block, or nothing - no partial shares.


What is softchain

Softchains: Sidechains as a Soft Fork via Proof-of-Work Fraud Proofs. Decentralized two-way peg sidechain design. Activating new sidechains requires a soft fork, hence the name softchains.
Ruben Somsen shared about a new concept "Softchain" on Twitter and Bitcoin Dev mailing list:
https://web.archive.org/web/20210101153139/https://twitter.com/SomsenRuben/status/1344770107017457664
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-December/018331.html

how is it different from drivechain?

It's similar to drivechains, but without the major downside of having to rely on miners, since all Bitcoin full node users can efficiently validate each sidechain.

What are associated tradeoffs and feedback from community?

You can find few in the replies to the tweet shared above, Paul Sztorc's tweet and below links (mailing list):
ZmnSCPxj: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-December/018332.html
Sergio Demian Lerner: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-December/018333.html


How to find net BTC spent or recieved in a transaction

If you have a look at the "vout" array, you can see there are two outputs from this transaction. The first pays 0.00008203 BTC to 16jyig11zSX77NV3o4AcWiw57m1tqLogg, and the second pays 0.00185075 BTC to 3Hm4AomkLBGgHHMVMYqoxpTyn1tvf6u4dh. There is a single input into the transaction, from the address 16jyig11zSX77NV3o4AcWiw57m1tqLogg (which must have been calculated by a block explorer because inputs do not have "from" addresses). The value of the input was 0.00229438, and it looks like the first output was to the same address as the input address so it is likely change, thus person A lost (0.00229438 - 0.00008203 = 0.00221235 BTC), and person B (could technically also be person A paying themselves) gained 0.00185075 BTC. The rest, 0.0003616 BTC, was paid as a fee to the miners.


What gives bitcoins value? A simple explanation please

Bitcoins have a value simply because of supply and demand. Mathematical laws created a fixed supply of Bitcoins, and people's expectation that they can use them as a means of exchange or store of value created demand.

Exchanges simply bring buyers and sellers together. Buyers wish to purchase Bitcoins, either as a means of exchange or as a store of value. Sellers are willing to sell Bitcoins because they'd rather have fiat currency, either because that's what they need to pay bills or because they expect Bitcoins to drop in value. At some price, buyers and sellers will meet.

Miners secure the Bitcoin block chain by providing the proof of work that Bitcoin uses to verify Bitcoin transactions. They receive a Bitcoin reward for doing this because that's how Bitcoin was designed.

Bitcoins have value because they are scarce and can easily by transferred over long distances. They also have value because there's a reasonable expectation that they'll be usable as a means of exchange and as a store of value. There really is no other requirement for a currency. Anything scarce, durable, divisible and fungible can be used as a currency if people agree to use it that way, and many people have agreed to use Bitcoins that way.


Why do so many bitcoin exchanges have their bank accounts closed and have problems establishing bank accounts?

Countries have AML (anti-money laundering) laws that limit activities that could enable money laundering. A Bitcoin exchange arguably can be used for money laundering. Even if the letter of the law doesn't say anything specifically relevant to Bitcoin, banks don't want to take chances.

To be able to respect AML and other laws, banks do need to know a few things about the owner and the business, and they have a "know your client" procedure for it. For most businesses this goes uneventfully, for others (e.g. Bitcoin exchange) it could be a problem.


Calculating average number of hashes tried before hitting a valid block

Well, currently the difficulty is 2,440,643.  There will be (difficulty * 2^32) (roughly) hashes per block.

So that means there are (2,440,643 * 2^32) hashes that must occur before one block is solved.  That's is across the entire network.

A block is solved in ten minutes (on average) or 600 seconds.
So the network is hashing (2,440,643 * 2^32) / 600  ~= 17 Thash/s.  (This calculation is performed and the result is displayed on BitcoinWatch.com)

Let's say your dual 5970 rig gets 1.4 Ghash/s.  That is 17,770 Ghash/s / 1.4 Ghash/s = 12,693.  That is the number of rigs, if all were exactly like yours, operating today.

So if 12,693 rigs can do the work in 10 minutes, one solo rig will tka 12,693 * 10 minutes, or 126,930 minutes.    With 1,440 minutes in a day, that means it will be about 88 days before you will have a 50% chance of solving a block operating solo.

Now that was the long way.

The short way:

http://tpbitcalc.appspot.com/

For Hash Rate, plunk in 1400 (1.4 Ghash/s) and click Calculate.

So then, how many hashes is that?  There are 86,400 seconds in a day and you have to has for 88 days.  86,400 * 88 = 7,603,200 seconds.  At 1.4 Ghash/s X 7,603,200 seconds means you hashed 10,644 Thashes.

That is: 10,644,000,000,000,000 hashes.


Why do Bitcoin API services offer Block details?

E.g. for debugging purposes, for miners, for parties who work directly with Bitcoin protocol.

"I see only block X on my local bitcoind, but the latest on blockchain.info is Y".

Application developers are less interested about blocks.


Why is input number non-existent in bitcoin API?

That is how it works, you need to look up the previous transaction where that output exists in order to get the value. The equivalent call using bitcoin-cli is:

$ bitcoin-cli getrawtransaction 9de8923855b2c56bc903c39418298fa8c185e5feb99cb32bfa31b9d06700ced8 2

then you can find the vout with index 1.


What is Ardor and how is it different from NXT 1.x?

From what I read Ardor claims to have every capability that NXT 1.x had but also:

Adds new features

"The platform offers a Decentralized Asset Exchange. Ardor will enable the trading and interaction of assets on any child chain for any of the child chain tokens. Other key features include Decentralized Voting and Governance Systems, and, Phased transactions, whereby users will be able to set multiple conditions before a transaction is executed."

Is easier to use

"It creates a blockchain platform that is open to everyone – from single users to fintech start-ups and governments."

"The developers assert that anyone can “create their own child chain” and interact with the entire blockchain ecosystem. The upshot is that anyone, anywhere, will be able to create blockchain services with relative ease."

Improves scalability

"Ardor is touted as “solving scalability problems” by separating transactions and data that do not affect security from those that do. Specifically, Ardor moves all of those that do not affect security onto child chains."

http://www.forbes.com/sites/rogeraitken/2016/06/21/nxt-crypto-blockchain-team-prepares-ardor-scalable-child-chain-platform/#40a091b6349b


how http://blockchain.info/, http://blockexplorer.com/q or http://www.bitcoinmonitor.com/ works

They monitor the public blockchain from multiple Bitcoin servers. There's a very simple rule for which chain is valid -- whatever chain has the most work is the valid one.


should i call keypoolrefill or it's refilled automatically?

Most people don't need to use keypoolrefill.

Bitcoin Core tries to fill the keypool to its configured maximum size whenever you take an address from the keypool. (It does not wait until the keypool is empty before regenerating it.) However, it isn't possible to add keys to the keypool unless the wallet is unlocked with walletpassphrase. So if you call getnewaddress 100 times (by default), your keypool will be empty and you will be prompted to unlock your wallet and run keypoolrefill. The same effect could be achieved by unlocking your wallet and then generating another address, which will also cause the keypool to be topped up.

Another use is if you want to temporarily increase the size of your keypool. For example, a really safe way of doing payment processing is to generate an encrypted wallet with a strong passphrase, generate thousands of keys using keypoolrefill 10000 or whatever, put this wallet on the live payment processing server, but only use the commands that don't require unlocking the wallet. Then even if the live server is compromised, the attacker can't steal the money because he can't unlock the wallet. This is similar to the idea of a watch-only wallet. You could do the same thing with the keypool setting, but I guess that restarting Bitcoin Core might be inconvenient in some cases.

Running Bitcoin with -keypool=0 and then only manually adjusting the keypool  with keypoolresize might also be useful for some backup strategies, or if you have multiple servers using the same wallet (which is not recommended, but maybe possible if you're really careful).


Sometimes the wallet file must be rewritten from scratch entirely (in particular when encrypthing it), to prevent unencrypted material to remain in old never-overwritten areas of the file. To do this, bitcoin writes a new file (wallet.dat.rewrite) and then renames it to wallet.dat. If this process is interrupted, it's possible that the wallet.dat.rewrite file remains. You can delete it safely.


How to convert a WIF private key to a BIP32 extended private key

You can't. The BIP 32 extended private key format contains information which is not present in the WIF private key. The extended private key format contains the chaincode of the private key, the index, and the parent fingerprint. Those information come from the derivation of the private key itself and cannot be found elsewhere.

In order to get the parent public key, the only information that you need from the extended public key is the index of the child. This can be trivially found by simply brute forcing through all possible child indexes (2^31 - 1 indexes) until you get a master private key which has a public key that matches the parent public key, or until you have derived the correct child public key from the parent public key.

Here is code that will find you the parent private key. This does the first technique of cycling through possible parent private keys until one is found which has a public key that matches the parent public key. Note that this may be completely inefficient and may take a long time to find a key. Also note that this only works if the child key is directly derived from the parent, not some depth down in the derivation tree.

from pybitcointools.deterministic import raw_crack_bip32_privkey, bip32_deserialize, bip32_serialize, bip32_privtopub
from pybitcointools.main import decode_privkey, encode_privkey

parent_pub = 'xpub661MyMwAqRbcEnKbXcCqD2GT1di5zQxVqoHPAgHNe8dv5JP8gWmDproS6kFHJnLZd23tWevhdn4urGJ6b264DfTGKr8zjmYDjyDTi9U7iyT'
wif_key = encode_privkey(decode_privkey('KyqcQVzcp7cHEMEDHQaz5eaE5azsRHaE4ukkeqwM2vdiQwBYtxeb'), 'bin_compressed')
for i in xrange(2**31 -1):
    priv = (b'\x04\x88\xAD\xE4', 1, 0, i, b'', wif_key)
    pkey =  raw_crack_bip32_privkey(bip32_deserialize(parent_pub), priv)
    final_key = bip32_serialize(pkey)
    if bip32_privtopub(final_key) == parent_pub:
        print final_key
        break


Which cryptocurrencies deviate significantly from Bitcoin?

Ripple is in my opinion very interesting that uses a very different system which isn't based on the block chain nor the proof-of-work algorithm. Rather, it uses a quite different consensus algorithm outlined here: https://ripple.com/wiki/Consensus

The only problem is that there's very little research about this concept and I can't figure out how it works more in detail without an official publication of some sort. All I can say is that it's different from any altcoin because it's based on trusting nodes that behave honestly and distrusting the ones that don't:

  If someone should be dishonest, the honest actors will notice them
  lying and can disregard their future attestations.  That is, if you lie once, you have no gain as the network doesn't care and they won't care what you say in the future.


The mining protocol between miner and pool is called Stratum.

See https://en.bitcoin.it/wiki/Stratum_mining_protocol

How to open a TCP connection and send/receive data using Java; there should be plenty of resources you can find on that.


how exactly was the original coefficient for difficulty determined?

I'm not sure it was. When the network started operating (and Satoshi was pretty much the only one mining), blocks weren't found every 10 minutes. For example, the first 2016 blocks were found in 24 days rather than 2 weeks. Normally this would cause the target to go up but it can't go above the hardcoded max target, so only in block 32256 in December 30 2009 we started seeing the retarget mechanism kicking in and blocks arriving every 10 minutes.

However, seeing that it did come out close to 10 minutes, it's possible Satoshi figured out the hashrate of his own machine, and chose the parameter as a round number close to what it would take to find a block every 10 minutes on his hardware.

I think you did not understand this line of code correctly. Hash values are represented as 256-bit unsigned integers. uint256(0) gives the representation of 0 in this data type. ~ is logical not and ~uint256(0) inverts all bits, giving the highest possible integer, 2^256-1. Right shifting by 32 bits gives 2^224-1, so that each hash has a chance of 1/2^32 to be lower than the max target.

The value is then converted to the more compact "bits" form, which also causes it to be rounded to (2^16-1)*2^208.

Doing 256>>32 or 1>>24 would have resulted in 0 since integer types can't hold fractions.


How to track bitcoin wallet activity with extended public key?

Using the extended public key one could derive all of the addresses associated with your wallet. This would allow someone to determine future and current addresses in your wallet, this could allow someone to monitor your financial activities. I'm not sure how they could disrupt access to your wallet. I believe it functions similar to a HD wallet public key.


Why do pools get so often DDoS attacked?

There are several groups of people that could have incentives to DDoS mining pools:

Owners of other mining pools. Mining pools make profit from the blocks mined by their miners. So it would make perfect sense for them to attack other pools to encourage users to abandon the pool and perhaps find a new home at theirs.
People mining at other pools, including their owners. When a miner is mining for a pool that has issues, chances are high their shares get lost. This means that chances exist that the pool under attack will no longer be able to find blocks and so the hash power of its users is lost, causing new blocks to be found less frequently. This can be advantageous to people mining at other pools because this will result in the difficulty being lowered, giving them a higher chance of finding blocks. (And again, as more blocks are found by another pool, the pool owner makes more profit.)
Opposers of Bitcoin. This doesn't only need to be governments, but can also include banks and payment processors like PayPal, Visa or MasterCard. Bitcoin is very innovative as a payment option and has the potential to take over a significant part of the online payment industry. Also, Bitcoin abolishes the centralized concept of money, from which banks make profit. So they all have reasons not wanting to see Bitcoin succeed as a successful currency and payment method.


Bitcoin wallet taking days to receive coins

Intersango has been having a problem with their wallet recently, as described in this forum post.  Another post claims that:

  this was triggered by someone spamming the wallet with a very larger
  number of small transactions

Encrypting your wallet won't make any difference to whether you receive the bitcoins or not.  You only need to "unlock" the wallet to spend coins (or to top out your pool of unused addresses).

You can check at http://blockchain.info/address/1youraddresshere to see whether the coins have been sent yet.  If they show up there but not in your wallet then it's an issue with your wallet.


Why is Bitcoin Core full node so slow to sync?

First of all you need to tail your $BITCOIN_DATADIR/debug.log and search for clues. You might solve your problem by just looking at the messages there. Here's a sample:

2019-10-13T18:17:11Z socket recv error Connection reset by peer (104)
2019-10-13T18:24:48Z socket recv error Connection reset by peer (104)
2019-10-13T18:28:17Z socket recv error Connection reset by peer (104)
2019-10-13T18:29:10Z socket recv error Connection reset by peer (104)

In my case I had several peers drop their connection but the syncing soon restarted with fresh peers.

The blocks you're stuck on are from August 2017, right after the Bitcoin Cash fork. Are you running the most recent version of Bitcoin Core? Have you tried clearing the blockchain altogether and restarting sync from zero? (Note: do not delete your wallet.dat file, just the files under blocks/ subdirectory.)

Is there other software running that could be connecting to peers' port 8333? Peers might be banning your IP for some reason. Is this PC clear of malware that could be scanning for port 8333 of network peers? This could cause your IP to be blacklisted.

Finally, have you tried forcing a IP address change? If this is network-related then rebooting your gateway to force a new IP could solve the problem.


Unfortunately you didn't provide enough information:

Which OS?
Version number of your Namecoin server?
Does this Namecoin server run on your local machine? If not, how is it connected physically?
Did you apply any command line params when starting the server?
What is the content of your namecoin.conf file?

Generally speaking, the most common causes for RPC connection problems are:

Mismatch of the provided data (rpcuser, rpcpassword, rpcport) with the contents of namecoin.conf
Command line parameter -server is missing


Is there a proof of work system which takes significantly more memory to generate than it does to verify?

I think a mining process that made use of stochastic sampling of a large data set would meet the requirements you have laid out. The blockchain even provides a great data set for this. For example, let's say each nonce requires you to randomly sample the blockchain to pick out a few bytes. Since you use many nonces while mining and couldn't predict which data you would need from the block chain, you would basically need to have the whole block chain (any publicly agreed upon data set, really) available while mining. The solution can then be verified with a small sample of that data set and some proof that the data is in the set. When using the blockchain example, you would probably need a chain of block headers and a merkle branch for the transaction data selected.

Another way to do this would be to use a large random merkle tree. Let's say someone created a merkle tree of 2^31 random 32 byte values. When taking into account that the merkle branches have to be stored as well, this is (1 + 2 + 2^2 + 2^3 + ... + 2^31) * 32 bytes, or (2^32-1)*32 ~= 137.4 GB of data in all. This data is very publicly available for anyone who really wanted to download it and verify the merkle root. The merkle root would be made known as the mining merkle root, and it is a well known and agreed upon constant. Mining involves sampling this random merkle tree and hashing, and with finding a successful solution, the merkle tree branch is provided, proving that the data that was sampled is actually in the publicly agreed upon merkle tree.

  In this scheme, it takes ~137.4 GB of memory to mine, but only ~1 kB of data to verify a solution against the publicly agreed upon mining merkle root.

And the numbers could obviously be tweaked here to allow people to mine without giving up 137.4 GB of their harddrive. A balance would have to be reached.

I actually like this way better, now that I think about it, because it doesn't have the side effect that mining can take longer as the block chain grows. You could probably even snapshot the bitcoin block chain and use that as a pubicly verifiable data set. But the block chain method essentially forces nodes to be full nodes as well, which is interesting, so it's a tradeoff.

Edit: With a quick search, I turned up this paper that solves essentially the same problem with a different stochastic sampling method involving the birthday paradox. Their solution is interesting because it involves building your own large data set each time. But this may not actually be a good thing, as it discourages re-building of blocks when new transactions come in.

http://www.hashcash.org/papers/momentum.pdf

A relevant bitcointalk discussion on the Momentum algorithm:

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

I think it's funny how the 'momentum' aspect (not being able to update merkle after it is first created) is touted as the defining characteristic of the algorithm, even though it's actually a pretty significant downside, delaying confirmation of all transactions by 1 block. It may also exacerbate the problem where miners don't want to mine large blocks because they take long to propagate. i.e. It may be more profitable to continue mining with your tiny block even after you have heard about a new block on the network because the momentum you already have makes it easier. I think the fact that bitcoin's PoW algorithm does not have any momentum is actually a great feature, allowing for transactions to get confirmed quickly.

Using an unchanging data set, like in the solution I provided above, provides the desired asymmetric memory requirements in working/verifying work, while also avoiding the problem of momentum.


If ASIC based machines can run at 14TH/s, why isn't the answer found almost immediately?

As explained here in the Bitcoin Wiki, the formula for using the Difficulty to determine the expected time to solve a block is:

time = difficulty * 2**32 / hashrate

Currently, the difficulty is 1,452,839,779,146 so a 14TH/s ASIC miner would be expected to, on average, solve a block with

time = 1,452,839,779,146 * 4,294,967,296 / 14,000,000,000,000

which gives a result of 445707095 seconds, which is about 14 yrs, if I've done my calculations correctly.
To double check that the technique works:
Using the current approx network hashrate (according to blockchain.info) of 10,183,000TH/s, and the same difficulty as indicated above, the formula gives a result of 612s to solve a block, which is the expected result of approx 10 mins.


How do you determine which position a block is in the blockchain?

To find the height of a block with only the raw blockchain (or block header) data, you need to follow through the sequence of references all the way to the genesis block.

Of course, there are external services offering this information in their API.

As for your premise, to calculate difficulty you don't need to know how many blocks were created in two weeks, only how much time passed for 2016 blocks (or actually 2015 blocks due to an off-by-one bug).


I had someone offer to mine bitcoin for me, I am a beginner

Sadly there are a lot of scammers around. Don't pay to anyone you don't know (and before you sign up on an exchange, make sure it's a reputable one).

There are also some services which allow you to buy "a miner" which mines for you, but generally, you would be better off just directly buying whatever coin you want yourself.

Be careful, don't trust strangers.


What user data has been leaked from MtGox's database during June 2011 hack?

It was details of 61016 user accounts as a CSV file with fields UserID,Username,Email,Password.  The passwords are hashed, and most of them salted too, but some (the oldest) are simple md5 hashes.

I just tried searching google for it and was unsuccessful.

I have a copy, and could make it available for download but don't know if that would be legal.  I'm guessing not.


Power Off Dash Miners for Short Time on P2Pool

Mine as long as possible, turn off only when needed.  I haven't check Dash P2Pool, but most payouts use some form of PPLNS (Pay Per Last N Shares) payout (although some have different methods to calculate it), so the longer you're offline, the lower the payout will be if you hit a block (since your %age of the submitted shares will be lower).

This is intended to stop people "pool hopping" (when your pool hits a block or gets super lucky, you jump to a pool that is due to find one or particularly unlucky at that point in time, if you're lucky you can get both rewards.  As you're paid depending on how many shares you've submitted, then you're not going to get paid as much because your work on the new pool is low, so it disincentivises that behaviour.

It's technically fine to stop mining for a few minutes, no harm to the machines (although heating them up and cooling down too often could pose a problem with components etc, but it's unlikely to be a big issue).

If you want to regularly turn them off, or for extended periods, then I'd advise sticking with something like NiceHash, since they use PPS (Pay Per Share), so any work you do is paid (although their fees may be higher).

Someone can correct me if I'm wrong, but stopping P2Pool and starting it shouldn't be a problem, I don't know how it stores it's statistics, but if it's a local version then it doesn't matter anyway, since you're the only one on that node.


For the 3 bitcoin address types, which can send to each other? Can a valid tx be created that spends to an unspendable address?

What you can spend, and what you can send to depends on the wallet software and nothing else.

There are no inherent restrictions on any combination.

In case someone uses old software, they may not be able to send to bech32 addresses. But they'll get an error that the software doesn't recognize the address; no funds will be lost.


Output and bitcoin spent what does it mean? I need help

This transaction just means that, some time in the past, someone transferred an amount of Bitcoin (BTC) to two recipients, one was probably a second person providing goods or services to the first person, the other recipient was probably change being returned to the first person.

The amount of Bitcoin was roughly equivalent to $61,000 at some point in time.

Both the recipients subsequently spent the received amounts in further transactions.

It is possible that either or both recipients now control 0 Bitcoin.

It is possible that either or both recipients now control millions of Bitcoin.

Only the recipients can tell for sure. Their Bitcoin wallets will tell them.

Let's say B is new to Bitcoin and wants to buy some for 150 Canadian dollars. B meets a millionaire A who is willing to sell some. B gives A the 150 Canadian dollars. A does the Bitcoin equivalent of reaching into their back pocket and taking out a crocodile-skin wallet. A looks inside sees seven $1000000 banknotes and a $61,234.56 banknote∆. A gives B the $61,234.56 banknote and B then gives A a $61,134.56 banknote in change. B now has $100 more, A has $100 less.

A and B then immediately spent all their  money on a superyacht and a pair of trainers and are now broke.

Or maybe not.

∆ Such things exist in the cryptocurrency world.


What is the right way to restart bitcoind if it crashes?

If you check in your debug.log you should be able to see if there is any error when you started the node. Probably when the node shutdown uncleanly some of the tables were in an inconsistent state.

Presuming everything is fine and it is not stuck, it is okay to just start with bitcoind -daemon and it will do what it needs to.


High level description of modern Lightning network (as per BOLT)

There is an article series on medium by rusty Russell (one of the main authors of the BOLTs)

The first part can be found at https://medium.com/@rusty_lightning/the-bitcoin-lightning-spec-part-1-8-a7720fb1b4da and the succeeding parts are linked from there.

This article series is from late 2016 and also somewhat outdated.

I recently started to write a book about the lightning network at https://github.com/renepickhardt/The-Lightning-Network-Book the goal is to bridge the gap. But the book has not arrived at describing the BOLTs yet.

On a extremely high level I can tell you that the BOLTs have several components :

the peer 2 peer protocol ( messages and gossip)
the transport protocol (onion routing and SPHINX)
construction of payment channels via RSMCs
transactions (RSMCs and HTLCs)
payment process via invoices

While the structure of the BOLTs is clear they still seem to be entangled among these topics and indeed a high level overview or "architecture" seems to be missing. For example I had a hard time understanding that the transport layer and the HTLCs are two very different things. Stuff like the gossip protocol and the transport layer are pretty much not mentioned in the white paper


Send from bitcoin core without downloading blockchain

My suggestion for your case is you can use a mobile wallet and import the private key of the address which you used to receive Bitcoin and then use your Bitcoin from that mobile (lightweight wallet).

In fact, the mobile wallets will also download the blockchain and keep its database up to date with the Bitcoin database but it will not fully download the whole blockchain so it will be so much faster.


What happens to unclaimed Open Assets (colored coins) asset quantity units?

I had the exact same question when reading over that specification document. I'm not sure if that is a mistake in the example, but the conclusion I reached is that the colored coins are destroyed.

I tested this with the Python Open assets library and the transaction that claimed less than the full possible number of assets was still a valid colored coins transaction.

So, unlike normal coins where the 'leftovers' are given to the miners, unclaimed open assets are destroyed.


Why my bitcoin node does not show the same mempool size than a web blockexplorer?

Mempools between nodes will be different. There is no "supposed to match after a while" as the mempool does not have anything that makes all nodes' mempools converge to the same thing. There is no "the mempool", there is only "a node's mempool" and these will differ based on the settings for accepting transactions.

The settings on your node's mempool are likely much stricter than the settings for blockchain.info's mempool since blockchain.info shows data for a variety of transactions that most nodes will reject (e.g. transaction fees less than 1000 sat/kB, creating dust outputs, unconfirmed transaction chains longer than 20 txs, etc.).


Are there Bitcoin password crackers I can use to recover forgotten passwords?

Revalin made available a sript that you can try running:

http://bitcointalk.org/index.php?topic=85495.msg942171#msg942171

There may not yet be anything else, but you'ld probably find someone willing to write one if you offered to send your wallet along with what you think the pass phrase might be and ask only for a fraction of the wallet's bitcoins back once cracked.


Is the getnewaddress command available before synchronization is completed?

Yes, getnewaddress works independent of the downloading and indexing of your blockchain database.

The command will generate a new private key in your wallet.dat file. This file is independent of the state of your blockchain files.

Your new address is derived from the freshly generated private key.

Your client will need to be synced to see incoming transactions (deposits) on your address reflected in your balance.


Why was the MIT license chosen for Bitcoin?

Satoshi:

  If the only library is closed source, then there's a project to make
  an open source one.

  If the only library is GPL, then there's a project to make a non-GPL
  one.

  If the best library is MIT, Boost, new-BSD or public domain, then we
  can stop re-writing it.

  I don't question that GPL is a good license for operating systems,
  especially since non-GPL code is allowed to interface with the OS.
  For smaller projects, I think the fear of a closed-source takeover is
  overdone.


Please wait. the estimated transaction time is 3d days. The tx will be either confirmed or will be removed from mempool. If you have opted in for RBF , you can increase the fee.


Are there standardized ways of generating wallets from passphrases?

Yes, BIP39 is one such way.

Electrum has a different, mutually incompatible way.


Creating a Bitcoin address using the 9 steps. Stuck on stage 2

The problem is that you are hashing the string of hex characters instead of the actual bytes that the hex string represents. You should be using an array instead with the bytes specified. The following should work:

string sha256(char[] str, size_t len)
{
  unsigned char hash[SHA256_DIGEST_LENGTH];
  SHA256_CTX sha256;
  SHA256_Init(&sha256);
  SHA256_Update(&sha256, str, len);
  SHA256_Final(hash, &sha256);
  stringstream ss;

  for(int i = 0; i < SHA256_DIGEST_LENGTH; i++)
  {
    ss << hex << setw(2) << setfill('0') << (int)hash[i];
  }
return ss.str();
}

int main()
{
  char[] arr = {0x02, 0x50, 0x86, 0x3a, 0xd6, 0x4a, 0x87, 0xae, 0x8a, 0x2f, 0xe8, 0x3c, 0x1a, 0xf1, 0xa8, 0x40, 0x3c, 0xb5, 0x3f, 0x53, 0xe4, 0x86, 0xd8, 0x51, 0x1d, 0xad, 0x8a, 0x04, 0x88, 0x7e, 0x5b, 0x23, 0x52};
  cout << endl;
  cout << sha256(arr, 32) << endl;
  return 0;
}


Using bitcoind JSON-RPC, how to get transaction from input address?

The data you are looking for isn't actually included in the transaction that spends the UTXOs. Addresses are basically shorthand for a scriptPubKey, and scriptPubKeys are associated with outputs, not inputs. So if you want to check if an input spends from a certain address, you have to get the corresponding previous output and look what address it pays to.

For example, I have a transaction in my listtransactions:

{
"account" : "",
"address" : "mmcuav4ZD8EBc8aH5EkoGcKZSPsoHz1UzZ",
"category" : "receive",
...
"txid" : "8cb677f33d2ad2d9d94a4aa5552cd6a09615568abb7e5fd3c34df3c7869105d3",
...
}

So, I use getrawtransaction to see what my transactions inputs are:

$ bitcoin-cli getrawtransaction 8cb677f33d2ad2d9d94a4aa5552cd6a09615568abb7e5fd3c34df3c7869105d3 1

...
"vin" : [
    {
        "txid" : "33e25fd78c075dff3b0474911ca2244c5246cb40b0b34653e2fe1ca6f7c26d46",
        "vout" : 1,
        "scriptSig" : {
            "asm" : "3044022009ee6ccde46a58d7e5347ed28e8e946b1cbca3518c5066bcf1809abdfef9ef940220254fa3ed7f80831f08f760958d870a575f612aa5bb67add4cd4eb7d135a75b6a01 02a54cf1e2ecaea3e56721af6e90eb8e934597ee77cd03e060bbed47b8db03a754",
            "hex" : "473044022009ee6ccde46a58d7e5347ed28e8e946b1cbca3518c5066bcf1809abdfef9ef940220254fa3ed7f80831f08f760958d870a575f612aa5bb67add4cd4eb7d135a75b6a012102a54cf1e2ecaea3e56721af6e90eb8e934597ee77cd03e060bbed47b8db03a754"
        },
        "sequence" : 4294967295
    }
]
...

Now I look at the transaction output that funded this input, which is at index 1.

$ bitcoin-cli getrawtransaction 33e25fd78c075dff3b0474911ca2244c5246cb40b0b34653e2fe1ca6f7c26d46 1

...
"vout" : [
    ...
    {
        "value" : 2.39990000,
        "n" : 1,
        "scriptPubKey" : {
            "asm" : "OP_DUP OP_HASH160 1fab219d5483021bd791453e155f7b956f4b3ed4 OP_EQUALVERIFY OP_CHECKSIG",
            "hex" : "76a9141fab219d5483021bd791453e155f7b956f4b3ed488ac",
            "reqSigs" : 1,
            "type" : "pubkeyhash",
            "addresses" : [
                "miQQFQse4DwFE9rkMkZ78CwvTHkg3sTJmc"
            ]
        }
    }
]
...

So, miQQFQse4DwFE9rkMkZ78CwvTHkg3sTJmc is the addres that funded my original transaction. Obviously, this can be automated so you don't have to make all these calls each time you want to see the address that funded a transaction.


Script will not be very useful if you dont know first how bitcoin work in deep, I suggest programming bitcoin, which guide you to re build the whole bitcoin software with a whole chapter for Script
free and open source here:
https://github.com/jimmysong/programmingbitcoin


how to install Bitcoin and bitcoin cash on the same ubuntu server?

I was able to successfully install Bitcoin ABC on Ubuntu 14.04.5 LTS, alongside Bitcoin Core, using these instructions:

Download the appropriate binary from here: https://download.bitcoinabc.org/

For me, the command would be:

wget https://download.bitcoinabc.org/0.16.2/linux/bitcoin-abc-0.16.2-x86_64-linux-gnu.tar.gz
Extract the archive:

tar xzvf bitcoin-abc-0.16.2-x86_64-linux-gnu.tar.gz
Rename the binary files:

cd bitcoin-abc-0.16.2/bin/; rename 's/bitcoin/bitcoinCash/' *
Install the files into /usr/local/bin:

sudo install -m 0755 -o root -g root -t /usr/local/bin *

And voilà!

bitcoinCashd -version outputs:

  Bitcoin ABC Daemon version v0.16.2.0-6af5e93

  [...]

bitcoind -version outputs:

  Bitcoin Core Daemon version v0.15.1

  [..]

ls /usr/local/bin outputs:

bitcoinCash-cli  bitcoinCash-seeder  bitcoind    test_bitcoin
bitcoinCashd     bitcoinCash-tx      bitcoin-qt  test_bitcoinCash
bitcoinCash-qt   bitcoin-cli         bitcoin-tx


Chak is not entirely correct. The exchange is the matching engine, but there will be someone else on the other side of the trade. The exchange does not have its own position in futures.

That said, legally each party to the future has the exchange as the counterparty (i.e. there are two separate contracts). This all but eliminates counterparty risk. Compare this with a forward, which is effectively a future struck direct between two parties, with no exchange.

Most exchanges have what are called market makers, which in return for being spared some or all exchange fees, commit to providing a buy and sell price for all (or a high proportion) of the time the exchange is running. So most people in practice are trading with a market maker who is bearing the risk of being on the wrong end of the trade. But you could be trading with anyone, either an individual or an institution who wants the opposite exposure to you.

Update As Max Vernon says, the Bitcoin futures on CBOE are cash-settled, not physically-settled. Physically-settled would be a poor choice for Bitcoin, because there could end up a situation where not all futures can be settled given the liquidity available. And as the price rocketed as (some) futures sellers had to buy bitcoin, everyone else would hang on to it.


find a CTransaction from a prevout in Bitcoin source code

I think what you want is to use this function:

bool CCoinsViewMemPool::GetCoin(const COutPoint &outpoint, Coin &coin) const

You can find the definition here: https://github.com/bitcoin/bitcoin/blob/v0.17.0.1/src/txmempool.cpp#L885

It will set the Coin object you pass as an argument. For an example of usage, see bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints* lp, bool useExistingLockPoints) in https://github.com/bitcoin/bitcoin/blob/v0.17.0.1/src/validation.cpp#L364

This is supposed to "provide access to all Coins which are either unspent in the
 * base CCoinsView, or are outputs from any mempool transaction".


Is it possible to convert Bitcoin Miner to Litecoin Miner?

No, you can't. And this has nothing to do with the operating system. Your hardware has a bitcoin ASIC chip made only for doing Sha-256 calculations. Litecoin uses the Scrypt algorithm. Sha-256 and Scrypt are not the same, so what you are suggesting is impossible.

You can mine other Sha-256 coins instead of Bitcoin.


Why does bitcoin not have something like nicknames?

In bitcoin, there are no usernames, just addresses that are derived from cryptographic keypairs. Since an address is derived mathematically, when each node hears about a new transaction, it can simply use the right math equation to independently verify that the rightful owner of an address is attempting to spend the address' funds. This is done via cryptography, using asymmetric keypairs and cryptographic signatures.

In your example, each user could claim a username, but now we have a problem: how will everyone know who owns each username? How can I confirm that you are the rightful owner of your username, and consider your transactions valid?

A website that has usernames/passwords keeps a central database with all of them stored, so when you sign in, their server can check your password and allow you online. But the bitcoin network does not have a centralized server on which to store usernames/passwords. Instead it is a decentralized network of individual users.

So, you could have every node store all of the usernames, but that could becomes really resource intensive! And also very bad for privacy (remember, all of the blockchain’s transaction are a public ledger). For these reasons (and probably some others), storing usernames requires a more complicated solution for a decentralized network, whereas the addressing scheme used in bitcoin works quite well, even if addresses are tough for humans to read.

It is worth noting, there have been 3rd party services that allow you to claim a username, and then if someone wants to pay you they can do something like visit a URL (eg. www.nicknamePay.com/sebbo) and be presented with a btc address. In that example, the website could manage you wallet for you, while you can just tell associates to visit an easy-to-remember URL.


What are some reasons that a rational miner won't switch to P2Pool?

Variance. Raw connection to p2pool will always have variance for a typical miner - if the pool is small there will be large pool-based variance, if it is large the share difficulty will be high and there will be large share-based variance.
Running a Bitcoin node is already nontrivial and going forward will become impossible for at-home miners. For example, some mining rigs run on a cheap USB flash drive, which may soon become insufficient to hold the blockchain.
Normal mining pools have additional features such as worker monitoring, SMS notifications, automatic conversion of NMC to BTC and so on.
Some of p2pool's suggested advantages are a bit exaggerated. The recent P2SH woes are a non-issue since miners who want to vote can simply go to a pool that votes as they want. The more generic concentration of power problem can alternatively be solved with smart miners (miners who generate blocks themselves or from an independent party, and submit shares with Merkle branches of the generation transaction which are accepted if it credits the pool).

Because of these reasons, I believe the future will be small PPS pools which act as a proxy to p2pool (with or without the use of independent block-issuing nodes). These will have low fees, no variance, as many features as the pool operator wants to implement, and will not be highly centralized. Until we see more of these I don't think there's much justification for p2pool going mainstream.


How do you type the ₿ Bitcoin Symbol in Android Google Keyboard?

Gboard settings (cogwheel on keyboard) > Dictionary > Personal Dictionary > (your language) > + button

For the shortcut box, add whatever symbol or word you want that will make the symbol appear on the autocorrect list in the moddle. Copy and paste the symbol for the shortcut field.

Yours may vary. Razer Phone 2, Android 9, Gboard v9.1.8