What other whitepapers are there for coin distribution models like POW (proof of work) and POS (proof of stake)?

I don't know of any such list yet, but no reason we can't start making one. :) Others should feel free to add their findings via an edit.

Proof of Work
Proof of Stake
Proof of Activity
Proof of Storage
Proof of Knowledge
Proof of Stake Velocity
Proof of Burn
Dual Purpose Proof of Work (Primecoin)
Proof of Lock (Tendermint)
Delegated Proof of Stake (Bitshares)
Stellar Consensus Protocol (Stellar)
Xoken Consensus Protocol (Xoken)


Help! I Synced an empty JAXX wallet over one that had funds in it

Without the 12 word phrase, there is no way to recover your coins. So you must do everything you can to try to recover those 12 words.

It sounds like your new phone created a new wallet upon startup, so the 12 word phrase will not be recoverable from there: you'll need to work with your old phone.

If the old wallet file is still on your old phone, then its no problem. Just open up the settings, and copy the phrase from there.

If the old wallet file was overwritten on your old phone, then you'll want to explore options to 'revert to a previous state', if you have a cloud backup service enabled this may be possible. If no option exists like this, you could explore professional data recovery options, but these will likely be expensive.

Best of luck


How do I access information on blockexplorer.com or blockchain.info without issuing requests to those websites?

bitcoind doesn't give you a way to query this, but by looking at the files it writes to disk, we can build our own tools that let us look at this. One such tool is Abe, and this is how you use it:

Installation (Ubuntu)

I'm assuming you have the standard bitcoin client running already.

Download Abe. Unpack it, and run python setup.py install

Go into abe.conf and add these lines:

# SQLite3 example:
dbtype = sqlite3
connect-args = abe.sqlite
# Specify port and/or host to serve HTTP instead of FastCGI:
port 2750
host localhost

A note about firstbits

If you want to do firstbits lookups, you need to add one more line to the config.

use-firstbits

Note that you need to do this before you run abe, or else you'll need to run Abe.reconfigure too.

Back to the normal installation

Run python -m Abe.abe --config /path/to/abe.conf

You should see the screen get spammed with

block_tx 38944 39254
commit

At time of writing, this will need to count up to 220,000. This took me about 8 hours. After the first startup, it will load in about a second.

Try opening http://localhost:2750/. If it shows no data, then there was an error. The output that the abe command produced immediately before saying that it was listening should give you some sort of insight.

Now your application can issue http requests to find out about the blockchain! There is a link to some documentation (http://localhost:2750/q), but you'll mostly be interested in

getreceivedbyaddress (http://localhost:2750/chain/Bitcoin/q/getreceivedbyaddress/ADDRESS)
getsentbyaddress (http://localhost:2750/chain/Bitcoin/q/getsentbyaddress/ADDRESS)
fb (http://localhost:2750/q/fb/ADDRESS)


Multibit HD: how much fee for cheap way to transfer bitcoin to other wallet?

https://bitcoinfees.21.co can give you an estimate of transaction fees based on the current network activity. It's recommended rate at the moment is 0.0026 BTC/kB to have a good chance of being included in the next block, but this changes often. Lower fees will take longer to confirm typically, but it's hard to be sure how long. At the rate multibit suggests, the website estimates it will take 4-28 blocks to be included, it estimates it could take up to 6 hours in the worst case.


How Master seed is generated using Bitcore API?

In case you are talking about mnemonic seed use this -

Install bitcore-mnemonic

npm install bitcore-mnemonic
bower install bitcore-mnemonic

Then use it to generate mnemonic seed -

var Mnemonic = require('bitcore-mnemonic');
var code = new Mnemonic(Mnemonic.Words.ENGLISH);
code.toString();
// army van defense carry jealous true garbage claim echo media make crunch...

var xpriv = code.toHDPrivateKey();

If you just want to generate a private from bitcore api you can use this function -

var bitcore = require('bitcore');
var HDPrivateKey = bitcore.HDPrivateKey;

Please note there is no rule to generate a private key. A private key is just a random string. It could even be your name or a whole article. But you must create a private key that is 'random' in nature. Also never use programming language functions like md5 hash or something to generate a private key because they are not truly random.

Bitcore api, however, provides an easy way to generate a private key using the above method. From there you can proceed as usual.

var bitcore = require('bitcore');
var HDPrivateKey = bitcore.HDPrivateKey;

var hdPrivateKey = new HDPrivateKey();
var retrieved = new HDPrivateKey('xpriv...');
var derived = hdPrivateKey.derive("m/0'");
var derivedByNumber = hdPrivateKey.derive(1).derive(2, true);
var derivedByArgument = hdPrivateKey.derive("m/1/2'");
assert(derivedByNumber.xprivkey === derivedByArgument.xprivkey);

var address = derived.privateKey.toAddress();

// obtain HDPublicKey
var hdPublicKey = hdPrivateKey.hdPublicKey;


Why might MultiBit not show a transaction that was sent to me?

You can ask the vendor for the transaction id of the transaction where they sent the bitcoin to you. Look it up on https://blockchain.info to check it exists and is sending bitcoin to your receiving address correctly. Look at the date of the transaction. Go into MultiBit, select your wallet and choose the menu option 'Tools | Reset blockchain and transactions'. Reset from the day before the transaction. Once it has resynced to the network you should see it in MultiBit.


DDoS on big mining pools: a quick way to 51%?

There's no cooperation involved in mining, and they won't be trying the same hashes because (for example) they have different transaction pools and (possibly) different destination addresses. Mining pooling is just like non-pooled mining, except that the revenue is spread over time instead of getting blocks of 25BTC.

Even when the pooled miners have a backup set that sends them to the largest pool (BTC Guild), that's acceptable for short periods of time. But miners are still people, and if something like that happens they'll quickly correct the issue.


Bitcoin Cash - Trying to implement Explorer in Linux server but getting error

Can you please try replacing bch-node.json file with this:

{
  "network": "testnet",
  "port": 3007,
  "services": [
    "@owstack/bch-explorer-api",
    "bitcoind",
    "web"
  ],
  "servicesConfig": {
    "bitcoind": {
      "spawn": {
        "datadir": "./data",
        "exec": "/usr/local/lib/node_modules/@owstack/bch-node/bin/bitcoind"
      }
    },
    "explorer-api": {
       "rateLimiterOptions": {
         "whitelist": ["::ffff:127.0.0.1"]
       }
    },
    "fee": {
      "rpc": {
        "user": "bitcoin",
        "pass": "local321",
        "host": "127.0.0.1",
        "protocol": "http",
        "port": 18332
      }
    }
  }
}

Because Bitcore won't be able to connect to your node without knowing your RPC username and password.


Generally, this is not possible.

Since all transactions are public, one could imagine a registry of sorts where a person could report a particular transaction as unauthorized.  You could then consider any coins traceable back to that transaction to be "tainted".  However, there are several problems:

There would be no way to verify the truth of a claim that a transaction was unauthorized.  Even if you required a signature to confirm that the claimant held the private key for the address from which the coins were "stolen", the claimant could have made the transaction intentionally and then reported it unauthorized to defraud the payee.
A Bitcoin thief would likely immediately send the stolen coins to a mixing service to disguise their origin.  Then every other innocent party who used the mixing service around the same time would also have their coins tainted.
There's no way of checking coins that you are "about to receive".  You have no information about the source of coins until the transaction is made.  At this point the coins belong to you.  What are you going to do?  Give them back?


Setting up and running CGMiner on a Raspberry Pi for a Jalapeño

I recommend using bfgminer, and so does Butterfly Labs.  Well, I guess they say cgminer will work, too :P.

The 4.10/4.3 branch, as well as the latest/master branch, work especially well with the Jalapeños and the Monarchs.

Build Instructions

sudo apt-get install build-essential autoconf automake libtool pkg-config libcurl4-gnutls-dev   libjansson-dev uthash-dev libncursesw5-dev libudev-dev libusb-1.0-0-dev libevent-dev libmicrohttpd-dev hidapi
git clone https://github.com/luke-jr/bfgminer && cd bfgminer
./autogen.sh
./configure
make
make install

Notes

Once you've gotten it to build and work successfully, take a look at the ./configure options and remove any unnecessary drivers/options for efficiency :D


When a transaction will reject if the fee was to low?

The minimum fee for relaying a transaction through the peer to peer network depends on the peer policy. It's up to the node (peer) operators to set the minimum relay fee.

Since Bitcoin Core uses a maximum mempool limit (before it was unlimited), this minimal relay fee will auto-adjust.

It's difficult to say feerate (fee per byte) x is the minimum fee required fee for the network.

And, later, you want that your transaction get mined, which is different from transaction propagation through the network.

This depends on the miners. They have full control if they include your transactions into a block or not.

If we assume, they act rational following financial incentives, then the higher your fee is, the more likely is, that it will be included.

It also highly depends on what other transactions in the mempool uses what ferrates.

EDIT:

deleting transactions as a user action is impossible, though you can assume, that over time, the transaction will vanish from the mempool(s) due to size limitations.
Best thing you can do is use RBF BIP125 (replace by fee) to ensure you have the capabilities to later replace the transaction with a new transaction paying higher fees.
In case your old (stuck) transactions hasn't signalled BIP125 RBF, then child pays for parent may help (CPFP, maybe google it). The concept there is that you use the change output of the stuck transactions as an input for a new transaction and use "relatively high fee" (pay for the missing fee and the new transaction). Therefore a miner likes to include that transaction (because of the fee incentives), but, needs also to pick the older (stuck) transaction.


Assuming the miner as an up-to-date version of the blockchain, he can compute the difficulty from the data about the previous blocks. An explanation of how the difficulty is computed can be found in this other answer.

Given a specific chain, indeed, the computation of the difficulty always gives the same result. Every miner may compute this new difficulty by himself and the result will be the same since the computation is based on the 2016 blocks slot. There is no need to know the hashrate of the network, it is enough to know how much time it was needed to generate the 2016 blocks by looking at their timestamps.

Additionally, block headers also encode the target threshold through the nBits field. The reason can be found in this answer.

PS: In order for a block to be considered valid, its timestamp must also be valid, that is, it must be:

  greater than the median timestamp of previous 11 blocks, and less than
  the network-adjusted time + 2 hours.

So the effects of the "attack" are very constrained.


I realize that the whole "Accounts" feature is being deprecated, but there is no getaddressesbylabel.

It looks like there actually will be a getaddressesbylabel API call in a future version. Along with a handful of other methods that replace the accounts feature. Check out this PR.

  what does DEPRECATED means for future versions? will the parameter be ignored or removed or will the whole getaddressesbyaccount be removed?

When a feature is deprecated it will usually stick around for a while reporting that it will be removed in future versions of the software.


You probably want to run multiple bitcoind instances in regtest to simulate multiple nodes.
Thats pretty easy. You can run a second instance by starting bitcoind with a clean data directory and a different RPC and P2P port.

For that, you could create a 2nd data directory (example: /tmp/datadir2). Create /tmp/datadir2/bitcoin.conf.

Use something similar than:

regtest=1
rpcuser=rt
rpcuser=rt
port=12340
rpcport=10340
discover=0

Now you need to connect your first node with your 2nd node by sending a addnode over the RPC interface.

bitcoin-cli addnode 127.0.0.1:10340 onetry

You can than distinct between both nodes with the -datadir argument while calling bitcoin-cli.

bitcoin-cli -datadir=/tmp/datadir2/ getinfo

Some examples:

generate coins in first node (50 BTC available)

bitcoin-cli generate 101

get address from 2nd node

bitcoin-cli -datadir=/tmp/datadir2/ getnewaddress

send coins to 2nd node

bitcoin-cli sendtoaddress <address> 10.0


Volatility is higher in Bitcoin right now. But ETH rose recently as well. It depends on how you define better for your purposes and how the markets will behave which is always difficult to predict.


Where does bitcoin-qt try to connect to when running for the first time?

It only needs one node to connect to to discover the network. After that it has a cache of several thousand other nodes that were once on the network, and most of those will still be.

On initial startup that is not available yet though, so the reference client will try to either find it in the configuration file (seed), try to find it via DNS, or even IRC if configured to do that.


Which bitcoin miner ASIC can use without leave power on computer?

The computer has to be on while you are mining.  As part of the way mining works, you need block headers as your input data.  For solo mining, these block headers are computed from transactions and other blocks coming from other peers on the network, and you need to update that data frequently.  (If another miner finds a block and you don't update your header to link to it, any block you find after that will be orphaned and likely rejected, making your mining a waste of time and energy.)  For pooled mining, you need updates for similar reasons, except that the updated headers come from the pool operator.

For most such devices, collecting this data from the Internet is handled by the host computer, so it has to be on and running the whole time.

It is possible to use a small low-power computer for the host.  One popular choice is the Raspberry Pi.


What is the refresh interval of MtGox ticker API?

if you want fast http ticker use the new fast_ticker :
http://www.reddit.com/r/Bitcoin/comments/1c9npl/mtgox_fast_ticker_last_only_no_rate_limit_1second/

http://data.mtgox.com/api/2/BTCUSD/money/ticker_fast

and you will get 1 second only cached minimalist ticker ( last )

if you need more ( low, high, volume ) you have the normal ticker, most probably cached 30 seconds :

http://data.mtgox.com/api/1/BTCUSD/ticker

the new data.mtgox.com is behind cloudflare now and the only ratelimits you will hit will now be cloudflare anti dos limits

old api urls not using data.mtgox are now deprecated and not guaranteed to work


Chainstate LevelDB corruption after reading from the database

Plyvel has Snappy compression enabled by default. Have you tried disabling it when opening the database?

# Open the LevelDB
db = plyvel.DB(".bitcoin/chainstate", compression=None)

With this code my bitcoind does not seem to complain after having opened the database with python.


Is it possible to store data privately into the bitcoin blockchain?

You can encrypt your data before you store it. However anyone would have access to the encrypted data and, if the encryption is broken (either now or in the future), the encrypted data will be revealed.


"Inspect the TREZORs memory with an electron microscope" documentation bug?

If you follow the change recovery seed link in that quote, you will see that the instructions include sending the bitcoins from the old account to a new account.

The authors are saying that upon discovering a device is stolen, the user should transfer the coins away from the compromised addresses to a new, uncompromised account.

  Isn't the effective private key saved on the device?

No, the seed is stored on the device, and the keys are derived from that. But the effect is the same, if you have the seed, you can derive the keys. The document doesn't mean that the seed on the stolen device was changed. It means that the user made a new seed on a separate device, and transferred their coins to that.


Both Trezor and Ledger support BIP 39 so yes they should be compatible.

Having the same keys on both just increases the risk because only one needs to be compromised to steal the coins, but it's not a big risk imo.


This repo https://github.com/Rav3nPL/p2pool-rav

contains an updated version of p2pool that i know working with dogecoin network


Which exchanges offer stop-loss functionality?

BTX Trader will let you create stop-loss orders on top of your account on Bitstamp, BTC-E, Mt. Gox, BTC China and CampBX.

It's not same as an exchange-hosted stop-loss order but a close second.

Disclosure: I'm one of the founders of BTX Trader.


Trustworthy url address for bitcoin download?

http://bitcoin.org/en/download is the official download page for bitcoin-qt, it is the oldest client, the most trustworthy and it is the client I would recommend for a beginner.

The same client can also be downloaded from the Bitcoin Core website, here: https://bitcoincore.org/en/download/


Script to periodically update assumevalid block in bitcoin core configuration, good idea?

So sure enough Bitcoin Core seems to start faster after doing that.
Is it a good idea? Or more specifically, what could go wrong?

It must be the placebo effect that you are experiencing because assumevalid has no effect on this when the default values for the consistency checks are used (changed with parameters -checklevel and -checkblocks)
There isn't anything that could go wrong, but it also isn't actually doing anything. There are two reasons for this: the default depth to check for is 6 blocks and the default check level is 3 which means that the part that uses assumevalid is not even run.
Now if you increased the check depth to be more than 400 blocks and the check level to be 4, then yes, you should see a difference. But with the default parameters, it won't make a different.
Setting assumevalid is really only useful for the initial sync and for when you are catching up from being a few weeks behind. But that all happens once the software has fully started, not during the initialization phase which you are asking about.


How can I transfer bitcoins from a MultiBit wallet to another computer?

MultiBit developer here. The version numbers you're supplying are not related to MultiBit. We currently have version 0.2.0 for MultiBit HD and 0.5.19 for MultiBit Classic. There has never been a 0.12 or 0.15 version. Are you sure that you have the correct wallet application?

That aside, if you need to empty your wallet in MultiBit Classic, you simply need to use File | Open to locate your wallet file, and then use the Send tab to transfer those bitcoins to another address. That address is provided by whichever wallet you'd like to use instead.

Do not delete your old private keys in case someone sends you bitcoin to an old address

Here's a help article that gives more details: https://multibit.org/en/help/v0.5/help_sendingBitcoin.html


Mycelium - more than one unused Bitcoin HD account

You can have multiple addresses on one account.
Accounts are not a feature of the Bitcoin protocol, they are a feature created by some wallets to help you organise your money.


When downloading the blockchain my application is become unusable, is there an issue with my code or am I using the BitcoinJ library incorrectly?

The downloadBlockChain() method looks like it downloads the whole blockchain. It looks like the PeerGroup.setFastCatchupTime method might be helpful to prevent it from downloading full blocks before that time. I imagine you'll use a method or change a boolean value to only download block headers for your SPV wallet, but I don't know where that would be.

https://bitcoinj.github.io/speeding-up-chain-sync may be a useful reference.


how do i backup private keys of user address which are generated by getnewaddress?

The addresses that you get from getnewaddress are part of your wallet. To back them up, use the backupwallet RPC command. This will create a copy of your wallet file at the location that you specify.

Bitcoin Core by default has a keypool of 1000 keys. However because Bitcoin Core uses BIP 32 Hierarchical Deterministic wallets, one backup is sufficient for you to be able to generate all of the private keys your wallet will ever have.

Although you will have access to all private keys, it is still recommended  that you backup regularly in order to preserve transactional data and other metadata stored in the wallet, as well as have all of the keys and not need to regenerate them upon restore (restoring may not necessarily get all of the transactions associated with keys that were not in the keypool at the time of backup). Thus you should backup the wallet every 1000 keys so that the latest unused keypool is always part of your most recent backup.

Also, if your wallet is encrypted (it should be), then you will need to unlock your wallet every 1000 keys so that the keypool can be refilled. You can do that with the walletpassphrase RPC command.


How to use block and transaction hashes for generating simple stochastic chances?

Here's the way SatoshiDICE does it:
SatoshiDICE has "secret keys" for each day which they pre generated for the next 10 years. They published the hashes of those keys so you can verify they didn't change them. When a transaction comes in, they hash the transaction hash and the secret key for that day, then take the first two bytes of that. Then, a few days later, they publish the secret keys.


Does the ZeroCoin protocol fulfill its promise of anonymity?

This is the zerocoin paper, but as far as I can tell, they haven't released source code yet, so all we can really do is speculate.

The single largest problem it has is that a zerocoin spend requires about 100x more disk space/bandwidth/cpu than a normal bitcoin transaction. However, the intended use case is that you use normal bitcoin transactions most of the time, then run through zerocoin when you want more anonymity.

Second, because all zerocoins are indistinguishable, they must either

all be the same denomination, which sucks for people making very large transactions and for people making very small transactions, or
Have a handful of predefined denominations, like 1-zerocoins, 10-zerocoins, etc. The problem with this is that it reduces your anonymity set.

As far as security/anonymity goes, I believe that they have a workable system unless there's some problem with their zero-knowledge proof, which I've repeated below.


Your current account is low. You must keep a minimum of 250 XRP to use all the features of Ripple.

That is a warning shown whenever your XRP balance is less than twice the current reserve requirements. The number in the warning will also change as you add/remove trust/credit lines or add/fill/cancel trade offers.

The amount of XRP required to in reserves are listed on the Ripple wiki. Basically, the 250 you see is 200 for your account plus 50 for your trust/credit line to Bitstamp (that you added to get Bitstamp-BTC into your Ripple account).

To make a trade offer requires an additional 50 XRP (which is just a reserve, it becomes un-reserved when the offer is filled or cancelled). Since you had only 299.9999 XRP (not 299 as you said) Ripple was unable to create a new trade offer as the new reserve limit would have been 300. Yes, the error message is not as clear as it should be.

Whoever sent you your initial 300 XRP really should have sent 300.1 or 350.1 (or more). Although it is possible to get more XRP from BTC on a new Ripple account with only 250.0001 XRP, it's requires careful management of the limited XRP that shouldn't be expected of a new user. It's really best to start a new account with at least 350.1 or more XRP.


It is the same thing as a vanity plate which are used for cars. That is: An address which you choose yourself (or at least part of it). For example the address of Bitcoin24 is 1BTC24yVKQdQNAa4vX71xLUC5A8Za7Rr71 (watch the first six characters!).

See this question How can I generate a vanity Bitcoin address?


Coin only. No colors, no assets.

Yes, the bitcoin baselayer facilitates payments. You will find however, that Bitcoin on-chain payments are not cost efficient for micropayments as fees would eat large portions of the received funds.

Receive coin using P2PK and / or P2PKH only?

There is no address standard for P2PK, so receiving to P2PK is not trivial at all. You could use P2PKH, but it is more than twice as expensive as more modern address formats. I would suggest to go with P2WPKH instead.

For sending I can always stay with P2PK or P2PKH is that correct?

Yes, inputs must satisfy the locking script the output used which is defined by the address the receiver chose. If you receive funds to a P2PKH address, you have to spend them as a P2PKH input. I'd say receiving is easier, since it only requires deriving a new private key and the corresponding address, then polling whether the address got paid. Sending on the other hand requires you to estimate an appropriate feerate, select inputs to fund the transaction,  support a number of different output formats for compatibility, produce the correct signatures, build the transaction, and submit the transaction to the network.
You don't have to reinvent the wheel. There are libraries that will solve most of these issues out of the box, or you can set yourself up with a BTCPayServer which solves all of the above and enables you to send and receive Lightning Network payments.


Would it be possible to generate a memorized wallet address by using a batch of phone numbers?

You could use the phone numbers as a passphrase for a Brain Wallet.


Why is an invalid pubkey accepted in the blockchain?

It was intended as a message, not as a public key.
It is accepted in the blockchain because it is a valid output script, whether or not it is spendable is not relevant.

Where does the address 1Du8MpTTV4VrQMHtgP4mG1Fq9q3ykb3L8h come from?

That address is a result of the software blockchain.info uses to generate an address from an output script. Why or how that works is something you'll have to ask whoever wrote it.


How do I to get the r, S and Z values from a raw transaction (version 2)


How do I get new unconfirmed transaction from mempool?

This PR got merged yesterday, you can build from master branch and maybe this should solve your problem: https://github.com/bitcoin/bitcoin/pull/19572
A tutorial about using bitcoind zmq: https://bitcoindev.network/accessing-bitcoins-zeromq-interface/


How are transactions broadcast to the rest of the network?

If a person sends a transaction to another person, and Bitcoin is a peer-to-peer application, how will the transaction get to the rest of the Bitcoin community?

Think of it like how gossip would spread. There are a bunch of people (nodes), and when one of them knows something, they tell it to the few (8 or so) people they are near (connected with), and then those people tell a few more people the message that was told to them, and then... Eventually everyone knows about the original information (transaction).

So when we say bitcoin is peer-to-peer, we mean it's just nodes that have internet connections (on port 8333 usually) with other peers. Not even necessarily the one you're sending the coins to!

  How does everyone have the same blockchain?

After peers exchange their information (and validate that all transactions and blocks follow the protocol rules), they store it. Since all of the bitcoin transactions from the beginning of the bitcoin block chain are needed to validate everything that has taken place, essentially all full nodes store the same data (about 27.5 GB of pure block chain data as of now).

  Does every system know about every other system in the network? If so, how?

No need to know about every other system on the network, each node just knows about the 8 or so nodes that it is connected to!


As correctly answered here https://bitcointalk.org/index.php?topic=1390192.msg14122567#msg14122567

setban "ip(/netmask)" "add|remove" (bantime) (absolute)

Attempts add or remove a IP/Subnet from the banned list.

Arguments:
1. "ip(/netmask)" (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)
2. "command"      (string, required) 'add' to add a IP/Subnet to the list, 'remove' to remove a IP/Subnet from the list
3. "bantime"      (numeric, optional) time in seconds how long (or until when if [absolute] is set) the ip is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)
4. "absolute"     (boolean, optional) If set, the bantime must be a absolute timestamp in seconds since epoch (Jan 1 1970 GMT)

Examples:
> bitcoin-cli setban "192.168.0.6" "add" 86400
> bitcoin-cli setban "192.168.0.0/24" "add"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setban", "params": ["192.168.0.6", "add" 86400] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/


Does an exchange of only virtual currencies fall under FinCEN regulations?

Your guess is as good as anybody else's.   FinCEN's guidelines read:

  The term "money transmission services" means "the acceptance of currency, funds, or other value that substitutes for currency from one person and the transmission of currency, funds, or other value that substitutes for currency to another location or person by any means."

That's as broad as you can get.  Bottles of Tide detergent apparently serve as a form of value that substitutes for currency, so going by that FinCEN could go after your corner market for not registering as a money transmitter for delivering tide to your door without verifying that you were the person who paid for the order (and keeping records for five years, and ... etc., etc., etc.).  Now I know they probably wouldn't stoop to doing that ... just like how the IRS wouldn't treat non-profits differently based on the political aims of the non-profit.

That's called totalitarianism.  The laws get interpreted such that the government gets total control over everyone and everything.


How fast can Ripple transfer money from bank to bank?

It will depend on exactly what combination of technologies are being used. If it's ILP and the banks (or market makers) already have payment channels setup, it can be virtually instantaneous. If it's a direct on-ledger payment, it would be about 7 seconds on average. If it's an ILP outer payment that requires both an on-ledger lock up and on-ledger settlement, it can be closer to 15 seconds.

It also depends what you mean by "Ripple". For example, if you mean any bank-to-bank payment using Ripple Connect (the product Ripple sells to banks), that could include payments that uses all kinds of combinations of technologies. For example, if it's an ILP outer payment and the settlement is on the bitcoin block chain, then it can take as long as an hour, because that's how long for payments to be reasonably certain on the bitcoin blockchain.


There is chainquery which allows you to try some cli commands online. Not all commands are available, but it's a good start to get your feet wet. https://chainquery.com/bitcoin-api


What if all nodes on the lightning network were watchtowers by default?

Not sure if I get exactly what you are asking for. But some general remarks and thoughts should hopefully give you all the information you need to answer your question.

A watchtower basically needs  a copy of your channels state history. (a subset of the data will be sufficient but let's assume for simplicity that the watchtower needs an exact copy of the history of channel states)

Now the answer to your question depends.

If every watchtower is supposed to have the full history of every state channel on the network we would have a total storage requirement of O(V*E) with V being the number of nodes on the network and E the number of channels. And a single storage requirement of O(E). Unless the person is a supporter of some Bitcoin forks like bcash, one can easily see that this would never scale as the number grows linear with the amount of payments taking place in the lightning network. This it has a storage requirement in the same order of magnitude as storing all transactions in one public blockchain with really large blocks.

However we could say that it is sufficient for every node to be a watchtower of x other nodes. In this way on average (amortized) every lightning node should have a storage overhead of a factor x with comparison to the storage requirements for their own state channels.


The same thing that keeps them from increasing the mining block reward. Everyone else would consider their blocks invalid and so there would be no benefit at all.


How would Bitcoin's purchasing power be measured after fiat were gone?

It's typical to measure the purchasing power of currencies using something like the Consumer Price Index, so this is probably would be used if Bitcoin were to become a dominant currency.

Basically, you would develop a "market basket" of goods and services that people commonly buy, and perform some sort of survey to determine what these goods and services currently cost  (in Bitcoins).  Then take some weighted average to come up with a single number that, roughly speaking, measures the overall Bitcoin price of goods, or equivalently, the purchasing power of a bitcoin.


bitcoin transaction is still unconfirmed after 30+ hours

I'm confused the transaction has 22 confirmations (right now).

A good way to speed it up is to use a Bitcoin Accelerator


Where to find the data to compare the decentralisation of mining for different cryptos?

Here is data on bitcoin mining distribution and ethereum mining distribution


Height mismatch between bitcoin-qt and bitcoin explorers

Apparently, there is a fork between 0.12.0 and 0.12.1 nodes.

Testnet is used to test new features of Bitcoin before they are released on the main network. Apparently, the newer version of Bitcoin created a block that was invalid under the rules of the older Bitcoin version. This caused the network to split, as the two versions now created two competing blocks at the same height, and are following separate chains.

Apparently, the softfork activation is being tested, which may cause your experience:

<phantomcircuit> nope
<phantomcircuit> like 50% of the hashing power currently on testnet randomly drops out for days at a time
<phantomcircuit> and im messing with the timestamps to get many many many more blocks than there should be
<phantomcircuit> the two things combined result in soft forks activating with way less than 95% of the hashing power


Proof of work - does the equipment matter?

Right.

The proof of work is computing 2 SHA256 of a sequence of bytes that represent the block header to find a value lower than a target. It doesn't matter if the 2 hashes are computed by an ASIC, a CPU, a GPU or a HP-48. What matters is the number of hashes you can compute per unit of time.

That's why the power of mining hardware is measure in MH/s, GH/s or TH/s (mega, giga and terahashes per second).


If the computer that stores the bitcoin is destroyed, how does someone access their bitcoin?

When Alice pays Bob, she creates a Bitcoin transaction. Her payment to Bob is defined in an output of the transaction. This output is encumbered with a cryptographic challenge tied to Bob's public key. You can think of this as the funds getting stored in a lockbox addressed to Bob. When Alice's transaction gets confirmed, it gets recorded in the Bitcoin blockchain, the network's shared transaction journal.
Later, when Bob wants to spend the funds, he creates another transaction which references the output of Alice's transaction in a transaction input. To spend the funds, he will need to provide a signature with his private key, the private key corresponding to the public key Alice used to address the lockbox. The signature is a form of zero-knowledge proof, it proves that the signer knew the private key, but doesn't leak any information about the private key itself. Since the private key is only known to Bob, this means that only he can spend the funds that Alice locked up for him.
So, while the funds are tracked decentrally on the blockchain, Bob needs to keep his private key safe in order to be able to spend the funds. If Bob loses his key and does not have a backup, nobody can open the lockbox and the funds are lost forever.
We call the software that keeps track of private keys and the associated funds "Bitcoin wallets". There is a range of different wallet types from software wallets you can run on your own computer or phone via hardware devices that store private key material to service providers that you trust to do the heavy lifting for you.


Bitcoin disappeared after resetting the blockchain and transactions

Your wallet shows empty because it doesn't really "know" that one or more addresses that it controls "owns" some bitcoins because you manually deleted the blockchain files.

It will display your correct balance once it synchronizes again, provided of course that you have not deleted the .wallet file.

I would also suggest you take extra care when deleting the .spvchain file, more at: https://groups.google.com/forum/#!topic/bitcoinj/vIbsMfd1NUA

Another approach would be to export your private key(s) for non-zero addresses and import them to a clean installation. Make sure you keep a back-up of your .wallet file somewhere safe throughout this process.


Are there any online wallets available for Litecoin?

We have just released http://www.coinwallet.co which supports Litecoin.


What type of power supply do Gridseed G-Blade need?

Either solution will work fine. For reference, check out these two setups:

https://www.youtube.com/watch?v=nCjSQMsdlKg

https://www.youtube.com/watch?v=2QrkWR5HdcQ

The former video illustrates use of AC adapters and the latter illustrates use of an external PSU.


Sending bitcoins to an un-owned, well-formed wallet

The wallet belongs to someone and you've just sent him money. (Can one
  contact this person and ask for it to be returned?) The key phrase is
  "can one contact" not "can you force him to give it back."

Not unless the owner of that address has publicly stated that she owns that address (perhaps on her blog or on a forum? Try googling).

  The wallet (as seen in the quote below) is unowned and is lost!?!

If the receiving address is valid and has not been used (you can find out from any online blockchain explorer), then it is highly likely that you've sent your coins to an address that nobody can claim (yet). In fact, it is almost certain that nobody will ever be able to generate a private key for that address. Therefore those coins will most likely be stuck in that address forever.

However, if the receiving address has been used, then there's a possibility of you getting in touch with that person and hope for her kindness. The problem is that there's no facility in Bitcoin for getting to know the identity behind a bitcoin address unless they explicitly provide this information.


Are Bitcoins contained associated with a wallet or with an address in a wallet?

Bitcoins are associated with Unspent Transaction Outputs (utxo). A UTXO contains a script that defines the terms under which it may be spent. Usually, this terms are as simple as "sign with correct private key", where said private key is associated with an address.

If you create new addresses in your wallet, your coins are not moved. When you want to spend five of the bitcoins from your example, you'd end up using-up five UTXO with a balance of one bitcoin each.

If you'd want to collect them in one address first, you'd have to send five bitcoins to the new address you created, i.e. actively send them to yourself.

I don't think that you'd increase your privacy by much, if you just sent the coins to yourself and immediately pass them on. Maybe a bit more plausible deniability, but not really much (because it would be curious that you'd just received five bitcoins from somebody else in the moment when you sent them on their way again).

What is commonly meant with the "new address for each transaction" paradigm, is that you never give out the same address for receiving a transaction twice. To wash coins by sending them to yourself, you'd probably want to send them to yourself several times and split them up in a bunch of different ways. However, if a good number of the outputs were then spent together in one transaction again, it would be obvious that you had split them up yourself anyway.


How do i configure two (or more) Antminer S9s on one bitcoin.com account?

If your username is Antminer then the username for each machine needs to be like this: Antminer.foo, Antminer.bar, Antminer.xx where xx is a unique identifier.


Bitcoin-Qt setup: Change block-chain file location, settings? documentation?

Here:

https://en.bitcoin.it/wiki/Bitcoin-Qt
https://www.google.com/search?q=bitcoin-qt+documentation

Use the -datadir option.
Right-click on your bitcoin-qt shortcut, press properties, and add -datadir=D:\Bitcoin
Go make that directory, then run bitcoin. If a bunch of files show up in there, you've done it correctly.
Yep.

-datadir
File > Backup Wallet

Yes, but not GPU mining. GUI miner is a nice option though.


multibit balances wrong, not correct for any individual address

due to this bug and other reported bugs seemingly related to improper accounting of change addresses escalating to LOST BITCOINS see someone else's post here: (http://www.reddit.com/r/Bitcoin/comments/22gt4r/major_mulitibit_bug_btc_gone_it_cost_me_all_of_my/)

I've switched to electrum, fortunately at the time (tons of blockchain resets), multibit was reporting my entire balance and was able to move it all to my electrum addresses.


How to install & activate a c-lightning plugin in lightningd?

As explained on the simple funds overview plugin you just have to start lightningd with the plugin argument like this:

lightningd --plugin=/path/to/plugin/directory/plugin-file-name.py

of course plugins could also be written in other languages than python.

You see this mechanism also in action in this video which explains who to write and run your own plugins.

Also you can move the plugin to the clightning codebase to the plugindirectory (version at time of giving that answer). plugins which are stored there are automatically called and activated on lightningd startup if the file of the plugin is executable.

You will also need c-lightning version bigger than 0.6 as plugins where not a thing before.


Why miners try to produce big blocks i.e. try to put transaction in a block as many as possible?

Why miners try to produce big blocks?

Because transactions pay fees. The more transactions they include, the more fees can be collected. They prioritize transactions with higher feerate to maximize this.

  What if, does a miner deliberately produce a block with a single transaction without considering the whole unconfirmed transactions, in order to gain the reduce of network latency advantage or some other purpose?

Some do that (though mostly because they just received a new block, and haven't had the time to construct a valid set of transactions on top).

In recent times, the argument for faster propagation also does not apply very much anymore. Techniques like Compact Blocks (BIP152), the Relay Network, and FIBRE can efficiently transmit blocks as long as they mostly consist of transactions that were seen before. This almost entirely removes the effect of size from the equation.


Why are there two transaction outputs when sending to one address?

147krm8yWUcVq9Ta25h679TCpsEznzgvRz is the change from the transaction. There was more than one output because you didn't have any previous transactions (sometimes thought of as "coins") that added up the exact amount of the transaction.

So your client picked some coins that added up to at least that amount and then created a new address to receive the leftover amount. So, 147krm8yWUcVq9Ta25h679TCpsEznzgvRz is you. You just don't know it because the client isn't good at disclosing that you. Essentially you wanted to send 22 cents, but only had dollar bills in your wallet. So the 0.78 was the leftover amount and the client created a new address to hold it rather than reusing 1JFWE8THcAQQRYx99c43DXSGyoPL9Zs62D.

It seems that this behavior of the Qt client (silently creating new addresses that receive the change from transactions) was created for privacy reasons. I believe the thinking was, why send the change back to the original address when a new address could easily be created? In that way, it's not even obvious whether your transaction was a payment of 0.78 BTC with a change of 0.22, or a payment of 0.22 BTC with a change of 0.78 BTC. But it seems to be causing a lot of confusion for users, based on what I see on this stack exchange. In my opinion, it might be better if the default client sent the change back to the sending address. Or if, at least, it showed that change address and its balance somewhere.

Some other wallets do let you manually select which address should receive the change from a transaction.


Accepting Bitcoin payments on my website using bitcoind? Many questions... no apparent answers

Actually Ive done this.

What I would say is that if you are planning to it your self it requires some amount of time and expertise if you really want to implement a custom solution that can integrate with your web platform. I did some research and in the end this is how I did it.

I use Bitcoind

It runs on a private server well away from the web server.
On the private server there are several encrypted wallets running on different ports under different user accounts each of them runs the RPC deamon that only responds to ssl from the local host.

Users have an account on on the web application, when they are created they are assigned to one of the private wallets and given an account in that wallet.

The web application sends an RPC request for getaddress  using a message queue that a process on the private server listens to. This issues a new address for payment and puts it in the web applications database.

When we want to accept payment we display the new address to the user on the web page

On the private server a deamon runs every minute or so that calls getreceivedbyaddress  -minconf with the addresses we have displayed to users to receive payment.

when it sees a new payment it updates the webservers database with the record of the payment.

To make it more complicated but secure the communication is also encrypted and the details of the transaction signed using a shared secret between the web server and the wallet daemon process. So for example the web application wont regard the payment as accepted until it sees a signed transaction in its database and the deamon wont put one there until it has seen the minimum number of transactions confirmations on the network.

It took me a couple of days to implement but I had quite a big head start.
The easiest way is to go with one of the payment vendors who have done the hard work for you unless you plan on becoming one of them.

There are several other gotyas you have to be aware of.. for example
Keeping a secure backup of the remote wallets
Keeping the address pool in the remote wallets primed and making sure you have backed up the wallet after priming it.
Storing the wallet pass-phrases so you don't lock your self out
having a way to change them..

What I do is have a multi signature approach where half the wallet phrase is sotred in the daemon binary so the developer could get hold of it.. The other half entered at run time by the support guy. Neither of them would have the full pass phrase so cant steel the wallet and run away with it easily.

Regarding the problem of creating too many addresses and not being able to remove them.
At them moment this is not a problem for us as our solution will scale as we get more users we can create more wallets.

As for cold storage I'm not completely convinced this offers us any more security than we have now with out giving us more problems associated with managing the cold part of the storage. At the moment its a numbers game. where by if we only have $5000 in a wallet its probably not worth it. If we have $3 million in a wallet then we would firstly be ecstatic our business was that successful, Then probably invest in a more secure private data center some brand new servers and some very clever security people


Why does it cost money to transfer bitcoin?

The transaction (tx) fee is the difference in value between you tx input(s) and your tx output(s). The fee is to incentivise miners to include your tx in a block. Until your tx is included in a block it's not part of the blockchain and the recipient will most likely not acknowledge the payment.

When you see your tx as pending it means it's been added to the mempool but has not yet been added to a block. When you see your tx displayed as 1,2,3 etc. confirmations that means it was included in the block mined 3,2,1 blocks ago (blocks are mined on average every 10 minutes).

You can create a tx with 0 fees and in the past they may have been picked up by a miner. These days with the high tx volume (currently there are 10k outstanding in the mempool) a 0 fee tx would almost never get added (unless a miner had another non-economic motive).

I was able to confirm a tx with a fee of 0.00000226 BTC on the 24 Sep 2017. To do that I was literally watching the mempool and picked a time when it was nearly empty. Currently my Bitcoin-Core wallet is recommending a fee of 0.002 BTC/kB which would work out to a fee of 0.0005 for a typical tx.


Transaction fails to validate (Error running script)

You have the wrong public key inside your SignatureScript:

Sig: 48-304502210093b8ff9180a8a31a5ee7b0fb6c560aef888a3d53576e530cb4601dce2d3c51da02204fd8a28743f1d1100a2f56428e743501091e833550df6cf540bad4f5248a6d3c-01
pubkey: 21-02d794c7e1a8068782ef6ee68acf9f6ad9c84c78349671c1a7bf60418a8e1ed108

The outpoint you are spending (2611[...]fd57:0) has the following PubkeyScript:

76-a9-14-2937902660c169b9381a5b3eb35cc889a4686a85-88-ac

When the script runs it fails on 0x88 (or OP_EqualVerify) because HASH160 of the given public key (02d7[...]d108) is e652ed9163ac72629584ec92f47602cca45aa969


First you should go to site you want to buy something then go to the menu where you can deposit bitcoin, it redirected me to some bitpay.com page with a qr code, so I copied the address besides the qrcode, and went to webmoney's WMX purse and pressed spend (or send bitcoin) and it successfully been sent, but bitpay didn't recognized the payment so after few days I got the transaction from webmoney and blockchain (supposedly the site they use for bitcoin transferring) and sent it to the purchase site support and asked them for help after few days they added it to my account.


How can I read information from the blockchain?

This can be done with some degree of effort using the Bitcoin API.

v0.7 getrawtransaction gives you access to transactions even those not in your wallet.

http://en.bitcoin.it/wiki/Raw_Transactions

There are other tools that you can use to build this capability as well.

libBitcoin
Armory (see Extras)
Bitcoin ABE
BitsOfProof supernode [pre-release]


Using bitcore to create a transaction with two addresses and change address

I figured this out, the new transaction code should look like this with the address generated using fromString() method using bitcore.

var address = bitcore.Address.fromString('2NEvGYDNxcVPZ2ThtmPKYoKBCEa3aJNjPL3');
var multiSigTx = new bitcore.Transaction()
    .from(utxo, pubs, 2)
    .to("mntnnj64W4po96m2ck4GXQJTAiKZQChpWB", 10000)
    .to("msR1bBwUWjTTNYFU5UTVNCXDUnEx1y2MMQ", 10000)
    .fee(5430)
    .change(address)
    .sign(["7e925007e09447fa6160597391d7a24f8f47e40222d6c94b06bd9cecee5eddff" ,"6b8adfd22b8dd3186ea5333602b39a59fc1c40c543dc3848ea88c6cd6b738594"]);

var txSerialized = multiSigTx.serialize(true);

This will then show the correct change output for the transaction.

console.log(multiSigTx.getChangeOutput());


C++ error building a fork of Bitcoin-ABC

I'm getting the exact same problem having forked Bitcoin to create a new altcoin. I believe the problem is related to a template being defined in a cpp rather than h file, and the different order of compilation due to file name changes. If I'm correct, then this reveals a subtle bug in the Bitcoin and Bitcoin ABC sources which should be fed back up the chain to assist future forkers.


How can I pay someone in another country?

They could open an account at btcxindia.com or another exchange in India. You send the BTC to their account there and then they just sell and widthdraw the rupees to their bank account.


Java library for Bitcoin Client Application

BitCoinJ

In addition to @D.H's answer, BitCoinJ provides the following for developers

open source through Subversion
easy to use Java API
easy to integrate via Maven
access to either release or snapshot editions depending on your risk profile

BitCoinJ also uses the Bouncy Castle encryption algorithm implementations. Some of these were missing or poorly implemented in Android which necessitated the inclusion of these libraries into BitCoinJ (currently via the Maven Shade plugin to allow updates to Bouncy Castle to be introduced when they occur).

These inclusions makes it a very useful library to get started with than simply rolling your own against the JSON API of the standard client.

Disclaimer: I'm a contributor to the BitCoinJ project so I'm a bit biased regarding it's utility.

BCCAPI

A transaction and balance monitoring API for Java.

From the website:

  The BCCAPI (BitCoin Client API) allows you to create a light-weight
  secure Bitcoin client in Java. The BCCAPI connects to a server that
  holds the block chain, and which tracks the client’s wallet balance on
  the clients behalf. The server only has knowledge of the clients
  public keys, and is in no position to spend funds owned by the
  client’s wallet.

This could be useful if your application does not require the client to spend coins through your system.

Off topic: A note on Bitcoin clients in Java

Although it's not a library as such, you may benefit from looking at the source code for the MultiBit project to get you started in creating a Java Swing based Bitcoin client based on BitCoinJ with internationalisation and QR code support.


What is the approach to calculate an Ethereum address from a 256 bit private key?

Start with the public key bytes (a bytestring of length 64)
Of that public key, take the Keccak-256 hash used ubiquitously by Ethereum (make sure you get that right, as the ultimately standardized SHA3-256 hash differs). You should now have a bytestring of length 32.
Drop the first 12 bytes. You should now have a bytestring of length 20, the Ethereum address associated with your public key.

Update: Oops! I see you want it from the private key, not the public key. That's harder. You have to first derive the public key from the private key, which is best with the help of an EC crypto library. I can show you some example code in Scala, but the EC math is mostly a black box to me. First, interpret the 256 bit private key as an unsigned big integer. Then, see e.g. here. Curve represents the named eliptic curve secp256k1. The details of the math are, alas, beyond me, but hopefully in whatever environment you are coding you have access to a high quality crypto library.

Update 2: In the comment thread, I speculated about where Ethereum's hash function diverged from the SHA3 standard. My speculation was mistaken, the version I thought was the incompatible change is the version Ethereum in fact uses. Thanks to work by Eric McCarthy, who chased this down in great detail. Please see this comment below for more details.


What, other that Fees and Luck, controls the time to confirmation?

Which transactions make it into a block are purely at the discretion of the miner who mines that block.  In general, they take the transactions that will yield them the most in fees...but there's not really a way of saying for sure.  If a particular mining pool has another incentive in play that is worth more to them than the fees they'd be sacrificing, I'm sure they would operate differently.


What's the consensus on using a non-networked VM as a cold wallet/airgapped computer?

The host running a virtual machine has complete, unfettered access to its guest, there's no breaching or compromising necessary. It provides absolutely no additional security in your described situation. It is likely trivial to access ECDSA private key material even between two unrelated virtual machines on a single host due to sidechannel attacks.


Does the OS make a difference for mining?

The major difference that you would face is the graphic driver support.
That kind of influences the performance as well. Windows is best suited that way because of extensive driver support for almost all graphic cards out there.

From mining software perspective, almost all the matured softwares are comptabile on the major platforms you mentioned.


Bitcoin RPC estimatesmartfee argument keys necessary?

It's not working because it does not have sufficient data to give you a reasonable estimation.

You will need a steady rate of transactions on the network for a sustained period of time. On regtest, that means you'll need to simulate those transactions as there is no network to provide them.

It's easier to see estimatesmartfee in action on testnet or mainnet.


Yes, there are multiple open source mining clients stated in the Quarkcoin thread. See "standalone miners".


Are the Mt.Gox markets for different currencies completely separated?

There is only one order book in MtGox. Orders aren't segregated by currency, rather, all prices are relative to the currency with the highest volume (based off The European Central Bank's daily rates). In their own words,

  For example, if a buy order for bitcoins is placed in EUR, the order can be executed against another user selling bitcoins in any currency and not necessarily only against another user selling bitcoins in EUR.

That said, wallet currencies are completely separate. There's no converting between them unless you're transferring that value via bitcoins themselves. For example, you can buy bitcoins in a EUR wallet with EUR, transfer them to a USD wallet and sell them in USD. Of course, you have to consider how you'll withdraw the resulting currency.


Someone bought bitcoins via hacking my PayPal account, how can I retrieve the bitcoins?

That is not possible.  By the decentralized design of Bitcoin, nobody has the ability to "cancel" the coins in an address held by someone else.

I'm sorry you were hacked, but it is almost certainly impossible to recover, block, or trace the funds at this point.


How to get the immature balance of an account?

Using the listtransactions command, you can see your immature coinbase transactions listed with category immature.

listtransactions appears to include both spent and unspent transactions in general, but since immature coins cannot be spent, that shouldn't be a problem.

Since accounts are now deprecated, you can get the immature balance for the entire wallet with getwalletinfo; look at the immature field.

Note that getbalance does not include immature coins.


New wallet per customer, or new address?

If you are looking to accept deposits from your customers then you should create one deterministic wallet using software like electrum and the install the extended public key aka xpub aka master public key (MPK) on the server. Then from that you can generate all the addresses you need.

The above creates a watch-only setup where you can generate addresses to receive bitcoin but not spend. So in case someone compromises your server they learn your entire transaction history but they can't steal from you. In order to spend the money you need to use the seeded wallet on your PC.

In order to associate addresses with users you would make a note of it in your app's database.

If you want to associate addresses with users in some deterministic fashion then you can assign each user an ID number and a counter which will serve as an address index. Then you can devise an appropriate derivation path that incorporates those two things. So for example Alice could be user ID 5430. Alice's deposit addresses are m/5430/i where i is the counter in the database. First Alice address would be m/5430/0, second would be m/5430/1 and so on. The user ID would not change once a user registers so even with slightly older backups as long as you have the user ID you can increment the counter until you get to the correct one.


Setting the fee rate on regtest, or, quickly generating full blocks

You can use a wrapper to mock the feerate.
Let's say you are writing your tests in Python. You can set up a Python RPC wrapper for the bitcoind interface, and optionally turn on a mock for specific tests (instead of calling bitcoind's estimatesmartfee it would return a preset value).
That is how it's done in C-lightning's functional tests. A good instance is this test which simulates a crash of bitcoind to test lightningd can support spurious failures of its Bitcoin backend.
See also a sample of feerate mock here.


How do miners understand what a transaction does?

Determining the fee of a transaction is actually very easy.

As you know, a transaction has inputs and outputs, where each output has an associated amount and a script, and each input is a link to an output of a previous transaction, along with whatever data is needed to satisfy the previous output's script.

A transaction fee is implemented by simply having the total value of the outputs be less than the total value of the inputs.  The difference represents the transaction fee and can be added to the block's coinbase transaction, to be collected as part of the miner's reward.

So in order to calculate the fee of a transaction, the miner simply has to:

Sum up the values of the outputs of the transaction.
For the inputs of the transaction, find the associated previous outputs and sum up their values.  (These will normally have already been stored in an indexed database, so it's easy to find them.) This gives the total input value.
Subtract.

Of course, the miner also has to check that the transaction is valid, since any block containing an invalid transaction is itself invalid, and won't be included in the block chain.  This is a little harder, because it does require actually "decoding" and executing the script for each of the previous outputs, and verifying that the input data and signatures provided in the current transaction satisfy those scripts.  But by design, the instructions available for those scripts is quite limited (for instance, there are no loops).  So this verification is of bounded complexity, and it can't be too hard in a computational sense.  Of course, the code to actually do the verification is already implemented in Bitcoin Core, so in practice all the miner has to do is run it.


Restore BIP39 mnemonic in Electrum using command line and custom derivation path?

You can't do it from the console, but you can do it through the python API.  Stuff like this is done in their test scripts all the time.
Look at the test_bip39_seed_bip84_native_segwit in their github repo for some hints
Another alternative would be to convert your bip39 seed to an xprv and use the restore command line option with the newly minted xprv.
Here's some sample code to convert your mnemonic to an xprv.  Obviously change the derivation path and mnemonic seed:
#!/usr/bin/env python3
from mnemonic import Mnemonic
from pycoin.symbols.btc import network as btc

code = ("abandon abandon abandon abandon abandon abandon" +
        " abandon abandon abandon abandon abandon about")
path = '84H/0H/0H'
mnemo = Mnemonic("english")

xprv = btc.keys.bip32_seed(mnemo.to_seed(code)
           ).subkey_for_path(path).hwif(as_private=True)

print("Issue the Electrum commands")
print(f"\tconvert_xkey {xprv} p2wpkh-p2sh")
print(f"\tconvert_xkey {xprv} p2wpkh")

Do keep in mind that Electrum imports are assumed to be at the Account Extended Key level.  This means that importing an xprv at the derivation path m/5' level (random example) will have you a first receive address of m/5'/0/0 and your first change address of m/5'/1/0.  Only way around this behavior would require importing the WIF keys one at a time.  A simple change to the pycoin code, but there is no simple xprv way to do it.


Bitcoin uses the autotools build system in order to build the source code.  It is a very powerful, yet notoriously confusing system.  You will need to edit the Makefile.am file to include the source files you want to build, and to point the linker to compiled sources.  You will then need to rerun parts of the build system (automake, ./configure, etc...) in order to regenerate Makefile.

The specifics for how to do this are difficult to say, since you will need to determine which parts of the system your new code depends on, and which parts depend on your new code.  I suggest reading up on autotools, determining what is needed for your particular code changes.


Can old wallet.dat (offline long time) still receive money?

Yes. If you have the addresses from that wallet, coins can be sent to those addresses.

  I think that I remember that 100 private keys are generated in advance and are in stock of the file. Does that mean, that I can receive 100 transactions after taking my client (it was bitcoin-qt/bitcoin-core) offline?

An address can receive coins more than once, although it's considered best practice to try to avoid that. But, in practice, you can receive many transaction that pay to any of those 100 addresses.


Does a bitcoin pool appear as one node or multiple nodes to the rest of the network?

The pool will typically appear as one node, though there's nothing stopping a business entity identifying as a pool to operate several nodes.

In any case, the miners in the pool will certainly not appear as nodes.


Each node on the network is connected to one or (hopefully) many more nodes. Anytime activity happens (a transaction is added, a new block is found, etc.), the node that it initiating that activity sends it to all of the nodes that it is connected to, and they do the same. Each node will run the transaction through validations to verify that it considers it to be a valid transaction. Most of those validations are hard and fast rules, but some of them are more flexible. For example the logic that a node uses to decide whether or not to add a transaction onto the current working block might depend on whether a transaction fee was included or not. For validations like that, a person could modify their code to change the rules as to whether or not they accept a transaction without causing their node to be considered a "bad" node that's breaking the rules.

Because of all this activity, and nodes sending to nodes sending to nodes, at any given time one node might not have exactly the same info that another node has, so your next question is probably how that is handled, and the answer is that it depends on what is different between the nodes, but here are a few examples:

Let's say that you found a new block (congrats!), and your node has 100 pending transactions on it. But there are 5 other transactions that other nodes have that have never made it to you (or that you rejected because they didn't pay a fee or whatever). In that case, what happens is simple: The 100 transactions that you did have would be recorded and become part of the chain, and the 5 that you didn't have would not (and will probably show up on the next block).

What about something more tricky, such as two nodes, A and B, solving a block at the same time? In that case, both A and B will send their solution out to their nodes, and for a (hopefully brief) period, there will be a split in the chain, with some nodes working on A+1 and some nodes working on B+1. Ultimately the network handles this just fine. One of the nodes is going to win, and the other is going to be lost. The winning node will become part of the permanent chain, and the losing node will be lost to eternity. This is exactly the reason that most sites don't consider a transaction to be complete until it is X levels deep in the block. As a transaction becomes older and older, it is less and less likely to be part of a chain that ends up getting dropped.

There's probably another dozen things that have different rules as to what happens as they move along the nodes, but I hope that gives you an idea of how it works for two of the primary types of activity that happen on the network.


How do I get rid of My so called bitcoin account

There is no such thing. Either you misunderstood this person, or he was lying.

Bitcoin is a decentralized digital currency. It is not a company with representatives that contact you or that you can have an account with.

There are companies that provide Bitcoin-related services and you may have registered with one, but based on your description this is not likely the case.

Probably you are the target of some form of scam. Scams have existed long before Bitcoin, and it's quite common that scammers call people and ask for their money under all kinds of false pretenses. The fact that this particular scammer has chosen to specify "Bitcoin" as a pretense alters nothing.

If this persists, contacting your local law enforcement could be prudent.


You gave a scammer access to your wallet, logging into it and then giving them access to the computer that was logged into the wallet. I'm sorry for your loss.


Is it BreadWallet? You can restore that in Mycelium, afaik.

As to your actual problem: just leave it, file the seed words somewhere safe, and maybe one day it'll be worth actual money.


Public key from private key generation problem

I accidentally solved my problem. When I was writing this function, Eclipse told me function getX() (and getY()) is depracated. So I used getXCoord(), because I thought its result is the same. In feeling hopeless I used getX() instead getXCoord() and whole function magically worked!

What's the difference between getX() and getXCoord() ?


Is it necessary to mount an external hard disk to save blockchain to external hard disk on Raspberry PI?

I get the following error:

Error: Cannot obtain a lock on data directory /media/pi/FreeAgent GoFlex Drive
Bitcoin Core is probably already running. No such file or directory.

  I tried stopping the process with

bitcoin-cli stop

Bitcoin Core is already stopped when you get that error. It can't run without the datadir.

  But that didn't seem to do anything.  Is the problem that the external
  hard disk has to be formatted and mounted, as per instructions
  [here][1]?

  As a test, I tried writing a file to the hard disk from the system and
  received the following error:

mv: inter-device move failed: 'testfile' to '/media/pi/FreeAgent GoFlex Drive/testfile'; unable to remove target: Read-only file system

  This does seem to confirm this hypothesis that the disk needs to be
  formatted/mounted.

No, it does not necessarily need to be formatted.

The problem is that your user does not have the correct permissions to write to your external drive. Make sure that your drive is writable and that your user has the permissions to write to the external drive. You may have to change how it is being mounted to the system (drives always have to be mounted in order to be accessible).


Can more than 1 block be solved per 10 mins on average (LONG TERM)?

someone /could/ throw a lot of hash power into the system. and until such a time as the difficulty adjusts, they /could/ produce more blocks than one per 10 minutes on average. but difficulty will adjust after one or more 2016-block chunks (note that change in difficulty is capped at a factor of 4 for each 2016 block chunk), until once again even with the new hash power only one block per 10 minutes is produced on average.

so "in the short term" it is possible for someone to produce more blocks than 1 per 10 minutes, but "in the long term" unless they continue adding hash power perpetually, the difficulty will catch up to them.


Cannot get the same address format from zeroMQ and Bitcoin Core

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

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

Thanks :-)


How to create a signed transaction offline using electrum?

Enter output address, amount and click on pay:

Decide the fee rate and click on finalize:

You can export the transaction hex from bottom-left before or after signing the transaction:

Make sure "Advanced Preview" is active in the preferences:


Historical number of full nodes in Bitcoin

There is no measure of the number of full nodes. The number published by many websites is the number of listening nodes, instances of software which is advertising itself as available for connections on the Bitcoin network. The term "full" refers to "fully validating", as distinct from non-validating or BIP37 SPV. To be listening you do not need to be validating, or even a Bitcoin node at all (a proxy connection is indistinguishable from a real node).

If you want to know about the number of listening nodes, bitnodes.io does track numbers for these though they appear to be easily manipulated at times (see the spike around September 2015).


If anyone can mine how does inflation not occur?

The answer to your question can be found on the Bitcoin wiki.

It's true that everyone can mine, but the amount of coins that are up to be mined by miners is controlled by the Bitcoin protocol.

The difficulty of mining a "block" is adjusted automatically (every 2016 blocks or ~ 2 weeks). The adjustment is made by all miners using a transparent calculation. The adjustment aims to retain a rate of approximately 1 block mined every 10 minutes.

Additionally, every ~4 years (or 210000 blocks), the reward for finding a block is halved.

Taking this two things in account, the reward for mining a block will become zero after 6930000 blocks or ~136 years. (It becomes zero because the precision in which bitcoins can me measured is too low.)

You may think that people will stop mining when the reward becomes too low, but you have to keep in mind that miners also get the transaction fees from the transactions they verify in their blocks. Currently the accumulated fee is only a fraction of the total reward, but as the reward decreases (and Bitcoin raises in value), these fees will (hopefully) become a sufficient incentive to mine.


The data-structure is encoding a set which means it is not encoding an order.

If you draw numbers uniformly at random from some universe then sort the result (thus destroying the order information), the differences between the numbers follow an exponential distribution. The GCS uses a golomb coder to efficiently store these differences. The sort method used is irrelevant so long as its consistent with the differencing method used.

There is nothing probabilistic about the set encoding itself. But for BIP158 the set being encoded is not TXIDs but short hashes of relevant outputs. Because the hashes are short they can have collisions, making the result probabilistic.


How long does it take to go from 51% hash power to 100% hash power?

From What can an attacker with 51% of hash power do?

  Prevent some or all other generators from getting any generations

So, yes. However, it doesn't immediately give him more mining income. Once the block readjustment happens two to six weeks or so after the attack, the bitcoin network will notice that far fewer blocks were made, and the difficulty will go down.


How does a miner know which nonce to start with ?

The entire block header enters as input in the hashing process.

Along with nonce and some other fixed fields there is a "Merkle root" field in the block header that each miner has different.

So each miner can search the nonce range from 0 to the last - in order; because of different Merkle root each miner will have different block header hash for the same nonce and other fixed fields.

NOTE: Why each miner has different Merkle root? That's because in the transactions miners include in the block (from which Merkle root is derived) there is one special transaction called "coinbase transaction" that each miner has unique. Therefore the Merkle root is also unique. "Coinbase transaction" is included by the miner himself along with regular transactions and is the transaction that gives mining reward to miner's own address.


How long does it take on average to receive one confirmation? Is it still reversible?

A Bitcoin transaction, by design, will get one confirmation after an average of 10 minutes. Even before a confirmation has been received, a transaction is generally irreversible.

If you were to send a second (double-spend) transaction, using the same inputs as a transaction you've previously sent, I suppose there might be some custom-developed nodes that would give it priority if the transaction fee was higher than the first transaction. However, I believe most nodes would reject the second transaction.

If one of these (corrupt?) custom-developed nodes was to solve a block including the second transaction, my understanding is that the network would accept the block and thus accept the second transaction. This question has been asked separately, here: Does any pool accept higher-fee transactions of a double spend, instead of the earlier one?

However, it's worth mentioning that standard nodes will not relay the second transaction.


Definition of confirmation time in blockchain.info, Part 2

Then is it correct to say that, in a simplest approximation it takes 6 times the confirmation time in the graph to get a transaction done?

Not quite, the first confirmation is different from all subsequent confirmations, I’ll explain how:

For the first confirmation, there are a couple of factors at play:

how long until the next block is mined
how high the tx fee is, relative to other transactions in the mempool

For all subsequent confirmations, there is just one factor:

how long until the next block is mined.

The average time between blocks varies, but usually averages just below 10 mins. So a simple approximation of time for 6 confirmations could be:

(Time for first confirmation) + 5*(average block time)

As an example, let’s say we have a tx where the first confirmation takes a while due to a low fee (let’s say, 40 minutes). The next block (next confirmation) will, on average, arrive 10 mins after that, and the next one 10 mins after that. So we might expect the time for 6 confirmations to be (40 + (5*10)) = 90 mins. Whereas under your assumption we would expect it to be (40*6) = 240 minutes.

It’s worth noting that 6 confirmations is often considered as being ‘fully confirmed’, to help mitigate the risk of a chain reorg happening after one or two confirmations. This number is calculated by considering the cost of an attack to reorg the chain, against the value of the transaction being sent. For high value transactions, you’d want to wait more confirmations, because eventually the cost of an attack to reorg the chain will outweigh the value of the transaction (so a miner would spend more resources attacking the chain than they would gain by reversing the transaction).


Bitcoind list all transactions from all accounts with listtransactions cli command

I would like to receive the transactions of all accounts on my daemon,
  including the default account.

$ bitcoin-cli listtransactions "*" 9999999


Is it actually possible to pay ONE fee but make many transactions?

Is this actually possible?

Yes. Transactions may have arbitrarily many inputs and outputs (subject to them fitting inside a block, of course). The inputs must be UTXOs that you can provide signatures for (coins you own), and the outputs will be new UTXOs, each of which can be associated with any address(es) you like (that is, the coins you own can be sent to as many addresses as you like).

Is it easy to do?

The reference implementation (Bitcoin Core / bitcoind) allows you to do this on the command line (that is, with bitcoin-cli) using its sendmany command. You can see an example usage of that command in this answer to a similar question.
I'm not aware of any wallets or solutions that make this easy to do via a GUI. Bitcoin Core and Samourai have easy ways to do batch spends. In Bitcoin Core, there is an [Add Recipient] button at the bottom of the "Send" tab. In Samourai, when at the "Send" screen where you would enter the destination address and amount, you can tap the three dots in the upper-right, and then tap [Batch spend].
There must be automated business solutions out there that companies such as exchanges and large merchants are using.

Will it save me lots of money versus making separate Bitcoin transactions for each customer?

That depends on the frequency at which you receive orders and the frequency at which you wish to fulfill those orders. If, say, you're receiving 10 orders per minute, then you could batch 50 orders into one transaction, allowing you to fulfill orders within 5 minutes. If you're only receiving 1 order per minute, then you could only batch 5 orders into one trasaction whilst still fulfilling orders within 5 minutes; to batch 50 transactions, you'd have to wait until you'd received 50 orders, meaning your customers would have to wait up to 50 minutes before you fulfill their particular order.
The average BTC transaction that contains one input (your funds) and two P2PKH outputs (recipient and change) is around 250 bytes. Each additional P2PKH output requires 34 bytes. In this way, assuming a transaction fee of 90 sats/byte:

50 individual transactions with 1 output each would in total cost 1,125,000 sats ≈ 0.011 BTC (≈ 486 USD at time of writing).

1 batch transaction with 50 outputs would only cost 172,440 sats ≈ 0.0017 BTC (≈ 74.50 USD at time of writing).

You can see how this becomes very economical at scale!

Having said all that, in practice this is much less of an issue nowadays because of Layer 2 networks like the Lightning Network. With Lightning, fees average no more than 20 sats per off-chain transaction, and then the resulting balance after many, many Lightning transactions will ultimately be settled on-chain by paying a single BTC transaction fee. Let's say you fund a Lightning channel, perform 50 transactions, and then settle the channel. That's:

One on-chain transaction of 250 bytes, paying 90 sats/byte, so 22,500 sats.
50 Lightning transactions at no more than 20 sats each, so no more than 1,000 sats.
Another on-chain transaction with another 22,500 sat fee.

So in total, that's 46,000 sats = 0.00046 BTC (≈ 20 USD at time of writing).
In practice, you can expect to perform many more than just 50 transactions with a single Lightning channel, further reducing the effective cost per transaction.


Actively display wallet funds on web page - how?

I already have bitcoind running with a 4GB pruned database, and I'm hoping that will be enough.

It is! By running bitcoin-core, you can pull this data in an easy, trustless way.
I would recommend creating and displaying a new address to your patrons each time a new donation is received (so as to avoid address reuse, which is detrimental to your privacy, and perhaps more importantly your patron's privacy), but otherwise you should be able to accomplish your goal without much issue. You could perhaps look at something like btcpayserver to help automate the payment flow on your website.
Here is a general workflow:

Generate a private key that will be used to receive funds, using your wallet of choice (ideally, this would be done in an offline environment)
Import the address(es) that are derived from the keys you generated in step one, into bitcoin-core. You can use bitcoin-cli importaddress to accomplish this step. Note that if the address is brand new and you know for certain it has never received funds before, then you can set rescan to false, to save a fair bit of computational time.
Use the command bitcoin-cli listunspent to return a list of UTXOs that are locked to addresses that the wallet is watching. You can optionally filter the returned info by address, see bitcoin-cli help listunspent for more info.
(Alternatively, you can use bitcoin-cli getreceivedbyaddress, which may be easier if you're re-using a single receiving address)
From there, you'll just need to parse the JSON data returned, and sum up the relevant address balance(s), to be displayed on your webpage.


There will have to be a public record of a transfer into address B before any transfers can come from address B.  Internally the provider may move the funds from one address to the other "off-chain" for purposes of display but until some BTC moves into address B publicly it can't be spent from B.

Most likely when you attempt to send BTC externally from address B, that amount will either be:

1) transferred publicly from A to B and subsequently from B onward (incurring 2 transactions and twice the confirmation delay)

2) transferred to a provider address from address A and be internally deducted from address B inside the provider system and actually transferred from some other provider address

3) publicly paid directly from address A but shown as deducted from B in the provider system

Off-chain transfers are one way to add additional anonymity to Bitcoin transactions but at some point the source address has to be publicly credited with BTC for the exchange to be valid in the block chain.


how long do i have to keep Bitcoin-Qt open after sending coins

Since there is nothing that shows you that peers have received and are relaying your transaction you might want to leave your client open until there is one confirmation.

In addition to the initial broadcast to peers, there are subsequent re-broadcasts performed by your client if the transaction has not received a confirmation.  This re-broadcast generally will happen in under an hour and will continue indefinitely at about that pace until the transaction gets a confirmation.

Without leaving your client open, these re-broadcasts will not occur.

If other nodes have just started up (i.e., a clean memory pool) or have flushed your transaction due to it not having gotten a confirmation after an extended period of time, only the re-broadcast will get the transaction back into that node's memory pool.

Once a transaction has a confirmation though, there is no further need to keep your client open.  There are some corner cases where that's not true (e.g., a block reorg occurs and that transaction confirmation no longer is valid, etc.) but in almost every instance once a transaction has a confirmation it then no longer needs to be re-broadcast.


What does "Uneconomical UTXO requested" mean?

This error message seems to indicate that one of the Unspent Transaction Outputs (UTXO) in your wallet has a lower value than the cost of spending it.
In Bitcoin, funds are tracked in the form of distinct transaction outputs. Each time someone gets paid, at least one new transaction output is created. While your wallet may show your funds as a balance, under the hood the balance is actually composed of one or multiple UTXO. To spend a UTXO, an input is added to a transaction. Transaction fees are paid per byte of data. If an input for example used 148 bytes, and the current feerate were 100 satoshi per byte, it would cost 14,800 satoshi to spend a UTXO. If the UTXO's value was 5,897 satoshi, it costs more to spend it than its value— it is uneconomic to spend it.
You may be able to sidestep the error by setting a lower feerate. Note that this will likely cause the transaction to take a long time to confirm.
Altogether, it would be reasonable for your wallet software to filter uneconomic UTXO in the preselection, so you may want to consider reporting this as a UX bug.


What command can i use instead of `ListAccounts`

You can still use the same commands to get a list of accounts and addresses

getaddressesayaccount: returns a list of every address assigned to a particular account.

listreceivedbyaccount: lists the total number of bitcoins received by each account.

Or as a workaround you can try the trick with the following:

listaddressgroupings: lists groups of addresses that may have had their common ownership made public by common use as inputs in the same transaction or from being used as change from a previous transaction.

listtransactions "*" 1 0 true: List the most recent transaction from all accounts including watch-only addresses.

More info on the available commands to list accounts/addresses: https://bitcoin.org/en/developer-reference

Hope this helps,

kind regards.

Cluster2k


How can I interact with Eclair from Python?

This might not be a satisfying answer but if you look at the eclair git repo and their Wiki you will find that the eclair API is a JSON API and is exposed via http and web sockets and can be queried with regular http requests.

If you look at the c-lightning python client it is a tool that talks via a unixDomainSocket to the exposed lightningd api. So I guess you could in a smilar way quickly create a python wrapper to be able to talk to eclair.

It seems to me that currently no one has bothered to do so.


By byte size and number of inputs/outputs, what are the largest transactions in the block chain so far?

The largest single transaction to date is 465,554 bytes.  It's hash is 659135664894e50040830edb516a76f704fd2be409ecd8d1ea9916c002ab28a2.
The same transaction has the largest number of inputs: 2,585.
Two transactions tie for the largest number of outputs: 623463a2a8a949e0590ffe6b2fd3e4e1028b2b99c747e82e899da4485eb0b6be and 5143cf232576ae53e8991ca389334563f14ea7a7c507a3e081fbef2538c84f6e both have 3,075 outputs
The same two transactions have the largest number of inputs plus outputs, although they only have a single input so the total is 3,076 inputs plus outputs.

Note, however, that the blockchain has been used to store information by manipulating output addresses so it is more than likely that the transactions listed in 3) are not "real", in that they do not contain spendable outputs.


Here is the quote you're referring to (link)

/**
 *
Represents an elliptic curve public and (optionally) private key, usable for digital signatures but not encryption.
 * Creating a new ECKey with the empty constructor will generate a new random keypair. Other constructors can be used
 * when you already have the public or private parts. If you create a key with only the public part, you can check
 * signatures but not create them.

 *
 *
ECKey also provides access to Bitcoin-Qt compatible text message signing, as accessible via the UI or JSON-RPC.
 * This is slightly different to signing raw bytes - if you want to sign your own data and it won't be exposed as
 * text to people, you don't want to use this. If in doubt, ask on the mailing list.

 *
 *
The ECDSA algorithm supports key recovery in which a signature plus a couple of discriminator bits can
 * be reversed to find the public key used to calculate it. This can be convenient when you have a message and a
 * signature and want to find out who signed it, rather than requiring the user to provide the expected identity.

 */

This library implements ECDSA is Elliptic Curve Digital Signature Algorithm, hence you can only sign/verify with this algorithm.
ECDH is Elliptic Curve Diffie Hellman and can be used to share a secret
key between two parties.

ECIES is Integrated Encryption Scheme which mix EC and AES, but it is
not implemented in OpenSSL (the core Bitcoin crypto library) nor the one you reference.

More details on these algorithms on wikipedia ;)

In conclusion, with ECDSA you can only sign/verify, you may encrypt
mixing ECDH to generate keys and AES to do symmetric encryption (even at
command line: look at ecparam, ecdh, enc), or you may use ECIES but you
need a different library.

On a related note, this guy seems to have re-invented ElGamal encryption using ECDSA but I haven't looked into his code at all.


Your concern is genuine but the decision to open a channel is not a part of the core specifications. The decision to open a channel with a node is up to the user.


Resource on cryptocurrency exponents/significant digits/decimal places?

Information regarding the precision of cryptocurrencies can be found in their respective developer documentation. For Bitcoin, the precision is measured in Satoshis (1/100,000,000 of a Bitcoin) and is the smallest unit of measurement. For Ethereum, the precision is measured in Wei (1/100,000,000,000 of an Ether). For ERC20 tokens on the Ethereum network, the decimal precision is specified by the token and varies.


Where is seed in Bitcoin Core in comparison to Bread Wallet

In Bread i have to write down my seed and in Bitcon Core i have to backup both passphrase and wallet file. is this true?

Yes.

  Each software has its own seed to private key mechanism. Is this true?

No. What you call the "seed" is actually called the mnemonic. Most wallets that give you a mnemonic use BIP 39. BIP 39 specifies how the mnemonic should be created and how to convert the mnemonic to an actual seed value.  Most HD wallets then use BIP 32 to convert that seed into your private keys

Bitcoin Core implements BIP 32, but not BIP 39.


Transactions are money orders to the Bitcoin network that reassign value from one owner to another. To that end, transactions reference pieces of Bitcoin in the inputs and reassign this value to recipients in outputs. When the transaction is accepted on the network, the pieces of Bitcoin referenced in the inputs are spent and new "unspent transaction outputs" (UTXO) are created according to the transaction's outputs. UTXO are how every participant in the network keeps track of where the money in the network is. UTXO are not only created for change, but any time a transaction defines a recipient. UTXO are spent whenever they get used as a transaction input. However, even so the transaction remains part of the blockchain and everyone can look up later where the transaction output was created and (eventually) spent.

Therefore, after a UTXO is spent, it's still a transaction output (TXO), but no longer a UTXO.

Take this example:

Input(utxo1)               Recipient Output
                 ---->
Input(utxo2)               Change Output

When the transaction is created, it spends the two UTXO referenced in the inputs. As the transaction is confirmed, every participant removes them from their UTXO database. However, the reference still exists in the blockchain as the outputs of the transactions that created those UTXOs. The transaction also creates two new UTXOs, the Recipient Output and the Change Output. Every participant in the network adds these two UTXO to their database. Let's say that the sender spends the money in the change output quickly thereafter, removing the change output from the UTXO database, but the recipient TXO remains unspent. In that case, (or any other where at least one of the two outputs remains unspent) the transaction would be counted in the "Total Transactions With Unspent Outputs".


What is the exact value of upcoming block rewards?

The halvings occur in form of a bitshift operation. So, in other words, you halve and cut off. Therefore, the rewards should be rounded down.

A while back, I've generated a table with block rewards and other information.

The rewards in satoshi per block should work out to be:

5000000000
2500000000
1250000000
625000000
312500000
156250000
78125000
39062500
19531250
9765625
4882812   <--- first deviation from your table
2441406
1220703
610351
305175
152587
76293
38146
19073
9536
4768
2384
1192
596
298
149
74
37
18
9
4
2
1
0


why bip 34 uses two step on MASF(Miner Activated Soft Fork)?

The two thresholds enable two different rules.

If more than 750 of the last 1000 blocks are version 2, the network starts enforcing BIP34 - at this point, blocks that claim to be version 2 but do not comply with the requirements outlined in BIP34 are rejected. Version 1 blocks continue to be accepted.

Once more than 950 of the last 1000 blocks are valid version 2 blocks, all new version 1 blocks are deemed invalid.

This allows for a mostly graceful transition, and gives miners time to upgrade their systems in a rolling manner as opposed to requiring everyone to update at the same moment.


How do I prune/clean wallet.dat for old unused addresses

Old addresses associated in the wallet will not cause harm.  Is there any specific reason you want to do this other than cleaning up the addresses associated in your wallet?  I would leave them where they are as you will normally always need new addresses for new transactions.

Or are you wanting to prune old addresses imported into a wallet.dat file that are now no longer in use?  In this instance I would be more tempted to find the addresses with funds in the on the wallet and import these into a new wallet.dat file and use this new wallet going forward.

You can use Pywallet to prune old addresses out of the wallet but in the 14.0V of BTC i dont think there is a way.