If I received two blocks at the same time, which one should I choose
  to mine the next block?

Up to you. You can take the first one. Or the smallest one. Or known by the majority of your peers. Nobody cares.

In worst case you will mine the orphan chain. But nobody cares about you in decentralized system.

In fact you should compare two chains by total work. But this algorithm gives you poor results on comparing two latest blocks with the same height.

  Is the situation could happend?

Depends on what you mean by "the same time". Sometimes the blocks with the same height happen. They came in few seconds ( up to 10-20 seconds ) one after another.

  Is the Bitcoin pick one block randomly?

You can look to the source code on github. But this does not guarantee that the mining pools use it unmodified.


Unfortunately, the method used to generate new keys at the time was to generate them randomly and store them in the wallet.dat file. So if you don't have a backup of the file after the address was used, it is not guaranteed that your backups will have the necessary key.
I would suggesting dumping the wallet.dat file to see all the private keys contained within it. Either it has the key for the address the funds were sent to and you are in luck or it doesn't and you are out of luck.
One easy way to do this is to use the dumpwallet command. There are also tools available to parse a wallet file and extract all the keys in it.


What is the maximum number of bytes the coinbase scriptSig (coinbaseaux) can hold?

The maximum is 100 bytes and is checked and defined here: https://github.com/bitcoin/bitcoin/blob/master/src/consensus/tx_verify.cpp#L195


modifying bitcoind to include mysql support

adding -lmysqlclient under LIBS in configure.ac did the trick
the new line reads as follows:

LIBS="$LIBS_TEMP  -lmysqlclient"


Accesing bitcoind through terminal on mac

Per Gavin Andresen's answer on the first post to which you linked, Bitcoin-Qt for Mac does not ship with bitcoind. However, you can still access it with curl or wget, or using the provided Python wrapper. See the post for more.

If you are adamant about using bitcoind itself, your best bet is to compile your own bitcoind using my instructions or using the instructions provided in the source distribution of bitcoin.


Please help - Bitcoin Conf file in the wrong directory

You can use the --datadir parameter to specify the exact location of your blockchain data, and --conf to specify the location of your configuration file.

From the wiki:

  If you want to store the data in D:\BitcoinData then click on "Properties" of a shortcut to bitcoin-qt.exe and add -datadir=D:\BitcoinData at the end as an example:

  "C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe" -datadir=d:\BitcoinData

  Start Bitcoin, now you will see all the files are created in the new data directory.

If you have a custom config, do the same with the added parameter:

  "C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe" -datadir=d:\BitcoinData -conf d:\Bitcoin\bitcoin.conf


Is there a rippled Windows binary available for download?

No, but there is a guide to building rippled on Windows: https://wiki.ripple.com/Visual_Studio_2013_Build_Instructions

Note this, though:

  We do not recommend Windows for rippled production use at this time. Currently, the Ubuntu platform has received the highest level of quality assurance, testing, and support.

That's probably why they don't offer a windows build - they want people to use Ubuntu. Perhaps you could use a VM - that's essentially what the Docker suggestion does anyway.


Does Cryptocurrency really need timestamps?

I think the question isn't so much whether this is possible, but whether this is desirable.

The block rate limit has several functions:

Keeping the stale block rate low, so that the effort a collusion attacker has to do is not much higher than honest miners (per block).
Keeping validation on non-mining full nodes feasible.

The second of these goals is inherently hard to achieve without a clock (it could be integrated into your proposal by modulating block size based on the achieved block rate, but that again would introduce the need for a clock).

However, the first of these is also incompatible. A collusion attacker (someone who only mines on top of his own blocks, and ignores anyone else's), or a cartel of miners that collude against everyone else together, can set the block rate arbitrarily high while keeping the uncles rate zero (or whatever desired rate). If such an attacker drives up the block rate high enough, it becomes harder for honest other miners to participate, even when the attacker has less than 50% of the hashrate - the other miners are inherently disadvantaged by only seeing blocks with a delay (the ratio between delay and block interval affects their profitability).

So what this accomplishes is that it self-selects for a set of miners that can keep up with the intended uncle rate, which may be arbitrarily small. The desired property is subtly different: keeping the fork rate low when an acceptably distributed set of non-trusting miners can participate.


What are the problems with naive pool sharing mechanisms?

The primary problem is an "attack" of sorts referred to as "Pool Hopping." Pool hopping was first described in a paper by Bitcoin forum member Raulo and between the paper and the ensuing discussion, it was determined that there is a strategy by which pools utilizing a proportional payout method can be exploited to maximize the miner's payout at the expense of other miners in the pool.

The attack works something like this:

If the number of shares submitted to a pool are less than or equal to 43% of the current difficulty, the miner mines at this pool.
If another pool has a lower share count, the miner switches to that pool instead
If no pools in the miner's list are at or below the 43% mark, the miner switches to a pool with a fair payout system as backup.

The math for why this works is well described in the paper I've linked, but the basic concept is this: If I submit one share and it's the only share in the pool so far and it just so happens to be the share that solves the block, my share was worth 50 BTC to me. If my share is one of two, it was worth 25 BTC and so on. Shares submitted in "short rounds" (i.e. rounds that take n < difficulty shares to solve) are worth more each than those in "long rounds" (n > difficulty shares). If a miner stays at a pool for a long time, the long and short rounds even out. Pool hopping ensures that you're always part of those "short rounds."

The full explanation is somewhat more complex, but that's a fairly basic explanation. 43% was chosen due to the math explained in Raulo's paper and there are a few scripts and applications to automate the pool hopping process, some free and some commercial.

There is rampant argument about the ethics of pool hopping, but there is little argument as to its effectiveness. Even hopping between a single proportional pool and a fair-scored backup pool sees substantial earnings increases. Hopping between multiple vulnerable pools increases gains dramatically.


How do I protect my paper wallet from use by a different human who has used a random generator?

"Improbable" is an understatement.

There are 2256 possible keys.  In the entire universe, there are estimated to be "only" 2100 atoms.

So the odds of someone else ending up with the exact same address/key as you is far, far less than the same atom, out of the entire universe, being randomly picked twice.

If you are worried about an address collision, here are things that should be more worrisome:

Gamma ray burst wiping out all life on earth.
Sun unexpectedly going Supernova
Rogue Blackhole swallowing the solar system
An asteroid hitting the earth at the same time as nuclear war breaks out.

On the list of things to worry about, an address collision just does not show up.

You say that "millions of people use Bitcoin and Bitcoin Wallets that use their own addresses use several addresses per day".

  100 Million of people
  100 addresses per day
  365 days / year
* 200 years
-------------
Less than 1 Billion addresses used in the foreseeable future.

1 billion is about 230.
Which means that in 200 years, the chance of a collision is somewhere around 1 in 2256-30 or, 1 in 2226, which is still way more than atoms in the universe.

You're easily safe for at least 200 years.


Need authoritative source for historic Bitcoin conversion prices from all exchanges

All historical data from any exchange available at Bitcoin Charts: Markets API

  Historic Trade Data

  Trade data is available as CSV, delayed by approx. 15 minutes. It will return the 2000 most recent trades.
  Format:

  https://api.bitcoincharts.com/v1/trades.csv?symbol=SYMBOL[&start=UNIXTIME]

  Returns CSV with columns: unixtime,price,amount

  Example

  Latest Kraken EUR trades:
  https://api.bitcoincharts.com/v1/trades.csv?symbol=krakenEUR


What is the advantage of a market-specific cryptocurrency?

Why is there more than one fast-food service? Why is there more than one internet browser? The competitive altcoin economy encourages other coins to surge with better implementations. Bitcoin has very high transaction fees as of early 2018, this is why a fork came off as Bitcoin Cash a few months ago, but Bitcoin Cash is not the only coin fighting for low fees. We have seen RaiBlocks (No fees) and many other altcoins surge recently due to low fees. Some coins are created not only to solve a problem, but to simply be better than the current coin. NAV wants to surpass Monero, by not only being a privacy coin, but also allowing anonymous Dapps and more.

A lot of coins have lucrative companies behind them, the answer to this question is not really different from the one of the question "Why is there more than one company in sector X"? People want to make money, so they will innovate and try to outperform the others with a better product.

Sometimes, companies will issue a token usually from an ICO to raise money on their platform. There's usually little reason for the purpose of their custom token/coin other than raising capital. A normal company would have to attract angel investors which is a lot harder than creating a coin and selling it while cryptocurrency is a hot asset. Doing an ICO also does not require to lose a share in the company. This is why we are seeing a massive influx in new coins.


How can 24 words allow a user to recover a public and private key?

A) For each hierarchical deterministic account path ~2 (if detached) to ~4 (if not detached) billion private keys and associated public addresses can be synthesized.  If BIP 44 technology is applied to HD wallets.  The same wallet can manage multiple cryptocurrencies, see this table.

B) Take a look here that concisely shows how to recover private keys and addresses for multiple cryptocurrencies using the BIP 39 seed words found here


It means the total value of the UTXO spent by your transaction's inputs is less than the total total of the outputs.

Put otherwise, it's trying to create money.


How does the Lightning Network stop flooding nodes (DDoS) with micro transactions? Is this even an issue?

As of right now, Lightening Network suffers from the same flaw that allows mempool spamming in the Bitcoin network (making tons of incredibly small transactions with normal fees), and therefor if there are a large number of microtransactions, will suffer from the same flaw.

  All channel updates are broadcast to everyone. How badly that will suck depends on how fast updates happen, but it's likely to get painful somewhere between 10,000 and 1,000,000 channels.

It is important to note that the mempool attack works by creating an artificial demand for space in a networks mempool. The transaction fee is average or above average, but there is little to no output. This attack works because it forces real transactions to pay higher fees.

However in LN the problem is different. It is more a question of what the network bandwidth can handle. This is not to say the issue is not fixable, the LN Developer listed in the source goes on to say that this system is not optimized. A possible solution would be for the seller to only send the preimage (for more information on how LN transactions hop through the network) to the those who have created an HTLC with the seller and to pass the preimage along the chain of debt until it reaches the payee.

Source: RustyReddit, RustyReddit


Does GDAX charge network transaction fees?

I could confirm GDAX does not have any network transfer fees. It could be unbelievable, specially if you started with Coinbase(like most people now), but it's the fact, as it's confirmed in all of their withdraw pages 'network transfers are fast and free'!


Is there a Android POS full node wallet apps that is open source? An app that can also stake?

I think the short answer is no, there isn't an Android full node app. Being a full node would requiring downloading and storing the entire block chain, and that is too much data for mobile devices.

I don't know of any mobile wallets that stake. And you are right that many of the apps are just the QT code transformed to Java. I think it was done this way on purpose so as to ensure that the two references are bug-for-bug compatible.


Buying big amounts of Bitcoin for cash in person

For large purchases, you should look at OTC (Over The Counter) Bitcoin markets. Also known as "dark pools".


How to export public key for an address in bitcoin-qt?

And the answer is:

copy the address in question from your "Receive" address list
Help -> Debug window -> Console
type: validateaddress <address>

where <address> is the address you copied in step 1.

The command validateaddress will output a number of key-value pairs, one of them being "pubkey".

Edit: bitcoin-qt creates compressed keys (as you can check in the iscompressed key-value). If you need uncompressed keys you can use something like https://coinb.in/


How can one create a Genesis Block for a new Proof of Stake Cryptocurrency?

Quick and dirty solution?  Use their own initial hash.


No. The amount of Ripples is fixed and, unlike with Bitcoin, available from the day it was created. The amount is fixed to 100 billion.

However, this amount is for the main "Ledger" which is currently used by everyone using Ripple. You can see a ledger as similar to a Bitcoin block chain. Everyone can, if he would like, create a new Ledger, just like everyone can start a new block chain.
Currently, though, there is only one Ledger really used and that's the one the Ripple founders started together with Coinbase and consists of 100 billion Ripples.

These 100 billion Ripples or XRP are dividable into "drops", which are 1 millionth of a Ripple. This means that 100 million billion drops exist.

With the transaction fee for Ripple currently on 10 drops, this means that even with thousand transactions per second, they will only run out in 634,195 years.

(Disclosure: Since Ripple is fairly young, I'm also new to it. I did some reading and tried to understand it's foundations, taking the Ripple wiki as primary reference. It's very much possible that I misunderstood some aspects of the system or that the wiki is not fully correct.)


In the Lightning Network, what happens if a "middle node" suddenly goes dormant for a long while?

If the transaction cannot resolve before the CLTV value of the HTLC runs out the peers will be refunded (the pending HTLCs cancelled) and the transaction will be cancelled.
If C is not there to receive R funds will not move so there is no need for force closures, but the funds will be stuck on the online channels as well for that period of time.
The online channels will be able to propagate payments in the meantime given there is more liquidity available and the number of pending HTLC-s is below the set limit.
See the situation where C would be online to receive R and go offline before propagating to B discussed in:
What happens if R is not revealed by one of Lightning Network nodes? (Payment cancelation)


How do I recover Bitcoins from a Change address that is in a corrupted wallet?

If that really was a change address, its private key is included in your backup of the wallet, even if you can't see it in the client GUI; this is because Bitcoin-QT always keeps some (a hundred, IIRC) precomputed addresses ready, and uses them whenever you request a new address or it needs a change one. However, change addresses are never shown in your address list, so you couldn't see them even if this was your original wallet.

If those Bitcoins have really been sent to a change address, you'll still see them in your balance, and you'll be able to spend them. However, if your balance is actually less than before, then they'we been transferred somewhere else, thus the trojan hypothesis sadly applies.


What are the reasons behind pool transactions fees and what are the consequences?

Transaction fees have been a part of the Bitcoin protocol from the beginning. They are a core part of the protocol and are designed to be the long term incentive for miners.

And, Yes, miners will often exclude transactions without fees (or give them a lower priority). It's been that way for a long time although it does seem to be getting more common in my opinion.

Satoshi dice has indeed had an effect on the network, but transaction fees have been a part of the protocol from the beginning. The consequences of fees are many, too many to discuss here, but include the motivation for mining (especially as block rewards decrease) and protecting the network from spam and attacks.


Looks like you give someone your bitcoin login which is the worse thing you can do. Unless you know that person and can really be trusted, this could be a type of scam. Try to withdraw all your money and if you can't mean he got all your money.

Never invest with random peoples/website <= A very very high risk


Create wallet address on user registration for trading platform

The call you want is getnewaddress, which will generate a new Bitcoin address, add it to the current wallet, and return the address as the result of the call.

You can find documentation for the call here: https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/getnewaddress/

If you were writing this in Python, it would look something like this:

from pyjsonrpc import ServiceProxy

bitcoin = ServiceProxy("http://127.0.0.1:8332")
bitcoin.username = 'testuser'
bitcoin.password = 'testpass'
print(bitcoin.getnewaddress())

You would then need to track the addresses generated and record them with your user accounts, monitoring transactions and crediting users as they come in.


Is it still possible to do cpu mining for experimenting?

Yes it is technically feasible to solo mine with a rpi3. The 'fastest' miner you could run would be minerd. However, there is a slim-to-none chance you will ever mine a block on the bitcoin mainnet, but there is still a chance! I would save the trouble of building minerd and use bitcoind's build in block generator

bitcoin-cli setgenerate true 1

You don't need to worry about crashing other bitcoin nodes, they will validate if your newly mined block is valid.

If you are looking to have some fun with mining on the rpi take a look at bitcoind's regtest mode. Regtest mode lowers the mining difficulty to the absolute minimum level of difficulty. This means you can mine 1000's of your own blocks per hour on a rpi3.


Should I Encrypt my Wallet for Cold Storage?

From Bitcoin Wiki:

Wallet encryption uses AES-256-CBC to encrypt only the private keys
that are held in a wallet. The keys are encrypted with a master key
which is entirely random. This master key is then encrypted with
AES-256-CBC with a key derived from the passphrase using SHA-512 and
OpenSSL's EVP_BytesToKey and a dynamic number of rounds determined by
the speed of the machine which does the initial encryption (and is
updated based on the speed of a computer which does a subsequent
passphrase change).

This means that it doesn't encrypt metadata or pubkeys.
If you want to achieve a greater degree of security and privacy, I recommend to further encrypt the wallet file.


Every segwit block has one such OP_RETURN in the coinbase transaction: It's the Merkle root of the witness tree.

When the segwit softfork was activated, this included a fix to the third-party transaction malleability issue that was present on the network before. The issue was that the signature of a transaction could be changed by any other person by inverting the S-value used in the signature. This resulted in another valid (non-standard) transaction spending the same coins to the same recipients, but a different txid.

Segwit prevented this source of transaction malleability by moving the witness program out of the input script to a separate "witness field" in the transaction ("segregated the witness") which is ignored when the txid is calculated. This means that even when signatures are changed for segwit transactions, their txid remains the same. Making the txid independent from the signature also makes it easier to build on top of unsigned transactions (since their txid doesn't change with the signature) which is e.g. useful for smart contracts employed in Lightning Network payment channels.

A block commits to all of its transactions by including the root of the Merkle tree over their txids. However, this would mean that this commitment wouldn't cover the signatures of segwit transactions as they don't contribute to the txid. To commit to the signatures, segwit introduced the a second parallel Merkle tree, built from the witness txids, i.e. a transaction id calculated over the complete transaction data including the witness program. Since the blockheader can't be extended without a hardfork, segwit blocks commit to this witness tree by including the root in an OP_RETURN in the coinbase transaction.


Would it be possible to store hashes generated in a file, then brush through them to find out if they are under the target?

While this certainly could work, the chances of the hashes ever being valid are next to zero.

The reason is, the hashes must not only meet the target requirements, but they must also be a valid hash of the block header, which changes with each block.


Your approach sounds secure.

You can use any addresses generated from your deterministic wallet to receive BTC without the need to boot up and recover your wallet first.

For privacy reasons you should generate multiple addresses from your HD wallet and one use each for receiving payments once. As long as you have your mnemonic seed you will be able to recover your wallet and all of its addresses at any time.


How do I load money into my bitcoin account

Bitcoin is an asset that you can purchase, more like an electronic version of a precious metal coin than like a payment service that you load money into.

To get Bitcoin you need to buy it from someone else or have someone pay you with it for providing some product or service.

To buy Bitcoins you can use services like Bitcoin exchanges (Popular exchanges in the US today are services like Gemini and Coinbase) or you can meet people in person and trade for bitcoin peer to peer (a popular service is localbitcoins).  The set of services available to you will be different depending on where you are.

As always, beware of scams online.  If you have any friends that use Bitcoin you can ask them for advice about what services they use.


Who is funding the Beam mimblewimble development team?

There are many investors of this project.

INVESTORS

Lemniscap Investor of Beam Mimblewimble

Node Capital is investor at BEAM Mimblewimble

yeomans capital Investor of Beam Mimblewimble

PROTOS asset management Investor of Beam Mimblewimble

youbi capital Investor of Beam Mimblewimble

Alternity  is investor at BEAM Mimblewimble

1KX Investor of Beam Mimblewimble

Continue Capital Investor of Beam Mimblewimble

Mek Group  is investor at BEAM Mimblewimble

Ceyuan Ventures Investor of Beam Mimblewimble

hexa labs Investor of Beam Mimblewimble

Collider Ventures

EZRA


Is there any study or research of how to make BTC transfers refundable?

At the technical level - No.

Credit card charge-backs work because the credit networks such as VISA and MasterCard (and participating banks) are giant clearing houses or multilateral bank arrangements to that effect. Anyone with an ongoing relationship with a bank essentially agrees to having money removed from their account or frozen in the case of a dispute or other funny business.

This is difficult to enforce with bitcoin addresses, if those addresses avoid the more centralised parts of the bitcoin ecology (currency exchanges, escrows, off-block payment gateways) that are more motivated to trace, penalise and report theft and fraud.

However:

Bitcoin insurance may become a popular way to mitigate against theft or fraud. This should actually be quite easy for insurance companies to calculate actuarial tables and premiums for; as the global transaction log for this currency is entirely visible.
Escrow is a common option for "reversible" transactions but only because the atomic irreversible bitcoin transactions are split into two separate transactions: One to the escrow and one from the escrow - assuming the escrow service is more trustworthy than the original buyer/seller arrangement... Escrow can provide a potential reversible service for fraud but would be pretty useless against theft.
A bounty arrangement might be viable. As actually offloading the bitcoins to a fiat currency is hard to hide (unless your mixer service provides pools of large volume and uniform dispatch interval); offering a bounty or amnesty of X% of the stolen money might result in the thief returning it.


dyld: Library not loaded when running bitcoind on a mac

The answer below is likely not complete for your situation, but will get things rolling if you take the initiative.

A compiled executable that is statically linked is 100% complete for a particular computer architecture, and are much larger in size than dynamically linked executable that tend to port better across computers with varying architectures.

Your improperly functioning executables are using dynamically linked libraries instead of using statically linked libraries. Your executable(s) are looking for a dynamically linked library (file) in the /usr/local/opt/miniupnpc/lib/ directory called miniupnpc.16.dylib.

If you have Homebrew installed, a "% brew list" will indicate if miniupnpc package is installed. A "% brew ls -v miniupnpc" will identify the path where are the files miniupnpc package files are installed such as the dynamically linked lib/libminiupnpc.16.dylib library file or the statically linked lib/libminiupnpc.a library file.

You will need to read about the HOMEBREW_LIBRARY_PATH environmental variable and the DYLD_LIBRARY_PATH environmental variable used on a Mac.

The path for your command line interface and the *.dmg file are different.  Use the UNIX "% which bitcoind" or "% which bitcoin-cli" to identify what the command line path really is set to within your UNIX shell.


Given a block, is there a list of all hashes for all possible 2^32 nonce values?

I know this sounds like a silly question, but is there some place to download all 137.4 gigabytes of hashes for the Satoshi block or some other block?

Nope.

  Otherwise, what is the best way to generate them?

Here's a program that does what you asked. It's a modification of Ken Shirrif's example mining program. It mines the genesis block.

It produces hashes at 2 MB/s on my laptop.

  Can I pick up an old ASIC miner and have it write every single hash to a hard drive?

Maybe, but it wouldn't really be faster than doing it with your CPU.


Impossible to restore Copay wallet on new phone

Anyone has an idea?

Use a spelling checker on your twelve-word recovery phrase.

Even better, use a tool to check the phrase against the appropriate BIP39 dictionary for your language.

Example

>wordcheck able moose zoo
able                           - OK
moose                          - Not in bip39 dictionary
zoo                            - OK

Source: https://github.com/redgrittybrick/wordcheck

Compiler: https://golang.org/


How do I interact with Bitcoin Core from NodeJS?

I highly recommend looking at Bcoin. It is a full node implementation used by Purse.io but also includes a rich API for interacting with the Node and wallets. All of it running in NodeJS. Documentation is sparse but getting better.

http://bcoin.io/

Otherwise, bitcoinjs https://github.com/bitcoinjs/bitcoinjs-lib is a Javascript library that lets you parse, create, and sign transactions. But it doesn't handle the hard part of querying the network, caching information about transactions and wallets, or picking inputs and calculating fees when you want to spend.


What is ccache? When should I use it when building and reviewing Bitcoin Core PRs?

The tool ccache helps store intermediate compilation results, so if you changes branches often, and rebuild, it can significantly speed up doing so.
To use it, you install ccache for your platform. That's it. The Bitcoin Core configure script will detect its presence, and use it automatically.


This is what I do:

Connect to peer
Set bloom filter
Send 'getblocks' message
Send 'getdata' message with MSG_FILTERED_BLOCK set for any new blocks

Note that 'getblocks' returns a list of block chain hashes from the specified starting point, not the blocks themselves.  Then 'getdata' returns 'merkleblock' messages instead of full blocks.  The peer follows the 'merkleblock' message with any transactions that match the bloom filter as separate 'tx' messages.

More details are in BIP0037

If you want an example, my Java wallet can be found on GitHub


lightning node data visibility on explorers

updated the docker image and put bind-addr to 0.0.0.0:9375 somehow fixed the problem for some unknown reason.


The approximate ratio which is usually used in calculations is 2^32 hashes per share. If you want the exact ratio, it's 2^48/(2^16-1).


What happens to the original bitcoin after a wallet restore?

I'm sure it's unlikely, but what if someone stole my computer and I then restored my bitcoin to a new wallet - would the thief be able to spend from the original wallet after I'd done the restore?

Yes. The two wallets 'hold' the same Bitcoin. If the thief steals your original wallet, it becomes a race to see who can spend the Bitcoin first. You have the advantage that only you know your password. (You did set a password, right? :) The thief has the advantage of surprise.

Additionally, if you generate a new address on the backup of the stolen wallet, the thief will have access to that too. This is due to the 'keypool' feature of Bitcoin. To avoid this, after your wallet is stolen, make an entirely new wallet, and transfer your Bitcoins to that. That will be safe, assuming you win the race.


Merging blockchains after algorithm change

That seems possible, but I'm not aware of any instances of it being done before.

You have three major problems:

Bitcoin generally assumes that there is one single ordering of transactions. That ordering can change, but there's always only one. The danger is that your two blockchains contain transactions that are mutually exclusive: transaction A and transaction B both spend the same coins, so only one can exist in the new master chain.
Everyone needs to upgrade to a client that supports the new merged blockchain, and the algorithms in both chains. Some people might have been screwed over by the previous step in the process (because a transaction they relied upon was essentially reversed,) so they might be a little reluctant to do this.
You need to avoid introducing any subtle security bugs while doing this.


How would the gossip protocol announce channels from a channel factory?

Pretty much everything would stay the same. If you look at the relevant messages channel_announcement and channel_update we have the following formats:

channel_announcement

  type: 256 (channel_announcement)
  data:

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

channel_update

  type: 258 (channel_update)
  data:

  [64:signature]
  [32:chain_hash]
  [8:short_channel_id]
  [4:timestamp]
  [1:message_flags]
  [1:channel_flags]
  [2:cltv_expiry_delta]
  [8:htlc_minimum_msat]
  [4:fee_base_msat]
  [4:fee_proportional_millionths]
  [8:htlc_maximum_msat] (option_channel_htlc_max)

If you look at this you'll see that the channel_announcement includes a lexicographically sorted list of node and bitcoin signatures and their corresponding pubkeys. This is trivial to extend to arbitrary number of participants by making this list variable in length.

In particular the short_channel_id still refers to the single output that the off-chain contract was opened with, that'd also stay the same.

channel_update may seem a bit more complicated since now there are n*(n-1) possible directions (sender-receiver pairs) this contract can be traversed, whereas in the simple 2 participant channel we just have 2 directions. The direction concept can however be easily extended to just lexicographically rank all sender-receiver pairs and use the index to identify the pair.

It is likely that some of the message formats need to be amended (variable length pubkey and signature lists) and some fields be made explicit (rank index for sender-receiver pair), but the general concept stays the same.


How secure is calling bitcoind JSON-RPC?

Yes, they can. Unless you enable RPC-over-SSL, the username and password are send Base64 encoded as a header in the HTTP request, which is easily decoded.


How can I use my pass phrase from 2009 to recover my wallet?

Do not confuse passphrases with recovery words. A passphrase is used to decrypt a wallet file. Without an encrypted wallet file, a passphrase is useless.


Mini-Blockchain proposal: How is the proof-chain secured against injections?

Block data is not necessary to check proof of work, or to check that past block headers has not been altered. This is because for a block to pass proof of work check, the hash of its header must be less than a certain value. So, the header (which is just 80 bytes in Bitcoin) has enough information to check proof of work. Also, each header includes the hash of header of the previous block. So, assuming that the hash function is collision-resistant, it is impossible to modify any of the previous headers without changing the hash of the last header, and it is impossible to change any header while keeping proof of any work done after the corresponding block. The only way to "fake" a mini-blockchain is to outrun the honest miners, which requires an attacker to have comparable amount of hash power.


ETH transactions between "smart" contracts and "dumb" wallets are always possible. The fact that your wallet does not support smart contracts does not mean you cannot send funds from a smart contract to your wallet, it just means you cannot manage a smart contract from said wallet. You can still send funds back a forth between the two.


Number of Trials Required For Brute Force Attack To Have x% Of Success?

Since nobody replied, I posted this on the Math Stack Exchange and quickly got an answer.

For anyone that's interested, using a formula from R we get the following values:

pbinom(0,3.365231884e48,2^(-160), FALSE)   = 0.9000000000339017
pbinom(0,1.0130357393e48,2^(-160), FALSE)  = 0.5000000000001161
pbinom(0,1.46885823057e46,2^(-160), FALSE) = 0.01000000000005571


I need details explaination about " BLOCKCHAIN BITCOIN ADDER BOT"

It's a scam. They are showing you addresses that they don't actually have private keys for in order to trick you into thinking that you will be able to make money. It's practically the same thing as the traditional Nigerian Prince scam.

Think about it: if someone had all of that money and could give you the private key, why wouldn't they just take it themselves? Why would they give it to someone else in exchange for a small payment?

TL;DR IT'S A SCAM


Kind of. People who call Bitcoin "Bitcoin Core" are referring to Bitcoin. They will also use the name "Bitcoin Legacy". but calling Bitcoin "Bitcoin Core" or "Bitcoin Legacy" is misleading.

Bitcoin Core is the reference client for Bitcoin. But it is wrong and misleading to call a coin by the name of its reference client. For example, we don't call Bitcoin Cash "Bitcoin ABC" even though its reference client is Bitcoin ABC. Nor do we call Ethererum "geth" even though its reference client is Geth.


I tried to run bitcoin core and it is gone. Has anyone experienced this?

Some antivirus programs can remove binaries, or move them away. If you have one running, look whether it has some kind of quarantine place where it puts suspected malware. False positives can happen.
That, or you deleted the file by mistake :)


How many rounds of HMAC-SHA256 needed to generate the master key in BIP32

BIP 32 only uses one round of HMAC-SHA512 to go from the seed to the master private key.

Neither of the two sources you listed are going from a seed (or passphrase) to the master private key. They are going from a mnemonic or passphrase to the seed.

What Mastering Bitcoin is describing is the BIP 39 conversion from mnemonic to BIP 32 seed. From there, that seed will be put though HMAC-SHA512 one more time to get the final master private key.

bip32.org is using HMAC-SHA256 (which is not HMAC-SHA512) 50,000 times in order to convert the passphrase you enter into a BIP 32 seed. Again, the resulting value will be hashed one more time using HMAC-SHA512 to get the master private key.


Can the blk0001.dat and blk0002.dat files be deleted?

You can delete them just fine, as long as you delete blkindex.dat too. They will be downloaded and processed again. This will take a while, these days, though.


How many OP_RETURN transactions in the Blockchain would be too many?

It is reasonable solution. The main problem is not in the size of blockcain itself. The problem is in growing the number of unspent outputs. OP_RETURN outputs do not increase size of Utxo database


Would any of the current botnets be able to launch and sustain a 51% attack?

If you want to profit from Bitcoins, you would not want to work against it (as was explained by Satoshi in his original paper). A 51% attack would not bring you profit, rather it would make everyone involved in the project loose, as Bitcoin's reputation would be damaged.

The other thing is getting enough hashing power. Unless you target mining-specific machines, chances of getting higher-end mining-compatible graphics cards isn't too high. So the trojan would have to rely on getting a lot of moderately powered PCs, and in order to launch a 51% attack, the botnet would have to be quite big. The biggest botnets, consisting of over 100'000 computers could potentially accomplish this, but so far Bitcoin isn't a prime target for botnet activity.


What type of smart contacts will be available on Lightning Network?

(This is according to my understanding, so any comments are very welcome.)
Lightning Network Summary
Currently, the lightning network operates by first creating a transaction on the blockchain, this is called a channel. See LND Overview.
When someone does a transaction on the lightning network, they create a transaction that they sign, which could be signed by the recipient and "closed out" at any time, which broadcasts the final state of the channel to the blockchain.
The fact that either party can close the channel at any time by broadcasting it to the blockchain means there isn't any loss of trust. With this level of trust, this limits the transactions on the lightning network to the current Bitcoin Script System which is intentionally not turing-complete.
Possibilities
Theoretically, another layer could be built on Lightning network (or the Bitcoin network for that matter) that established it's own form of scripting (e.g. some turing-complete scripting like Ethereum), and then generated Bitcoin-compatible transaction scripts. But, then the user would have to trust the new scripting language to generate a valid transaction that is in their favor. However, that introduces a very large attack vector and possibilities for developer errors like we've seen on Ethereum smart contracts. This does not depend on the Lightning network, though some of the concepts of LN might be useful.


One method commonly in use is an "offline wallet."

To generate an offline wallet, launch a bitcoin client on a known clean computer, virtual machine, or use a bootable Linux distribution like LinuxCoin. Make sure this system is NOT connected to the internet for this process. When the bitcoin client is first launched, it generates a brand new wallet.dat file with one address. Save that wallet.dat file to a thumb drive along with a text file containing your new bitcoin address. Delete the wallet.dat from the machine once you've copied it.

Any coins sent to that address are only accessible to someone holding the wallet.dat file on your thumb drive and since the computer which generated that thumb drive has never seen the internet so it's a pretty fair bet that your copy is the only copy. Send any coins you want to secure to your "offline" wallet's address and use your thumb drive to recover the coins when needed. Remember that once you've used the wallet on the thumb drive, it is now "burned" and a new one must be generated.

Edit: There is an excellent resource for wallet-securing techniques available on the Bitcoin wiki which also covers backup methods, encryption and many other topics at far too great a length to cover in a single answer.


How do you make the unicode Bitcoin symbol show correctly in text on Linux?

While the symbol was part of the Unicode 10.0 release, many fonts still don't have the symbol as part of their character set. You need to install a font that includes the symbol to make it show up.
One such font is GNU Unifont Glyphs. After installing the package unifont, the symbol shows up in the console and browser for me.

Corollary, many Linux distributions support inputting unicode symbols by typing CTRL+SHIFT+U, followed by the symbol's designation 20bf offset by a space or ENTER.


I doubt anyone will have such a value since it would require a tremendous amount of computation. One approach would be to monkey patch your HMAC-SHA512 function to return a value with 32 leading zero bytes for the purpose of the test.


can Bitcoin transactions are included in multiple blocks?

Yes, theoretically, 2 blocks could be mined at (almost) the same time.
And then, it's also possible that one transaction could be included in those 2 blocks.
But then, there are 2 blockchains, but only one of them (the longest one) will finally be accepted by the network.
So your transaction could be in 2 blocks, but only one time in a blockchain.


Inflationary (no total coin limit) cryptocurrency where miners keep all new coins

PPCoin and its offspring NovaCoin have an infinite money supply - even though the reward for blocks gets diminished over time (as in Bitcoin et al.), as the money supply increases there will be more and more coins offered as reward for simply hoarding the coin.

There are also built-in deflationary mechanisms for destroying coins with every transaction, so hopefully the money-supply would self-adjust: increasing or expanding as needed, depending on how much it's actually used.


Fees when withdrawing funds from bitcoin?

Does one have to pay a fee to withdraw funds from their bitcoin account into cash

If you have a Bitcoin account you are either storing money in a service like an exchange or are using an obsolete feature of the Bitcoin core wallet. Many people who own Bitcoin don't have a Bitcoin account - they look after their own cash and don't pay someone else to look after their cash for them.
Bitcoin is cash.

If you convert cash from one currency into another, you will pay a fee, sometimes the fee is hidden as a spread between buying and selling rates. This is a feature of currencies in general and has nothing to do with Bitcoin.

If you move control over some amount of Bitcoin from one Bitcoin address to another, you will pay a transaction fee.


It is from the perspective of the other person (not yours).

When you see Sell, or Sell Orders or Selling or Asks is people willing to sell to you. Thus you look at these entries if you are buying.

When you see Buy, or Buy Orders or Buying or Bids is people willing to buy from you. Thus you look at these entries if you are selling.


How to create a valid unsigned transaction

This is not how Bitcoin works.

Bitcoin does not use an accounts system nor does it use addresses on a protocol level. Spending Bitcoin means that you are spending from a transaction output. If there is no available transaction output for you to spend from, then you cannot create a transaction. So with addresses with 0 balance, no such valid transaction can be created.

Next, the "sending address" that you specified requires a digital signature in order to spend outputs associated with it. This is because that address type tells wallets that an output should be created which has the form OP_DUP OP_HASH160 <hash> OP_EQUALVERIFY OP_CHECKSIG where the address encodes the <hash> and the type of address specifies the other opcodes. So you cannot spend outputs that are associated with this address without being able to provide a valid digital signature that corresponds to the public key that hashes to <hash>.

What you could do is have a transaction output whose script is something like OP_DUP OP_HASH160 <hash> OP_EQUAL. This does not require a signature, but such a script, even though it can be constructed with the provided address, does not correspond to that address because it does not have the construction that the address type specifies.

Thus it is impossible to create such a valid unsigned transaction because 1) there is no output to spend and 2) the address requires a signature in order to spend from outputs associated with it.

Such a signature-less script as a I described corresponds to no address; there is no address type that specifies it.

The output script would look like this:

76a914ef0ffa5f1cc59bed17cf4e35ae9cbf396cddf17088

A transaction spending from that script would look like:

0200000001deadbeef000000000000000000000000deadbeef00000000000000000000000000000000222103061e97605659c9dc77ed437cbc345ec41633888ae3b2c75fdd532db789cc476fffffffff01000000000000000016a914ef0ffa5f1cc59bed17cf4e35ae9cbf396cddf1708700000000


Where can I register a domain and pay with bitcoins?

Note that all services need to be checked by you somehow to decide whether you can trust them!
There is a list of such services at https://en.bitcoin.it/wiki/Trade#Domain_Name_and_DNS_Hosting; for example:

http://www.domains4bitcoins.com (com, net, org, co, co.uk, in, biz, us, eu, mobi, asia, name, tel, co.in, tv, me, info, ws, bz, cc, org.uk, me.uk, net.in, org.in, ind.in, firm.in, gen.in, mn, us.com, eu.com, uk.com, uk.net, gb.com, gb.net, de.com, cn.com, qc.com, kr.com, ae.org, br.com, hu.com, jpn.com, no.com, ru.com, sa.com, se.com, se.net, uy.com, za.com, gr.com, co.nz, net.nz, org.nz, com.co, net.co, nom.co, ca, de, es, com.au, net.au, xxx)
http://bitdomain.biz (biz, com, com, org, info, us, eu, in, mobi, asia, name, tel, tv, me, ws, bz, cc, mn, ca, de, es, com.au, net.au, xxx)
http://www.cinfu.com/domains/ (com, net, org, biz, info, eu, in, us, de, ru, es, asia, bz, ca, cc, co, mn, mobi, name, me, tel, tv, xxx, *.uk, ws, la, tw, cn, ac, io, sh, nu, be, tc, vg, ms, gs, jp, at, am and more 2nd level domain)
http://www.exoware.net/domainregistration.xhtml (com, eu, me, org, me.uk, de, es, co.uk, net, name, info, org.uk, cc, tel, ca, biz, tv, co)
https://www.kalyhost.com/domain.html (many different top-level domains
https://clients.microtronix-tech.com/domainchecker.php (not so many top-level domains)
https://secure.orangewebsite.com/cart.php?a=add&domain=register (not so many top-level domains)
http://www.privacyshark.com/ (anonymous, but not clear which top-level domains are offred)
http://www.frankdomains.com/btc (all top-level domains and all European TLDs e.g. .com, .xxx, .travel, .at (Austria) through to .com.ua (Ukraine) and all countries inbetween Also all New gTLDs as they come online)
https://www.namecheap.com/support/payment-options/bitcoin.aspx (Namecheap: Many TLD's)
...

More offers:

https://www.domenburg.com (Instant registration after 1 btc confirmation, 500+ TLDs: ru, com, net, org, co, pro, in, biz, us, eu, mobi, asia, name, tel, co.in, tv, me, info, ws, bz, cc, ca, de, es, ...)


Why Copay sends amount from address to address?

If you receive a payment in your wallet, it should stay there unless you make any transactions yourself by purpose. Anything else would get me worried to say the least.


What problems identified with bech32 addresses have been resolved with the updated bech32m?

As far as I can tell "length extension mutation weakness" is the sole problem that needed to be resolved and is resolved by bech32m. But "length extension mutation weakness" includes both insertion and deletion.

Insertion: if a valid Bech32 string has the suffix p, inserting a single q character immediately before the p will produce another valid Bech32 string.
Deletion: if a valid Bech32 string has the suffix qp, removing the q character will produce another valid Bech32 string.

There are also more complex insertions and deletions that are possible than just "q before final p" too (see Pieter's comment at the bottom) though I haven't found this documented anywhere thus far.
To resolve this problem a new checksum algorithm has been designed by:

replacing the constant 1 that is xored into the checksum at the end with 0x2bc830a3

Bech32m encoding will only be used for SegWit output versions 1 and above. Version 0 will continue to use bech32 as the length extension mutation weakness does not present a problem for version 0 as SegWit v0 addresses are restricted to two specific lengths (No such length restrictions are currently imposed on higher SegWit version addresses.) They are defined to only be 42 characters (P2WPKH) or 62 characters (P2WSH). Although technically you could insert 20 q characters to make a P2WSH address with a valid checksum from a P2WPKH address, the checksum is not designed to guard against adversarial situations or insertions this large. The goal of the checksum is to protect against typos, copy paste errors, transcription errors, errors from being relayed as spoken words.
Pieter added on GitHub:

I think it's a bad idea to have multiple addresses valid for the same scriptPubKey. It only results in confusion when decoding/recoding doesn't roundtrip. v0 outputs use bech32, and I don't think this should ever change, for better or for worse. It also worsens error detection to 29 bits (as every v0 output now has two valid checksums).

Once you have proposed two different encoding schemes (bech32 and now bech32m) this presents a challenge to wallets of knowing which encoding is used and the bech32m draft BIP hence decides to make the two entirely incompatible ie it is impossible for a bech32m address to be a valid bech32 address and vice versa.
Thanks to Pieter Wuille and Russell O'Connor for some corrections on the original post.


More Input-Values than necessary. How and why is this possible? No it is not the fees!

Only the exchange can answer this - most exchanges and hosted wallets implement their own utxo handling mechanisms, and don't necessarily follow a space/fee optimal approach. There could be other considerations, such as reducing the number of utxos in their wallet, consolidating funds into bigger utxos during a low fee period as they expect larger payments during a high-fee time, or other business reasons.

Alternatively, it could just be an inefficient implementation.


What criteria does Bitcoin.org use to choose which wallets to list

I asked Craig Watkins, Bitcoin.org's wallet page maintainer, to comment.  The rest of this answer is his reply.

  Currently on bitcoin.org there are 21 wallets listed (including three
  "hardware wallets").

  Bitcoin.org is a community maintained site:
  https://bitcoin.org/en/about-us

  Updates to the wallet listings are submitted as pull requests on
  github: https://github.com/bitcoin-dot-org/bitcoin.org

  and approval for listing is based on community consensus of complying
  with the criteria listed here:
  https://github.com/bitcoin-dot-org/bitcoin.org#wallets

  The pull requests can be submitted by anyone, but are most often
  submitted by the wallet developers themselves.  Reviews can be
  performed by anyone, but are usually done by the current bitcoin.org
  wallet maintainer who offers an opinion on the compliance to each
  criteria listed.  The reviews, discussions, and results for each of
  the current and past pull requests can be viewed here
  https://github.com/bitcoin-dot-org/bitcoin.org/pulls


Large number of dust inputs sum to nice round numbers. How and what wallet used?

Another explanation might be that one of the input transactions is intentionally created to cause the sum to be a round number.


Are there any downsides to banning node crawlers?

It would be hard to specifically ban crawlers as a practical matter because there is no reliable way to differentiate them from other normal nodes. They can, in fact, just be normal nodes that instrumented with code to collect the desired data and report it back to an aggregation system.
So then you are left with banning normal nodes. Since all of the value of running a node comes from its connectivity to the P2P network via other nodes, this would not make sense.


Does the backup (Bitcoin QT) saves my BTC if i create thousands of addresses?

If you're using an HD wallet, then yes.  This would be the case if you created the wallet from scratch with the latest version of Bitcoin Core using default settings.  However, if a lot of those addresses were unused, you might have to use special options to increase the gap limit when attempting to recover from the backup, or it might not regenerate enough addresses.

If you're using a non-HD wallet, then no; in that case you have a keypool of 1000 keys.  So when you make a backup, it will be able to recover coins from the next 1000 addresses you generate, but no more than that (unless you use the appropriate command line option to enlarge the keypool).  This would be the case if you created the wallet with an old version and then upgraded, or if you set the command line option to use a non-HD wallet.


bitcoind getrawtransaction has no value for vin, what am I doing wrong?


Solo mining requirement to win a block everyday?

You can mine 1 block roughly every 10 mins, hence total blocks per day is 6 x 24 = 144

The current Hash Rate in the Network is about 70000 GH/sec (Source: Blockchain.info]1

If you have 100% of the Hash power, you will get all the blocks each day.

To get at least one block a day, you will need roughly 0.7% of the current total hash power (1/144), that is about 486 GH/sec of hash power.

To get at least one coin a day, you will need at least 19.44GH/sec of hash power ( 486 / 25 coins per block)

The hash power requirement will change as the network hash rate rises with more ASIC devices shipped.


What pool catters to multiple alternate currency?

try www.multipool.us they have a server which does multiple currencies in a day(depending on their profits)


Confidential transactions: how can they be verified by the network?

If the network doesn't know transaction amounts, how can it verify a transaction?

That's exactly what Pedersen commitments allow you to do.

Each of the outputs contains a commitment P(v,r) = vH + rG, where v is the value and r is the blinding factr. The network does not know v or r, but does know P(v,r) (and H and G, which are constant).

Pedersen commitments have the property that they're linear in both arguments. This means that P(v1,r1) + P(v2,r2) = P(v1+v2,r1+r2).

For every transaction, a network rule requires that the sum of the output's commitments equals the sum of the commitments of the outputs spent by the inputs. This means that the sum of the output's values must equal the sum of the input's values, and that the sum of the blinding factors must equal the sum of the input's blinding factors.

The range proofs are there to prevent overflow in the value addition.

  It doesn't know whether the account balance is sufficient.

There is no 'account' balance in Bitcoin. Transactions create outputs by burning outputs created by other transactions. Your wallet shows the sum of the values of all outputs you can spend. The only requirement is that a transaction does not create more in outputs than it burns in its inputs.

  How can the network even know account balances when the amount of incoming transactions is hidden?

It can't. The purpose of Confidential Transaction is to prevent the network from knowing anything about anyone's balances. The only necessity is that individual wallets are able to determine how much they're able to spend. In CT that is solved by sending that information in encrypted form along with the transaction, with the receiver's public key.


Transaction broadcasts and block synchronization

While implementation specific, transactions are only re-broadcasted by the bitcoin-qt client after every x minutes (30?) and only if it's not in the main chain yet. Once a block comes in that has the transaction, it'll stop transmitting. If a new chain is accepted later that doesn't have the transaction, it will start broadcasting again.
About transactions getting lost, I already wrote an answer about that once :

Most clients on the network have a transaction pool in their memory. The same basically applies to miners: they just dump the top 500KB (or some other value) transactions into a block, sorted by transaction fee (descending, of course). When there aren't many transactions, maybe because of a series of block in a short amount of time, it will be confirmed anyway.
But to answer your actual question: yes, transactions (sort of) expire. When you send a transaction, it sends a tx frame to all connected peers. These peers store the transaction in their memory pools and tell all their connections that they have a new transaction. When those connections don't have it yet, they ask for it, and that's how a transaction spreads over the network.
At some point every node in the network will have the transaction in their memory pool, and at that point it will no longer be sent over the network. Now when a user restarts their client, the memory pool is wiped, and the transaction is deleted from that computer. (Plus a few other ways to delete transactions from the pool)
Because of that it's very unlikely for the transaction to be gone from the entire network, but in case it does happen: the reference client will automatically re-send the transaction every x hours(/minutes?) when it's still not confirmed.
Oh, and I forgot the most important part: transactions on Bitcoin (tx frames in the protocol) don't have a 'time' field, which means that transaction expiration can't be a feature of Bitcoin.
To summarize: yes, the transaction can expire, but that is really unlikely.


Are there any open-source trading bots out there?

ga bitbot

from the project page:

  ga-bitbot is a distributed genetic algorithm tuned automated mtgox trading system for Bitcoin which includes market data collection, gene client/server, reporting tools, and automated trading.

  The intention of this project is to create a high frequency capable trade platform for the bitcoin p2p currency.

bitcoin arbitrage

From the project page:

  bitcoin-arbitrage - opportunity detector and automated trading
  It gets order books from supported exchanges and calculate arbitrage opportunities between each markets. It takes market depth into account.

  Currently supported exchanges to get data:

  MtGox (USD, EUR)
  Bitstamp (USD, ~EUR)
  Bitcoin24 (EUR)
  Bitfloor (USD)
  Bitcoin-Central (EUR)
  BTC-e (USD, EUR)
  Intersango (EUR)
  Bitfinex (USD)

  Currently supported exchanges to automate trade:

  MtGox (EUR, USD)
  Bitstamp (USD)
  Bitcoin-Central (EUR) - closed

  (under MIT licence)

  *TODO:

  Tests
  Write documentation
  Add other exchanges:
  icbit
  BitFinex
  Update order books with a WebSocket client for supported exchanges (MtGox, Bitcoin-Central)
  Better history handling for observer "HistoryDumper" (Redis ?)
  Move EUR / USD from a market to an other:
  Coupons
  Ripple ?
  Negative Operations
  use Litecoin or other cryptocurrencies trades


I had the same doubt. I've done a little research in the library bitcoinj, and I think that it is possible to use multiple wallets at the same time. I recommend you first work with a single wallet so that you can understand a little how it works the library. I leave an example:

public class MainClass {
    private static final File BLOCKCHAIN_FILE = new File("block.dat");
    private static final NetworkParameters NET_PARAMS = MainNetParams.get();

    public static void main(String[] args) throws Exception {

        List<Wallet> wallets = getWallets();
        BlockStore blockStore = new SPVBlockStore(NET_PARAMS, BLOCKCHAIN_FILE);
        BlockChain blockChain = new BlockChain(NET_PARAMS, wallets, blockStore);
        PeerGroup peerGroup = new PeerGroup(NET_PARAMS, blockChain);

        for (Wallet w : wallets) {
            peerGroup.addWallet(w);
        }

        //Starting peerGroup;
        peerGroup.startAsync();

        //Start download blockchain
        peerGroup.downloadBlockChain();
    }

    public static List<Wallet> getWallets() throws UnreadableWalletException {

        List<Wallet> wallets = new ArrayList<>();
        for (int i = 0; i < 5; i++) {
            Wallet w = Wallet.loadFromFile(new File("wallet_" + i + ".dat"), null);
            wallets.add(w);
        }

        return wallets;
    }
}


Is there an open database to query bitcoin transactions

Google Cloud provides a dataset for most public blockchains, including bitcoin. You can directly query the dataset via their BigQuery Tool - you can use standard SQL
Bitcoin Dataset on GCP:
https://console.cloud.google.com/marketplace/product/bitcoin/crypto-bitcoin?filter=solution-type:dataset&id=7fd60425-cb95-4a58-b59f-ab3789642844


Would it be wise and extra secure to use non-ascii characters in a brain wallet?

It would not be wise to do this.

"Brainwallet" software is completely non-standardized, there's no guarantee that any two implementations handle the encoding of characters in the same way. Addition of UTF8/UTF16 these characters is also likely to be incredibly confusing, did you mean Tooxy or Тооху? Those strings look the same but one is a completely different set of Unicode characters (and make two entirely different keys).

Even with the addition of non-standard characters it's unlikely any particular human generated string will have enough entropy to avoid attack. Staying far away from the brainwallet concept entirely would be most sensible, it's extremely broken and will likely lead to a loss of money either through theft or faulty software.


Can't link my Paper Wallet to Blockchain

When you are in your Coinbase account use their "Send" feature to send coins to your paper wallet. It will then prompt you for a wallet address to send the coins to. Enter your paper wallet address there. Choose the amount to send, etc.

More here: https://support.coinbase.com/customer/en/portal/articles/971437-how-do-i-send-digital-currency-to-another-wallet-

If you are keeping the coins for yourself, there are better alternatives than paper wallet. If you are giving as a gift, just make sure recipient knows what to do or no do with the wallet.


The term mining is most specifically applied to Proof of Work consensus mechanisms. This is because verifying a bitcoin block is a rigorous process of hashing the block header until you find the block header hash that matches the current difficulty goal. New bitcoins are generated in the process (incentivizing mining) and hence the term mining.

Proof of Stake - In this consensus protocol, all the hard limit on the coins are outstanding on day 0 of the blockchain. This can achieved mostly through ICO. Now, the validators in this protocol stake their coins as a collateral in the network. The collateral serves as a guarantee that the validators do not act in a malicious way as they can lose their collateral. Every validator gets selected at random to verify a particular block. The chance of getting selected is proportional to the amount of money that is staked. The validators collect only the fee of the transactions in the block. The validators in Proof of Stake are called forgers or minters.

Proof of Ownership - This is not a consensus protocol. It is a byproduct of the blockchain that allows you to track the owners of certain information. The most glaring example would be colored coins. This is stored in the transaction as a metadata using a OP_RETURN opcode.

Proof of Existence - Again, this is not a consensus protocol and is basically a byproduct of the blockchain that allows you to verify that a particular record or transaction exists on the blockchain. This can be verified by different parties independently.

Proof of Space - This is a consensus protocol that leverages disk space rather than computational power. To mine blocks using PoSpace miners invest disk space to the network, with the probability of mining the block proportional to the space allocated as compared to the total capacity of the network. A PoSpace is a piece of data that the prover send to the verifier to show that he has reserved a certain amount of space. Without reserving that much amount of space, there is no way the prover can send that data. One way in which PoSpace can be implemented is by using hard-to-pebble graphs. The verifier asks the prover to build a labeling of a hard-to-pebble graph. The prover commits to the labeling. The verifier then asks the prover to open several random locations in the commitment.


MMCFE Not Reporting Stats from pushpool/wallet

add after stmt.pwd this line

"stmt.sharelog" :"INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?, ?, ?, ?, ?, ?)"

and it should do the trick ;)

for litecoin you should remove the rewrite  into
"rpc.target.bits" : 18,


How to create watch-only wallet on a server with a full node?

You can install Bitcoin core and import an address as watch only, then you can track all transactions.


Do larger blocks make it harder for smaller miners to compete? Why?

Yes. There are reasons at multiple different levels.

Propagation related.

It takes time for a new found block to propagate around the world to all other miners. Bandwidth, network latency and validation times play a roll. It's also important to keep not just worst case numbers in mind, but even adversarial case. The average case isn't very relevant.

So assume propagation takes 1 minute (bit extreme but not unheard of), that means that miners that hear about the block 1 minute after it was created, have just wasted 1 minute of hashing work on the wrong block.

Assuming all else equal this will happen to large and small miners. However a 30% large miner will NOT have that problem for 30% of the blocks (their own blocks). Small miners will only NOT have it for their own 1%.

Similar logic applies to orphan blocks: 2 new blocks found by different miners at the same time. A 30% miner has a good chance of finding another block on top of their own, while for a smaller miner (all else equal) that chance is negligible. Meaning smaller miners will have a higher orphan rate.

Economies of scale related.

Almost by definition economies of scale are favouring larger players.

All kinds of discounts and better deals you can make when buying in bulk: equipment, electricity, accommodation, staff, security, DDOS protection, fast redundant internet connections... Pretty much everything you can get faster (latest technology) and cheaper when you're bigger.

Economies of scale are sort of naturally limited by diminishing returns though. At some point electricity doesn't become cheaper anymore if you buy more and at some point fixed overhead costs become insignificant anyway. It's hard to say when the combined benefits to growing further will stop being significant. But it can certainly push small miners out of business and make it that much harder and riskier to start a new mining company.

One economy of scale that sort of works as a disadvantage to larger miners is heat dissipation: it's a easier to get rid of waste heat (or even to use the heat productively) at small to medium scale. Large concentrated miners need special equipment to get rid of heat or it prevents them from operating in hot climates.


Is there an API that supports different Bitcoin wallets?

I found out about Coinkite after I posted this. I send an email to their support team asking:

"With this platform, will I be able to have a user link their wallet and be able so send bitcoins to another users wallet, regardless of what wallet they use?"

I got a response of "Yes" and they sent me a link to their docs


This information can be retrieved from a running node with the getutxosetinfo command.

 $ bitcoin-cli gettxoutsetinfo
{
  "height": 365344,
  "bestblock": "0000000000000000007c35a02dcbc73a0d10ef4cbaee9a597fe16208a828f451",
  "transactions": 6784625,
  "txouts": 25716140,
  "bytes_serialized": 877658065,
  "hash_serialized": "14bfa4c4aca29b11099b70deb76ee2e174524e70e8bb57addfa0ba17c3254804",
  "total_amount": 14383464.76669119
}

Note that "bytes serialized" is a measure of the compressed UTXO.


How can I contribute content to bitcoincore.org?

The source code for bitcoincore.org (the website) is maintained via a GitHub repository. Content updates are proposed and reviewed by means of pull requests. Instructions for contributing to the website can be found in the repo's CONTRIBUTING.md.
Given that this question was tagged with "news", I am wondering whether the purpose of the bitcoincore.org website is clear. The above linked contribution guidelines state:

Content Policy
The purpose of the website is to be an official mouthpiece for the
Bitcoin Core project as well as be a resource for technical
information that has a direct impact on Bitcoin Core software. This
can include research, presentations, and developer blogs.
Where proposed content is about Bitcoin Core project policy, there
should rough consensus of the Bitcoin Core project maintainers as a
minimum bar and final decision is with the Bitcoin Core project lead.
via
CONTRIBUTING.md#content-policy,
retrieved 2020-06-27

News seems out of scope per these guidelines.


I don't think importaddress is supported in config file. I use https://jlopp.github.io/bitcoin-core-config-generator/ for making changes in config file
I don't see any options to solve this problem here: https://github.com/jlopp/bitcoin-core-config-generator/blob/0febd7537a89846e0b40badca12d3b7dd2074dfc/src/data.json
There are only two options related to "import" mentioned in the above file:
loadblock - Imports blocks from external blk000??.dat file on startup. This option can be set multiple times with different file values.
stopafterblockimport - Stop running after importing blocks from disk.
importaddress adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend as mentioned here: https://bitcoincore.org/en/doc/0.20.0/rpc/wallet/importaddress/


Why are UTXO locks stored in memory only?

Because it was added as memory-only filter by Jeff Garzik in PR: https://github.com/bitcoin/bitcoin/pull/1861/

It might be nice to store this in the wallet, but to judge interest and review the interface, this is a useful first step.

Couple of users who care about privacy wanted persistency for locking unspents and created issue: https://github.com/bitcoin/bitcoin/issues/14907 but it was closed in May 2020 because of lack of interest and nobody tried changing it with a PR.


How are Lightning network, duplex channels, and micropayment channels related?

Both lightning channels and duplex micropayment channels (DMC) are proposals to create bidirectional micropayment channels, that is, micropayment channels that can be used in both directions (a user A can pay to another user B and, at the same time, B can pay to A). Apart from their goal, both proposals also have similitudes in the basic blocks they use to achieve it (e.g. multisignatures, time locks, etc.).

They differ on the exact way to accomplish it and on some of the properties of the created channels. For instance, DMC create channels with a finite lifetime while lightning channels can be kept open indefinitely. They also differ on the exact number of signatures and transactions involved in the creation of the channel, the payments and the resolution of disputes.

A more detailed description and comparison can be found in this recent paper.

AFAIK, both lightning channels and duplex micropayment channels can not be used in practice yet because they need some functionalities that are still not deployed in the main network (e.g., the ability to build upon unsigned transactions). I am not aware of any available implementation of DMC.


Can an attacker change an old block without changing the checksum?

Sure, he can try. But the algorithms Bitcoin uses were specifically chosen to make this attack completely impractical. It would be trillions of times easier to just buy the Bitcoins.


Error compiling litecoin clone, boost error

Nevermind, sorry, I got past that part. I had clang as the compiler from update-alternatives, had to switch back to gcc. Currently compiling right now hopefully no more errors.


How much "Proof of work accepted by server" needed to generate 1 bitcoin (or a part of it)

As a miner in a pool, you will be paid a fraction of the pools income based on how much you contribute to the pool, compared to the other miners. So it all depends on how powerful your mining setup is. The reason that using just a PC is so unprofitable now, is because dedicated hardware (ASICs) that is specifically designed for mining is being used, which is thousands of times more efficient.
The total hash rate of the bitcoin network is nearing 7 exahashes per second according to blockchain. This means the difficulty of finding a valid block must be really high in order to keep the block time at an average of 10 minutes. The estimated time to find a valid block is proportional to the difficulty, something like difficulty * 2^32 / hashrate seconds. Now a home PC, with a hashrate in the tens or hundreds of megahashes per second (rough estimate, depends on your hardware) basically just can't compete, at literal billionths of the networks total power. You'll end up paying a lot more in electricity consumption than you will make from mining.

There are a number of calculators available online, for example:

https://www.cryptocompare.com/mining/calculator/btc
https://www.coinwarz.com/calculators/bitcoin-mining-calculator


What's more important GPU cores or GPU memory?

I would not bother buying new hardware to mine low rate. I suggest you try mining with your existing hw. You could try cpu-mining MAGI, it's easy to start with: https://bitcointalk.org/index.php?topic=735170.0

You won't strike it rich but its a nice mining start.

If you want bitcoins to use anonymous I suggest you find someone local to buy from with cash, or buy a prefilled creditcard and use that to buy coins.

Mining pools don't pay for your hw specs, they pay for the amount of work contributed.


Can anyone shed any light on this error? Bitcore Multisig - bad-txns-in-belowout

That error happens when the transaction attempts to send more Satoshis than it spends. You might have your units mixed up (using Satoshis instead of BTC, or vice versa).

The code that throws the error can be sheen here: https://github.com/bitcoin/bitcoin/blob/v0.10.2/src/main.cpp#L1462-L1465


Close Multibit
Navigate to /Users/<username>/Library/Application Support/Multibit
Rename multibit.spvchain to multibit2.spvchain
Restart Multibit


What does "new block detected on network before long poll" mean?

It means a block has been found and what your currently mining is the past block.


This might mean your internet connection is too slow. With p2pool, you are basically competing against all the other miners for internet latency. If you have bandwidth-intensive software running (downloads, uploads) try stopping it.


Electrum I requested wrong amount QR code but paid larger amount from luno?

In Bitcoin, the sender chooses the amount to send. Because you corrected the amount in Luno and the correct 0.1 amount is showing (although currently unconfirmed) in electrum, you know this is the balance you will receive once the transaction is confirmed.

To understand why it is currently unconfirmed, see Why is my transaction not getting confirmed and what can I do about it?


Let me clarify the response from kaoD for future reference. The generation transaction is a transaction with exactly 1 input, whose prevOut hash is null:

0000000000000000000000000000000000000000000000000000000000000000

An example of such a transaction in JSON format can be found here (blockchain.info is no use here as it does not conform the JSON output of bitcoind). Notice that besides this, the Satoshi client also puts the coinbase transaction in first position in the tx array, I wouldn't trust this too much though as it may well change in future and may not be consistent across clients.


Can I save stuck bitcoins by creating a completely new transaction?

Of course you can do it as long as the previous transaction does not get confirmed.


There are many pairs of private-public keys. The usual wallet.dat starts with 100 keypairs, although usually you use only a few. To get your keys you can use Pywallet. Then you can print them as they are, or as QR codes.

You should note however, you are not printing Bitcoins, but the keys you use to get to them. This is more like printing username and password to your paypal account, rather than printing money.

Carrying your printed keys is only useful if you intend on paying with them (and only as much as you need in case you loose your printed key). As not many people accept Bitcoins nowadays, it is not too useful.


How exactly is my account/wallet at ripple.com secure?

Ripple.com only hosts the javascript client which talks to the Ripple network via websockets. Once Ripple is out of beta there will likely be different clients to choose from (smart phone apps; command line clients; desktop apps; etc). The existing javascript client is already open source and you can host it locally if you like (and have the technical know-how). Thus if Ripple.com becomes unreachable you have other client options. These options will only improve as Ripple grows and leaves beta.

Your Ripple wallet contains your secret key and your contacts in an encrypted form. Your balances and configured credit lines are stored in the ledger in the distributed ripple network. Currently there are only a dozen or so ripple servers all under the control of OpenCoin (in order to make it easy for them to make changes during the beta to the server code that would otherwise disrupt the network). As long as there are a sufficient majority of ripple servers intercommunicating you only need to be able to communicate with one of them (bitcoin is vaguely similar in that there is an intercommunicating network or bitcoind processes). Currently the webclient connects to s1.ripple.com by default (look under Advanced->Options) presumably this could point to any ripple server, and perhaps once out of beta the clients will have a list of servers to try.

When you created your wallet and when you login with the webclient there is a "Fetch Wallet" option (see What do the "Fetch Wallet" options when opening a Ripple wallet mean?) that controls where the wallet is stored. By default an encrypted version is stored "in the cloud" and locally by your browser. With the default options, if you run the webclient from the same machine+browser it can use just the local copy if the cloud storage is unavailable. If you move to a new machine or a different browser, the copy in the cloud needs to be accessible. You can also make a local backup of your wallet to a file, see How do I backup my Ripple wallet?

If for any reason there is no copy of your wallet available, all is not lost. Ripple lets you create a new wallet using your existing secret key (which is why they strongly recommend making a copy of the secret key). Since the wallet only holds your secret key and your contacts, all you will have lost is your contact names. The client would show your trust/credit lines and transaction history using just the ripple addresses of others. You'd just need to re-enter the contact names (perhaps recognizing your contacts by your current trust/credit limits and balances or perhaps needing to ask your contacts again for their addresses).


Check if your libleveldb.a compiled all necessary files correctly. Could you run the following commands please and post the output back?

ar tv libmemenv.a and ar tv libleveldb.a. If the output is something similar to

rw-rw-rw- 0/0 432255 Apr 15 16:56 2014 memenv.o
rw-rw-rw- 0/0  21322 Apr 15 16:56 2014 port_win.o

then the problem could be that your Windows find.exe is overruling your MSYS file.exe. They both work very differently and are not interchangeable. The makefile of LevelDB uses the Unix style find.exe. You can fix this by explicitly putting your MSYS find.exe directory before the Windows find.exe directory (which should be something like C:\Window\System32\find.exe).

This was a very hard problem to track down and you can see my progress (and that of Ron, who kindly helped me a lot, thanks Ron!) on the 'official' building Bitcoin thread on bitcointalk.org. Starting at page 28 and continuing down until you don't see my name anymore (I'm called Jori there too, it's my real name).


How can I export all my private keys using bitcoind?

You could send the dumpprivkey JSON-RPC call to the client.  It takes a single parameter of BitcoinAddress to reveal the private key for that specific address.

To export all private keys for all addresses, you would have to call listreceivedbyaddress to list the addresses and then call dumpprivkey for each.

See:
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list


What does "Reindexing blocks on disk" mean?

0.8x versions of the bitcoin-qt client now use a different database to store the blockchain.  This change was necessary to allow for larger block sizes.

The reindexing process is converting the previous database (which used BerkleyDB) into the new one (Which uses LevelDB).


Can an SMPPS (Shared Maximum Pay Per Share) pool be hopped?

SMPPS and ESMPPS (Equalised SMPPS) are "hoppable" only in the sense that they don't explicitly punish hoppers. They are resilient against the prevalent style of hopping but they do nothing to lessen the gains of users who hop away. For this reason, SMPPS (and ESMPPS) are considered "fair" algorithms by hoppers and pools using E/SMPPS are often chosen as "backup pools" to be mined at when no other pools meet their specific criteria. Algorithms like PPLNS (Pay Per Last N Shares) punish anyone who isn't a 24/7 miner regardless of when or how they choose to hop in/out and so aren't even viable as backup pools.

In short, it's not realistic (to my knowledge) to say that SMPPS could be in any way gamed by pool hoppers. They are, however, fair to hoppers who choose to use them as a backup pool and so many who are staunchly anti-hopping still consider SMPPS to be bad/inadequate.


What are the consequences of high orphan block rate?

Orphan blocks (in that meaning) are not a network-wide condition. They're an implementation detail (and arguably a bug).

Orphan blocks are simply blocks for which a particular node in the network doesn't have the parent yet. It doesn't mean that parent does not exist.

Since Bitcoin Core 0.10, this concept simply doesn't exist anymore. They were a side effect of the old block fetching logic that requested whatever other peers offered. In the new "headers-first" logic, the headers are downloaded and validated first, before blocks are requested. This gives guidance to the node about what to download and in what order. Since that change, blocks are never requested before their parents are known, and if a peer were to send a block unsolicited anyway, it is simply discarded as a protocol error.


What options do I have to avoid API gap limit? I am using xpub keys

Issues related to gap limit as summarized in this blog post. Basically you have few options

Use wallets like electrum to increase gap limit setting
Automatically send small amount of funds to 20th unsued address to keep things going. This is done by services like blockonomics
Keep generating new address without worrying about gap limit. Later you can generate all private keys using xprv and sweep in the funds from all private keys.


GUIMiner does not connect on Slush's pool

Without seeing exactly what you are doing on GUIminer, this is just a guess because it is a very common problem beginners run into.

When GUIminer was last updated, Slush was using difference credentials to mine on his pool.

These are the current credentials to use as of this post's date, per Slush's home page:

  http://api.bitcoin.cz:8332
  (Main pool URL)

  or
  stratum.bitcoin.cz:3333
  (If you have Stratum-compatible miner)

In GUIminer you are probably using the built in defaults for Slush's pool

Notice that the Website field does not match one of the two current URL's from Slush's home page.

You will have to change the server drop down to other and then manually enter the correct credentials.

This is for the main server:

This is for the Stratum server:

Try the Stratum server first. Stratum protocol is more efficient and lessens the load on the pool. If it doesn't work then switch to the main server.

I'm sure you already know, GPU mining is no longer profitable (hasn't been for quite a while). You will likely only make about a penny or two per day worth of Bitcoin while your power cost will probably be about one to two dollars per day. I'm betting that you are just getting started and trying to learn how to do it first before trying anything else, like purchasing an ASIC. That's good. I did the same thing.


What is the limit on the number of "transactions" you can make inside one "sendmany" call/transaction?

A standard transaction may use up to 400,000 weight units (=100,000 vbytes). Every transaction must have at least one input and at least one output. It is possible to perform multiple payments in one transaction by adding several outputs that each pay one recipient. This is often referred to as payment batching. Usually, a change output is used to return the remaining funds to the sender's wallet.

Let's assume that the sender is using the most blockspace efficient output format, Pay to Witness Public Key Hash (single-sig native segwit). A P2WPKH input weighs 68 vB, and each P2WPKH output weighs 31 vB. A transaction must have a header that tracks the meta information of the transaction. For a segwit transaction, the header weighs 10.5 vB.
The maximum number of payments in one transaction can therefore be calculated with:
(limit - header_size - input_size - change_output_size) / output_size

(100,000 - 10.5 - 68 - 31) / 31 = 99,890.5 / 31 = 3,222.27

A pure P2WPKH transaction with a single input can therefore perform 3,222 payments, or 3,223 when it does not need a change output. If the transaction uses more inputs, the number of possible payments decreases accordingly.
I would expect that this limit is not usually reached in practice. I don't know for sure whether Bitcoin Core would allow you to create a non-standard transaction with sendmany, but I'd expect that it would allow it. I guess one could check in the source code if one would expect the limit actually to actually be met.


I could never get this to work. So as a work-around, I port forwarded http and https, and made and http endpoint that in turn called the function in question and returned the result. A roll-your-own http wrapper around bitcoind, because I couldn't get the bitcoind http server to accept a connection coming in from the outside to my router. This is not ideal, since I must turn off VPN to get even this to work.

I can tell by the settings available in bitcoin.conf that this functionality was intended to be possible. Therefore, I see this as a documentation failure. Someone somewhere knows how to do this, and I'm sure it's trivial to them, but it's a well kept secret.

I request an example of specifically this be added to bitcoin.org, since this is functionality intended to be possible.


What is a megahash and how is it used to estimate the rate at which bitcoins are mined?

A hash is a function that takes a string as an input, does a transformation of it, and returns a second string that's considerably shorter than the original and that could be considered is the "resume" of the original. You can check Wikipedia's Hash definition

Hashes are required for "mining". I'm new to Bitcoin so I may describe this wrongly: As part of mining, miners compete to discover a short number that, when added to the end of a string (which contains all recent transactions since 10 minutes ago) produces a hash with a specific number of zeros at the beginning. The correctness of such a discovery can be easily verified by anyone but finding that small apendix is computationally very, very hard. The first miner to discover such a key to "lock" a block is awarded the reward - 25 BTCs as of now.

Here in comes the "mega-hash" term: CPUs, arrays of GPUs and ASICs are rated according to how many different hashes they can compute per second. Analyzing a million different hashes per second is what's called a "mega-hash". Obviously, the higher this number the more different combinatinos you can try, so it becomes more probable that you will find an answer. However, this is only a relative advantage that may be completely nullified if the other miners have a similar or even higher computing power than yours.

This graph explains it all beautifully, hope it's clearer than my bad prose


What is the recomended sequence for signalling RBF?

The only other relevance of the nSequence field is as relative locktime (in version 2 transactions); see BIP 68.

If you do use relative locktime, they will determine the value of nSequence.

If you don't use that feature, any nSequence lower than 0xfffffffe will do.

In BIP125, there is no need for strictly increasing nSequence versions. instead, the highest fee wins.


error : incorrect rpcuser or rpcpassword (authorization failed)

I was having the same problem and just managed to fix it now.
Since the file bitcoin.conf does not exist inside ~/.bitcoin, Just create one.

Here's what did:

 vi ~/.bitcoin/bitcoin.conf

Enter letter 'a' (to edit the file). Then type:

 rpcpassword=any_long_random_password

Press the ESC key, and press ZZ to exit vi

Apparently the password that bitcoind started with is (for one reason or the other) different from the one you are trying. (i also have a feeling that bitcoind misbehaves like that because no password was defined; since there was no bitcoin.conf)

Now, even though you have changed the password, it will NOT be effective until bitcoind has been re-started. But since it won't even accept the stop command (./bitcoin-cli stop) due to the authentication issue;
You will need to kill the process, and restart bitcoind. It will work fine afterwards:

pkill -9 -f bitcoind

then

./bitcoind -daemon

Hope this is helpful


Why does BIP174 take Xpubs but no addresses?

How does an updater, signer, or finalizer know what this XPub is for?

It's not just an xpub. It's an xpub with key origin information. The fingerprint of the master public key and the derivation path to that xpub is provided. This means that a prefix match can be done with the derivation paths given in the input and output maps to find which xpub can be used to derive a particular pubkey.

  Doesn't this expose some privacy?

Yes.

  For outputs, do I have to enter the public keys?

No. You don't have to provide any information for the output maps.

  Is there no option to enter an address instead?

No. Addresses are not useful in PSBTs.

The output fields do not specify the outputs themselves. That is done in the global transaction. Addresses only serve to specify the scriptPubKey to use in an output. The global unsigned transaction already has the output specified with their scriptPubKeys. So providing an address is not useful as it is just duplicate information.

  Inputs: An input Non-Witness UTXO seems to require the entire previous transaction, instead of simply the txid and vout. Why is this?

The txid and vout are already provided by the Global unsigned transaction. Both the Non-witness UTXO and witness UTXO are needed in the inputs in order to sign the transaction. The signing algorithm requires knowing the scriptPubKey for the output being spent, and for segwit, the amount too. The full previous transaction needs to be provided to prevent attacks where users are signing for an output that they don't intend to spend. By providing the full transaction, signers can verify that the txid they compute for it matches the txid that is specified in the global unsigned transaction.


What literal thing is determining the price of Cryptos / stocks?

The "current Bitcoin price" from an exchange like Coinbase is simply the last price at which a buyer and seller agreed to trade Bitcoin at that exchange, also known as the "last price". Every time a new trade takes place on that exchange, the price is updated.
The current price from sites that aren't exchanges themselves, like Robinhood or Preev, are generally taken as the averages of the prices of all of the exchanges they connect to. Sometimes these averages are weighted, so that the price from exchanges with higher trade volume is weighted more heavily than the price from a very small exchange.


Help understanding OP codes on multisig redeem script (hex)

You are on the right track. 0x52 and 0x53 are the multisig elements ("2 of 3"), and 0xae terminates the structure. The "off by one error" comes before the signatures, which is in lines 58-60 of the gist. A good explanation of the multisig is (of course) in Andreas' book "Mastering Bitcoin". I have decoded the structure below:

    52: OP_2:                the number 2 is pushed onto stack
    41: OP_DATA_0x41:        uncompressed pub key (65 Bytes)
        0491BBA2510912A5:BD37DA1FB5B16730
        10E43D2C6D812C51:4E91BFA9F2EB129E
        1C183329DB55BD86:8E209AAC2FBC02CB
        33D98FE74BF23F0C:235D6126B1D8334F
        86
        MultiSig's uncompressed Public Key (X9.63 form)
        corresponding bitcoin address is:    139FpKh63Vn4Y73ijtyqq8A6XESH8brxqs
    41: OP_DATA_0x41:        uncompressed pub key (65 Bytes)
        04865C40293A680C:B9C020E7B1E106D8
        C1916D3CEF99AA43:1A56D253E69256DA
        C09EF122B1A98681:8A7CB624532F062C
        1D1F8722084861C5:C3291CCFFEF4EC68
        74
        MultiSig's uncompressed Public Key (X9.63 form)
        corresponding bitcoin address is:    1PNvbXZFysxvx3252w9JHMa7zbG95snqnm
    41: OP_DATA_0x41:        uncompressed pub key (65 Bytes)
        048D2455D2403E08:708FC1F556002F1B
        6CD83F992D085097:F9974AB08A28838F
        07896FBAB08F3949:5E15FA6FAD6EDBFB
        1E754E35FA1C7844:C41F322A1863D462
        13
        MultiSig's uncompressed Public Key (X9.63 form)
        corresponding bitcoin address is:    1jqo3ptYSnUhCJq75MMyRuwC2zNyQqRy3
    53: OP_3:                the number 3 is pushed onto stack
        ##### --> 2-of-3 Multisig
    AE: OP_CHECKMULTISIG:    terminating multisig

        corresponding bitcoin address is:    3QJmV3qfvL9SuYo34YihAf3sRCW3qSinyC


Did Satoshi know since its publication all the applications that the blockchain would enable?

Did Satoshi knew since its publication all the applications that the blockchain would enable?

I doubt it. Even the phrase 'blockchain' was coined long after the Bitcoin paper was published. However, Bitcoin uses primitives like HashCash to do something that their creators never envisioned, so I don't think he would be surprised by the ideas of Bitcoin being used for things that he didn't think of.


The script is maintained by the intended recipient; he is the one responsible to keep it and not to lose it. The nodes do not store any database of the scripts.

The script is provided by the spender upon spending the p2sh as part of the scriptSig data. For the exact specification of how this data is structured, see BIP 16 by Gavin Andresen. This allows the other nodes to validate that the script was redeemed correctly.

The purpose of p2sh is not to limit the data on the blockchain – that remains the same. It is, as per the BIP, to "move the responsibility for supplying the conditions to redeem a transaction from the sender of the funds to the redeemer".


Different balance for same private key using bcoin and copay

There are several factors that could be causing the discrepancy.

Make sure you are running the latest version of bcoin (v2.0.0 was just released)
Make sure your node is fully synced to the testnet blockchain.
Make sure all the transactions in the Copay wallet history are confirmed.

Other possible issues:

Do you make a lot of transactions with this wallet? Like, more than 10 or so in a single block? It's possible you've exceeded the BIP44 lookahead and some manual configuration may be necessary to recover all the transactions (although this particular behavior is usually fixed with an additional rescan)
When you rescan, do you specify a block height to rescan from? Make sure that is low enough to catch your complete transaction history.

Compare the history of the two wallets (https://bcoin.io/api-docs/?shell--cli#get-wallet-tx-history). Can you determine which TXs are missing from the bcoin wallet? It might be helpful for debugging if we can identify a pattern.

If you want more interactive help debugging, you can find the developers on IRC #bcoin or on slack: https://bcoin.io/slack-signup.html