How to compress transaction fee as much as possible?

Each customer's transaction will use the same number of output bytes regardless of whether it pays a public key that was already seen on the network or a new public key, and when you go to spend the outputs, it will take the same number of input bytes to spend them whether they paid different public keys or not.

For that reason, it makes sense to use different receiving public keys to differentiate between customers rather than appending an additional output with an OP_RETURN.

To reduce transaction fee as much as possible, you should reduce the byte size of a transaction as much as possible.  Here are a few things you might be doing already but which (if you aren't doing them) can help:

Ensure you use compressed public keys (33 bytes) rather than uncompressed public keys (65 bytes).
If you don't need users to pay addresses but can instead get them to pay arbitrary scripts (e.g. you're using custom software or the BIP70 payment protocol), consider accepting payments using pay-to-pubkey (P2PK) rather than pay-to-pubkey-hash (P2PKH); this will save about 24 bytes for each payment.
When segwit becomes available, switch to using it as miners will be able to fit more segwit transactions in a block than they can fit traditional transactions, so they will likely charge you less fee.
Combine multiple payments if possible.  If you can get multiple customers to pay you in the same transaction (using something like coinjoin) or if you can pay multiple customers at the same time, you'll produce smaller transactions because you won't need to repeat some fields in a transaction (such as transaction version or locktime).  When paying to your customers, you can save quite a lot because you'll only have one change output no matter how many n customers you pay.


What happens to price when the block reward is gone completely?

You've completely failed to mention the difficulty retarget mechanism in your analysis. If the block reward drops, miners will quit until the difficulty is low enough that the remaining miners will break even. This will happen regardless of what the new reward per block is, the only thing that changes is the new difficulty/hashrate. (There is some subtlety in that the retarget mechanism takes time to kick in, but if the drop is gradual that's not much of a problem.)

With low hashrate, the network is less secure. This is why we need to come up with ways to make sure transaction fees are sufficient to fund an acceptable level of mining. (A limit on the data size of blocks is a possible such way, but not a very effective one IMO.)

But the drop in reward will not magically cause the price to go up. The price is determined by the market.


How to validate a Bitcoin address is a real one?

also, the official client bitcoind has a 'validateaddress' command. see https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list

you could call that from your code if you happen to have bitcoind running already.


Why is Ripple's base58 alphabet so weird?

I don't know about the rest of the string but I think the leading bytes are ordered that way to make the types of "addresses" be human reconizable.

From a quick look at the source I think the leading characters, rpshnaf map like so:

r = public Ripple address
p = node private
s = Ripple secret
h = ?
n = node public
a = address family generator or seed ?
f = address family generator or seed ?

Of these, wallet owners have seen the r* and s* "addresses" and those running ripple will be have seen the n* and p* ones.


Not in the UI no.

You can work out the XPUB from your wallet words by making an offline copy of https://dcpos.github.io/bip39/ and then using that.

If it is a regular MultBit HD wallet it is the BIP 32 panel you want.

Use it offline for security of your wallet words obviously.


How can PayPal merchants accept bitcoin?

Braintree is owned by PayPal so I believe you would have to integrate with them:
https://www.braintreepayments.com/


How is Zclassic's pszTimeStamp generated, and what does it mean?

The derivation is given in the Zclassic codebase:

from pyblake2 import blake2s
'Zclassic' + blake2s(b'No taxation without representation. BTC #437541 - 00000000000000000397f175a94dd3f530b957182eb2a9f7b79a44a94a5e0450').hexdigest()

The reason they generate it in this way is because Zcash generates its pszTimestamp like so:

from pyblake2 import blake2s
'Zcash' + blake2s(b'The Economist 2016-10-29 Known unknown: Another crypto-currency is born. BTC#436254 0000000000000000044f321997f336d2908cf8c8d6893e88dbf067e2d949487d ETH#2521903 483039a6b6bd8bd05f0584f9a078d075e454925eb71c1f13eaff59b405a721bb DJIA close on 27 Oct 2016: 18,169.68').hexdigest()

And the reason Zcash generates it in this way is because there is a consensus rule (inherited from Bitcoin) that limits the size of a coinbase scriptSig to a maximum of 100 bytes.


You're spot on!
I don't have enormous gobs of cash sitting around (who does?!) but as I get paid monthly I have some sitting ready for bills or going out next week. Buy the Dip - or more bluntly - Buy the F'ing Dip (BTFD) - is a reminder that:

The dip will be temporary
Don't later regret that you didn't buy
Consider buying a dip IF YOU ARE ABLE TO

Interesting commentary from Dr Adam Back talking with Preston Pysh and PlanB on Preston's podcast recently; accepted experience/wisdom was to ignore dips below 20% - that is a "dip" of 10% wasn't even worth the definition of "dip". Larger dips of 20%+ are therefor worth buying if you're able.
For me, I dollar cost average with a daily buy so I don't really watch the price - some days I get more sats, some days I get less sats, but at the end of every day I have more sats than yesterday.
Over the long term bitcoin will rise in value, and therefore I've protected my savings (future purchasing power). It's that simple. I'm not a trader. I don't have great gobs of cash sitting around. Work in a job and earn living, pay my bills, and save in bitcoin.
Do what you're able. :-)
PS - During the 2017 bull market there were about half a dozen dips of 30%; this dip is the first half decent one so far. aka: this is normal for bitcoin.


Why does Bitcoin send the "change" to a different address?

Two reasons:

So whoever sent to your "A" address can't claim to have sent you 31 bitcoins ("See!  Look on block explorer, there are two transactions sending to "A", one for 20 bitcoins and one for 11-- send me back the extra 11!")
Using a new change address makes it more difficult for other people to track of how many bitcoins you have or where you're spending them.


Scrypt (Litecoin) memory / performance tradeoff

For Litecoin, if memory size is increased in processing the Scrypt
  algorithm, for example to 384 kB instead of 128 kB (...), would the typical CPU
  architecture (...) be likely to see a corresponding increase
  in performance?

No, it works the opposite. If you increase memory, which is used by the scrypt to generate a single hash, the time it takes to generate it, in theory, will increase. The time may not increase if the processing unit can fully use its fastest cash in a single data transfer call. However, you need standardised hardware and you would want to deliberately adjust scrypt memory size for it. Which is inconvenient on a global users scale.

Moreover, it's not up to you, personally, to decide the memory size of scrypt. This is a universal agreement of all litecoin users, that memory size of the scrypt algorithm has to be N bytes. If you want to use something else, any transaction you issue will never gets validated by any other users.


get any transaction in p2p manner using bitcoinj

GetData can fetch only unconfirmed transactions, and that's what Peer.downloadDependenciesInternal is doing.

You might want to contact the developer of the now defunct biteasy.com block explorer, he was using (and extending on) bitcoinj.


You can download Electrum and create new transaction from output with higher fee, it's called "Child pay for parent"

You hsould have access to oone of output addresses.


Jaxx Wallet ---> Cryptopea Wallet - unsuccessfull (doublespend)

I would suggest you to contact your wallet support team, let them know that you had this issue so that they can dig deeper maybe..

But as i can see transaction was confirmed so your coins was delivered to you, so you are fine.

See what is double spending, buy looks like your coins didn't succeed to double spend, so you are fine.

What is Double-spending?

Double-spending is the result of successfully spending some money more than once. Bitcoin protects against double spending by verifying each transaction added to the block chain to ensure that the inputs for the transaction had not previously already been spent.

More information: https://en.bitcoin.it/wiki/Double-spending


There are a few different factors for the synchronization time:

You're not only downloading data, but the data is also being validated. There is a lot of I/O going on. Disk speed is a significant factor.
The earlier blocks are much smaller than the later blocks. Validation time roughly scales linearly with the data size.
Complexity of transactions may have increased over time, transactions with more inputs take significantly more time to validate.
The UTXO database grows larger as you parse the blockchain, and every input for every transaction has to be looked up in the UTXO database.


Bitcoin core's estimatesmartfee error "Insufficient data or no feerate found" with synced node

The fee estimation is completely based on how long your node has been running, how many transactions have entered the mempool, and how many of those transactions have been confirmed. It is not (and cannot be) based on the fee information of transactions already included in blocks. So it does not matter whether you are fully synced or not. If you just started up or if there are few transactions being confirmed, then the fee estimation will not have enough data to work.

Testnet does not have a lot of traffic, and AFAIK, a miner is currently not including any transactions in their blocks. Thus there is not a lot of information available for fee estimation to work, so it does not. That is why it is currently unavailable.


Why does it make sense for mining pools to send empty blocks to miners in Stratum v1?

Historically, block template generation has been very slow. It was faster to send an empty template with no transactions, then wait for the mining pool to create a block template with transactions, then send the result to the miners when it was ready (in the order of ten seconds occasionally). This is no longer the case in modern versions of bitcoin core.


It depends on what OS you've got. Windows, Linux, Mac OS?

That said, one of the many possible solutions is somehow OS-independent:
move everything to one single directory on your external disk including the wallet.dat file, the .conf file, the executable, and the blockchain data. Then make sure you always start your Bitcoin-Qt client from the console and include the parameters -datadir and -conf in your command line. Here is an example for Linux:

cd /my_external_harddisk/bitcoin/
./Bitcoin-Qt -datadir=. -conf=./bitcoin.conf -printtoconsole

(I added the optional -printtoconsole parameter. This prevents inflating the debug.log file somewhere on your OS disk all the time.)

In MS-Windows it would look very similar, I guess (I haven't got access to a Windows PC at the moment).

In Mac OS you may want to keep everything in a directory containing Bitcoin-Qt.app for practical reasons, but the principle is the same:

cd /Volumes/my_external_harddisk/bitcoin/
Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt -datadir=. -conf=./bitcoin.conf -printtoconsole

If you later inadvertently start Bitcoin-Qt without any parameters then it simply creates an empty wallet.dat file in Bitcoin's standard directory somewhere on the OS disk. At first glance this looks as if you suddenly lost all your precious Bitcoins. Don't worry, your original wallet.dat file is still there on your external HD in perfect condition. Just exit the program and restart from the console with the parameters as explained above.


Transaction with unparsed input address ? What does it means?

The output being spent is a native segwit output. If you look at the transaction that created it, you get 0014644a61cf83439e53b5dd413bec63c98c9e39c107 for the lock script, which is a native segwit p2wpkh output.

Spending a purely segwit output requires no value to be set for the scriptSig (unlike for a p2sh-p2wpkh).

The address is shown as unparsed as Insight has not been updated to recognize bech32 addresses.


Failing to build bitcoin-core v0.13.1 on debian stretch

This is due to some incompatibility between Bitcoin-Core 0.13 (and below) with openSSL 1.1. openSSL 1.1 has some significant API changes: https://wiki.openssl.org/index.php/1.1_API_Changes

The pull request (patch) #9326 should fix this problem (will very likely be in 0.14).
https://github.com/bitcoin/bitcoin/pull/9326

Until this has been resolved, you should use an openSSL version below 1.1.

EDIT: this has been fixed in the bitcoin-core's MASTER branch


how i can cancel a transaction in blockchain,info?

There is no way of canceling a transaction once you publish it to the network.

At the moment there are many transactions (about 100k) waiting to be confirmed. This might take a while.

For now the best thing you can do is to wait.


How to start Bitcoin-qt with Bitcoin Cash?

Bitcoin ABC 0.16.1 binaries for linux have a QT GUI:
https://download.bitcoinabc.org/0.16.1/linux/ - I have not checked the other platforms, but I assume they do too.

They kept the same binary names (bitcoin-qt, bitcoind, etc) when they forked Bitcoin Core, which is a bit confusing because it is a seperate network with its own consensus rules.

The standard bitcoin-qt (Bitcoin Core) only works for bitcoin, not bcash.


What prevents one from replaying a BCC transaction by nulling the SIGHASH_FORKID bit?

First of all the sighashType field with (or without) any bit fields is used in source data while for signing. The signature does not sign itself, but it signs sighashType. So, changing sighashType invalidates signature.

Second, the data for signature is created in different manner.


How to import an existing extended private key to bcoin?

What exactly do you have from Electrum? Is it an xprv... ?

What you need to do is create a wallet and assign the master private key:

https://bcoin.io/api-docs/#create-a-wallet

bwallet-cli mkwallet --id=WALLETNAME --master=xprv...

Note that Electrum's address derivation scheme may not match bcoin's exactly (since bip32/bip44 don't provide metadata like address type). Therefore you may also need to include the flag --witness=true which will derive bech32 addresses along the bip44 path. If Electrum is using bip49 or bip84 derivation schemes, you will have to run a modified branch of bcoin to recover the same addresses.

If you want to chat about this the developers are usually available on slack or IRC #bcoin


What are ways a BTC Exchange could steal from its customers, and how can they protect themselves?

One way an exchange could prove that it is liquid is to move all the funds from one address to another, and publish the transactionID.  This would be visible in the block chain.


How to generate xPub Key from public key in java

The extended public key, xPub, consists of both a chaincode and the public key itself. These are effectively distinct from each other, you cannot generate the chain code from the public key or vice-versa. Normally they are both generated at the same time from a seed, but without the seed you cannot generate the same chain code.


How can the wallet identify public addresses are linked to a private address

While exact implementations between wallets might differ, the general approach is usually similar to the following:

A wallet generates a private key (or a set of keys) based on an HD wallet, or just individual random keys
The public keys for private keys generated in 1. are calculated, and used to create the desired address scripts (p2pkh, p2sh (wrapped segwit/multisig), p2wpkh, p2wsh).
The wallet stores the private key, along with a mapping to which address script uses that key.
The wallet constantly scans the mempool and new blocks for outputs that send Bitcoin to the address scripts calculated in 2. When it discovers such an output, it adds the coins to the wallet balance and informs the user.

There are implementation specific variations on this (for example, an HD wallet may not store individual private keys, and store a mapping of the derivation path from the root key and the address script instead).

For an actual example, let's say our wallet has the private key for the address 1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX. The HASH160 for the public key of this address is 99bc78ba577a95a11f1a344d4d2ae55f2f857b98, and the locking script is 76a91499bc78ba577a95a11f1a344d4d2ae55f2f857b9888ac. This locking script is what appears in the actual bitcoin transaction that sends coins to this address.

The wallet will store the private key, and make a note that the private key corresponds to that locking script. It will then scan the bitcoin blockchain for transactions which have an output that matches that locking script.


Bitcoind running in vagrant can't import bootstrap.dat from external directory

With bitcoind 0.10 (current release candidate) you don't need bootstrap at all anymore as it downloads faster and more efficient than bittorrent would. Bootstrap is probably going to disappear soon. So you might not want to bother at all.


NXT Private blockchain changing the block generation time

Yes, the block time can be changed, but not very easy. There are two ways to do it:

Change the timestamp resolution to be 1/6th of the second. The
drawback is that you will run out of int values 6 times sooner
(timestamp is 32-bit integer). And eventually it will be less
convenient to read timestamps.
Keep the timestamp resolution and
adjust the forging. In Nxt there is no constant for changing the
block time, so you'll have to change few other constants. A
BLOCK_TIME constant was added in Ardor, you can see how it is used
there. The drawbacks of having 10 sec blocktime with 1 sec
resolution is that the base target adjustment will work not so well,
so finally you may end up with average block time which is not
10 sec.

A negative effect in both cases is that there will be less time for nodes to communicate new blocks and consequently more spontaneous forks will appear.
And the number of blocks will grow 6 times faster.


What exactly is collecting transactions?

The miner "collects" transactions just by listening on the peer-to-peer gossip network where nodes send transactions to one another.

Every transaction has a digital signature which proves that this specific transaction was authorized by the owner of the funds (specifically, the person who knows the private key corresponding to the address where the funds were previously held).  You can't change the amount, destination, or fee of the transaction without invalidating the signature.  So the miner doesn't have to trust that all received transactions are valid; she can (and must) actually verify the signatures.

There's no guarantee that all transactions sent over the gossip network are "authentic", but as noted above any inauthentic transactions would be immediately detected and ignored, due to the signature being invalid.  Moreover, nodes that send such transactions get banned by their peers - this isn't strictly necessary for security (since everybody is verifying signatures anyway) but just helps keep those nodes from wasting everyone's time and bandwidth.

Likewise, when a miner produces a block, other miners (and every other node on the network) will check that the block meets all requirements of the Bitcoin protocol.  One of these requirements is that every transaction in the block has valid signatures.  So if our miner tries to "distort" transactions, their signatures will be invalid, and so her block will be considered invalid by other miners.  This means that when they produce their own blocks, nobody will list her block as the "previous", meaning that it won't end up as part of the block chain in the long run.  This in turn means that she won't get the 12.5 BTC block reward, nor the transaction fees associated with her block.  So trying to mess with transactions in the block won't work, and carries a severe penalty besides.


Acquiring Data

You have two options here:

Check out one of the data providers online. Quandl offers (mostly) free historical data for a variety of pairs and exchanges. Alternatively, if you have bucks to spare, Coinigy offers high-quality data sets on a per-month pricing model.
Roll your own data crawler, using a programming language of your choice and the various APIs available for exchanges.

I'll discuss the two options further below.

Acquiring Data from a Data Provider

Obviously, this option is the most convenient, however also possibly most expensive, depending on your required quality of the data.
there is also no guarantee that the exchange, pair and/or time range you're looking for is present in the data base.

To Sum up:

Pro:

Least time-consuming
Data is likely to be cleaned and formatted
Many data providers offer a unified layout of data across several data sets, making it easy to compare them.

Cons:

Paid data is expensive for hobbyists (Market data at coinigy is at 30$ / Month, as of the time of writing)
Free data is often provided as is, leaving you with clean-up duty and post-processing tasks
If data is cleaned, artifacts can occur without you knowing, tempering with your research results.

Rolling your own Data Crawler

With just a little experience in programming and basic understanding of how an API works, you can quickly set up your own data acquisition tool. There's varying degrees of difficulty, of course, but at the very heart of it, the matter is quite simple:

Choose an Exchange
Choose an API
Hook into API using code wizardry
Start downloading data

I'll walk you through the necessary steps (sans the code - I feel like this is a topic for another StackExchange; I will, however, link you to libraries that will help you get started).

1. Choose an Exchange

I'm guessing you've done your research and thusly, will only point out a few things when considering the exchanges you want to fetch data for:

Make sure they have stable servers and connections (Exchanges in Asia, accessed from, for example, Europe, have notoriously unstable connections). Otherwise you'll have pot holes all over your data, perhaps even rendering it useless.

if you absolutely require the data, consider renting a server closer to the exchange server center's physical location.

Make sure they have meaningful volume. If there's only little volume changing owners over the course of a set time frame (usually, the 24h volume metric is always available), the exchange is likely not a very good choice. It skew the picture of the market.
Test their customer support first. If you happen to require their assistance some time later during crawling, a great support staff can make all the difference. Besides, it gives you a small indication of the exchange infrastructure's quality.

2. Choose an API

Choosing the right Application Programming Interface (API) depends on 2 things:

How granular you need your data to be,

and

what APIs the exchange has to offer (obviously).

REST APIs

If you're fine with, say, 1-Minute snapshots of data (i.e. tickers, order_books, trades etc), requesting data via a Representational State Transfer (REST) API is sufficient. This allows you to send a http request to a specified URL, and receive a response containing the data requested (usually in JSON-format).

The convenient thing about REST APIs is that they function mostly the same across exchanges - requests are sent, responses received and data evaluated by you. Some exchanges require you to use different request methods (such as POST) instead of the usual GET requests; however, this is usually only required for private endpoints (private meaning that you need to authenticate yourself first, before receiving data like your account's balance, etc), so if you're just after market data you shouldn't encounter them often.

A limitation of REST APIs is that they usually feature a request limit. The most commonly seen limit is 60 requests per minute, but can be more strict (or more loose - Bitfinex allows unlimited requests per minute). Some exchanges also employ a request counter - this means that certain requests increase your IP-connected counter by a certain value. Depending on your status with the exchange this counter decreases over time by a pre-determined value.

In addition to this (if you're thinking 'Well, hey! Why not fetch data every second then?'), market data is often cached. A snapshot of an API endpoint is stored for a set interval, before actually being updated on the server side. Hence, you might send a request every second, but nonetheless receive identical data until the server cache is refreshed.

WS APIs

WebSocket (WS) and WebSocketSecure (WSS) APIs are full-duplex connections, which allow the user to receive close-to-real-time updates of one or several API endpoints to which they've subscribed.
Full-duplex simply means that you can not only receive, but also send data to the WebSocket connection. This is predominantly useful when running a bot that is supposed to trade on your behalf, as the feedback is usually faster.

In principle, you open a connection to the WS API, and subscribe to the endpoints you want data on. Typically, this is separated by endpoint and pair, but make sure to consult the API documentation - some exchanges do not employ a channel subscription model, and data comes flooding right in without further configuration.

The implementation of WebSockets ranges from trivial to complex, so expect to do some reasearch on how to access some of the exchanges' WS APIs. While the principle system remains identical across all of them, many exchanges use different protocols and/or services to provide their data - for example the WAMP protocol and Pusher, which add an additional layer of complexity, since they require a specific client to connect.

However, if you require tick-by-tick data, such as for real-time order book building, this is what you want to go with.

FIX APIs

The Financial Information eXchange (FIX) Protocol is a standard started in 1992, and now commonly used by institutions and brokers in the financial markets. It is by far the least available API at exchanges, with even fewer actually sending market data. It is most commonly used to place or cancel orders (for example at CoinbasePro). However, some exchanges offer real-time market data via FIX.

Keep in mind that you'll need extensive knowledge of the FIX protocol, such as setting up a FIX engine and proxies to connect to the exchange. This may, in some cases, incur monthly-recurring charges.

3. Hook into API using Code

Depending on what API you chose, as well as which programming language you intend to use, you have a wide variety of options.

Many exchanges provide client libraries for their APIs, some developed by the exchange dev team themselves, others are contributed by users (which are usually revised by the developer team before being quoted on the exchange's website).

There are many other libraries out there, for likely any language (for example BitEx for Python 3.x (to indulge in some shame-less self-promotion), which unifies core methods across a variety of REST APIs, as well as some WebSocket APIs).

Being a Python developer myself, I can only recommend using it. Especially if you're not bound to an environment.
Using the requests library, for example, you can query an exchange with ease:

import requests

# Get a list of all asset pairs at Kraken.com
print(requests.get('https://api.kraken.com/0/public/AssetPairs').json())

4.Start downloading data

Once you've set up your data crawlers, you need to release them! I personally run the REST crawler via cron jobs, and Websocket crawlers as daemons. But this is up to you.

It will of course take some time to acquire a meaningful set of data, but alas, you either pay with money or with time for the data you want.

Useful Links

API References

REST
WebSockets
REST vs. WebSocket
FIX Protocol

Data Sources

Quandl.com
Coinigy.com
CoinDesk.com
Investing.com
Bitcoinchain.com
Cryptodatasets.com
CoinMarketCap.com
Crypto Archive

Feel free to add, correct or update any of this content in the comments below! Thanks.


SPV clients - how much does occupy the full blockchain headers?

SPV clients need to download the blockchain headers so that it knows that it is following the blockchain with the most work. Each header is 80 bytes, and with 474994 blocks (as of writing this post), the size of all blockchain headers is 37999520 bytes which is ~38 MB.


What software/hardware is required to mine with an FPGA?

You would need a computer to program the FPGA, obtain the work units, distribute them to the FPGAs, collect the shares, and submit them back. If you're not using a mining pool, you'll also need the computer to generate the work unit, assemble solved blocks, and submit them to the Bitcoin network.

The computer won't be doing that much work. So you can use a very low-end machine and optimize it for low power consumption and low noise.

Cablesaurus built the first commercially available FPGA Bitcoin miner. There is a lot of innovation going on and what's available is changing rapidly, but most of the current designs are very similar to this design.


If you forgot your encrypted wallet's password, there is nothing you can do.

Keep it anyway, just in case you remember it someday.

Of course, if you have a backup, you can use that one.


It's commonplace that when there's an investment or monetary instrument someone doesn't like, they call it a "ponzi scheme".
For example, gold (ie gold bullion) is indeed often called a "ponzi scheme". Diamonds and gems certainly are.
Some folks think that conventional stock market shares in the current historical era .. ie "Apple shares" or "Ford shares" are a "ponzi scheme".
So, people buy APPL at a higher and higher price, there's no intrinsic value at all (they argue), and the one and only way to make money is to sell to the "greater fool."
Note that I do not know, do not care, and don't have an opinion either way on whether or not these things are indeed ponzi schemes.  The point is, it's completely commonplace to label things like gold, or even shares as "ponzi schemes".
You can find endless discussions where certian folks think government money ("fiat money!") is just a ponzi scheme.
(Just the other day someone commented that real estate in a certain city is "just a ponzi scheme"; ie they believe the prices are un-real and the only reason to buy is to sell to a "greater fool" - until someone is left holding the bag.)
So it's completely normal and commonplace to describe something as a "ponzi scheme"
Note that the term is now used very generally (to mean "a scam" or "something with no real value"). It is NOT used CAREFULLY in an exact sense of how "the original ponzi scheme" operated.
(If you object to "the exact meaning of words changing" - whatever, would have to go live on another planet. You can immediately list huge numbers of words in English that have no connection to their "older, precise" meaning.)
Regarding the talking head's appending the trendy word "open".
It's: an attempt to be clever and attract publicity, more TV appearances, and more book sales.
It would be wildly reading too much in to it, to try to tease out the exact "meaning" of adding "open".
Here are a few other clever! phrases in the same vein:

"it's a prime based ponzi!"

"ponzi mining!"

"a ponzi scheme that's listed on major indexes!"

and so on.

An influental and intelligent person like Nassim N. Taleb

Football players make money via: creating television programming which generates tv ad income.
Bakers make money via selling buns.
"Talking heads" like Taleb make money via: catchy soundbites which generate more interviews and book sales.
It's exactly like being a tiktok'er or youtuber and generating views with shlock.


Does rootstock use bitcoins or do they use their own rootstock coin?

Rootstock uses smart bitcoins (SBTC). On a technical level this is a separate token from bitcoin (BTC). They live on a separate blockchain. On the other hand, every smart bitcoin represents one bitcoin.

Rootstock is a Bitcoin sidechain.

This works as a 2-way peg between the bitcoin blockchain and the rootstock blockchain. You use this to transfer coins between the chains. Send a bitcoin over to rootstock and it becomes a smart bitcoin. Send it back and you have a (normal) bitcoin again.

A more technical way to see it is that X amount of smart bitcoins are created by locking the same amount of bitcoins on the bitcoin blockchain. When you later unlock an amount of bitcoins, the same amount of smart bitcoins disappear again from the roostock blockchain.

The important part is that your bitcoin can only be active on one of the blockchains at any given time.


How to determine where a bitcoin address resides

You cant. You can send BTC to anywhere, including addresses that will never exist.

If you're reasonably sure that the address is in use, i.e. by seeing active transactions on bitcoin.info, you could try sending a small transaction with a message in it, but it will likely be ignored.

In all probability, you lost these coins.


What is most efficient way to validate bitcoin target (difficulty) value in C++

Bitcoin Core has its own arith_uint256 class for calculations on 256-bit unsigned integers.  Its code to convert "bits" (so-called compact format) to arith_uint256 can be found in arith_uint256::SetCompact in the file arith_uint256.cpp.

So you could always just use its code directly.  This might be a good idea because if your version differs in any way from their behavior (e.g. rounding errors), you could disagree with Bitcoin Core on the validity of a block.  If your version is in a widely-used client, this would fork the block chain.


Telegram ICO technical whitepaper - does it exist?

There is a post on Reddit with TON Whitepaper uploaded to Google Disk.
The source is said to be TON telegram channel.


How can bitcoin be used for all transactions, even with only one confirmation?

When you pay with bitcoin using a service that uses Coinbase as a payment processor (such as Humble Bundle), it usually accepts in a short amount of time. The reason they can do this is because they check that your transaction has propagated through the whole network and that there are no competing (double spend) transactions.

Once that has happened, the only way to do a double spend is to mine your own block (because everyone else has accepted your first transaction). Mining a block is very expensive so there is very low risk. Certainly less than the risk of credit card chargebacks.

Now if you are selling something very expensive, then waiting for some confirmations would be good. Also in this case the buyer would likely be in less of a hurry.


What makes HD wallets resistant to brute force attacks?

You don't have access to all of a HD wallet's private keys and their corresponding addresses immediately and can't check them for funds immediately.

When generating the 128 bit seeds and then generating the first few addresses of those HD wallets, you will encounter duplicates. Even if we ignore this and assume every private key and every corresponding address to be unique (which makes the math easier so more people can understand it), it's an unfeasible endeavor.

There currently are about 4.67*10^7 UTXOs. The best-case scenario for stealing at least some money is that every UTXO is held by a different private key in a different address. Instead of thinking about how our chances of success are worse than that, let's just assume it to be true.

HD wallets only use their seeds after 10^5 rounds of sha256. We neglect the additional effort of creating a private private key, creating a public key from that, creating an address from that, praying to the Flying Spaghetti Monster that the user actually used the very first address in their HD wallet and the funds in that first address are still unspent, and doing the actual lookup. Because those are harder to determine the cost for and as it will soon turn out, it's infeasible even if we literally have zero cost for that.

Given the numbers above and our very generous assumptions, we have to calculate 2^128÷(4.67*10^7)*10^5 = 7.28656032*10^35 sha256 hashes to get access to 1 UTXO.

The current hash rate of the entire Bitcoin network is about 3*10^18 hashes per second. Of course, in reality we can't just use miners because those 10^5 hashes we need to calculate per seed aren't independent of each other. In fact, they all (but the very first) depend on the one before them. That's the worst possible scenario for calculating a lot of hashes.

But even if we assume that we have access to all of the world's Bitcoin miners, magical new means of running purely sequential calculations in parallel (which is impossible, of course), and get all of the electricity those miners for free because our uncle just happens to barely use his nuclear power plant, recently, anyways, we still need to wait 7.28656032*10^35 / (3*10^18) = 2.42885344*10^17 seconds per UTXO to be able to steal it.

Luckily for us, that's only 7'701'843'734 years which is hardly more than half the age of the universe. I think we got that 1 UTXO. Then, again, our assumptions were pretty generous. It might take us a little longer to get hold of that 1 UTXO. Most of the big UTXOs probably aren't even stored in HD wallets but in cold storage instead, so we have even less hope to get hold of them, but whatever.


Does value 'True' at the middle of stack is valid transaction?

Contrary to the book Mastering Bitcoin, there is no boolean value of "True" in Bitcoin Script. An executed transaction script is valid when the top item remaining in the stack at the conclusion of execution is non-zero. To combat transaction malleability BIP62 (transaction version 3) also introduces the additional validity requirement that the stack must contain no additional data elements, only the single non-zero value.


I Want To Confirm That My Bitcoins Are Being Held In New Wallet

You can check on 3rd-party pages whether they have knowledge of your transaction: E.g. Blockexplorer shows that address 1HyETxKBZshfu2cdjEWMYntDFabFXsrHe2 received just short of 35 BTC last week. If that's the amount you sent, you were successful.


What are Merklized Alternative Script Trees?

The idea of Merklized Alternative Script Trees (or previously Merklized Abstract Syntax Trees) dates back to an idea Russell O'Connor had in 2012. The original idea was that you could have alternative scripts or script fragments stored as leaves in a Merkle tree and then the leaves of the tree that weren't used could be pruned away and not take up valuable space on the blockchain. Compare this to P2SH (Pay to Script Hash) where the entire script is hashed and then revealed on the blockchain at spend time. This brings block space efficiencies (and hence lower fees) as well as privacy benefits.
The earlier formalized proposals for MAST were BIP 114 and BIP 116 and the most recent proposal is of course Taproot (BIP 341). The reason why we moved away from using Merklized Abstract Syntax Tree terminology is that with Taproot (and BIP 114) only one single leaf of the Merkle tree can be executed. You cannot split one particularly long script path into multiple script fragments stored on different leaves of the tree and then satisfy a combination of these leaves. It is effectively a tree of ORs (no ANDs of different leaves and no IF, ELSEs that lead to satisfying different leaves on the tree). You can have ANDs and IF ELSEs but they are contained within leaves not between leaves. Satisfying a single leaf is sufficient to spend the UTXO. As Johnson Lau says in BIP 114:

Only one branch is allowed for execution, and users are required to transform a complicated condition into several mutually exclusive branches.

Pieter Wuille and Russell O'Connor discussed why this design decision was made for Taproot at London BitDevs in July 2020. One of the reasons was that you only need a logarithmic number of Merkle branch nodes to get to any given leaf. There is a combinatorial explosion if there is the potential to have different combinations of all the leaves. Another reason is that the design space had to be limited at some stage to give the proposal the best chance of obtaining community consensus and ultimately be activated.


I can calculate the priority of the transaction (527 confirmations currently, ~452 bytes):

119994817 * 527 / 452 = 139,905,461

Since this is over the minimum of 57,600,000 and meets the other rules for free transactions: namely, that the transaction is under 1000 bytes and has no outputs under 0.01 BTC, this transaction can be free. You do not need to include a transaction fee: make the sum of the outputs equal the input amount exactly.

If your transaction didn't meet the requirements for a free transaction, or if you don't wish it to be treated as a free transaction (which have some limits in transmitting, etc. that might slow down their inclusion in a block), you would need to include 0.0001 BTC transaction fee per thousand bytes (e.g. up to 1000 bytes is 0.0001, 1001-2000 bytes is 0.0002, etc.)

(this is assuming the testnet has the same rules for transaction fees as Bitcoin's mainnet)


Although Lightning Network is completely different and maybe not best to compare both, things that are easier with Elements or only possible with Elements right now:

Issue assets: https://elementsproject.org/elements-code-tutorial/issuing-assets

Confidential Transactions (Amounts hidden)

Hardware Wallet for Liquid(An implementation of Elements)

Tether (USDt)

TDEX: Protocol to build decentralized exchange for trading assets issued on Liquid (An implementation of Elements)

Simplicity: https://github.com/ElementsProject/simplicity

Covenants: https://medium.com/blockstream/cat-and-schnorr-tricks-i-faf1b59bd298 (Maybe soon possible on Bitcoin as well)

LN is also possible on an implementation of Elements: https://twitter.com/notgrubles/status/1355547472827834373
Few differences between Lightning Network and Liquid (An implementation of elements) mentioned in https://blog.liquid.net/six-differences-between-liquid-and-lightning/

Transaction size: the size of payment each Lightning channel can process is limited by the size of the initial funding transaction used to set it up. This makes it less likely that, as transaction size increases, a complete pathway from buyer to seller will be found, making the Lightning Network less reliable for large transactions.
There are no limits to the size of a transaction on the Liquid Network (technically 21 million BTC would be the limit!). A user can peg in as much BTC as needed and start transacting immediately. Recipients also do not need to engage in any channel preparation, they can receive as much as a sender can send. Since Liquid operates on its own blockchain, the number of transactions it can handle is subject to a blocksize limit Fees are currently very cheap (0.1 sats/vbyte for next-block confirmation), but as Liquid adoption grows fees are expected to increase which will make micro transactions unviable on-chain.

Speed: Payments via the Lightning Network can be made almost instantly. Since Lightning payments do not require confirmation on the blockchain they can take place as quickly as an internet connection will allow: potentially allowing for millions of transactions per second.
New Liquid blocks are produced at regular one-minute intervals—ten times faster than the average Bitcoin block—and two confirmations are required for a transaction to be considered settled. This means that Liquid transactions take around two minutes.

Privacy: a degree of monitoring is still possible with Lightning since individual nodes can record the channel and direction information from transactions they are asked to process. While this method of surveillance has limitations, it still represents a privacy concern.
In contrast, the Liquid Network’s protocol is designed so that the amount of funds and type of asset transferred are not revealed to anyone other than the sender and recipient. This is made possible by a cutting-edge cryptographic protocol developed by Blockstream called Confidential Transactions.

Trust model: Liquid’s trust model is based on a federation consisting of 15 hardware security modules (HSMs) attached to host servers (known as functionaries). The functioning of the BTC:L-BTC two-way peg relies on two thirds or more of the Federation functionaries acting honestly.

LN privacy issues are also explained in https://abytesjourney.com/lightning-privacy/


You're not accessing the post data correctly.

$data = json_decode(file_get_contents("php://input"))['order'];
$total = User::Get($data['custom'], FIELD_USERS_CENT) + $data['total_native']['cents'];
User::Set($data['custom'], FIELD_USERS_CENT, $total);

See also.


Trying to setup my own pool and having problems connecting to my server

You're adding the server the wrong way. The way you note the server's address isn't valid URI syntax.

Bad :

username:password@http://localhost:8336

Good :

http://username:password@localhost:8336


Decoded transaction hex without enough signatures?

Tips: 14y7Zx9V19AJHD8AKDYa46WnKH1Ey7atd5

{
    "txid" : "0a7bc048ce3bebbd77dd16a5113978284a424eae766b680bb4a258322701d227",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "551cc8a4953515b845ed2ea37037877be32118d81259cb8b36d7d42a1ae83b29",
            "vout" : 1,
            "scriptSig" : {
                "asm" : "",
                "hex" : ""
            },
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 0.00010000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 b36797fc263fc01d374ace37a0ea30c444fbfa73 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a914b36797fc263fc01d374ace37a0ea30c444fbfa7388ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1HMc49uNVcw9yxREZ2NztL8wAb9dg4n8tN"
                ]
            }
        },
        {
            "value" : 0.00010000,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_HASH160 b2e1d360c89521feda58dc194b324a7cd442e48b OP_EQUAL",
                "hex" : "a914b2e1d360c89521feda58dc194b324a7cd442e48b87",
                "reqSigs" : 1,
                "type" : "scripthash",
                "addresses" : [
                    "3HzrjLKjMmH5chsadUWxr7DJzhRf771V2r"
                ]
            }
        }
    ]
}

I did not give a scriptsig when I created the transaction.
If I had given a scriptsig, then it would appear in this decoded transaction.

The only time you should give a scriptsig (I think) is when you are creating multiple transactions that depend on eachother, and you are not broadcasting them.


Is OP_RETURN combined with a hash, appropriate for proof of existence of an asset?

First you need to be a lot more specific about what you need: who do you need to prove what to? Who is going to try to censor you? Who needs to be able to verify?

Simply create your own database records with the tweets and hashes in them, each hash also including the hash of the previous tweet and other meta data that important (timestamp?, sender?, headline of today's newspaper?, hash of the latest Bitcoin block? Your digital signature?).

If that doesn't allow you to prove whatever you want to prove, then you could publish the latest of those hashes for example once per day/week/month in an OP_RETURN transaction.

You might want to look here to see if that fits your needs: https://petertodd.org/2016/opentimestamps-announcement


I've seen some bounty sites pop up every now and then. Can't remember any of them. This fact alone suggests that you would not get anywhere the same kind as exposure as on the forum.


Anonymity of Bitcoin ownership a fakery?

Bitcoin isn't anonymous in any rigorous sense, and the developers never claimed it was.  See for instance https://en.bitcoin.it/wiki/Anonymity.  If someone has been telling you that it is, then indeed that is "fakery".

However, the specific issue you describe is pretty easy to avoid, practically speaking.  If John doesn't want you to know his total holdings, then he should split them across a large number of addresses.  For instance, there is nothing stopping him from spreading his coins across 10,000 addresses, each containing BTC 0.1.  (There will be some transaction fees but clearly he can afford them.)  Then he can send you coins from just one of them, and you won't really know about the others.  If he wants, he can use a mixer or similar service to further obscure the fact that those addresses were funded from a common source.


How does the bip32 version bytes convert to base58?

Just like in regular bitcoin addresses (or anything base 58 encoded), the version bytes don't get encoded by themselves. As described in the Serialization format section, there is 78 byte payload that gets versioned and checksumed before then being encoded into base 58:

  4 byte: version bytes (mainnet: 0x0488B21E public, 0x0488ADE4 private; testnet: 0x043587CF public, 0x04358394 private)
  1 byte: depth: 0x00 for master nodes, 0x01 for level-1 derived keys, ....
  4 bytes: the fingerprint of the parent's key (0x00000000 if master key)
  4 bytes: child number. This is ser32(i) for i in xi = xpar/i, with xi the key > - being serialized. (0x00000000 if master key)
  32 bytes: the chain code
  33 bytes: the public key or private key data (serP(K) for public keys, 0x00 || ser256(k) for private keys)

There's not a byte-to-character mapping when you do base58 serialization of a multi-byte structure. It's not like 0x04 becomes 'x', 0x88 becomes 'p', etc. Rather, the whole 86 (78 payload + 4 version + 4 checksum) byte structure gets encoded to something that starts with 'xpriv' when the 4 most significant bytes of the 86 bytes structure are [0x04, 0x88, 0xad, 0xe4].


Verifying that a transaction is in the blockchain

Just to be clear: It's not the entire block that is being hashed, as you said, blocks are found by hashing only the block header of a candidate block. However, the block header includes the Merkle root of the transaction tree which in turn commits to the exact set of transactions in the block.

You're correct, a cryptographic hash function is a one-way function and the block content is not retrievable from the hash. To learn the content of the block, you use the block hash as a unique identifier and request the complete block from an archival node, i.e a full node that keeps the complete Bitcoin blockchain in store.

In turn, if you only have the txid to go from, you can request the full transaction from any node that has knowledge of it. The raw transaction does not include the information in which block it was included though. AFAIU, to get that you'd do a getData request of the MSG_MERKLEBLOCK type. This will not only give you the full transaction, but also hashing partners to form the Merkle branch up to the block hash and the block header, allowing you to fully validate the transaction's inclusion in the blockchain.


Butterfly Labs ASIC for rendering in 3dsmax

Unfortunately, this is one of the problems with Bitcoin mining hardware, it cannot be repurposed to do anything else. It's not like a GPU where you can just use it to render graphics in a game.

ASICs are Application Specific Integrated Circuits. The "Application Specific" part is the key word here, they are specific to being used for mining only.


Checking pending (not yet in the blockchain) transactions

Even transactions with no confirmations will show in the results (unless the transaction has been sitting unconfirmed for some time and then the service stops tracking it):

http://www.BlockChain.info


How is BIP 158 wallet rescanning supposed to work with xpub keys?

No, you essentially have to do exactly that: test the block filter for each address that might have gotten used by your wallet. That might not be quite as bad as you seem to think, though.
Deterministic wallet backups usually come with a master secret and the derivation path. If you have both these pieces of information, only one derivation path needs to be searched.
Then, your wallet would usually generate a number of addresses in advance as a form of lookahead. The size of this buffer is often referred to as the gap limit. If any of the wallet's addresses appear in a transaction during the rescan, the buffer is refilled with additional new addresses before continuing to scan from that point on. The underlying assumptions are that addresses are generally used in the order they are generated, and that personal use of a wallet does not generate a lot of unused addresses. Therefore, light client wallets often employ a fairly small gap limit by default.
Some wallet backups additionally store the creation date of the wallet, which allows a rescan to ignore prior blocks than the corresponding blockheight.


Is it really safe to use vanitygen to generate your unique bitcoin address?

"Using vanitygen you might think that you would be able to find the private key for a given address. In practice, this is considered impossible. Given that the difficulty increases exponentially the longer your vanity is, so does the average time required to find that vanity. The example table below shows how an increasingly complex vanity affects the difficulty and average time required to find a match only for that vanity, let alone the full address, for a machine capable of looking through 1 million keys per second."

https://en.bitcoin.it/wiki/Vanitygen#Use_of_vanitygen_to_try_to_attack_addresses

vanity  difficulty  average time

1B  22  < 1s

1Bi 1,330   < 1s

1Bit    77,178  < 1s

1Bitc   4,476,342 (4.48E+6) < 10s

1Bitco  259,627,881 (2.6E+8)    3 minutes

1Bitcoi 15,058,417,127 (1.506E+10)  3 hours

1Bitcoin    8.7339E+11  1 week

1BitcoinE   5.0657E+13  1 year

1BitcoinEa  2.9381E+15  60 years

1BitcoinEat 1.7041E+17  3,500 years

1BitcoinEate    9.8837E+18  200,000 years

1BitcoinEater   5.7325E+20  11,700,000 years

1BitcoinEaterAddressDontSend    1.6209E+47  3.3E+33 or 3.3 decillion years


Virtual currency used as alternative currency

While there's no technical issue preventing the use of Bitcoin and its' associated engine for any number of alternate currency types, the problem you're likely to run into with your question is the addition of a central issuer. Bitcoin is explicitly designed for distributed issuance of funds according to a carefully designed algorithm that requires distributed proof-of-work. It would be non-trivial to chance the issuance mechanism.

That said, if you have a talented programmer, Bitcoin is open-source under the MIT license and you're welcome to modify it as you see fit, just know that it's probably not going to be as easy as your question seems to indicate it should be.


Where to connect to get streaming blockchain data?

Your best bet is to run a bitcoind node locally and then connect to it using zmq (ZeroMQ).

Pulling it from anywhere else means you're trusting someone else and the data can easily be corrupted. Also blockchain.info has a horrible track record of being wrong and being down very often.


Trouble running bitcoin unit tests with test_bitcoin on Ubuntu

Try installing the correct version of BerkleyDB. (4.8) I have the correct .debs in this repository:

http://github.com/nickodell/build_bitcoin

You may need to uninstall the newer version of libdb first.


What happens when invoices get paid more than once?

It is possible that intermediate nodes on the route between you and the payee may track previous payments they have forwarded. If this happens, then the first time the payment_preimage for a payment_hash is revealed, any node along the route could remember it, and if they see the same payment_hash used again in another payment, they would be able to respond with the corresponding payment_preimage before forwarding the payment along the route, and this would allow them to claim the funds which are being spent without the intended recipient ever receiving them.


Where is merkle path of a transaction stored in a transaction?

The merkle path is not stored explicitly within the block. It is calculated from the transactions in the block when requested by a client.


Buy BTC without linking PAN card and aadhar card

Try localbitcoins.com, there is a quick buy option which doesn't require ID


Can I still claim BCH from BTC core wallet after the 'BCH November 13' fork?

It depends on what exactly is changed in the upcoming hard fork, however the devs would not make previous outputs unspendable intentionally.  Your private keys corresponding to UTXO that you controlled at the time of the first fork should still control the same amount of BCH going forward.  If not, users would reject this upcoming fork.


There is now :)

http://welshcomputing.com/bitcoin/wiki/en/Main_Page

About/limitations: http://welshcomputing.com/bitcoin/


The explorers are not synced with each other; they display different blocks. It seems like Dash's testnet has been reset multiple times so chain.so is using one version of the testnet which dash.siampm.com is using a different version of the testnet. This means that they are using different blockchains. Thus your transactions will only appear correctly on the one that is using the testnet chain that you are using.


Why do the xpubs from electrum and trezor not match when creating a multisig wallet?

In my case, the master pubkeys do match, they are just encoded differently, with one (ab)using the xpub version prefix and the other Zpub, and corresponding checksum bytes in the end. The actual curve points and all derivations from this coincide.


Get latest Bitcoin transactions in real-time

blockchain.info offers a web socket for real time information about blocks and tranasactions.
Have a look at https://blockchain.info/it/api/api_websocket

-- UPDATE

to avoid relying on third party services, I would now suggest to use a bitcoin node with zmq


Why BIP32 extended public key differs from BIP32 derived private key?

Your first screenshot has a BIP44 derivation path 44'/0'/0'/0'. Your second screenshot has a derivation path of 40'/0'/0'/0'.


How are the transactions chosen from the Mempool if every node has its Mempool?

When a new transaction is broadcast, it will be passed from the originating node to all available peers. Those peers will then pass it to all of their peers, and so on, until (hopefully) every node in the network has heard about the transaction. Each node can keep a mempool if they so choose, and that mempool will store all of the transactions they have heard about recently. Node operators can configure several variables in their software to only store a certain certain amount (in bytes) worth of txs, to only relay transactions that are above a certain fee rate minimum, etc.

The mempool of each node may thus be a little different, there is no consensus enforced on what is stored in the mempool of each node. In fact, a node operator may choose to not keep a mempool at all!

Miners will run full nodes that communicate with the network, this is how they hear about new transactions to include in the blocks they are mining. Once a new block is found, the miner will broadcast it to the network. As each node hears about the new block, they will work to independently validate the block and all of the transactions in it. Part of this process involves identifying which transactions are confirmed in the block, and removing those transactions from the node's mempool. Soon after hearing about a new block, each node's mempool will be updated to remove the now-confirmed transactions.

  Do every node get all the transactions in their mempool, meaning it's like a syncronisez place where everybody can see the same transactions?

There is no enforced synchronization or consensus or mempools, but many mempools will likely have many of the same transactions stored at any given point in time.

  ..how does the rest of the network of miners know that the transactions they have chosen from the mining pool isn't already being mine by another miner?

Chances are there will be a large overlap in the transactions stored in each miner's mempool. When working on a new block, miners will use transaction from their mempool, but it doesn't matter if more than one miner tries to mine a block with the same transactions in it. Eventually one of the miners will find a valid block, and upon broadcasting it to the network, the other miners will simply update their own mempools to remove the now-confirmed transactions that were included in the last block (in the same way any other node will). Then the process starts all over again, with everyone racing to mine the next block, again using the unconfirmed transactions they have in their local mempools.


Bitcoin.conf not being read by Bitcoin Core

The answer was to simply move bitcoin.conf in the correct directory, as described here: Where is the data folder for Bitcoin-Qt?
Also, don't forget to set the correct file permissions as well; bitcoin.conf should be owner read-only!


unconfirmed transaction more than 1 month 17 days?

Your transaction does not contain commission.

The value of inputs equal to the output values.

May be that's why nobody confirm your TX for a long time.


How much money is being doled out in fees for every block right now?

There are some useful charts that show information about, amongst other things, fees per block.  Fees per block are currently trending downwards, but that is due to the additional hashing power coming on-line which means that blocks are being mined faster and so the average number of transactions (and hence fees) in an individual block is dropping.  Expect this to balance out sometime soon as the network takes account of the increased hashing power out there.

Right now, if you assume that transaction fees sit at around 0.25BTC per block you won't go far wrong.


Why connected node count have dropped since august 1st?

A common cause for a node's connection count going down and staying down for a while is IP address changes: It can take a while for knowledge of the new address to percolate in the network.

Otherwise, your prior high count could just have easily been caused by an attack or spy-peers that have since stopped.

It's a bit hard to say since the expected number of peers of a listening node depends on how many other peers are in the same /16.


Do I have to buy a full bitcoin to get the price increase?

If you have 0.1 BTC and the Bitcoin price is $10,000, it is worth $1000.
If the Bitcoin price becomes $20,000 you will still have 0.1 BTC but it will be worth $2000.


After a little research, it appears that the syntax is valid for Core (these lines), but Bitcoin Unlimited doesn't have that code.


Why are there barely rounded values on btc-e?

I suppose trading bots are the reason here. They calculate usually with big precision, so such orders are normal for them.
It is also possible that btce is doing some crosspairs (MtGox does it for sure):
Someone wants to sell 1 BTC for 800 EUR. Exchange insert this order also to USD market with the price 1100.123123 USD. Due to price USD/EUR the amount might look like this.

Finally, some exchanges can reverse pair, e.g. BTC/USD and USD/BTC. Then the price will look so strange.


Can I sell bitcoin worth five million dollars or more and how can I?

The first fifteen exchanges here are famous and credible. Choose one of them, open an account, verify your ID (KYC would certainly be required), add your IBAN number, deposit Bitcoin, sell it, withdraw it to your account.


Possible better peer-to-peer protocols for Bitcoin?

The network used today isn't actually the same as the original design, which did not have an inventory system at all, every transaction and every block was sent to every peer indiscriminately. Compact Blocks was also added to remove redundancy in block transmission and reduce latency, as blocks predominantly contain transactions which have already been forwarded around the network previously. Fee based filtering was added to allow nodes to request that peers to not send transactions which will be rejected regardless, which saves bandwidth.

The P2P protocol, while not ideal, is relatively functional in its current state. It is an unusual set of requirements (flooding, censorship resistance, sybil avoidance) which doesn't have much simularity to many other systems.


Attack vectors for difficulty retargeting with BCH and BTC?

Short answer: You can protect with money.

It is an economic problem. First, if the marketcap changes slowly, the difficulty can adopt. Now suppose the marketcap changes suddenly and miners behave rationally for the short term profit.

Since total_reward = block_reward + fee, a sufficient higher fee can attract miners. For example, if the marketcap on one side is double, then the compensation fee should be more than 12.5 BTC. This total fee may seem high, but it had actually happened. During the time lacking miners, there is 13.4 BTC in block #494045, and many other blocks with 11+ BTC. This is around $30 per transaction and people are willing to pay it! Hence, for the "protection", rich people can pay high fee, poor people can make donation transaction, and "irrational" miners can stay by losing profit.

Anyway, you cannot use the blockchain if you cannot pay a high fee. Note that the above strategy is true in both directions: A "protection" on one side is an "attack" on the other side. So the fee on both side may rise exponentially together.


Will the block reward continue halving beyond 1 satoshi if bitcoin precision goes beyond 8 decimal places?

The "8 decimals limit" is not that, but rather bitcoins are a human readable representation for 100,000,000 satoshi: The software natively computes in satoshi.

What happens under the hood is that the limit of satoshi that a miner may claim by creating a block halves. Obviously, only whole satoshi can be claimed, (as currently they are indivisible), so after block 6,930,000 when the reward limit drops from 1.164… satoshi to 0.582… satoshi per block, one cannot claim a whole satoshi anymore, as it would be greater than the limit.

If a new smallest unit of Bitcoin would have been introduced by then, we could continue to claim parts of a satoshi until the reward limit drops below that new unit.

In fact, we will be losing out on part of a satoshi in every block starting with block 2,310,001 when the reward drops from 9,765,625 satoshi to 4,882,812.5 satoshi in approximately 2049.


How do I set the transaction fee in Multibit?

The developers of Multibit have explicitly disabled such a feature to change the transaction fee, citing concerns that having little or very low transaction fees would result in the transaction taking too long to process (which is going to be unbearable for the average user only interested in sending and receiving money quickly).
From the GitHub issue originally submitted, the developer explains:

The reason for this is that whilst in theory it is possible to send BTC with zero fee in practice it is not. For the "regular user" (i.e. someone who just wants to use bitcoin and does not really know the details) their user experience is quite poor with zero fee tx. We have probably both experienced this with Instawallet (zero fees added) where you sometimes have to wait until the next morning before the miners decide to add your tx to a block.
It would create too much frustration to users (and too many support calls for me) to have zero fees.

Note: tx means a transaction.


What was the first transaction which resulted in the very first bitcoin being mined

It startet with the rewards of the first blocks. After the genesis-block, there were 50 bitcoins in total, after the second block, there were 100 bitcoins in total, 150 after the thrid block...

This is the first block and the only transaction is a coinbase transaction (reward to an address). https://blockchain.info/block/00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048

And the following blocks do all look like that (only the coinbase transaction in all those blocks) until Satoshi made the first transaction from one address to another address (in block #170)


You have pretty much answered your own question.
Yes, such a check would be possible, but it would have a cost (need a database lookup, at least). That cost isn't worth it, because the risk of actually finding an address that has been created by someone else before is so utterly mindbogglingly small - it just won't ever happen.
Furthermore, even if such a check would be done, it would have severe limitations:

Only full nodes (which have access to their own unspent coin list) could do it directly; other wallets would need to query another service, which is inherently a privacy risk.
Hardware wallets are obviously unable to do this at all, as by definition they cannot access the internet.
Even on full nodes, generally no by-address index exists of the unspent coins list; only a list optimized for access by created-by-txid. Since it's an unspent coins list, it cannot account for addresses that were used in the past but don't currently have any coins assigned to them.
Even ignoring all that, such a check can only account for addresses that have actually been used. There are probably far more addresses created (and thus someone already has the key for) than have ever been sent to.


How do I start a bitcoind server in deprecated mode for multiple functions

Set the two flags independently.

ie, -debug=bench -debug=net


Will we ever need smaller amounts of Bitcoin than a Satoshi?

TL;DR: If transaction volume explodes, Bitcoin is adopted for micro-payments, and the value of bitcoins increases sufficiently, we will need greater divisibility.

First of all, since there are 100,000,000 satoshi to a bitcoin, obviously one satoshi would be worth $0.01 if one bitcoin were valued at $1 million.

Beside the questionable math in tysat's answer, his answer is based on the assumption that there are no use-cases for payments smaller than a cent.

I don't believe that it is a valid assumption to make:
Next to there being other currencies with subunits of smaller value than $0.01, when one satoshi is worth $0.01, that would also be the smallest possible transaction fee one could attach! This would be prohibitively expensive for any micro-payment based business scheme, such as for example Bitcoin based content paywalls, direct internet traffic payments to ISPs, or other automated micro-payment driven schemes: Paying five cents to read an article, you'd have to add a 20% fee.

Now, such services could possibly move off-chain where further precision could be added, yet that would require users to have accounts for each of those services, and to tie up their resources unnecessarily, while reintroducing counter-party risk; essentially reverting a lot of the key selling points of Bitcoin!

Assuming that the Bitcoin protocol will develop to scale even beyond the transaction capacity of today's credit card systems as recently suggested by Gavin Andresen, it seems plausible that business ideas will appear to challenge even such transaction capacity. As those would though be prohibited by a minimal transaction fee of $0.01, we could see a push towards even smaller fees.

Should the above lead to a scenario where somebody finds uses for payments with a value of a tenth of a cent ($0.001), and transaction fees for that should be less than 10% of the payment's value, we'd need smaller subunits if one bitcoin becomes more valuable than $10,000. Since we already have breached $1,000 once, that doesn't sound impossible.

Update 2017-03-23: AFAIU, adding further divisibility to Bitcoin would require a hard fork, and therefore is not something that will simply manifest. If necessary, it would require a massive overhaul of all software currently used in the Bitcoin ecosphere. On the other hand, Lightning actually already implemented support for probabilistic sub-satoshi payments.

Update 2018-05-17: Lightning uses millisatoshi to account for channel balances, adding another three magnitudes of precision. Payouts on the blockchain are rounded as the precision there is only to the satoshi.


Create Multiple Output transactions with Bitcoin Core

If I understand your question correctly, you want to "spread" bitcoins in a single transaction over several addresses.
I think the question to multi-sig is misleading here, more sophisticated guys to prove me wrong :-).
The standard transaction in bitcoin would have one ore more inputs (from previous transactions), and one or two outputs (with adresses). The first output address is usually the target, where you want to send the satoshis, and the second output is "a return address". A return address in the sense, that you don't loose your funds as transaction fees. Usually this second address is one of your wallets many addresses, that were initially created for you.
Multisig has the goal to lock satoshis to a single adress, and requires 2 or more signatures, to be able to unlock (and thus transfer) the values (there are "n of m" combinations possible, here are further details: https://bitcoin.org/en/developer-guide#escrow-and-arbitration, and limits are discussed here: What are the limits of m and n in m-of-n multisig addresses?). Again, the output part of such a multisig transaction would work in a similiar fashion like the standard transaction. You can define one or two addresses in the same way as with standard transactions.
The last two questions are slightly missing the concept of transactions and blockchain:
1.) ... but what happen if I don't have any unspent transaction on the bitcoin server?
Basically you are not the owner of an "unspent transaction".
You would have a wallet, and in the wallet you would see satoshis. This is the abstraction  model. In reality satoshis are assigned from address to address with the help of a transaction. This means, you need to have an address, to which satoshis are linked, to be able to spend something. Usually this happens, because you bought bitcoins. Therefor you need to have a wallet, and this wallet creates some addresses for you. One of these addresses would be given to the seller, and he would create a transaction with your bitcon address as target address. This "fills" your wallet with an inital amount of satoshis.
How can I get a list of unspent transactions from blockchain?
Purpose is slightly unclear -  maybe it is linked to the previous question.
We usually say "Unspent Transaction Output" (UTXO). This is a value, that can be seen in any transaction, that transferred satoshis. In the example I gave before, the value that you see in your wallet. You can use this to create a new transaction. Details again in the developpers reference link.


What are some potential scenarios that a state actor can harm bitcoin if they control more than 51% of the hashing power?

There may be a lot of miners in China, but the People's Republic of China do not control the mining power.

A 51% attack on Bitcoin may be theoretically possible, but it is definitely not feasible. Andreas Antonopoulos addressed this question and answers it better than I could. Here's a video of this Q&A: https://youtu.be/yWTQgmCuiCw?t=8


Actually, I forgot to start cgminer with the user running X (being autologged in).

Doing

su user_running_the_x_session -c "/home/user/mine.sh"

worked perfectly.

BTW Art Shayderov, yes, cron is used for repeated jobs, like for example the one I am talking about here ;)


I found 10 different wallet.dat files on my computer. How can I tell which has money in it? Bitcoin-core-qt

You will need to have a fully synced bitcoin core on your computer and then load these files one by one. You may need to re-synchronize each time if you use pruning so I suggest to not do that.


Is there a guaranteed hash for every block?

There's no guarantee that you can solve a block just by adjusting the nonce.  But there are other things you can change in a block that also change the hash.

This question is pretty much an exact duplicate of your question.


Snapcard is a buying service that uses a bookmarklet to populate a shopping cart on Snapcard's site using product details from the e-commerce site you want to buy from.   Coindesk's writeup on the service gives more info.

[Edited: This comment originally was for BitSpend.net which is now defunct.]


Can the price of Bitcoin ever be stable to the USD?

No currencies are stable unless they have a central bank making it artificially stabile. When that is said, the stability will largely be depending on the size of the economy. I do not, however know exactly how to measure the size of the Bitcoin economy, but I assume it should be measured in terms of the total amount sent between people or companies over a period of time (which would be similar to the measurement of GDP).


The block explorer says the transaction has been confirmed by block 1173986 which was mined several days before you posted your question. This means you received the money but your wallet software doesn't show it to you.

Make sure your wallet is connected to the internet. If you use a client which downloads the entire blockchain, wait for that process to finish. If you use a client which doesn't download the entire blockchain, make sure you are connected to other nodes / a server (depending on the kind of wallet). Possibly change the server your wallet connects to.


RPCPORT and --rpcport not working in Latest version: 0.18.0

See the 0.18 release notes (https://bitcoin.org/en/release/v0.18.0#configuration-option-changes):

  The rpcallowip option can no longer be used to automatically listen on all network interfaces. Instead, the rpcbind parameter must be used to specify the IP addresses to listen on. Listening for RPC commands over a public network connection is insecure and should be disabled, so a warning is now printed if a user selects such a configuration.


Can you transfer NXT assets directly to another nxt account?

This is possible.

In default NRS client this can be done via [Asset Exchange] -> [My Assets] -> [Transfer].


If any of the steps fail, comment below, I'll try to help.

1) Follow the tutorial here to install Ubuntu for Windows

2) Set your Username and Password

3) Type

sudo apt-get update -qq

After commands that start with sudo, it'll ask for your password. You'll need to type it, but it won't be shown on screen for security. Press enter.

4) Type

sudo apt-get install python3-pip python3-dev build-essential python3-virtualenv virtualenv -yqq

5) Now, in Windows, visit https://github.com/greenaddress/garecovery and download it via "Clone or Download -> Zip" Move it to your desktop

6) Go back to the Linux terminal. Type cd with a space after it. Drag & Drop the unzipped folder. Now, press enter.

7) Type and enter

pip uninstall enum34
virtualenv venv
source venv/bin/activate
pip install --require-hashes -r tools/requirements.txt
pip install .

8) You can now continue the final step, which is located here


I have a full size a2 and it is a normal 120mm fan but you need to get one with high flow fans. I'm currently trying to find the best fans to keep me under 50 c but no be as loud as the original fans


How does a merchant ensure sufficient value in light of the price volatility?

There is no way for the merchant to ensure that he receives full value. This is the nature of digital currencies and why many merchants decide to not accept bitcoin as a payment; it is volatile. However, there is also the chance that the value will increase, thus netting a profit for the merchant. All in all, any merchant who accepts bitcoin not only is hoping for an increase in the price of bitcoin but is also looking to appeal to more customers.


Why are the fees for converting Ripple to Bitcoin so high?

This is most likely explained by the high fees on bitcoin. These services still have to move the bitcoin from one wallet to another and you have to pay a fortune at this time, about $6- $19.  You didn't do anything wrong this is something that will be fixed on the #bitcoin chain once #segwit and Lightning Network are highly adopted.


Paying only 6 satoshis/vbyte ($0.18 cents) per input in transaction fees?

All fee calculators rely on statistical modelling of the mempool. There is no assumption that future transaction producer behavior is identical to what was observed in the past, but it's the best data available to produce an estimate with.


First of all, most faucets (not all) have a minimum payout of 20000 satoshis. Check the minimum payout of the faucet you are using. Try updating to one of the latest versions of multibit from here. Generate a new address and try again, it should work. Maybe because of the forks in the network the old address may not be valid.


Note: The accounts feature is being deprecated from the codebase. Accounts are groupings of addresses, constructed by the wallet software.

You may find that the listunspent or listreceivedbyaddress commands are more useful for you.

  I wanted to know what is the "" and 0.81234545 and where my real addresses

"" is the default name of an account

0.81234545 is the balance of your wallet, in BTC.


Yes, importwallet exists.

Coverting a wallet from Electrum to Bitcoin Core is very hard, as both pieces of software have a very different idea of what a wallet is. Electrum relies on servers that provide indexed blockchain information to discover transactions, so its wallet does not store much information. Bitcoin Core needs all your transactions and keys actually available in the wallet so that it can operate independently.


Can I know if a bitcoin private/public key or address was derived from another key in an HD wallet by its structure?

Individual address private keys begin with 5,L or K. What you're calling root private keys are actually called extended private keys and they begin with ?prv where ? is either x,z,y,Y,Z. You can see examples of those here. So that's how you tell the difference.


How much would it cost for a government to undermine Bitcoins?

As I suggested in my Bitcoin master thesis, a 51% attack would cost in a bulk part of about 7 million dollars to execute. The figure will change depending on the technology used, the current difficulty and so forth. This option would make Bitcoin or any other Bitcoin-like currency useless.

However, if the USA goverment was to crack down on Bitcoin as a terrorist activity, it could detain any Bitcoin developer in the country indefinitely, which would probably be cheaper. This option would most likely generate a lot of backlash from the community, and could encourage other programmers to take over the project.


Transferring bitcoins out of an old multibit wallet

Pywallet I believe can sort all your problems out. Will let u import the wallet addresses and should let u send the btc again to invalidate the original transaction.

You can either export the private keys from the old Mac wallet and import them into a new wallet. Note once u have exported the private keys u should consider the address compromised and not leave any btc in it


How does a mining pool coordinate with different Javascript clients?

The web site doing this don't need to be considered malicious, the visitor could willing agree to do the mining in order to help it. Said that,

Yes, they need to, to know the hash of the merkle tree of the block the pool is trying to mine. Otherwise they would have to download the blockchain in the browser themselves, and that would take hours or days. They also should somehow receive transactions to include in their blocks. Javascript running on a webpage can't typically comunicate with a cryptocurrency node directly, only via http requests to the same page domain.
Yes, they also need to, otherwise they would be wasting CPU time doing the same work. For example, visitor A could receive instructions to compute hashes for a block X with nounces ranging from 0 to 15999, visitor B with nounces from 16000 to 31999 and so on.


Bitcoin transaction with 0.0001 BTC fee not getting confirmed?

There is a time limit for transmission by most clients. I think Bitcoin-qt used 3 days. After that you can spend it again


The nlocktime parameter in createrawtransaction seems not work using Bitcoin Core Wallet GUI

You're putting the locktime in the wrong place. You have

"[{\"txid\":\"myid\",\"vout\":0}]" "{\"address\":0.01, \"address\":0.01} 20"

but it should really be

"[{\"txid\":\"myid\",\"vout\":0}]" "{\"address\":0.01, \"address\":0.01}" 20

The locktime is a separate parameter, not part of the quoted parameter that has the transaction outputs. It goes outside of those quotes.


Each private key can send the transaction fully, similar to having a joint account, the other party can cash out the account at any time and so can you.


What Income Could I Expect as an OTC BitCoin Trader

After the withdrawal of Mt. Gox and Intersango from having a domestic bank transfer method for those in the UK, there has been a widening need for local trading.

There are two exchanges that sell bitcoins and take Barclay's Pingit for payment, Blockchain.info/wallet and a new one, BitcoinFridge.co.uk, so any local trader is competing with those methods.

But for face-to-face cash trading, that is just like any retail operation where the key to success is location, location, location.

If you look on LocalBitcoins for London, there are a couple traders showing a history of completing hundreds of transactions, and the vast majority of the remaining traders with just a handful of completed trades.  Without knowing the timeframe for that and average purchase amount it is tough to compute earnings (profit).  It appears that there isn't much more liquidity above a 7% deviation from the market price, so that will be a limiting factor.

But there is an increasing level of local trading occurring, and buyers gravitate towards sellers who are established.  So starting sooner rather than later gets to that "established" level before the latecomers.

Also, there may be an opportunity to serve as a broker to other traders.  For instance, casual traders may have orders too big to accommodate themselves, but could fill the order with an affordable local source of bitcoins that are sold in larger amounts for maybe just a few percent premium over spot.  That's possibly where the biggest opportunity lies (albeit it would also be where the largest capital requirement, for inventory, is necessary as well.)


It's the same wallet, data?

This depends on your configuration like -datadir. This can be specified by command line, or something like a registry key value (when you are using Microsoft Windows).
Note that recent versions of Bitcoin Core supports loading multiple wallet at same time.

TL:DR: is the RPC 8332 port active when using the GUI, Vs the Daemon?

Yes, of course both bitcoin-qt and bitcoind supports JSON-RPC.
Edit: My apologies. For bitcoin-qt GUI, to enable JSON-RPC you must specify -server=1 in command line options, or edit bitcoin.conf to add server=1 to it. For command-line bitcoind, JSON-RPC is enabled by default. Thanks for Pieter Wuille for pointing this out.


Why is the block size is not filled with transactions?

Miners pick transactions from the mempool which is the queue of unconfirmed transactions. When there are fewer transactions waiting than would fit into a block, the block will not be full. The miner could create more transactions themselves, but that would be only useful if they wanted to send one themselves already in the first place, otherwise they'd just be paying themselves to include useless data.

So, why are so few transactions waiting to be confirmed sometimes? The traffic in the Bitcoin network appears to have both a daily and a weekly cycle. It tends to start picking up when Europe's business day starts, and slows down a bit when the US West Coast goes home from work. Weekends tend to have less traffic altogether. Of course that is overlaid by greater trends in Bitcoin, so demand will surge during price rallies for example.

Mempool Visualization of last seven days via jochen-hoenicke.de

Additionally, the block production is probabilistic. Blocks come in random intervals roughly ten minutes in average, but that'll mean that sometimes there may be three blocks in one minute and the queue gets flushed, or no block for an hour and the queue builds.

UTXO Set Size over past year via statoshi.info

In the end, network participants should ensure that the queue doesn't flush completely. When there is little demand for blockspace, users could be consolidating their tiny pieces of Bitcoin: the unspent transaction output set grew from 50M to 64M in the past year. In a perfect world, we'd always have a backlog of consolidation transactions that we could chew through when no other transactions are waiting.


Conditional based Crypto based on Smart Contracts

No, you can't.

There is no secret information anywhere in a blockchain. It is exactly the log of all information the public has to verify correctness of the system.


How to tell if a file is a Bitcoin wallet?


How can Bitcoin be adopted as tradeable currency pairs on Forex?

Well, the Bitcoin exchanges are a form of a forex clearing house. At the moment, however, Bitcoin is not really ready to be traded alongside all world's currencies at some more major exchanges - the big players could sway its value up and down at a whim with a fraction of what money they have. Before that happens Bitcoin still needs to grow and become more noticeable. However, there isn't much stopping someone from incorporating Bitcoin into a new forex.


How does one claim ownership of an NXT address?

The first out-going transaction for an address claims the address. To make such a transaction, you need to know a private key for the address. The first transaction causes the corresponding public key to be stored against the address in the block-chain, and then subsequent transactions are only accepted if they have the same public (and hence private) key.

The addresses are 64-bit, which would probably take a few years to crack by brute force. The public and private keys are 256-bit.


Is Wallet softwares safe? then how verify?

Is there any software or organization that can verify whether wallet is secure or not?

You can use an open source wallet and take the time to read and understand all the code and then compile it yourself. This would be an unfeasably large task for most ordinary people. Software developers might find it a bit easier but it is still a large amount of work.
You can use a network sniffer to discover where a standalone wallet on a device you own is sending data.
You could pay a well-known independent security consultant to perform the above analysis or more likely, arrange for an employee or associate to do this. Someone of the stature of Schneier for example. This would be very expensive.

You can avoid the need for this by storing your private keys, and generating transactions, on a computer that is not connected to any network. Then carefully move the raw transaction data to a connected machine for transmission. For example use a new clean USB stick for each transaction. The connected machine has no access to your private keys and therefore cannot surreptitiously divulge them. Some software wallets support this (Armory?) and some hardware wallets are used in this manner (Trezor, Ledger).


Difference between bitcoin and testnet, really

Testnet bitcoins are less widely used in commerce than mainnet, and are not perceived as intended to be a currency.
Yes, you're unlikely to fetch a significant price though.
The transaction will not be recognized as a valid transaction. It would essentially be an irrelevant jumble. In fact the client wouldn't allow you to send anything because the address won't match the format of the respective network.


Is this how I should calculate a Double SHA256

Yes you should convert your first output before feeding it back in: A hash function is typically a function which takes in an array of bytes (of arbitrary size) and spits out an array of bytes (of fixed size). When making the first call first = sha256('myfirstSHA'), it is likely that the string argument is implicitly converted to an array of bytes, whereby each character is substituted by a single byte encoding. However, the string output you are getting (which is a string, not an array of bytes), clearly represents a hex encoding of a 32 bytes array. You need to convert this hex encoding into a 32 bytes array. If you have a Linux terminal, as indicated by this post, a very useful command is xxd -r -p which converts your hex encoding into actual bytes:

$ echo -n myfirstSHA | sha256sum
9b2b95b24dd9149480ebda21aafe3f1a3c0370798ceec3c4d09c6a16adfe01c8 -
$ echo -n myfirstSHA | sha256sum | xxd -r -p | sha256sum
96082208e341446bb8ba032486d142cbe73f1a66276b96c18ff815f31293fe0d -

If you are worried about the trailing '-' which appears in the output of sha256sum, you can cut it out:

$ echo -n myfirstSHA | sha256sum | cut -d' ' -f1
9b2b95b24dd9149480ebda21aafe3f1a3c0370798ceec3c4d09c6a16adfe01c8

and then proceed as before:

$ echo -n myfirstSHA | sha256sum | cut -d' ' -f1 | xxd -r -p | sha256sum
96082208e341446bb8ba032486d142cbe73f1a66276b96c18ff815f31293fe0d  -

In case you do not trust that xxd -r -p does the right thing, you can store the output in a file:

$ echo -n myfirstSHA | sha256sum | xxd -r -p > temp

then use hexdump -C temp or indeed xxd temp to check the content of the binary file:

00000000  9b 2b 95 b2 4d d9 14 94  80 eb da 21 aa fe 3f 1a  |.+..M......!..?.|
00000010  3c 03 70 79 8c ee c3 c4  d0 9c 6a 16 ad fe 01 c8  |<.py......j.....|
00000020


Transaction Hash Chain Signature: What Is Getting Signed?

Question: Let's assume that the three transactions depicted are #1, #2, and #3 from left to right.
Is the Signature for Transaction #2 computed using Owner 1's Private Key and the Transaction data for Transaction #1 or is it computed using Owner 1's Private Key and the Transaction data for Transaction #2?

The Signature for Transaction #2 is computed using Owner 1's Private Key and the Transaction data for Transaction #2.


There are two ways to create signatures for transactions. One uses a High S Value and the other a Low S Value.  Since the signature can be malleated by third parties (also see transaction-malleability) to switch the High S to Low S and vice versa, and that changes the transaction id, High S Values have been deprecated for several versions.

You could either malleate the transaction's signature to Low S and republish it, or you could just import the wallet.dat into the new Bitcoin-Qt that you're trying to send the funds to anyway.

Be sure to create a backup of the new wallet.dat before you import the old.


Some people pre-ordered Largecoin units, but they never took deposits from anyone.


You're correct that Gavin has all three private keys available to him at the start, but you're missing that he only uses the public keys to create the P2SH multisig address.  Specifically, this line from the example is listing only public keys,

./bitcoind createmultisig 2 '["0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86","04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec6874","048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d46213"]'

The createmultisig RPC will let you mix addresses (corresponding to private keys you have in local storage) and public keys (for cases where you don't have the private keys---like when creating a multisig address with your friends).

There's a step-by-step create-and-spend multisig example on the Bitcoin.org Developer Examples page  (you probably want to start by reading the immediately previous examples, as they build up to P2SH multisig).


how can I track the transaction or the newest block on my computer.

You can run a full-node Bitcoin client such as Bitcoin core. It will collect the full blockchain - it can take a long time (weeks) to download the full blockchain, but you should be able to examine early blocks and transactions without waiting.

In the case of Bitcoin Core, you can use the API to examine blocks (GetBlock etc) and transactions (GetTransaction etc).

  is there any way I can type something on my terminal of the PC and shows the data on it?

For example

./bitcoin-cli getblockcount

./bitcoin-cli -testnet getblockhash 240886

./bitcoin-cli getblock 00000000000000000d2347b601158f40c741dbd9353918903f057cedd82f49de 2


Why will a miner verify the digital signature, instead of directly adding a transaction to the Merkle tree?

If a miner would do so, and the transaction they include is invalid, they would produce a block with invalid transactions in them. As all full nodes on the network (not just miners) verify all transactions in blocks, they would reject this block, and the miner would lose their reward.

By extension, other miners will avoid building on top of such a block, as they too do not want to lose their reward.


How to develop and then sell my own Bitcoin Hardware Wallet?

There's not a lot from a electrical engineering perspective inside a hardware like the Trezor. It's a small microcontroller, a very cheap OLED screen, some miscellaneous buttons and connectors. The entire bill of materials is likely under $10 USD for per unit.

The difficulty comes from the software and integrity perspective. You've got to ensure that the software doesn't lose other people's money, that it protects in the ways it intends to, and resists tampering. The hardware should be able to be produced with some confidence that the software written to the devices is secure, that nobody can replace them in transit with identical, but malicious devices. You've got to be sure nobody engineering the devices has their own backdoors to steal money from the device, that there's not ghost runs being made by a producer.

If there's a large theft relating to hardware you've produced, you'll be the one immediately blamed as responsible for backdooring them, so this is an existential threat for the producer if they get it wrong. Are you willing to take this personal risk? Most people would not agree the benefits outweigh the costs, if producing secure hardware seems like a easy idea you've probably not considered all the modes of failure.