What happens if the blocksize stays at 1MB?

As long as there is demand for Bitcoin transactions and the hash rate is somewhat stable, Bitcoin will confirm 1MB of transactions every ten minutes in average. Since this is a fixed supply, Bitcoin would not be able to satisfy a demand greater than 1MB per ten minutes and some transactions would never confirm. This is a graceful failure, as it would be rational for miners to confirm the transactions that give them the highest revenue, and thus the transactions that are the most valuable to their users will be catered to first, and transactions that signal less priority get priced out of the blockchain first. These would either move to off-chain solutions or other blockchains in the long term.

It seems obvious that fees would thus adjust respective to blockspace demand and economic value of the transactions. As either grows, pressure to provide more capacity will mount. It seems likely that sufficient pressure would lead to adoption of some capacity increase eventually, be that Segregated Witness an Lightning Network, or increased demand for altcoin solutions.


Should I send the remaining balance from a paper wallet to a new paper wallet?

For security and privacy reasons I would advise you create a new paper wallet and send that remaining balance to it. For privacy so that you don't reuse the address and for security so that you don't reveal your public key on the blockchain when spending the first transaction. Until funds in a wallet are spent, only the hash of the public key is visible on the blockchain. Afterward funds are spent, the public key gets revealed. It is not such a big issue but more secure not to reveal the public key especially in terms of quantum security.


Current transaction fees for various cryptocurrencies

I use this: https://bitinfocharts.com/bitcoin/

You can click on any other cryptocurrency on the top bar and look for the value of "Avg. Transaction Fee", in USD.


What pools will allow asic block erupters these days?

You're never going to see anything with these.
Block erupters are simply... ancient. The ones I had did a few hundred megahahes - a reasonable ASIC you'd buy today does 10+ terahashes.
1 terahash = 1,000,000 megahashes
You're essentially never going to contribute enough to a pool to see a reward share that you can actually withdraw.
If you intend to start mining now, you will need to invest several thousand dollars into modern, capable machines to do so.


Mining Altcoin with hash rate bigger than average network hash rate

This depends on the altcoin-specific mining implementation.  However, assuming a mining model like Bitcoin, which runs on proof-of-work, you'd get the majority of coins mined in any given day if you have a higher hashrate than the rest of the network combined.

So, if there are 100 coins available to be mined per day, and before you start mining the network hashrate is 100 hashes per day, you'd mine 33 coins per day if you suddenly started mining at 50 hashes per day, assuming difficulty is adjusted on a per-block-basis.

Or, if the network hash rate is 40 MH/sec and you suddenly start mining with 220 MH/sec, and the number of coins issued stays stable, you'd get 84.6% of the coins mined, on average.  This assumes the proof-of-work required to generate a block of coins is recalculated continuously, which is not generally the case, but it makes the calculation easier, and at some point the network will adjust the difficulty to reflect the total hashrate.  If this was Bitcoin, where the difficulty is adjusted every 2016 blocks, you'd have a major advantage for up-to 2016 blocks, or whenever the next difficulty adjustment occurred.


Crypto exchange - what do BTCUSD SELL and LTCBTC SELL mean?

BTCUSD means you are selling your BTC in exchange of USD, same with LTCBTC, you are selling your LTC in exchange of BTC. That both works with spot and leverage trading settings.


How can one be truly anonymous without mining?

Once you have bitcoins, there are tools such as mixing services to help increase your privacy.

For true anonymity in acquiring bitcoins, cash-in-the-mail provides a method that can be anonymous.  You send an envelope with cash and a bitcoin address.  Voila, bitcoins are acquired anonymously.

Cash-in-the-mail methods:

Get-Bitcoins.com - U.S. address, accepts USD.
QuickBitcoins.net - U.S. address, accepts USD, EUR
BitcoinNordic.com - Danish address, accepts EUR, GBP, DKK, SEK, NOK, USD (others with prior approval as well)
BitcoinsInBerlin.com - German address, accepts EUR


How to get the input address from an txid with bitcoind

You need to pass the option -txindex=1 at the command line, or include txindex=1 in bitcoin.conf.


Where can one download the legit copy of bitcoin core software with hashes to verify?

Those are both legitimate sources. You can be confident in your download by verifying the checksum and the PGP signatures provided on the respective sites. The process is outlined in more detail on their download pages.

I think the method with the highest level of confidence would be to clone the official repository: https://github.com/bitcoin/bitcoin and build it from source.

I don't know who controls bitcoincore.org, I'd assume the maintainers of the Bitcoin Core developer community. They are linked in the GitHub repository, so thats a reassuring signal to me.


What prevents Dash miners from refusing to pay to masternodes?

I believe the block reward is split at the time of the block generation and this means that in order for the block to be valid it must send 45% to a masternode.  As all masternodes are aware of each other on the network (need to be online 24/7 for over a week) and their receiving address (need 1000 Dash in an address at the node online) so they can each verify if the correct distribution has been made and thus is a valid block.  Further info on Masternodes

If the miners try to take 100% of the reward the masternodes would not accept this as a verified block and thus would not allow the chain to be broardcast through them to other nodes.

This is the same way as how Devcoin works where % goes to the miners and % goes to the devtome distribution for work done.  The miners in devcoin have no say over the distribution of the shares only that it is part of the block that they can mine and read the distribution from a receiver file uploaded each month for the next round of blocks distribution.

As devcoin's model was tried and tested as was one of the earlier coins I think dash works along the same lines from looking at the code and blockchain.

https://explorer.dash.org/tx/b8f8024bb84340a0473faffa1f7d41e8b182f763ae5e876f0448d8799cb5d919 is the transaction for the generation of 911503 block

Here the two outputs are set and the distribution is made to each receiver of the % share.  The miner does not have the ability to control these outputs from the original generation of the block as far as I am aware. Would be like in bitcoin someone trying to verify a block that has generated 75 bitcoins in the block. It is just not possible to get this block accepted by other nodes as they would all reject it. As would the master nodes and other miners in the Dash situation.

Hope this helps and if anyone knows differently please feel free to explain where I am wrong, always keen to learn more :)


Trying to understand why hash value is more secure from hash algorithm

giving them a number H(studentID||Bi) where Bi is the ith block header in the Bitcoin blockchain.Would the scheme be me more secure if you instead used H(studentID||Bi-1|| Bi)?

For this purposes of this question, the bitcoin header Bi = H(Bi-1 || other stuff).  Under a black box assumption of H()'s behavior, the two schemes are practically equivalent.

You can't really argue that H(id || Bi-1 || H(bi-1||stuff)) is more secure than H(id || H(Bi-1||stuff)) on the basis of 'more data' because H() might well have an internally bottleneck E.g. it could be implemented H(bytes[0 .. n]) = H(H(...H(H(H(bytes[0])||bytes[1])||bytes[2])...||bytes[n])  (and, in fact, sha256 does work kind of like this, though not one byte at a time).

Without out a more formal definition of "security" I don't think it's possible to just answer the question.  But guessing at a meaning "could someone more easily rig their office hours under one instead of the other"-- the answer would be no.


ELI5: is it true that Base58 doesn't prevent typo, but Base58check does, really because there is a checksum?

Yes. Every byte sequence corresponds to one Base58 string. Every byte sequence also corresponds to one Base58Check string, which contains a 4-byte redundancy, a checksum.
And this 4-byte-code's only purpose is the detection of transmission errors (typos). Newer Bech32 addresses have a different kind of checksum allowing error correction, up to a certain level in addition to error detection.


In Nextcoin, proof of stake is used.  So the "mining" process there is just about holding coins and leaving your computer on.  It doesn't involve powerful CPUs.

Each block (every 60 seconds), a random Nextcoin is selected to be the next "miner".  There are 1 billion coins so the odds of a single wallet being selected is the number of Nxt in that wallet divided by 1 billion.  (Also, it's possible to calculate and agree on who that node is so the transactions need only be sent to that particular wallet.)

If a node with the selected wallet is running, it will collect the transactions, make a block, and send it to the rest of the network and collect the fees.  If the computer is turned off, however, then the entire network will have to select a different nextcoin to make the transaction.  This time, the unresponsive wallet will be ignored.  The network would suffer in that the time to make a block is decreased, but the thought is that people wouldn't leave their computers off if they have a lot of NXT because they're missing out on all the fees that they could have collected.

If you only have a few NXT, you can leave your computer off: You probably wouldn't have collected much fees anyway.  But, your odds of being selected were low so it probably won't decrease transaction times much.


I have unspent bitcoin in the blockchain

In short, bitcoin transactions are made up of inputs and outputs. When you sent funds, an input was spent, and the output went to the receiving bitcoin wallet. The unspent tag simply means that the funds that you sent have not yet been used as an input, and the funds are therefore still at the address to which you sent them.


ECIES - When is it bad to sign and encrypt using the same keys?

Since I'm obtaining the public key from a message, PS2H script, or BIP32 wallet I want to make sure that all secrets (Bitcoins, private keys, and privacy relating to BIP32) are maintained and no risk to privacy exists.

Though it might have changed in the revisions of BIP0032, in some situations you can put the entire wallet at risk if you expose a single private key. You basically never want that happening, both for privacy and security purposes.

You'll need somebody more in tune with EC like Gregory Maxwell to answer the encryption specific questions, in Bitcoin we only sign and never encrypt so it's something I have never researched deeply. I believe in more recent SSL ciphersuites EC is only used for the key agreement and the rest is handed off to a symmetric cipher for speed purposes.

Remember that Bitcoin addresses are usually not designed to stick around, basing any form of encryption on something that is inherently disposable is probably not a particularly wise idea. The only real use we have for message signing functions is for systems like Eligius which do have a static address already due to their function, and we need to prove that the same user is authorizing a change.


What will happen when a collision in SHA256 be found?

No hash function has ever been broken in a way that would be meaningfully have an impact to Bitcoin. It’s not even a consideration, other than  for OP_SHA1 which has no non-academic usage in Bitcoin.


pycoin deriving wrong addresses from private key

looks like i was using pycoin wrong. for some reason the hex private key is not imported using a H:. the following works fine:

$ ku c4bbcb1fbec99d65bf59d85c8cb62ee2db963f0fe106f483d9afa73bd4e39a8a

input                        : c4bbcb1fbec99d65bf59d85c8cb62ee2db963f0fe106f483d9afa73bd4e39a8a
network                      : Bitcoin mainnet
netcode                      : BTC
secret exponent              : 88985120633792790105905686761572077713049967498756747774697023364147812997770
 hex                         : c4bbcb1fbec99d65bf59d85c8cb62ee2db963f0fe106f483d9afa73bd4e39a8a
wif                          : L3p8oAcQTtuokSCRHQ7i4MhjWc9zornvpJLfmg62sYpLRJF9woSu
 uncompressed                : 5KJvsngHeMpm884wtkJNzQGaCErckhHJBGFsvd3VyK5qMZXj3hS
public pair x                : 54652445751364966014814199642702485207468864303823415690143529040235143060593
public pair y                : 72966369330535479126907188414667138321635397511721864437822996012971795952725
 x as hex                    : 78d430274f8c5ec1321338151e9f27f4c676a008bdf8638d07c0b6be9ab35c71
 y as hex                    : a1518063243acd4dfe96b66e3f2ec8013c8e072cd09b3834a19f81f659cc3455
y parity                     : odd
key pair as sec              : 0378d430274f8c5ec1321338151e9f27f4c676a008bdf8638d07c0b6be9ab35c71
 uncompressed                : 0478d430274f8c5ec1321338151e9f27f4c676a008bdf8638d07c0b6be9ab35c71\
                                 a1518063243acd4dfe96b66e3f2ec8013c8e072cd09b3834a19f81f659cc3455
hash160                      : 79fbfc3f34e7745860d76137da68f362380c606c
 uncompressed                : c4c5d791fcb4654a1ef5e03fe0ad3d9c598f9827
Bitcoin address              : 1C7zdTfnkzmr13HfA2vNm5SJYRK6nEKyq8
Bitcoin address uncompressed : 1JwSSubhmg6iPtRjtyqhUYYH7bZg3Lfy1T

i think ku H:c4bbcb1f... may be the way to import a bip32 private key, whereas ku c4bbcb1f... just imports a regular private key as secret exponent.


Is there an easy way to diversify your Bitcoin holding among the other popular forks?

Sidestepping the comments about whether or not Namecoin is a fork or a separate project or whether bitcoin is an investment or a currency, I'll address the direct question asked: Is there a way to easily and automatically purchase several crypto-currencies at once? Not at present time, no.

Bitcoin (and its forks) is a very young project, though, and I'm sure there was a stock exchange before DJIA or S&P existed. Give us time and it's very likely that something of the sort will be created - especially now that the demand has been made publicly known.


How would an atomic exchange of assets be implemented in a blockchain?

The basic idea is that one party makes a payment in such a way that the funds go back to them unless the other party makes the other payment, in which case the other party gets those funds. The other party can then make the payment and claim the output of the first payment.

Here's one possible more detailed sketch:

A and B each generate a private key, determine the corresponding public key, and exchange them.
A and B each sum the public keys and hash them to form a joint address for the transaction.
A and B form two transactions. One sends the funds back to A but has a lock time in the future. The other sends the funds to B if B provides proof of payment of B's funds to A.
They each sign both transactions and the signatures are summed so that both transactions are ready to submit. No additional transactions for the joint address can be signed unless A and B agree.
A sends her funds to the joint address formed in step 2. A knows that she can get her funds back when the lock time expires and that B can only get the funds if she provides proof of payment to A.
B sends the funds to A and submits the proof of payment along with the signed transaction to get A's funds. At this point, the payment is complete.
If B fails to perform step 6, when the lock time expires, A submits the signed return transaction to get her funds back.


Standardized symbol for "pay with bitcoin"

Although there is no official "Bitcoin Accepted Here" sign, the most popular graphics for this purpose seem to be these:

Source: https://bitcointalk.org/index.php?topic=1631.0


hopefully this answer helps you.

Specifically,

  There is nothing which distinguishes a BCC address from a BTC address; they are both the same format and refer the the same keys, thus a BCC address is a BTC address and vice versa. This means that if someone sends BTC to an address that you created with a BCC wallet, the person who owns that BCC wallet would receive BTC. It won't appear in his BCC wallet, but if he has the same private keys on a BTC wallet, he would receive the coins there and be able to spend it.

Emphasis mine. Hopefully you have the private key!


I suspect what will happen is that most of the mining pools will use the official client, and so will use the discouragement policy as set by Gavin et al.  This will make it in each pool's best interest to not have their blocks be discouraged.


How does Bitcoin Core know that your private key relates to your public address? Are the private keys stored?

Does Bitcoin Core store these private keys in the application or in
  the public ledger?

the private keys are stored in the wallet, along with the public keys. Never (!) ever you would show the private keys to someone else, otherwise you'll loose the funds! This is why wallets are also secured...

  Are these private keys store on a private server by Bitcoin Core
  developers?

No, as mentioned before, in the wallet software. If the developpers had access to the private keys, they could steal all funds... doesn't make sense.

  When you sign a transaction with your private key, how does Bitcoin
  Core know that this private key is related to your public address?

The link between priv and pub keys is by the ECDSA logic.

The answers here are fairly generic, and deserve probably a whole chapter of a book, but I think I'll reference to Andreas' book "Mastering Bitcoin". It is an amazing book that'll definitely get you to go. It's freely available online here: http://chimera.labs.oreilly.com/books/1234000001802/index.html


Using multiple wallets on one "bitcoind" process

Follow this steps:

Run the bitcoind process.
Create a wallet for each of the clients using:

bitcoin-cli.exe createwallet <client_uniq_id>

When you want to perform any action on any wallet simply use:

bitcoin-cli.exe -rpcwallet=<client_uniq_id> <your_rpc_method>

Use "" for <client_uniq_id> in order to refer to the default wallet, created by the bitcoind.


LND describegraph and getnetworkinfo RPC response

After looking into the code and running some tests I think I've found the answers:

avg_out_degree is the average channels per node. In other words, total channels / total nodes = avg_out_degree. source
max_out_degree is the maximum channels (sum of incoming and outgoing) found on a node in the network. This can be found by iterating through every node and summing their incoming/outgoing channels to find the maximum. source
time_lock_delta: the required timelock delta for HTLCs forwarded over the channel. source
min_htlc: the minimum value in millisatoshi required for incoming HTLCs on the channel. source
fee_base_msat: the base fee charged regardless of the number of milli-satoshis sent. source
fee_rate_milli_msat: the effective fee rate in milli-satoshis. The precision of this value goes up to 6 decimal places, so 1e-6. source


How do I transfer BTC from my Coinbase account to my Android wallet?

Yes, type it in. Or you can copy the address and email it to yourself and copy and paste it from the email.

There really isn't any easy mechanism in Bitcoin for the person receiving the funds (i.e. your phone) to request the money from the person sending the funds (i.e. Coinbase). There is the BIP 70 payment protocol but that requires both a compatible wallet on the sender's side and some webserver setup stuff on the receiver side. Even with that, there isn't anything for the sender to initiate the transaction at all, only the receiver.


Why is the value field 8 bytes in transaction output when it can be achieved with 7 bytes?

Is there a particular reason why a size of 8 bytes was chosen

Probably not.

In the original Bitcoin source code, many of the primitives used in data structures were simply the in-memory representations of those primitives. For integers, this is a 32 bit (4 byte) little endian integer. However 32 bits is not enough to represent all of the satoshis that exist in Bitcoin. The next primitive that can be used is a long, aka a 64 bit integer. Since this was just serialized as it is represented in memory, the amounts end up being 64 bit little endian values.

  Is it possible to bring a change to this via a soft-fork or does changing this require a hard-fork?

The serialiation format used for computing the weight and hashes can only be changed via a hard fork.

However you can transmit a transaction using whatever serialization you want so long as that format contains all of the necessary information to construct the serialization necessary for computing weight and hash. This would not require any fork because it is not a consensus change.


The blue bars indicate the transaction volume in that period, this is how many bitcoins have been traded. Use the blue numbers at the left axis to see how many bitcoins were traded.

The yellow line is the average weighted price in that period. Use the yellow numbers on the right to see what the price is.

The green and red parts show the fluctuations (high & low) around the average price. It shows that at 16h00 there was a trade at a price above 1000 (USD I guess). However this could be a single trade of 0.001 BTC for 1 dollar... You cannot derive this from the chart.


ELI5: How does Segregated Witness (segwit) work?

Not all unspent outputs need signature scripts. Of course, this doesn't have many uses (but puzzles. for example, proof of SHA256 collision to redeem funds) but such a thing exists. UTXO that don't need a ScriptSig are called an AnyoneCanSpend outputs. Such transactions are considered nonstandard and are not relayed in the network. However, if a miner includes a nonstandard transaction in their block, their block will be valid and the transaction will be relayed.

A SegWit-P2WSH output looks like this:

00148ca0e5d2474900bf82376926da8c5f4464bd7bd3

Does it start with a version byte? ✓
Does it have a 20-byte Witness Program*? ✓
Is the ScriptSig empty*? ✓

*Doesn't have to be. Details: https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki

Congrats, that's a SegWit output! Legacy nodes see it as a nonstandard transaction, and don't relay it. The SegWit nodes check the output for the conditions above, understand that it's a SegWit output. Next, they check the transaction for a valid "witness". It's not a nonstandard transaction for them, and they relay it to the other SegWit nodes. After a miner puts it in their block, legacy nodes will understand that it's a nonstandard/AnyoneCanSpend script, and will honor it.


Why don't addresses in an (unencrypted) wallet.dat file seem to match addresses that would be generated by the private keys in the wallet?

Perhaps pywallet is misreporting the bitcoin address?

Does your wallet actually show a 1NpYUPpz2E4fhYfoJRfUApa5hSPcrpCGaT bitcoin address?

Here's a method to manually determine the public address for the private key.

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


Why are banks and other centralized entities interested in block chains?

Speaking as someone who has worked on a blockchain project for a bank, I can tell you that banks are interested for several reasons.

Banks know they are ripe for disruption

Due to a combination of heavy regulation and incumbency (mixed with a variable level of collusion), banks have remained relatively protected from the technological disruption that has been occurring in every other industry.  This can't last, and banks know it.  They are trying to get out in front of whatever technology might disrupt them, and they have enough money to throw around while investigating.  As a result, banks are spending a lot of time and money exploring the possibilities of blockchain technologies.

Banks want to reduce their transaction fees

Customers of banks are not the only ones who have to pay transaction fees.  Banks, themselves, are charged for moving money around, and are always looking for a way to reduce their costs.  If they can get together and reduce their fees by creating something like the R3 Consortium, then they will do so.  Currently, these banks would all have to transfer money to each other over ACH, Fedwire, SWIFT, or some other legacy network.  This incurs fees and counter-party risk.  If the general public can use a blockchain to remove counter-parties, why shouldn't banks?

Blockchain solutions offer faster transactions than the current infrastructure allows

The project I worked on for a bank was implementing a private blockchain for supply chain financing.  Sending money internationally to pay for manufactured goods and parts has always been a hassle, even for the banks.  There is a lots of risk involved, and delivery of product is often held up by archaic money transfers.  If banks can reduce this time and risk by way of a private blockchain, then factories and suppliers can get paid sooner, and goods can be delivered in a more timely fashion.  This is very appealing to the customers of a bank who are doing business around the world, and even to the bank itself.  Suppliers offer discounts for faster payments, called dynamic discounting.  By using a faster payment solution, banks can lend credit to the purchaser, obtain the goods for the discount, and split the difference with their customer.  The supplier gets paid sooner, the customer gets their goods for cheaper, and the bank gets to charge a larger fee than the otherwise would have.  It's a 3-way win.

Blockchains offer a better solution to traditional bookkeeping and auditing

A bank can be thought of as a big ledger of whom owes how much money to whom.  When money is transferred between banks and other financial institutions, what is really happening is that both institutions update both of their ledgers to show that recipient owes a little more, or the sender owes a little less.  These are two separate ledgers, and banks have entire departments that keep track of them and audit them, making sure they are in sync.  That costs money and takes time.  A blockchain can also be thought of as a big ledger.  Banks are curious if blockchains can replace the large amount of work that has always been done to keep these records updated and correct.

Blockchains offer a reduction in fraud

Probably the number one thing banks have been worried about in recent years is fraud.  Fraud has been the fastest growing crime since the turn of the millennium, and banks are often left picking up the tab.  When Target and Home Depot had their point of sale systems compromised, and millions of customers had their credit and debit cards stolen, it was the banks that had to pay the brunt of it.  They not only had to incur the costs of the fraud, itself (along with the merchants), but also the costs to re-issue cards to millions of customers.  Banks are interested in any technology that promises to reduce fraud, and blockchains get suggested often.  Just how the banks plan to use blockchains to reduce fraud, I don't know, but I can assure you that they are going to try to find a way.

Conclusions

My personal opinion is that private blockchains offer a lot less than a public blockchain such as Bitcoin does.  However, they still have many use cases within the world of traditional banking.  Because the technology, and Bitcoin, have the potential to be very disruptive, banks are becoming acquainted with it as an act of preparation for the future.  Bitcoin suffers from an image problem, as well as having many unanswered questions in the realm of traditional financial regulation.  Private blockchains offer banks the opportunity to "dip their toes in the water" without the risk of running afoul of regulators.


Does private key belong to one public key in Bitcoin?

Each private key corresponds to one public key, but a mnemonic key contains the master private key which describes how each private key is generated.
If you want to withdraw from it, I would use Electrum. It can show you the addresses and you can export individual private keys.


Why can't default minimum fee rate be changed to 0.1-0.2 sat/vByte?

The primary reason for the minimum feerate (and related things like the discard feerate) is preventing the use of the P2P network as a cheap global broadcast system. If it's easy to produce transaction that will never confirm yet will relay across the network, it'd open the network to abuse. I don't know what the right level is to make sure that doesn't happen, but 1 sat/vbyte seems pretty low.

That was before the network and mempool logic had floating fees. Now the feerate is primarily set by market pressure, and lowering the minimum would at most have an impact during times when there is ~no demand for block space. I personally think the ecosystem should expect to function fine when there is continuous back pressure, so I'm not sure what is gained by reducing it.

I can't speak for anyone else, but I don't think it's interesting to spend review time on. Note that the PR you link to is just to increase precision of the internal data types used for feerates; it doesn't change any relay policy.

I don't think spam is the problem. Lately the feerate has been significantly higher than 1 sat/vbyte anyway, and long term I hope that whatever the minimum is set to, it's effectively never hit. What matters is the discard feerate, which is not set by the market (it's the "additional" feerate you need to pay to replace a transaction in the mempool through RBF or mempool limiting, in order to make sure there is some cost to relaying the transaction that is now expected to not be mined anymore). That discard feerate is by default set to 1 sat/vbyte as well, which seems low.


you can check this repo, iti si creedt for Cryptography For Developers, Simon Johnson (pg. 218):
https://github.com/in3rsha/sha256-animation


Cpuminer problem: empty reply from server

The miner you are using does not support the stratum protocol. Instead you must use a pool that uses the old and now obsolete getwork protocol

If I see it correctly BTCGuild still offers the getwork access with the following URL:

minerd.exe -o http://btcguild.com:8332 -u username_1 -p password -a sha256d -R 2


How do I specify in which directory Bitcoin blocks and other data should be stored?

I believe you can specify this directory using the datadir configuration in bitcoin.conf.

-datadir=<dir>         Specify data directory

See Running Bitcoin.


Yes, the order matters. Changing the order of bytes of data being hashed will result in a different hash. Thus changing the order of transactions for the merkle root will also result in a different merkle root. There is no requirement that miners try different orders of transactions. But they may choose to do that instead of re-selecting transactions for the block. Note that transaction order does matter (coinbase must come first, parents must come before children, etc.) so a miner cannot try all possible permutations of transactions.


Is it sometime advantageous to split a transaction into multiple smaller ones?

It can be advantageous to split transactions in order not to draw from different addresses in one transaction, because that would announce that both addresses belonged to the same Wallet (for the privacy paranoid user).

The priority of a transaction is reduced by having more source addresses, however it is on the other hand increased by sending a larger amount. Coins that have been held for a longer time also increase the priority.

I don't see why it would have been necessary to transact in this fashion and I think the overall size for the network would be the same (2*250B or 1*500B).

I would assume that you had two different addresses holding coin that were each emptied each in one transaction.


Byte array to hexadecimal and back again in JavaScript

Here's something you can copy-paste in.

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

From here/here.


When performing a 51% attack, you will need to find new blocks faster than the remainder of the network combined. This way, your block chain will become the longest and clients will consider it the main chain.

Theoretically, this is achieved (on long term) when you have >50% of the hash power.

But as we know, a lot of luck is involved in mining. It's possible that someone with 55% or even 60% of the total hash power will only succeed in his 51% attack after many weeks because he has bad luck. (Note that with >50%, statistically you will always succeed on long term.) But it is also possible that someone with less than 50% can succeed on short term.


About the phrasing, there is really no "plan" on Bitcoin as there would be if a centralised authority governed the protocol. Instead, there are proposals and sometimes supermajority consensus for the network to deploy a proposal.
Regarding your question you can already do this today using the locktime features of Bitcoin transaction.
You can either:

Hand your child a transaction with a nLockTime set to block X (so that the transaction cannot be confirmed before the block number X).
Create a transaction which can be confirmed but cannot be spent before the block number X (CHECKLOCKTIMEVERIFY).
Create a transaction which can be confirmed but cannot be spent before N blocks are mined after your transaction (CHECKSEQUENCEVERIFY, relative locktime).

In either way (I omitted an even more involved one purposefully), you (and your child) definitely need a specific software to create and recognize this type of transaction.
Learn more (and get more links) on the Bitcoin wiki page about locktimes.


If I use a MacBook Pro to mine Bitcoin (and keep records for the blockchain), how much can I earn in 1 month?

It will be hard to find exact numbers, as GPU mining for Bitcoin has been completely obsolete since somewhere in 2013 when the first ASIC-based mining solutions appeared.
Still, I wouldn't expect the CPU and GPU in a modern Macbook Pro to be able to mine faster than a few 100 million hashes per second. Even if we assume it can do 1 billion hashes per second (probably a serious overestimate), then as of January 2021, with 8 hours/day, you'd make around 0.002 USD per month in a pool (if they even permit you withdraw such a small amount). If not in a pool, it'd be exactly 0.
It won't be worth the added cost in electricity. It won't even be worth the cost in added wear & tear to your hardware.
There probably exists software that can do this still, but I don't expect it to be maintained or easy to set up as it has been obsolete for so long.


Building enviornment, libraries, and compiling... What does that mean?

Build environment: the environment in which the source code is compiled and built into a complete binary which you can run. This typically consists of the compiler, linker, OS you are building on, and OS you want the binaries to be built for.

Library: A library is a set of code that your or other's programs use. They are compiled just like any other program but they do not contain main functions so it cannot be run as its own executable. Libraries are used to avoid code duplication for things that can be used across multiple programs.

Compiling: The process of turning source code into an executable binary. You must compile source code in order to actually use it.

  Can someone tell me how to do that using VS Community 2017?

You really shouldn't do that. Bitcoin Core, which most altcoins' primary software (including Litecoin) are based off of, is designed for being build in a Unix environment (primarily Linux and MacOS). It is substantially more difficult to build it in a Windows environment, particularly with the tools that Microsoft provides (e.g. Visual Studio). It is instead recommended that you use the Windows Subsystem for Linux. Instructions for doing that are available here


Why is there an output with op-return in regtest mode?

You did, presumably.

The transaction you're showing is the coinbase; it's a  special transaction added by the miner. The OP_RETURN output is the SegWit block commitment. It is the Merkle root of all transactions' wtxid (a txid that includes the witnesses), thereby making sure that the block commits to all witnesses.

When running in regtest mode, you probably directly or indirectly from a script called the generate RPC call, which produces a new block. If there were any SegWit transactions in the block, the commitment is mandatory (and optional otherwise).


I just lost 1.36275883 ($313), and I don't know how it happened or how to prevent it again

The two most likely scenarios are that you either had malware on your computer/phone that stole your private keys and was able to spend them on your behalf, Or you used easily guessable brain wallet seed. Brain wallets use easy to remember list of words or a phrase. The problem is that if it is not done correctly, then anybody can guess random phrases and check to see if they generate a bitcoin address that has any unspent amount. There are many individuals out on the net that are attempting to brute force brain wallets.

Depending on how much cost/hassle you are willing to put up with, there are many different ways to secure your Bitcoins. You can have an offline pc that you use to hold your coins in cold storage. Only keep daily spend amounts on your hot wallet (the coins on your phone or computer that you are going to use in daily transactions and can afford to lose). You can buy a dedicated device that handles all the security of your coins. These are called hardware wallets. A popular one is called Trezor. With a hardware wallet you are able to store your Bitcoins in a safe offline device. And when you need to spend them, you hook it up to your computer and use it to verify how much you want to spend and to were. The device keeps you secure even if your machine is infected with malware since it never lets the private keys leave the hardware wallet (you steal those you can spend your coins).

A low cost way to have cold storage is creating a paper wallet. A paper wallet is a print out of your private keys, commonly they also include a qr code version of your keys so you can quickly import it into a phone or computer wallet without having to type out the long keys. Just make sure you keep the paper in a safe place and you treat it like cash


Which rate is the best rate to go by for Bitcoin prices

Mtgox's price is high because it is difficult (if paying a 5% "emergency withdraw" fee) to impossible (if not paying a fee) to withdraw USD.  This makes USD on Mtgox less valuable than cash in hand, and therefore bitcoins are worth more in terms of "Mtgox USD" than real USD.

BTCChina's price has been high recently due to huge demand in China and capital controls that make it difficult for arbitrageurs to move USD or CNY out of the country.

When deciding on a fair price, it is best to use the price someone would get if they used the most convenient exchange in their country.  In the US, Coinbase or Bitstamp's rate makes sense.  In Europe, Bitstamp is the best option, and in China, a Chinese exchange would be more appropriate.


How do I figure out the balance of an individual address on Bitcoin for Android?

You are trying to use addresses for accounting, but they aren't designed for that.

What you actually want is the accounts feature of bitcoind, though I doubt any mobile wallet implements such a thing.

If you say explicitly why do you think you need to do that, someone might have an answer. Meanwhile, just use the whole balance, and create a new address for each incoming payment, without worrying about specific address balances.


What is the composition of transaction types in current blocks?

I recently had the same question and made a small script to compute it (using this python library). Here you have a cumulative plot showing the number of transaction outputs of each kind over time:


Bitcoin/Dogecoin Daemon RPC authentication - 401 status error

Ok, it seems that for some reason I didn't read this essential part:

  The easiest way to tell Java to use HTTP Basic authentication is to set a default Authenticator:

    final String rpcuser ="...";
  final String rpcpassword ="...";

  Authenticator.setDefault(new Authenticator() {
      protected PasswordAuthentication getPasswordAuthentication() {
          return new PasswordAuthentication (rpcuser, rpcpassword.toCharArray());
      }
  });


Recovering Hive Wallet private key with passphrase

Might want to experiment with libbitcoin's command line interface called bitcoin explorer (bx). Instructions for using v3.0 bx commands used below are found here in the right pane.

Assuming there is no mnemonic password, and the associated public key is compressed, the associated BIP 32/39/44 m/44'/0'/0'/0/0 private key and address can be computed as follows:

1) % echo "artwork crowd need rent install fire draw escape moment myth strong belt chair quiz cinnamon lab park leopard bicycle empty harvest cream matter teach" | bx mnemonic-to-seed | bx hd-new -v 76066276 | bx hd-private -d -i 44 | bx hd-private -d -i 0 | bx hd-private -d -i 0 | bx hd-private -i 0 | bx hd-private -i 0 | bx hd-to-ec | sed 's/$/01/' | bx base58check-encode -v 128

L58MiHSepQEyenRzb8EENW3mXv1DYExG5XMGCgdoZC94yqi5eBRd

2) % echo "artwork crowd need rent install fire draw escape moment myth strong belt chair quiz cinnamon lab park leopard bicycle empty harvest cream matter teach" | bx mnemonic-to-seed | bx hd-new -v 76066276 | bx hd-private -d -i 44 | bx hd-private -d -i 0 | bx hd-public -d -i 0 | bx hd-public -i 0 | bx hd-public -i 0 | bx hd-to-ec | bx ec-to-address -v 0

19JdNez3RdtfYXCnH1NohFxY5sRWRu6xbW

Assuming there is no mnemonic password, and the associated public key is uncompressed, the associated m/44'/0'/0'/0/0 BIP 32/39/44 private key and address can be computed as follows:

3) % echo "artwork crowd need rent install fire draw escape moment myth strong belt chair quiz cinnamon lab park leopard bicycle empty harvest cream matter teach" | bx mnemonic-to-seed | bx hd-new -v 76066276 | bx hd-private -d -i 44 | bx hd-private -d -i 0 | bx hd-private -d -i 0 | bx hd-private -i 0 | bx hd-private -i 0 | bx hd-to-ec | bx base58check-encode -v 128

5KcCVPJbPyUBa2geWwCcCfkg6C6wVq2C7v6VpWNUmT5zzkdph14

4) % echo "artwork crowd need rent install fire draw escape moment myth strong belt chair quiz cinnamon lab park leopard bicycle empty harvest cream matter teach" | bx mnemonic-to-seed | bx hd-new -v 76066276 | bx hd-private -d -i 44 | bx hd-private -d -i 0 | bx hd-private -d -i 0 | bx hd-private -i 0 | bx hd-private -i 0 | bx hd-to-ec | bx ec-to-public -u | bx ec-to-address -v 0

1MGahZGaVNM5Y26A58sa5LajiyeopnBez6


Bitcoin allows users to transact pseudonymously, so there is no data contained within the blockchain record itself tied to an identity. This is by design, anything else would be terrifyingly Orwellian. Transactions are final, once fully confirmed in the blockchain nobody can issue a reversal or cancellation. As a bitcoin user, you have ultimate responsibility over your funds.

However, it is possible that external data can link an identity to an address. For example, many exchanges that convert BTC <-> fiat money will require customers to undergo a ‘know your customer’ (KYC) procedure, in order to satisfy the regulators of the jurisdiction the exchange service operates within. So an exchange may have a record of customers and associated addresses (but that would not be a public record).

This means that if the scammer stole your coins and then sent them straight to an exchange, there may be a record that could allow the authorities to find the scammer. But keep in mind as well: bitcoins are fungible, so while there is a transaction history that can be traced, there is no way to track ‘this exact bitcoin’ through time. So a savvy scammer may be able to obfuscate their transaction history, to the point of it being functionally impossible to trace your stolen coins through time.

Your best bet is likely to file a report with your local authorities, but I am sorry to say that in many cases there will be little they can do. Best of luck, I hope you are able to recover your funds.


Is there a more space-efficient way to prove that a transaction is contained within a block?

Other than shortening the hash used, there is no way of making the proof take less space.

On a side note, the hash can be made shorter by just using the first n bits.  The checksum of a bitcoin address (first 4 bytes of sha256(body))is made in this way.  I don't know why ripe160 is used instead of a truncated form of sha256 for the main body of the address.


Need help to recover blpckchain.info wallet, my wife forgot her password and the brute force with btcrecover is not catching the password

Is there a way to just manually transfer the btc from the old wallet into a new wallet we do have access to

No.
You need at least one of the things you have none of

working wallet.
PIN or password for the wallet.
Recovery phrase for the wallet.

is there any way to extract the password or private keys directly from the wallet file?

No.
The brute-force guessing method you are using is the primary known method.
There have been alleged security vulnerabilities in the blockchain.info wallet but it is possible your wallets were patched to fix those issues. It may be a long shot:

Major Wallet Vulnerability Revealed As User Barely Reclaims 9 BTC
blockchain.info vulnerability allows attackers to steal bitcoin wallet backups

Can anyone help!?

No,
You are already doing the right thing I think.
Unfortunately, from the perspective of the software designers, what you are doing is exactly what they must make every effort  to prevent being possible. If you could easily do this, so could a hacker or someone who stole your phone.

Footnote. OP knows this - but it is a good idea to remind new readers:
The Blockchain.info website says

Your Backup Phrase is made up of 12 random words, and is an encoded version of your master seed (and an industry standard). It acts as a backup and allows you to access your bitcoins and ether regardless of the wallet software you’re using. In the event that you lose your password, or choose to use another wallet provider, your Backup Phrase is all you need to regain access to your funds.
Quick tip: You can find your 12 word Backup Phrase in your Security Center after creating your wallet. Write this phrase down and keep it somewhere safe.

(my emphasis)
I'd go further, practice wallet recovery and make sure you can recover a lost wallet before putting serious money "in" it.


Do I need to keep updating Armory version and more?

It really boils down to fixes and any upcoming security issue which are announced with the releases, but in general it's a good idea to upgrade every once in a while (at least it will likely make any mandatory update less painful). The updates should usually be less painful than initial install - sometimes no database rebuilds are even needed, and v0.93 rebuild is very fast too.

Note that sooner or later you will eventually need to upgrade Bitcoin core too. It may be running seamlessly from within Armory but you can also choose to run it yourself as a standalone application - either way updates will be required eventually to pick up the latest changes in the network. Armory updates often comes along with Bitcoin core updates as it need to support any Bitcoin core database changes.

Also if you use an offline wallet, there are some limitations in the version delta you can have between online and offline wallets - Armory will normally warn you loud and clear about them.


How would you store a very large amount of crypto currency

I am very happy with my Trezor, less so with my Ledger (because I find the interface annoyingly clunky).  The Trezor is extremely easy (and, I believe, extremely safe as long as you don't leave your PIN number or recovery phrase lying around).  It works fine for Litecoin and Bitcoin, and a bit more annoyingly for Ethereum (where it outsources the wallet to another provider).  I don't believe it will hold NEM.  I'm not sure if the Ledger will hold NEM, but it should be easy to look up on their website.  I hold only Ripple in my Ledger, because (among the coins I hold), this is the only one the Trezor won't handle.


Will the upcoming block size increase be more profitable for miners, or less so?

the linked article is regarding the change of maximum block size from 1MB to 20MB. as you can see in this graph from blockchain.info, blocks have not yet reached the maximum of 1MB:

blocks are yet to go above 0.55MB, so its really not as urgent of an issue as the article makes out.

eventually though, there will be enough transactions on the bitcoin network to fill up more than 1MB and at that point miners will create blocks bigger than 1MB.

in terms of mining effort, the algorithm is identical when hashing (mining) a block with 1 transaction in it or when hashing a block with 1 million transactions in it. this is because the hashing is conducted on the block header which contains a merkle root of all transactions. sure it would take a bit longer to calculate a merkle root for 1 million transactions than it would for a single transaction but both would still take less than 1 second though.

another concern in the article was that the internet bandwidth in china might not be high enough for miners to receive enough transactions to put into a block. firstly i don't think this is a realistic concern - bitcoin blocks are mined on average once every 10 minutes, and i struggle to believe that the internet is so slow in china as to not allow downloading 20MB in 10 minutes. but even if this were a problem, it would just mean that the blocks mined (on full nodes) in china would have fewer transactions than blocks mined elsewhere. the new 20MB blocksize will just be an upper limit - it is not a requirement for all blocks to be 20MB in size! and secondly, transaction fees do not currently make up a huge percentage of the mining reward anyway, so even if bandwidth were a concern the difference in payout would be negligible. for example, the current block reward is 25btc (us$6014) and the contribution due to transaction fees for the latest 3 blocks has been:

361188 - 0.12673848 btc = us$30.49
361187 - 0.23697908 btc = us$57.01
361186 - 0.19895231 btc = us$47.86

(at the time of writing this 1btc = us$240.59)

by 2032 we will reach a block reward of less than 1btc (0.78125btc to be precise) so transaction fees will matter by then. but i would be very surprised if downloading 20MB in 10 minutes will be a problem for any full-node miner at that point in time.

the final thing to note is that miners in china need not be full nodes. they can always keep their full node somewhere with faster bandwidth (eg hong-kong) and then just transmit the 32 byte merkle root to the miners in china every time it gets updated with new transactions. this is virtually nothing, and given that its possible to have a phone conversation with somebody in china from the west then it should definitely be feasible for mining.


How come the lightning network creators believe the fees will be zero?

For each payment channel there will be two transactions sent to the blockchain, as you say, for opening and closing it. I'm not sure of the exact specifics of the lightning network, but I don't know where you are getting four writes to the blockchain. It should just be two: open a channel, close a channel, and do as many LN transactions as you want in between.

The LN fee they are talking about is not the opening and closing writes to the blockchain. Those are just normal Bitcoin transaction fees, separate from LN fees.

From what I understand the LN will be a somewhat decentralized system of large nodes that process the transactions. Every time you send a transaction inside of a payment channel on the LN you have to pay a fee to these nodes that route the transactions through the LN, this is how the nodes make money. But because the LN is a more centralized network than the bitcoin network, and it doesn't involve computing incredibly expensive hashes to confirm transactions, the cost of routing payments through the LN is very cheap. It won't be free, but it should be very cheap. Credit Card companies take usually around 3% fee, I read Joseph Poon say at some point that LN transaction fee will be percent based (instead of data size based like blockchain) but the fee will be less than 1%, maybe even as cheap as 0.1%.

Additional thoughts:

Assuming merchants eat the transaction fee as they do for credit card fees, it will save merchants a lot of money (>2%). Note however that for large Bitcoin purchases just doing a standard blockchain transaction will be cheaper than using the LN. Even with current transaction fees, if you pay $1000 for something with Bitcoin with a $5 fee, if LN has a 0.5% fee then it'd also be a $5 LN fee, so using those hypothetical numbers that would be the break even point where $1000 use normal bitcoin transaction. LN is meant for many small purchases and will be much cheaper than Bitcoin when you use it for many small everyday purchases.


Here is a Step-by-Step tutorial

 Set up bitcoin.conf.

rpcuser=user

rpcpassword=password

rpcallowip=172.28.128.1 # The ip of your machine. Use 127.0.0.1 if you use local machine

Start a bitcoin client by

bitcoind -server=1 -daemon

 Download this library and install it by running

python setup.py install

Create a python script to connect to RPC server.

from jsonrpc import ServiceProxy
access = ServiceProxy("http://user:password@172.28.128.4:8332")
print(access.getbalance())


Why are arithmetic script opcodes limited to 4 byte operands?

From the source code:

  Numeric opcodes (OP_1ADD, etc) are restricted to operating on 4-byte integers. The semantics are subtle, though: operands must be in the range [-2^31 +1...2^31 -1], but results may overflow (and are valid as long as they are not used in a subsequent numeric operation). CScriptNum enforces those semantics by storing results as an int64 and allowing out-of-range values to be returned as a vector of bytes but throwing an exception if arithmetic is done or the result is interpreted as an integer.

This does not explain why overflowing is allowed, but I guess this has to do with preventing errors (say, 3 billion + 3 billion resulting in a negative number).

As for the 4 byte limitation, I assume this is for safety. If there was no limitation, then because CScriptNum stores numbers as signed int64_t values, overflowing that limit (not the stack item overflow described in the previous paragraph) would result in undefined behavior according to the C standard. This is bad practice in general, but very bad in consensus-critical code. Most nodes run x86 Intel processors, but could you imagine how deeply in trouble we would be if a transaction was valid on Raspberry Pi based nodes and invalid on miner nodes, or valid locally on your smartphone and not on the network? All kinds of bad stuff would happen: hard forks, double spends, you name it.

You could also have problems with very large numbers being added to increase their size past the 520 byte push limit, then hashed repeatedly to consume as much CPU time as possible, resulting in a DoS attack.


Can there be double spend between propagation of block chains between 2 set of peers?

Staying well connected is important to bitcoin nodes and miners. Special relay networks such as the Bitcoin Fibre Network exist to ensure new blocks are communicated quickly, and to prevent network fragmentation.

In your example, some subset of nodes have become fragmented from the network. If you sent a tx to those nodes, they would not be aware if it was a double spend, so they may store it in their mempools.

However, transactions need to be confirmed by miners, so if no miners are in the fragmented network, then those nodes would simply wait endlessly to hear about a new block. If the rest of the network knows about the other tx in the double spend, and has confirmed it in a block, then the fragmented nodes would simpy drop the tx they heard about once they reconnect and get the updated blockchain. Any UTXO can only be spent once on the blockchain, a second attempt would be invalid.

It is unlikely a miner would be fragmented, due to the existence of things like the Fibre network I linked to above. Miners are heavily incentivized to ensure they have good connectivity to the network. Anything less than that means they could lose money by mining on the wrong chain.

So, I hope you can see that if a situation arose in which the network became fragmented, then it could be possible to get a double spent tx into the fragmented node's mempools undetected. However getting the doublespent tx confirmed is unlikely, due to good miner connectivity (very low chance of miner fragmentation). So as long as users wait for transaction confirmation (ie not a 0-conf tx), they will be at little risk of being double spent against. Usually 6 confirmations is the recommended waiting period for high value transaction.


Is there any wallet that allows safely storing private keys in an offline computer?

Armory will allow you to do everything except #1. That, you can do with a livecd:

http://www.swansontec.com/bitcoin-dice.html


How long does it take to propagate a new broadcasted message in the Bitmessage?

Curently, with around 5000 nodes, a message shouldn't take longer than about 15 seconds to propagate. Typically, it's faster.

Messages are forwarded if the Proof of Work is sufficient. There is no signature verification on forwarding, since only the recipient of the message can verify that. Nowadays, PyBitmessage runs the decryption attempts in a separate thread, therefore forwarding and decryption run in parallel.
Some versions have different delays in forwarding depending on what type of object it is, some do not have delays. But this has nothing to do with decryption attempts, it is an attempt to mitigate timing attacks.
For propagation size does matter, because it takes longer to transfer, however I don't think the difference is that big, in particular if you're on a fast connection. For decryption, the data itself is encrypted with AES-256-CBC, and that's pretty fast, on my laptop I get like 100MB/s, so you shouldn't see a big difference.
Latency does influence the speed a bit, but some network operations are asynchronous, at least in PyBitmessage, so from practical point of view it's not a big deal.
I don't understand this. It takes a bit longer if there are more nodes in the network, but on the other hand if they are well connected, it's faster. PyBitmessage will by default attempt to maintain 8 outbound connections, and refuse incoming if it has more than 220 total connections.

Recently a new stats website was launched: https://beamstat.com/, which works nicely, just the node count is incomplete.


Having some trouble getting started mining bitcoins using GUIMiner and Radeon HD 5770 graphics card

There isn't any point in mining with a CPU or GPU. You can get just a few MHash/s that are not enough to accept work from pools. If you want to mine, you have to have at least 1 GHash/s, and you need to buy specific hardware, like ASIC miners. There are a few companies like Butterfly Labs, KnCMiner and more where you can buy machines. The most recent one is from KnCMiner that release preorders for Neptune, a 3000 GHash/s machine for about 12,000 dollars.

You can also look at some cloud mining like cex.io. The price per GHash is much more, but you can trade GH any time.


How does the satoshi client handle endianness?

The answer is simple: big-endian architectures are not supported.


Why can't someone build a custom computer and win the reward for a few days?

Lets see, following on from the other answer, you're going to need 6,400,000 TH/s. Currently you can buy the Antminer S9 which will give you about 13.5 TH/s, so you'll need a mere 475000 of them.

If you are buying  that many units I reckon you could negotiate a pretty good discount, if you don't cause an international shortage. Lets say you could get them for $3000 a unit. This would cost you only $1,420,000,000.

You are going to need about 3900 m/3 of space to store the devices, unpacked. By my reckoning that is about 4 tennis courts filled about 2 meters deep. Not a vast area but bigger than most garages. In reality, you'll need more space for ventilation and access.

To run all the devices concurrently you'll need about 66,500,000 Watts of power, that is enough to supply about 88,000 domestic homes. Your electricity bill would be at least $50,000 a day.

By my reckoning, you'll need about 45,000,000 BTU's of cooling, this could be achieved with 661 of these costing around $7,000,000. I haven't accounted for the additional space, electricity and airflow requirements.

The S9's internet bandwidth requirements are relatively economic, averaging out at something like 500 bytes a second. So, you'll only need 238 Mb/s bandwidth. This could be be supplied via and OC-12 line which will cost at least $700 a day, or more depending on distance. You're going to need something like a 1 Cisco Catalyst 6513-E switch, 180 Cisco Nexus 2348TQ and 10,000 Cisco Nexus 2248TP-E switches. The switches alone will cost something like $51,000,000. There is likely a more cost effective solution but you'll need to speak to your engineering team to work that out.

None of this takes in to account other concerns like expert cable management and racking, maintenance and security.

Finger in the air, you need a couple of billion dollars to get started. Given the current market cap this might actually pay off but you can see the risk and, don't forget the cleanup cost once you have devalued the market.

Good luck.


Can Bitcoin be "shutdown" if energy consumption for mining is heavily regulated?

Those questions have been answered multiple times.

The difficulty depends on the mining power. If there is a regulation and 60% of the miners are away, the difficulty would decrease drasticly within 2 weeks and the other 40% would need less power to mines the blocks. So the mining would not be hampered for a long time.

  Would BTC survive with only minor mining going on?

yes. Only a few people could still mine. The bitcoin network does not really need big mining-pool companies for that.

And you third question is a primarily opinion-based.


There are several layers to bitcoin's cryptography:

ECDSA. Elliptical curves, specifically the problem of solving discrete logs is well-known to be a difficult problem. The particular curve that bitcoin uses is secp256k1. If that particular curve is cracked, there would probably be some sort of patch to change the curve in bitcoin, which if the other two things aren't cracked, should have a reasonable chance of success as people can migrate coins encrypted with the new curve. If Elliptical Curves in general are cracked, then the other two things securing bitcoins are still there. Also, many websites would be compromised right away, including banking sites and credit card verifications as they rely on this encryption as well.
SHA256. If SHA256 were cracked, that is, if you were able to generate a source for any particular SHA256 hash, this would probably not mean much by itself. There are other algorithms that can replace this.
RIPEMD160. Again, if this were cracked, it's useless without the ECDSA cracking. There are other algorithms that can replace this.

If any one of these things is cracked, there would most likely be a hard fork to move everything over to a different hash. It wouldn't be pretty, but it would be possible.


Merkle tree structure inside blocks - what are they for?

There is no merkle tree structure inside of blocks. Transactions are just concatenated with each other. The order of concatenation does matter though. It is necessary to verify the merkle root, which is the root node of a merkle tree. The merkle tree is not encoded in the block, rather it is generated on-the-fly using the data in a block in order to verify that the provided merkle root is correct. SPV wallets will often request for a transaction and proof that that transaction is in the block, so a node will provide part of the merkle tree to prove that the transaction is in the block.


How much would cost to mine a block with Google Compute Engine?

Even if it was a GPGPU cluster, you will not make a profit from the prices they are charging. Mining at this point is only profitable with FPGA, ASICs and certain GPUs pending power consumption.


Authenticating with npm nodejs bitcoin-core module

I tried the following, and it works:

const Client = require('bitcoin-core');

const client = new Client(
    {
        username: 'yourUsernameHere',
        password: 'yourPasswordHere',
        port: '8332'
    }
);

client.getInfo().then((help) => console.log(help));


Have there been any successful "airdrops"?

I remmeber there was BitcoinTalkCoin - the one with BCC ticker, in fact there were few sharing the same idea). They successfully "airdropped" the coins to BTT users, registered before the coin anouncement. I received some myself :) although it was pennies, you can say that the mission was accomplished.


listunspent rpc/cli command doesn't seem to list unspent unconfirmed transactions for watch-only addresses

So...

Seems like listunspent is actually working fine. However, importmulti doesn't seem to scan mempool for transactions.


Creating Payment system using Blockchain API

The question is pretty general in that you may be using Blockchain API in the generic way.  Blockchain.info is a company that provides an API to use on the Bitcoin network.   If you want to write applications using that API can read about it here. https://blockchain.info/api/

Along with that API you could look into other services like BitPay or even Stripe which provide ways to accept Bitcoin payments without having to know a lot of detail on the protocol.

If you're using Blockchain API in a generic sense and want your website to not be dependant on external companies and APIs you would run a full node yourself.

Bitcoin full nodes allow communication via RPC calls to create wallets, transactions etc..  There are many examples of how to connect to a bitcoin node via RPC with PHP.  You would run the node on TestNet so you can build and test without fear of losing money to errors or fees.

Bitcoin Core is the obvious choice for a full node, but I would also look at bcoin implementation if I were doing significant wallet management.


Conditions for recovering a p2pkh bitcoin private key

What are the necessarily ecdsa values needed to recover the private key of a p2pkh address.

A key is recoverable if two signatures are created with the same R value.

  When same address is reused numerous times to receive bitcoin what threat does it pose?

It leads to some loss of privacy, allowing different payments to be linked together.


What is the best free iOS wallet out there?

I personally like Blockstream Green as in addition to being simple to use, it has many features about security and privacy


Is it possible to get already-sent bitcoins from a corrupted wallet?

Create a backup of your current wallet.dat file. Check this is you don't know where the file is stored.
Check debug.log in your bitcoin datadir, see if there are any errors, ask somebody, post here, post on IRC
Start bitcoind or Bitcoin-Qt with command line argument -salvagewallet (if you don't know how to run a Application with command line arguments, try to ask someone or get help over IRC freenode/#bitcoin.
If step 3 didn't help, check if you have a backup from your wallet.dat, replace files (only overwrite your wallet.dat if you followed step 1).
If nothing worked out, get help from a bitcoin expert over IRC (but never give away your wallet.dat!)


Use case for multiple inputs in a single transaction

Is there a way to ascertain a pair or more of Bitcoin addresses belong to the same wallet on the basis an address pair was used as input for a single transaction?

No.

Assuming that all inputs to a transaction are from the same wallet is often called the 'common input ownership heuristic', but it is possible to create transactions using inputs from various wallets, so there is no way to apply this heuristic with 100% accuracy. In many cases it may work, but in many cases, it will fail.

  Can I verify the address pair input is not part of a createrawtransaction or fundrawtransaction transaction, for instance from a blockchain explorer?

No, the transaction data that is broadcast to the network is purposefully devoid of information about which software/method was used to craft the transaction. In some cases 'transaction fingerprinting' can be used to make an assumption about this, but again it is only a guess at best, false positives can easily be created too.

  In which case besides createrawtransaction and fundrawtransaction would multiple inputs within a single transaction belong to different wallets?

A transaction with inputs from multiple wallets is usually referred to as a coinjoin transaction. Some examples of wallets that implement coinjoin transactions are Wasabi wallet, or Join Market. Other ideas exist to create 'payjoin' transactions, such as P2EP. Coinjoins can also be manually created using software such as bitcoin-core.


When building bitcoind, I receive error "headers.h:36:20: fatal error: db_cxx.h: No such file or directory"

I did the following command on Ubuntu and it worked.

sudo apt-get install libdb++-dev


What is the threat model of a Bitcoin HSM / Hardware Wallet?

what is the threat model that they protect against and are vulnerable to?

Hardware Wallets are security appliances with varying hardware and features, but the overall concept is largely identical. A trusted device holds cryptographic keys, allows for viewing of information on a dedicated display, and accepts secure input through its own interface (buttons or a touch screen).

In the Hardware Wallet security model, a user interacts with their untrusted host device to construct a transaction paying an amount to an address, the transaction is then send to the hardware wallet for assembly of the transaction including the cryptographic signatures. The user is expected to verify the information shown (namely the amount), and acknowledge the transaction on their device. Each transaction needs explicit acknowledgement on the hardware device, and the host is unable to make transactions without that approval.

This is distinct to the traditional software wallet model where a user interacts with an untrusted host, which on the entering of the encryption key for the wallet, can make any arbitrary transaction of any amount to any destination.

  How much do commonly stated practices about using these devices improve the safety of storing Bitcoin using them?

Many of the pieces of safety advice given about the usage of Hardware Wallets provide very little additional security, or provide just the illusion of security in lieu of actually effective measures.

An often repeated security measure is checking that the address on your hardware wallet matches the one you attempted to send to using the companion application on the host computer. This is completely meaningless, as the destination address is provided by the untrusted host. The address not matching would be an indicator of absolutely nothing at all other than severe software failure on the part of the device.

  How secure are these devices for storing Bitcoin

The ultimate security of the device comes down to trust in the manufacturer, as it is extremely easy for mistakes in software to allow for complete theft or loss of funds, and for invisible backdoors to be inserted. History has shown that many of the devices available are plagued with severe code quality concerns, have poor choices in the construction of their hardware security, and can otherwise be an unsafe choice to store funds.

Backdoors

Backdoors in Bitcoin transactions, specifically due to some features of EDCSA, are trivial to produce and are extremely difficult to detect especially if sporadically deployed. ECDSA signatures contain a number which is generated from a supposedly random source, however if this number is crafted to contain values of a third party, it can deniably leak the secret private key or other information along with being valid. Modern software implementations of ECDSA use [deterministic generation][5] for the secret nonce value, but this is not verifiable without using the private key for validation.

Code Quality

All devices today have shown severe issues with their open source implementations of ECDSA cryptography, or simply have their implementation completely closed source to evade analysis.

The Bitcoin Trezor originally shipped with a ECDSA implementation that based on a python library transliterated into c. This code was comically slow and exposed a [very large timing sidechannel attack][6]. Being physically close to the device while it was signing a transaction exposed enough information through the execution time to expose private key material. The Trezor has otherwise had a considerable number of bootloader, timing analysis, power analysis, and hardware vulnerabilities.
The Ledger Nano has a amateur hour mistake in its bootloader which allows for complete bypass of the security on at least the main processor which is handling user input and communication. For most microcontrollers the layout of the memory has repeating sections and multiple positions at which pieces of data can be accessed, the bootloader was simply unaware of this and allowed for arbitrary changes to the security sensitive code.
The CoinKite series of hardware uses micro-ecc, an abandoned "ECDSA for arduino" which contains absolutely no tests and is vulnerable to at least one timing attack.

Using a hardware wallet for storing Bitcoin is not a bulletproof choice, it's a considered set of security trade offs that requires thoughtfulness and understanding of the threats and weaknesses of the devices.


Full SegWit support in the Bitcoin Core wallet is planned for the next release.

It is a matter of testing and review: https://github.com/bitcoin/bitcoin/pull/11403


Yes, you can encrypt the wallet

  It’s a good idea to encrypt your private keys if you only spend money from your wallet rarely. The Wallet.encrypt("password") method will derive an AES key from an Scrypt hash of the given password string and use it to encrypt the private keys in the wallet, you can then provide the password when signing transactions or to fully decrypt the wallet. You can also provide your own AES keys if you don’t want to derive them from a password, and you can also customize the Scrypt hash parameters.

Yes, you can corrupt the wallet, but not if you do things the right way.

  By default the Wallet is just an in-memory object, it won’t save by itself. You can use saveToFile() or saveToOutputStream() when you want to persist the wallet. It’s best to use saveToFile() if possible because this will write to a temporary file and then atomically rename it, giving you assurance that the wallet won’t be half-written or corrupted if something goes wrong half way through the saving process.

Source: https://bitcoinj.github.io/working-with-the-wallet


Can you create empty Bitcoin transactions?

Yes, it is possible and allowed by the consensus rules to create 0 value outputs. Such outputs can even be spent. However such outputs are also non-standard and thus transactions with 0 value outputs will not be relayed. They can still be mined into a block by a miner directly inserting the transaction into a block they are mining.


Alternative Cloud Hashing sites to Cex.io

Cloudhashing.com does cloud mining, but they did not offer trading the last time I checked.


How do bitcoin nodes initially find peers?

Although the torrent protocol requires a central server, you don't necessarily need a central server for a p2p network. The client only needs the IP address of at least one active participant. Connecting to this will give you other IP addresses to connect to.

So the only problem for a p2p network without a central server is: where to find the first IP address to connect to. Bitcoin solves this using a so called IRC bootstrap after the first installation. Basically it tries to find such ip-addresses on designated IRC channels.

This is only necessary on first run; subsequence runs it will just try ip addresses that have worked before.

More info on the IRC bootstrap: http://bitcoinmedia.com/the-irc-bootstrap-method-is-flawed/

EDIT: On further inspection, it seems that IRC bootstrapping is no longer used. See the link for details.

EDIT: See also this question regarding the initial connection (bootstrapping)


getblocktemplate request that omits transactions?

getmininginfo or getdifficulty are useless as they return the difficulty of the most recently mined block, not the block that is currently being mined.

The network difficulty is adjusted every 2016 blocks (~2 weeks), so to accomplish your goal (track the network difficulty) there is no need to continuously return the difficulty of every new block. It will only change once every 2016 blocks, so getmininginfo should do the trick.


If there are no more buyers at price X, then a seller has to lower his price by Y. If there are still no buyers, she will have to lower it more. If there a lot more sellers than there are buyers the price can drop very quickly, just as right now there are a lot more buyers than there are sellers and the price is rising very quickly.


You don't have to select the oldest transactions, they are same as the recent transactions in blockchain's utxo view. When building a transaction, you can take the transaction size into consideration, which could affect the transaction fee.

Generally, each output is 148bytes and each input is 34bytes. Here is a more accurate way to calculate transaction fee.

How to calculate transaction size before sending


If well-built wallet software can avoid transaction malleability, why does the lightning network need an additional malleability fix?

My understanding is that wallets can avoid creating malleable transactions.

It depends. For typical transactions, standardness rules on the network make malleated transactions unlikely to be relayed and confirmed. But this is just based on goodwill of the network and miners. As was shown recently, it's trivial for miners to stop enforcing this. As there are no consensus rules that prevent malleated transactions from confirming, generally every transaction is at risk.

Perhaps what you are referring to is that good wallet software can cope with malleability. They detect when a modified version of their transactions gets confirmed, and treat it as a replacement for the original. For simple payments, this is usually sufficient.

  If so, why does a lightning network need SegWit or some other tx malleability fix?

Because Lightning does something that regular transactions don't do: rely on having pre-signed transactions depending on unbroadcasted potential future transactions, and expecting them to not be invalidated. Malleability breaks this assumption.


How to determine valid vanity address prefixes for any starting net byte?

Casascius' Bitcoin Address Utility includes a Base58 calculator. You can input into it the lowest and highest values to encode to obtain the lowest and highest strings.

For example, to get the lowest Namecoin address, start with the hex representation of its network byte 52, which is 34, and add 40 zeroes (representing the 160 bits of the public key hash in hex). The result is MvaNCeVyvP6ZXYFWGpKaDX9ujEQ418F7sm. Likewise, to get the highest string use 34 followed by 40 f's, giving NKuyBkoGdZZSLyPbJEetheRhMjezbtjJCf.

Only 34-character strings which are between these two, in lexicographic ordering, can be valid Namecoin addresses. The ordering of the characters is compatible with ASCII, 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz, and thus most programming environments should be able to check the address with the built-in string comparison functions.

Specifically, the first 2 characters can only be one of the combinations between Mv and NK, which are Mv, Mw, Mx, My, Mz, N1, N2, N3, N4, N5, N6, N7, N8, N9, NA, NB, NC, ND, NE, NF, NG, NH, NJ and NK.

A more general approach is to decode the address into a number, and verify that the result is composed of the required version byte followed by any n bits (where n is the bit length of the encoded data, 160 in the case of a receiving address).


Why do I need my password to generate a new receiving address in bitcoin-qt?

The Bitcoin-Qt/bitcoind client will try to maintain a key pool of unused keys at an even size (default is 100 keys).  So each time you click "New key" it is going to try to add one to the key pool.

These keys in the key pool need to be encrypted, so your passphrase is required to do that.

The getnewaddress API call will, I believe, give you an address from the pool and if the wallet is locked, will simply deplete keys from the key pool without requiring the passphrase to replenish.


How exactly does the network know if the miner has put forth a valid proof of work?

When a miner authors a new block, the block contains a block header. The block header is used to put the new block in relation to previous blocks and gives a summary of the transactions. In detail, the block header contains:

a version byte
the block hash of the previous block
the Merkle root that commits to all transactions in the block
a timestamp
a field corresponding to the current difficulty
a nonce that provides some randomness.

This block header has only 80 bytes of data. When these 80 bytes are put through SHA-256d once, they result in a hash which we use as the unique identifier of the block, the "block hash". The block hash is used to announce the block to peers and in the next block to commit to this one. This same "block hash" interpreted as a number has to meet the difficulty requirement ("have a certain number of leading zeros").

  What you are saying is that the nodes have to do the work to find the valid hash all over again.

Not quite! Finding a block header for which the hash meets the difficulty requires a multitude of tries. Since it is impossible to predict which block header will succeed except by hashing and checking, the fact that a valid block has been found proves that a large number of tries have been expended (about 4,92×10²² in average currently). We call this concept proof-of-work. However, the validation of the work only requires to put the provided block header once through a hash function and then to compare the resulting hash with the difficulty which is trivial to do!
In fact, this is the first of a number of validity checks that other network participants do when they receive a new block candidate.


How to receive and manipulate a bip 70 payment object in django python?

I asked this same question in a simpler way without mentioning bip 70 and got the answer here.
The initial problem was that Django doesn't like people posting to your server who arent authorised so I used from django.views.decorators.csrf import csrf_exempt and the corresponding decorator @csrf_exempt as a short term work around for further debugging.
More detailed info can be found by following the link to the simplified question.


Does the .bitcoin directory shrink in bitcoin-qt 0.7.2 and later?

The code referred to by that thread will become 0.8, and is not in any released versions as of January 2012. 0.7.2 is a minor upgrade to 0.7.1 only, with only bug fixes.

0.8 will indeed use a more efficient storage mechanism, which will most likely result in slightly reduced storage requirements (though you may need to delete the old database manually). The most important improvement, however, should be block validation speed, and the amount of I/O to disk necessary.

In the future, the new database scheme may lead to a version that supports block pruning, where not (all) history blocks are stored on disk anymore without compromising security (it would still require downloading those blocks in full, however). Because of the invasive effects on the network if suddenly many nodes weren't able to serve history anymore, this may need some discussion first, and isn't implemented yet.


Sending regtest Bitcoin fails with an error message. How do I resolve this error?

You could enable -fallbackfee as it says in the error message but the easiest or quickest way to resolve this is to set a fee. In this example we are setting a fee of 1 satoshis per byte.
./bitcoin-cli sendtoaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 0.1 "" "" false true 1 sat/B

If you do
./bitcoin-cli -regtest help sendtoaddress

you will see what those arguments after the regtest address represent.
Alternatively if you want to set the fallback fee see this StackExchange question.
This PR 16524 merged in October 2019 disabled -fallbackfee across all chains (mainnet, testnet, regtest) by default.


How do I run a headless testnet on OS X?

Ready to use distribution of bitcoind for Mac OS X doesn't exist, so you would have to build it from source code, here is the instructions for that: What are the steps in building bitcoind on Mac OS X 10.6?


So you are asking if it is possible to store a huge chunk of data in an tx output what worth 100000000 satoshi, right? Yes, it is possible but you have to pay really big fee to store your picture in the blockchain on millions of computers.


I'm trying to confirm my BCH is being held on my trezor

TREZOR says that Bcash (Bitcoin Cash) will only be available in TREZOR Beta Wallet for now. They chose this strategy, as they don't want to force a firmware update on users that are not interested in Bcash. Mode details on Claim your Bcash (BCH) in TREZOR Wallet


How does the mining pool know our hashrate/our share?

So, how does mining pool know, if we have actually gone through all the 1000 mega hashes to submit one share to the mining pool (Person A has done more work than person B)?

The mining pool don't know and don't care how many attempts your miner made to solve a share, he care about how many shares you actually solve. (person A and person B get the same rewards if they submit the same number of shares of the same difficulty, regardless of how much work they spend to find these shares)

But person B who has low hashing power already found a share but has not done any work compared to person A

If the person B found the same amount of shares than the person A but with much less work, the person B have been luckier than the person A.
Take in account that not all share have the same difficulty and consequently the same value, typically mining pools serve easier share (which require less work) to slower miners and more difficult ones to faster miners (to better exploit the different speeds).

How does mining pool get to know if Person A has done more work than Person B, as miner does not submit any unsuccessful hashes but the successful ones, but already more work has done.

As already mentioned above, you are not paid for the work you do but for the shares you produce.
The mining pool does not know your hashrate, estimates it based on the speed with you solve the shares and their difficulty: if you are lucky and you find more shares than you should, your hashrate will be overestimated, if you are unlucky and you find less shares the hashrate reported by the pool will be lower than the actual one.


Where can I get a list of stale RBF'd transactions?

I would like to prove that a certain transaction was in the mempool on a certain date before it got replaced via RBF with another transaction.

Consider Tx de8ba282831c6d645aa777a35a5b9f2107cbd96913a9cd4c5880420db092e399 as an example.
gettransactionin Bitcoin Core returns:
"time": 1615601043,
"timereceived": 1615601043,
"replaced_by_txid": "f77e6928c1c12bc91858c95b32dab1e493b24cdf3e19c02372aa11e6dc5ec3c9",

Time of this tx: Saturday, March 13, 2021 2:04:03 AM
Got replaced by another tx on: Saturday, March 13, 2021 2:04:11 AM
I am not sure but maybe this information is only available for transactions that belong to your wallet.

Is there any service that provides this data?

Couldn't find such information in any of the famous bitcoin explorers. Best I could find was one explorer that shows invalid type for tx which got replaced:
https://tbtc.bitaps.com/de8ba282831c6d645aa777a35a5b9f2107cbd96913a9cd4c5880420db092e399


Building a web app to collect Bitcoin payments. How should I monitor transactions on payment?

I'm looking to create a web app similar to coffee.foldapp.com where they load up a bitcoin address and once you pay it will automatically show the Digital code product. They seem to be using 0-confirmation. I heard it was risky, but why are they doing it then?

It is risky since you accept the transaction without it being in the blockchain. See the accepted answer to this question for a double spend example: as mentioned in the comments it is still difficult to work. This question is related. Merchants are doing it because they are willing to accept the risk for small value transactions. You will hear several percentages on the risk factor but it is generally low. Some examples here and here.

  I'd like to do the same approach since my digital items aren't super expensive and have the option for zero confirmation.

Super expensive is relative.

  What are some ways to do this? Does the client browser have to constantly ping the server to get a payment status update? Or does the server push it to the client's browser?

The server pushing to the client is the way to go from an engineering perspective.

  I'm planning to do this in PHP if its even possible. Or can I just do it without PHP and just tap into API's of other sites like blockchain.info?

Even if you don't use your own node (or other people nodes) directly and want to use the API of a site you will still need to program it in some language. For example, the blockchain.info site has an API library for PHP.


Is the Lightning Network sufficiently secure and well tested for wumbo channels?

Lightning is great but one can't say it is battle-tested. If script
kids would be interested, they could take down those shiny new 5 BTC
wumbo channels with negligible cost and no effort at all.
The underlying issue is that a channel cannot hold more than 483 HTLCs
at a time, regardless of the channel capacity. Sending 483
micro-payments to yourself and holding on to the HTLCs is enough to
incapacitate a channel for up to two weeks.
By utilizing the max route length to add loops, each payment can
consume up to 9 HTLC slots on the target channel. If the script kid is
lucky, they only need to send 54 payments to get it done. A single
tiny channel takes double-digit amounts of Bitcoin out of business.
Below is me locking up approximately 5,800,000 satoshis with a
refundable 18 satoshi payment looping five times through three mainnet
channels owned by Bitfinex and OpenNode. For basically as long as I
want. This happened today.

Wanting to become the world's payment system sounds good but we can't
have trivially exploitable vulnerabilities like this. Walk the talk.
Therefore I started a new project called Circuit Breaker: a
firewall for Lightning nodes. The primary goal is to encourage
thinking about this problem with the potential to grow into a
full-fledged Lightning protection system.

This question was answered by Joost Jager on Twitter.


How to resolve eclair-node-gui-0.3.3-12ac145.jar getting CAPSULE EXCEPTION after java update to version 11.0.9.1?

You're using a very old version of eclair which used Capsule to simplify packaging and deployment. We've moved away from Capsule (which seems to be a dead project) quite some time ago and now package applications as zipped directories which include a bin/ subfolder with launcher scripts for linux/macos/windows. I strongly suggest that you upgrade your node to the latest release of eclair which you'll find there: https://github.com/ACINQ/eclair/releases. I also suggest that you switch from the GUI (we don't package it anymore but it's very easy to build yourself) to the server version and use it through it's JSON API.
You can get technical support for eclair at https://gitter.im/ACINQ/eclair if needed. Thanks!


Sent Bitcoin Cash to Coinbase Bitcoin address

You can wait until Jan 1, 2018 [1]; they are going to add Bitcoin Cash withdraw support. Or you can contact them (of course).

[1] https://support.coinbase.com/customer/portal/articles/2853600-bitcoin-cash---frequently-asked-questions


Would writing one's own cryptocurrency in a language other than C/C++ be stupid?

There's no reason why a cryptocurrency needs to be written in a low level language. It's just that Satoshi's original implementation of Bitcoin happened to be in C++ (perhaps that was the language he/they felt most comfortable with), so now a lot of people seem to think it has to be that way. It doesn't.

You could certainly implement a cryptocurrency (either an existing one, or a totally newly designed one), in Python, or Javascript, or pretty much anything else. Wallet software is mostly managing a big database with a bunch of hashing.


Very interesting brain teaser. I agree that this could be interesting in combination with CPFP. The sender could defer the transaction fees to the recipient which would probably be an interesting proposition for some services in the Bitcoin space.

There are a few problems with negative fees from an operational perspective, though:

The sender defers prioritization to the recipient. However, if the sender needs to access the funds that are assigned to the change output of the transaction, he'll either have to CPFP the transaction himself after all, or doublespend the transaction to add more outputs.

In the first case, he ends up paying the fees himself, in the second case, he creates a scenario where multiple valid conflicting transactions float about unconfirmed, and since he doesn't know which one will confirm first, he'd better also broadcast all alternative complementary transactions.

I.e.

tx1: S --> R1 + C

tx2: S --> R1 + R2 + (C-R2)
tx1b: C --> R2 + (C-R2)

This would quickly increase the amount of transaction combinations that could be accepted on the network, create unnecessary network traffic, and would create a headache for fee estimation: At the same negative feerate, it would be much cheaper for R1 to just purchase tx1, while R2 would have to come up with the fees for tx2 (which is cheaper than tx1+tx1b).

In general, if there are multiple recipients to the transaction, the first to spend from the transaction has to pay for everyone to receive their money.

Another problem is that it may further incentivize out of band payments for transactions which at a larger scale could cause unpredictability in transaction confirmation times, and may skew other incentives in the network.


You can cancel them in the Your current active orders section of the Trade tab by clicking the cancel link under Action. The remainder of the order is taken off the books and you can place new orders using the funds which are returned to your balance.


What is the difference between an SPV wallet and an API wallet?

SPV wallet: only download block headers from blockchain network, it's kind of lightweight node, SPV wallet is able to verify the TX with Merkel branch that from full node.

There are lots of SPV wallet implementation at Github with different coding language, you can go and check it.


What is the right method to calculate Relative Strength Index (RSI) for incoming real time data?

use Current Gain = (Price at 05:05) - (Price at 05:00)

so at 05:59 it should be almost exactly as the new level at 06:00


difference between inbound and outbound connection

When your client start the connection with another peer it is outbound, otherwise it is inbound.

If you want to be sure that your tor node is properly setup and that other peer can connect to you, check: https://en.bitcoin.it/wiki/Setting_up_a_Tor_hidden_service


how bitcoin reject invalid transaction? (with createrawtransaction)

in conclusion, it doesn't works but i want know why this code not working

This part {"MY WALLET ADDRESS": 1.0, "3LnZGyRAeCA3LAMBU2RSQn6dAkHw8rWquw": fee} will throw an error, but the more general answer about security is:

You can only generate a valid transaction if the wallet file you have open contains the private keys that can sign the transaction you've made. If you can't produce a valid signature, then it will not be a valid transaction, and the network will not relay or confirm it.


Bitcoinj: How to get notified when coins are received

Technically speaking, the coins are spendable immediately; they'll just take longer to spend and cost more in transaction fees. But to know when the coins are confirmed, in onCoinsRecieved:

  If you want to know when such a transaction receives its first confirmation, register a TransactionConfidence event listener using the object retrieved via Transaction.getConfidence(). It's safe to modify the wallet in this callback, for example, by spending the transaction just received.

(Source.)

Use something like this:

public void onCoinsReceived(Wallet wallet,
                            Transaction tx,
                            Coin prevBalance,
                            Coin newBalance) {
    TransactionConfidence confidence = Transaction.getConfidence();
    confidence.addEventListener(new TransactionConfidence.Listener() {
        public void onConfidenceChanged(Transaction tx,
                         TransactionConfidence.Listener.ChangeReason reason) {
            DefaultCoinSelector.isSelectable(transaction) {
                // do something here
            }
        }
    });
}


unconfirmed transaction for over 2 days what to do?

The recommended fee for a transaction is of 450 satoshis ber byte.

Your transaction is 226 byte long.

450 x 226 = 101700 shatishi

101700 shatoshi = 0.00101700 Bitcoin

The transaction fee you included is of 0.0003842 Bitcoin which is 0.0006328 BTC lower than the recommended.

I wouldn't be surprised if you had to wait even more.

Data source: bitcoinfees