Need help about Mining and Difficulty levels!

Generally speaking, as the difficulty goes up, and you keep the same hardware, your earnings will go down. If they drop below the cost of mining (including electricity, etc), then yes, you will have a loss.


Using Bitcoin ATM's, how does selling work?

Atm will generate a bitcoin deposit address
Client scan it using smartphone and send bitcoin to that address
Atm will wait for confirmation and emit fiat money from dispenser

Things to consider:
KYC level for bitcoin amounts
Generation of addresses
Confirmation number
ATM connected full node
Rate exchange
And more , but I believe this is the basic.


How to setup a LAN network with only one bitcoind client downloading the blockchain?

You need to use connect in your configuration file, rpc_connect is something different, it means that your client delegates its commands to another bitcoind.

If one client connects normally and other clients connect to it using connect = ip.of.main.client it will work the way you want it to.

Conversely you can prevent a node from connecting to anything by using connect = 0.0.0.0.

EDIT : I understand better now. You need to use rpc_connect = ip.of.master.bitcoind on the 'slave' node, and connect = 0.0.0.0 to prevent it from loading the blockchain and you should be all set.


net: Networking. All messages related to communicating with other nodes on the network, including what P2P messages were sent and received and to whom and other information about the network messages.

tor: TOR. All messages related to using a TOR SOCKS5 proxy and TOR hidden service (used for receiving incoming connections over TOR). This includes messages about the creation and shutdown of the TOR hidden service and messages about the connection to the TOR proxy.

mempool: Memory pool. Messages related to actions done in the memory pool including the acceptance and removal of transactions.

http: HTTP Server. Message related to the HTTP server that is used to handle the RPC requests. These messages will typically be for the startup and shutdown of the server as well as received requests.

bench: Benchmarks. Messages about the performance of various parts of the software that can have performance issues.

zmq: ZeroMQ. Messages about the ZeroMQ notification system, including the startup and shutdown of the service as well as when notifications are issued and new clients connected.

db: Wallet Database. Messages about the status of the Berkeley Database engine used for the wallet database. This will include messages about the database flushes.

rpc: RPC Server. Messages about the RPC server including its startup and shutdown as well as when commands are issued.

estimatefee: Fee Estimation. Messages about the fee estimation algorithm including messages about when fee estimates are requested and information about the status of the fee estimator.

addrman: Address Manager. Messages about the status of the address manager and when addresses are added or removed from the address manager database.

selectcoins: Coin Selection. Messages about the UTXOs that are selected when sending money.

reindex: Reindexing. Messages about the reindexing process, in particular errors about out of order blocks and repeated blocks.

cmpctblock: Compact Blocks. Messages about the Compact Blocks relay protocol including when blocks are partially downloaded or reconstructed.

rand: Randomness. Messages for when randomness is needed by any function.

prune: Pruning. Messages about local blockchain pruning, including the result of a pruning operation.

proxy: Proxy. Messages about using a SOCKS5 proxy and its authentication.

mempoolrej: Memory pool Rejects. Messages about transactions that are rejected from the memory pool.

libevent: Libevent. Messages about the libevent library which is used for the HTTP server.

coindb: Coin Database. Messages about the coin database which contains the UTXO set. Includes messages about database flushes and writes.

qt: Qt. Messages about Qt, the GUI framework.

leveldb: LevelDB. Messages about LevelDB which is used for the block indexes and coin databse.

Note that this is not an exhaustive list of the types of messages you will see for each category. Also some categories have many possible messages whilst others have very few.


Is Bitcoin's supply inflated by the exchanges of Bitcoin?

It's certainly happened before when there was less regulation or among the smaller, less-regulated exchanges. Whenever an exchange disables withdrawals for everyone, it could be due to them running into liquidity issues like that.
Large exchanges are now regulated by various money services authorities in part to prevent this exact scenario.


How do I convert Bitcoin to and from my local currency?

You will need the aid of a service or individual in order to exchange fiat currency to and from bitcoin.

You will also need a bitcoin wallet.

Some services offer both exchange and wallet functionality.

You may find these resources helpful:

How does one acquire bitcoins?
How to buy bitcoins (Lists of services available in many countries)

For the United States: http://howtobuybitcoins.info/us.html

Trade (A list of many options and services)


Link Receiving address with other addresses

Say you have two addresses, address A and address B. If someone sends coins to you at address A, and someone also sends coins to address B, then no one can link those addresses together. They are just separate transactions with separate transaction outputs, just like any two transactions that are sent to different people.

But now, if you have to send some coins and you need to spend both of the previous transaction outputs were generated by sending to address A and address B, then you will be associating those addresses together. This is not a proven association, two different people could come together and spend two of their outputs together in the same transaction, but this is not a very likely scenario. The more likely scenario is that the person who initiated that transaction (you) owns both address A and address B.

That said, just because someone watching the block chain can tell that the SAME person owns address A and address B, that doesn't mean that they know that YOU are the one who owns address A and address B. Read this stack exchange for more info: How anonymous are Bitcoin transactions?. If they know that you are the owner of address A, though, then they would be able to determine that you are (likely) also the owner of address B (but only if you have made a transaction before that spends from both of those addresses).


How much Bitcoin is needed to start a Lightning node?

When you start using lightning, the minimum bitcoin you need is the cost of opening the channel + anything else you want in the channel.

The cost of opening the channel is equal to the fees you pay to send a transaction.

So as a minimum you will need:

the lowest fees you can get away with to send a transaction + the amount you want to put in the channel.

You can check out the lowest fees required from any number of services, for example earn.com's service is pretty popular - https://bitcoinfees.earn.com/


Bitcoin without mining - what needs to be implemented

Mining is not essential for coin creation. New coin introduction can be tied to new block creation, or be time based. Even if you don't use proof of work, you will still have blocks (even if you don't call them that way anymore; they may be called "database updates"). More interesting however, if you don't use proof of work, you don't even need your own currency (but you still could).

Validation is done by full nodes (the "auditors"). Miners also validate, but it is not their primary function. They do so because otherwise their blocks - which indirectly provides their income - could unknowingly be invalid, and not be accepted by the rest of the ecosystem.

Mining has one and only one purpose: providing a decentralized, permissionless mechanism for determining which version of history to accept, in case there are multiple valid competing versions. These competing versions are inevitable when there is not a single party coordinating their creation. This is because communication speed across the planet is not infinite, so one may create a block without having heard about a competing block elsewhere.

So to answer your question, if we want a block chain without proof of work, the only thing you need to do is replace the criterion for choosing between different versions of history. The simplest is using digital signatures instead of proof of work. There could be a known central party that signs blocks instead of grinding a nonce, and any chain with its signature would be accepted. No more reorgs, electricity and hardware costs, confirmation times, concerns about propagation, ... the system would work better in every way possible, apart from the fact that it now needs a trusted central party who has the right to censor.

This can be extended. Instead of one known central party, there can be multiple. For example, there could be 10 known parties, and every block is required to have a signature from 7 out of those 10. This requires a significant number to conspire, but if they do, they can still censor transactions. In fact, this system is a modern incarnation of Byzantine Fault Tolerance, a distributed consensus system that long predates Bitcoin. The only downside is that there is no recourse when the security assumption (7 out of those 10 are honest) is false. In a proof-of-work setting, one can join the mining landscape in that case, even without telling anyone else.


I just compiled bitcoind and run for the first time. Do I already have a private key?

Bitcoin Core will automatically create a new wallet on first start. This wallet will contain 2000 private keys (unless otherwise specified by the -keypool=<n> option) and the seed used to generate those and future keys, at least until you encrypt the wallet.

As such, there is not just one private key that you need to backup, rather you need to backup 2000 keys and the seed. Otherwise, restoring a backup will not restore all of your private keys.

The easiest way to backup your wallet is to just copy the wallet.dat file to a safe place. I would not recommend that you try to create a paper backup of your wallet.

If you insist on a paper backup, then you should record the seed. The seed can only be gotten by using the dumpwallet RPC command and then finding the private key labeled hdseed. The seed is a private key and cannot be used in any other wallet software since they do not accept the seed as a private key. You will need to remember that it specifically is not just a normal private key and that it only works in Bitcoin Core. To restore the seed, you can use the sethdseed command in a new wallet.

I really don't recommend that you try to backup the seed. There are changes happening to the Bitcoin Core wallet soon that may make your seed backup unable to work. The recommended way of backing up is to copy the wallet.dat file, and to do so periodically. This will guarantee that you have your private keys, guarantee that it is compatible with future versions of Core, and also backup transactions and metadata (such as labels).


Personal details disclosure when buying bitcoin

Policies will depend upon the exchange itself and setting up an account can take a good long while.

Some exchanges ask for less information, but I'd recommend being careful with using them. There have been some scams that have cost people large amounts of money.

Usually, exchanges want all of the information so they can increase security. As Bitcoins that are lost or stolen are nearly impossible to recover, exchanges want your personal contact information incase any legal problems come up. IE, you decide to run a scam yourself.

I'm pretty sure Mt. Gox has changed its policies. You now have to provide government issued ID to set up an account on Mt. Gox


Recover corrupted wallet due to system crashed

Recover corrupted wallet

  Possible to get back my private-key from [corrupted] wallet.dat

I doubt it.

You could put in weeks of effort and not recover anything. By effort I mean learning what tools are available, how to configure and use them and how to evaluate the results. Learning more about the internal structure of wallets etc. Learning about general tools that can recover deleted older versions of files (if you immediately stop using the computer and maybe extract and duplicate the disk) etc.

Most likely you will  be contacted by many scammers offering to recover your wallet or telling you about marvelous people who can recover wallets. It is almost certain that all of them will be trying to trick you out of more money by inventing plausible seeming fees. In this website we see a lot of pleas for help from the victims of recovery scams.

Backups

Most computer users learn early on the importance of backups. Some by seeing other people's good habits, some by seeing other people's disasters and some by making our own disasters.

See Tom Scott - The Worst Typo I Ever Made

In the case of Bitcoin, it is essential to make a backup as soon as you create your wallet and again after making any significant changes such as importing a key. This sort of backup needs to be kept somewhere safe from fire, theft or accidental loss.


How do I know if I have ever registered a bitcoin account?

There are a few different ways you can store bitcoins, there isn't just one place you can log in to and check your balance, like you may be used to with online banking. So if you don't remember having a specific wallet with coins stored in it, then you'll have to go on a bit of a hunt.

For example, there are desktop full node wallets (eg bitcoin core), litewallets (eg Bread, or Jaxx), paper wallets (a piece of paper with a keypair on it), hardware wallets (eg Trezor or Ledger), web wallets (eg blockchain.info), and 3rd party wallets/exchanges (eg Gemini, Binance). Each one of these is a different method for storing the cryptographic keypairs that are used to generate a bitcoin address, and interacting with the network. Each one will have different levels of security/ease of use, usually a user will select a method of storage based on their personal needs for security/usability.

If you don't remember specifically what sort of wallet you may have used, then try searching your computer for bitcoin-related files (eg search terms: wallet, bitcoin, btc, etc), as well as your email inbox. Search anywhere you think may hold a clue, such as old hard drives/backups, your internet browsing history, or your social media accounts.

Good luck!


How to transfer btc from multiple btc addresses to a single btc address?

A very generic question, so only a generic answer. I think, what you are looking for is how to create a transaction with multiple inputs, to a single output. There are many bitcoin tools out there, I for myself use some shell scripts on unixoide systems. There is also bx and tx tools, as described in Andreas‘ book „Mastering Bitcoin“ (book is online readable). Then there are libraries for php, Java, python - each with its own learning curve. Generally: you need the previous tx ID, the outpoint, and the target address and amount. This all needs to go into a serialized set of data, then a hash is generated over it, and signed. Once you have the signed tx, you can send it from a wallet or from many Online services (like blockchain.info) to the network.

I recommend to start playing on testnet or regtest, assemble a tx, and run through the possibilities. Then you can search specifically here in the forum, or raise a question based on the experience.
Again: it can be done manually, but requires some effort to get into the logic of correct assembly. Andreas‘ book is a good starting point.


What are steps 4-9 in bitcoin address generation for?

Steps 5 to 8 are the checksum (a rudimentary error detection code). They make sure that if the user makes a typo when writing down the address, the resulting address will be invalid and the coins will not be sent to oblivion. (The checksum used isn't perfect so this could happen, but rare)

In addition, step 4 is the version byte, it makes sure that humans looking at the address understand what it represents - pay to pubkey hash, pay to script hash, or a different network.

Step 2 and 3 make sure that receiving funds does not require publishing the public key. This helps if ECDSA is compromised, either by algorithm research or quantum computers. For this and other reasons, it is recommended to avoid receiving funds to an address from which funds were previously sent.

You've mentioned "check for a collision" in your question - none of the steps serve to check for a collision, it is assumed that collisions are impossibly unlikely.


What are the issues of running lightning daemon with pruning node?

Pruned nodes don't have the ability to make a full index of all transactions in the chain, which makes implementation of tools like Lightning difficult or impossible. There's no risk particularly, a pruned node has the same security properties as a normal one, it just doesn't have historical transaction data necessarily.


What if old blocks invalidate with soft fork?

The fix is in deciding when the change takes effect, and only validating with the stricter rule from that point onwards.

The easiest way is to decide upon a block height, say: 695,837 and all the blocks before that one are validated with the old rules, and blocks 695,837 and onward are validated with stricter rules.

Something a bit more sophisticated was used for SegWit. Every 2016 blocks, the difficulty gets modified to make sure we get a block once per 10m on average. These 2016 block intervals were used to gage support for the softfork, through signalling in the version bits of each block. Miners get to set these when they find a block, and only when 95%+ of the blocks in a 2016 timespan contained a certain flag would SegWit activate. This way, there was no fixed block height dictated in code, but instead, the miners together were able to dictate the lock in of the soft fork.


My husband died, I have lots of codes and words... help

I am sorry to hear about your loss and situation. I would suggest the following industry-known expert Pamela Morgan (She is the partner of Bitcoin advocate Andreas Antonopoulos) on the matter of estate-related crypto planning and backups, and who could potentially help guide you in the recovery process (here is her official Twitter and Website for reference).

https://twitter.com/pamelawjd?lang=en
https://empoweredlaw.com/

I am not endorsing her and suggest you do your own research, but I am just sharing who I think would be most knowledgable on how to approach this topic the most carefully and whom I would personally trust.

Caution:
I would not share any of the information with anyone, as any private-key or recovery-phrase related information would be the equivalent of giving someone cash that you cannot recover if they turn out to be malicious.

Information gathering:

I would continue to aggregate the information you have to build a map of all the account and wallets and associated login info, whether associated with emails, phone numbers, and be on the lookout for any paper backups where you might see 12 or 24 words written in order that are spelled correctly but the sentence doesn't seem to make sense, as those are mnemonic backups of crypto vault, where there could be multiple cryptocurrencies associated (as per BIP44), and multiple addresses (as per BIP32) per each support asset.

Here are examples of a random 12-word mnemonic:

position solution half fly topic large scene verify moment boost catch push

There could also be keystore files (usually .json files) that have UTC and a date in the filename, which are AES-ciphertext and would require a password to decrypt (and would likely contain a private key or recovery phrase). Those json files have a filename that looks like this:

UTC--2019-08-15T20-56-......

There could be notes that were kept of pin codes or passwords elsewhere, whether in a note pad or word document or password manager.

Note: Take great care to keep any such backups secret and not to share those words with anyone and keep them offline, until you can find the help you need.

Custodial and non-custodial brokers/exchanges/wallets: Knowing what types of applications were installed and what brokerage accounts were used will also help determine whether the accounts were non-custodial, or if the brokerage/wallet provider has access to the funds as well (in which case you could reach them for next steps) whereas, the non-custodial providers do not have access to the funds but at most could provide any information that was associated with the account in some cases. Good luck~


Valid fork in regtest - Change blockchain via RPC?

The longest valid chain is always chosen automatically. Thus the way to make it forcefully switch is using the invalidateblock hidden RPC.


Of the many, many crypto address out there, how many are really being used?

One way to know, would be to check 'active' wallets, the ones that have a recent transaction - you define the meaning of recent (1year? 2years? more?).

The problem is that old wallets may still be owned (people just hodling) and accessible, and bunch of wallets are also owned by the same people.

You can use this site : https://bitinfocharts.com/bitcoin/explorer/ to check some interesting data about existing wallets.


Is it more profitable to mine non-SegWit blocks

A "segwit" block does not exclusively contain segwit transactions; it can contain both segwit and non-segwit. "Non-segwit" blocks contain exclusively non-segwit transactions because it does not have the requisite segwit commitments. Since segwit blocks can contain both types of transactions, it is actually less profitable to mine non-segwit blocks as you will be missing transactions that segwit blocks can contain.


How do I import an Electrum wallet into BitcoinJ?

As stated in https://bitcoinj.github.io/working-with-the-wallet:

"The “watching key” in this case is the public form of the BIP32 account zero key i.e. it’s the first key derived from the master."

I also thought it was the master public key, but it is the first (or 0th) derived key.

Hope this helps.

EDIT:

To answer your last question, the seed's creation time is used as a hint to BitcoinJ as to when it should start searching for transactions. If you have access to your first transaction on your Electrum wallet, use that approximate time.


It seems to be an error from the Boost library that is thrown "thread-related resources cannot be acquired". You probably should contact the dev team about this error, from your description it appears to be a memory leak.


Does checking for balance on any cryptocurrency address is same as checking if address is correct?

Using a public API can verify that an address is valid, but only if the address is known to the Bitcoin (or Litecoin, Dogecoin, etc) network.

This will not work for cold storage addresses that have not yet been exposed to any network peers (because they are invisible to the network until used).


Minimum and maximum values of "all" cryptocurrencies?

I can't answer for all cryptocurrencies, but for bitcoin, you shoud store values as long and not doubles. The unit of account of bitcoin is the satoshi, a hundred millionth of Bitcoin. Since there can only be 21M BTC ever, that's a maximum of 2.1 quadrillion (2.1 * 10^5) satoshis. That number fits in 64 bits.

For Ethereum, you need 256 bits unsigned integers IIRC.


That is hex encoding, two ASCII characters per byte.

SHA256 output is 32 bytes, or 64 characters when hex encoded.


Using Bitcoin Core, if you start it with -debug=net (or add debug=net to your bitcoin.conf file), every single network message will be included in the debug.log file along with the node it came from. You can then parse the debug.log file to get the information you want.


Apart from the official bitcoin client what other clients are there?

There is a current list of clients here
http://en.bitcoin.it/wiki/Category:Clients

There is development discussion around alternative clients here
http://bitcointalk.org/index.php?board=37.0

Currently the "Official Client" (more specifically, the Satoshi client) is the most widely used and has implementations that run on Windows, OS X, and Linux. However, multiple alternative clients have been developed, including ones that run on Android, and this is currently a high priority for the bitcoin community.

The current most popular alternative clients are BitcoinJ, written in java
http://code.google.com/p/bitcoinj/

and BitDroid, which runs on Android
https://github.com/cdecker/BitDroid-Network


I get invalid argument error when running bitcoin-cli -getnetworkinfo, and a few other parameters

getinfo has been deprecated as an RPC command, and the hyphenated version is provided as a bridge for legacy applications that have not yet moved to getblockchaininfo and getnetworkinfo.

For regular RPC commands, you do not need the hyphen, and can simply run them as bitcoin-cli getblockchaininfo.

The hyphenated parameters control the behaviour of bitcoin-cli itself, such as which datadir to connect to, or whether to use named parameters in the requests.


How do block explorers determine propagation through nodes/P2P protocol?

They don't, essentially, the numbers given for this sort of thing are generally meaningless.

Many of these services attempt to connect to a large portion of the listening network and gain insight into the chance of a transaction confirming, however this is not a measure of safety for transactions. A transaction having been announced by many nodes does not mean that it will not be double spent by a miner, as has happened many times in the past. For BlockCypher in particular, the confidence number does not use a Bitcoin Core node for validation, so will show very high confidence for transactions which are invalid, but have a seemingly high fee.

In the case linked with betcoin dice and ghash.io, they would have shown absolute confidence of confirmation, however the mining pool was simply including alternate transactions that did not spend to the service every time their bet was a negative. For a betting site with a 1% house edge, they only need to be able to do this more than 1% of the time for the attack to be financially profitable for them. This happened for a period of months with nobody noticing, no users stopping using the pool, or any other punitive measure. "Transaction confidence" or other tools only work in a non-adversarial environment, which Bitcoin is not.

  Can a node simply ask its peers if the transaction exists in their mempool with a getData request?

You can to some degree ask a node that you are connected to if it has a transaction in its mempool. Nodes implement logic called transaction trickling which intentionally batches and delays relay of transactions in an attempt to prevent privacy adverse behavior such as this. Note that most nodes in the network do not have listening sockets open, so you can not make outbound connections to them. Merchants and miners in particular will not have incoming connections to prevent against trivial denial of service attacks against them.


Creating secure architecture and payout process

You're going to  be doing some fun stuff if you need a complex system.

The Simple Way

Just use Bitcoind along with it's walletnotify and blocknotify arguments. See here. As soon as you get a walletnotify, store it in a database and make sure txid is unique. Walletnotify fires multiple times throughout a transaction's life. Check the database every block looking for unprocessed transactions that have 6 confirms. Those that do should get marked as "processed" or get deleted from the database.

The Hardcore Way

If you need the functionality like described. Consider using one of the many libraries that implement some Bitcoin features and function. Check out Bitcoinj (java), Libbitcoin (C++), Gocoin (Go), and the many python libraries that can be found through search. These libraries can make it a lot more simple to run a more finely controlled and specialized node.


The standard Bitcoin client should run on BSD machines. If you encounter any difficulties getting it to compile or run, ask more specific questions.


How do nodes come to consensus on whether a timestamp is valid?

They don't need to.

If a block's timestamp is in the future, it won't be accepted - but it also won't be marked as invalid. Once enough time passes, the node will accept the block if it is offered or received again.

Effectively, the maximum limit on the timestamp is not a consensus rule, but just a temporary acceptance rule.


I did not see a9607981ae4bbf42ed0cfacc05455f9396c85a9e8aeb61474f3f7516c35430ec broadcast-ed I only saw d8e5dac095d5f6133e6c3f11e1d9f923c04dac0824f9f8ce0000573df7cc8080

That might not be meaningful. Bitcoin is a gossip network, so it's possible for a different node to see a transaction that you didn't see, particularly if it contradicts a transaction you have.

If you're connected to 8 nodes, and each of those has transaction TX1 in their memory pool, none of them will send you TX2 if it contradicts TX1. (Assuming they're running Bitcoin Core, of course.)


If UASF activates, are blocks found by ASICBoost still valid on UASF nodes?

Once segwit shall be activated, does it mean that ASIC miners using ASICBoost miners won't be able to mine on that chain at all anymore?

No. Nothing about segwit prevents miners from mining non-segwit blocks using ASICBOOST. Mining segwit blocks will slow down (and likely prevent) covert ASICBOOST from working, but miners can still use it and also use overt ASICBOOST if they want to.

  What about when UASF activates on august 1st 2017 (if it activates)? Does it mean that UASF nodes won't accept block found by ASIC miners using ASICBoost?

No. It means that all blocks must signal for segwit so that segwit activates under the BIP 141 activation rules. This has nothing to do with ASICBOOST and does not require segwit commitments in blocks until after activation. After activation, segwit commitments are only required in blocks containing segwit transactions which not all miners must have in their blocks.

  Are all the current ASICs using ASICBoost good for the trash should the UASF chain win?

No. Segwit itself does not prevent ASICBOOST. It only partially prevents covert ASICBOOST, and only for blocks that include the segwit commitment (i.e. blocks containing segwit transactions). In order for covert ASICBOOST to be blocked, all blocks would need to have a segwit commitment in them regardless of including segwit transactions, but that is not something that segwit specifies.


I'm not 100% sure how this API works, but it looks like it lets you supply the entropy. Test to see if you always get the same address and secret if you supply the same entropy. If you do, then just use the mnemonic and any HD scheme you want to derive a secret of any kind (you can use the same algorithm you'd use for bitcoin) and pass that secret as the entropy to that API call.

Two cautions with this approach:

1) You must test to make sure that API really is deterministic. Try it on a few different machines and a few different JS implementations and make sure the same entropy always leads to the same address and secret.

2) Your ability to recover keys from the mnemonic would be tied to your access to this library. If the library ever changed its key generation algorithm, you might be unable to recover the keys. So pick a version that works and don't ever change it.


When I do

litecoind getreceivedbyaddress LUiTUnmBLQ6mvCXk2YNxiU7cZQdty1pToV

I get

0.00000000

I think this will always be 0.000 unless the address in your wallet.dat. One way would just be to include that addresses wallet.dat file in your litecoind directory and then just do

litecoind getbalance


What are the costs of cryptocurrency fraud?

For exchanges with no fees, users colluding can sell each other coin backwards and forwards all day to manipulate prices at no cost to themselves. Or you could do it with one user but two accounts. If you are buying and selling at the same time, at the same price, the price doesn't matter.


Is GPU mining worthwhile for any currency?

There are countless digital currencies in existence; every day new ones appear, are pre-released; ICO'd, or are ninja launched.

Bitcoin is SHA-256, which renders mining using CPUs and GPUs pointless because ASIC processors have been engineered; chips which serve only one purpose; that is to compute/solve/hash SHA-256, and because they are engineered to do only that; they are exponentially more efficient in doing so.

GPUs on the other hand are used to mine coins both by hobbyist miners and large scale GPU farms.

But they aren't mining Bitcoin; or any other SHA-256; they are mining coins either with new POW (Proof of Work) algorithms; or POW algorithms for which no ASICs have yet to be engineered (or are simply not public/available).

For GPU based setups; common algos are X11, X13, X15, Scrypt depending (as ASICs do exist for Scrypt but were not widely adopted); and many others.

You can find a list here: http://bitcoinguide.online/a-list-of-cryptocurrency-algorithms/

If you only have a single GPU; there is really no point whatsoever in using it to mine a currency; unless it's your own clone that you're creating.

You can go on site's like NiceHash and rent mega power; based on bidding per / g/hash t/hash; and jump in and speculate on what coin may or may not be profitable to mine. One GPU simply wont cut it.

Or you could build GPU mining rigs; using a simple steel frame; a low end CPU processor; 4 GB of ram; run Ubuntu off a USB stick; and slap 4 or 5 GPUs on the motherboard using PCI-E Risers.  You'll need a decent 1300w or more PSU; depending on the algo; and you must be network and code savvy; as it's mostly all still command line driven.

If you do so; expect to lose money the first year; it's still the wild west; and the only way to learn it is in the trenches.

And to add; yes; AMD shares have been volatile due to alt-coin news and releases. As have prices. Cards, such as an AMD R9 280x; one of the most popular first gen cards at the time Alt Coins came crashing onto the scene; skyrocketed in price from $200 to $500 or more on all sites; including Amazon. As did all components; PSUs, etc.

Then; they would crash with the market; people would burn out; the secondary market became flooded with people ripping their rigs apart and selling off the pieces; and then repeat-- new coin comes out; it becomes a huge rally, and the card prices would jump back up... sometimes doubling, tripling in price in days... People made money of that as well; simply buying GPUs on the crashes and selling on the rally's.

I often joked that Bitcoin; and later the alt-coin clones which appeared in hoards were invented either by the Power Companies; or the Chip/Wafer manufacturers.


Bitcoin transaction no confirmation unspent

Just give it time. Eventually miners will pick up the transaction and confirm it.

Just like it takes time for a payment to post to a debit card, so to does it take time for a payment to "post" on the network.


For a transaction with a single input and output, is there a difference between SIGHASH_ALL and SIGHASH_SINGLE|SIGHASH_ANYONECANPAY

A one input/one output tx signed with SIGHASH_SINGLE|SIGHASH_ANYONECANPAY can still be modified to include more inputs and outputs, as long as the original input and output are not modified.

A tx signed with SIGHASH_ALL cannot be modified at all, and no new inputs or outputs can be added.


Most of the Indian bitcoin businesses go by the analysis from Nisith Desai and Associates:https://www.zebpay.com/wp-content/uploads/2016/04/Bitcoins.pdf

Bitcoin is unregulated in India(not illegal or legal) and only points of dealing with the sovereign currency(INR) are taxable. Rules vary depending on if you mine, earn, buy, invest, sell or spend your coins and also with the parties in the deal.


Are there any services to tell black list address?

No and active work is being done to make this even harder as we speak. Fungibility is a necessity of a currency, black lists are not compatible with that.


CPU mining ended in 2011. You will earn less than what the electricity costs, so the more you mine the more money you lose. You will never earn the minimum amount required to cash out from a pool, so you actually won't be earning anything at all, just burning electricity.

This is why CPU mining is disabled, and why noone should use it.


How can I "redeem" a private key without downloading a client?

It [edit: was] possible to redeem a private key at MtGox. Under "Add funds", choose "Redeem private key" and pick the format that you want to enter the private key in. The full amount of the private key will be added to your MtGox account.

Update: It is also possible at My Wallet (blockchain.info).

Update2: Mycelium wallet for Android app has a "cold storage" feature.  You simply scan (or enter) the private key, then scan (or enter) the Bitcoin address t send the funds to.  Hit send and you are done.


How can I get the DateTime of when bitcoind last received a block?

No, there isn't.
getblockcount can only get the number of blocks in the best chain, but not the last received block.

You might need to write a new rpc to get the last received block.

First, add a new data structure in main.cpp and record blocks received order in ProcessBlock().

Second, write a rpc to print out that data structure.


Delete watch-only imported address bitcoin-core

If you are feeling brave, you can edit the wallet.dat file itself to remove those. You can use the db4.8_dump and db4.8_load utilities to modify it. Note that doing so may result in database corruption and I would not recommend it. That is really the only way to delete anything from Bitcoin Core's wallet.


What's the segwit transaction serialization "flag" field for?

Found it in bip 144:

  Rationale for the 0x01 flag byte in between: this will allow us to easily add more extra non-committed data to transactions (like txouts being spent, ...). It can be interpreted as a bitvector.

So the 0x01 flag is indicating that the witness data should be included in the (bip144) transaction serialization.


Bitcoin-QT wallet.dat prior to adding passphrase

I presume the reason for step 1 is to protect you from losing your Bitcoins in case you later discover that remembering your passphrase is beyond you. If you understand the relative dangers and conclude that not keeping a backdoor around your new passphrase is the right way for you, I suppose you could try skipping step 1.


Sending coins when the priv/public keys are not in wallet (bitcoind)

Yes. You should not need the keys to be in the wallet to send a transaction using sendrawtransaction(). All sendrawtransaction() does is broadcast it over the network.


What are the options available to convert Bitcoin to Paypal USD?

The factors that matter for any cash-out decision are:

Where are you located (country)?
How much are you looking to trade?
What type of cash are you looking to receive?
How soon do you need access to the proceeds?
Is privacy important?

Specifically for cash-out to PayPal, options include:

http://snapswap.us/#/paypal (You'ld need to do BTC -> XRP first though. http://Shapeshift.io lets you do that.)
http://www.VirWoX.com  (BTC --> SLL, SLL --> USD)

Other ones that are not as widely known -- proceed at your own risk:

http://www.btctopp.com
http://www.exchangemycoins.com/pages/sell-bitcoin-paypal
http://order.payexchanger.com/index.php?a=add (You Give="Bitcoin", You Want="PayPal")
http://24pay.me

What might exist is a service that lets you pay for charges with Bitcoin and then the recipient gets to withdraw the proceeds of the sale using PayPal. So you would simply need to sell to yourself.

For example, I see that Fiverr accepts BItcoin for payment: http://blog.fiverr.com/fiverr-now-accepting-bitcoins and I believe they offer withdrawal via PayPal http://www.youtube.com/watch?v=px_eYHCgGZ4. So you simply would create two accounts, list a task, and transact with yourself. Obviously the account for buying (and paying with Bitcoin) would need to be something that you wouldn't want associated with your real identity. Additionally, you probably want to do the listing with one IP address and the buying on another just in case they check for that kind of stuff.

Maybe when PayPal is a cash-out method for Amazon (coming, apparently http://recode.net/2015/04/09/paypals-big-change-it-can-work-with-amazon-after-ebay-split/ ) then maybe you can sell to yourself (buy Amazon gift cards to pay, then cash out to PayPal from the proceeds of the sale to yourself.)

BitLanders is another service that lets you trade with yourself, paying with Bitcoin and withdrawing in PayPal. Also, apparently if your sales aren't enough to cover your withdrawal amount you can make up the difference with Bitcoin.


bitcoind no such file or directory when trying to execute on Ubuntu for Raspberry Pi 4

Edit: you’re using the wrong architecture bitcoind binary, gnueabihf means armv7 hard float, which is 32-bit. There are 3 possibilities:

Download the correct Bitcoin binary for arm64 architecture (preferred);
Use 32-bit OS;
Install 32-bit compatibility layer on 64-bit OS.

—
Type ldd /usr/local/bin/bitcoind to check what libraries you’re missing. Most likely the only thing you need to do is to update your /etc/ld.so.cache by executing ldconfig.
ps: if you want to run a binary from the current directory, e.g. after switching to /usr/local/bin, you should type ./bitcoind, not just bitcoind.


I just ran into the same issue, although mine was a syntax error...Also you didn't specify what coin your mining. Different settings for different coins. Pushpool is responsible for inserting the share info into the SQL database. You need to add the following lines to your pushpool config in the database area:

        "sharelog" : true,

        "stmt.pwdb" :
          "SELECT password FROM pool_worker WHERE username = ?",

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

Sharelog must be true, not "true"(my syntax error that took 24 hours of hunting.) You need to add the "stmt.sharelog" entry and pushpool will insert the correct data. The MPOS or front end will pick it up instantly. The database table "shares" has 2 additional columns called difficulty and time. Don't worry about them. Difficulty has a default of 0 and time will insert the current timestamp as default.

As for Stratum, the coin daemon must support getblocktemplate. I'm mining BBQ/BQC coin and it is not implemented yet. I am stuck using long poll and I'm getting alot of stales. Need to optimize for the coin your mining. It is working and I hope that pooler will release his fork of bbqcoind on github. He added getblocktemplate and it's working great at bbqpool.net. Happy mining!


Creating a new electrum 3 wallet file with an imported segwit private key

Use this python script:

from electrum import bitcoin

format,privkey,compressed=bitcoin.deserialize_privkey("<yourprivatekeyhere>")
print( bitcoin.serialize_privkey( privkey, compressed, "p2wpkh") )

Run the above in python 3 and then import the priv key it outputs into electrum as per this guide.

The reason you have to do this is because Electrum went its own way with the private key format. See the release notes for 3.0.


If for cash means you want paper then it is possible only theoretically - you sell it in the same way as cucumbers or gas to the people that want to buy it. You just need to find them and it will be hard because if you don't want to do it online means you are afraid of something: fake banknotes, money laundering, etc.


Yes this problem has been solved. Have a look at the pruning option. You can specify whatever maximum size you want to allow the blockchain to take up.


Is it possible to create a thin client that only listens for transactions and pending transactions?

When receiving a payment, it is critical to know whether or not the transaction that makes that payment is a legitimate Bitcoin transaction (or not).

This is determined by checking if the transaction is valid according to the network's rules- and a crucial part of this is determining whether or not the transaction's inputs are valid. In order to determine the validity of the inputs, the client must have some way of knowing the current state of the network. Generally this is accomplished in two ways:

Full node: this is software that will independently download and validate every transaction and block, thus verifying what the current state of the network is. As such, any transaction can (and will) be checked for validity.
Thin/Lite/SPV client: this is software that will download the longest chain of block headers, but not the entire block. The client can thus check the validity of transaction by requesting proof of the transaction's inclusion in a block from full nodes on the network, this is accomplished via the merkle root included in the block header. This method of transaction verification requires more trust (that miners are in fact creating valid blocks), so the thin-client must trust that this verification is being performed by other nodes on the network.

If you are not performing verification of incoming transactions in one of these ways, then you will be easily defrauded, since you will be unable to differentiate between a valid and invalid transaction, without fully trusting someone else to supply this info to you.


What mining parameters are not modifiable with ASIC miners?

Very little of transaction validation logic is done in the ASIC. All that they do is take a block header, rapidly increment the nonce, and see if the hash that pops out is anywhere close to the target. So, as long as the block header doesn't change, none of the ASICs need to change.
Nonce
The 4-byte nonce field might need to change in the near future, because you can only have 4 billion distinct hashes every second. That might seem like a lot, but with ASICs getting 100Ghash/s, it gets a bit awkward. One way around it is to make 25 different coinbase transactions, thus getting you 25 different block headers. You then give each twenty-fifth of the ASIC a different block header. Despite all this, lengthening the nonce field is probably more trouble than it's worth, given that it would require a hard fork.


How can I specify multiple txids in createrawtransaction function?

Send the command as following:

bitcoin-cli createrawtransaction
[{"txid":"FIRST_INPUT_TXID","vout":2},
{"txid":"SECOND_INPUT_TXID", "vout":3}]
{"FIRST_OUTPUT_ADDRESS":0.006, "SECOND_OUTPUT_ADDRESS":0.004}

if it didn't work try to skip quotation (") by adding backslash before it \"


The rawtransaction interface accepts and returns "raw" hex encoded p2p compatible transactions. Using the non-rawtransaction methods (like sendtoaddres, will not give you the possibility to inspect or alter the created bytearray.
The getrawchangeaddress method will retrieve a key from the keypool and return its pubkey (encoded into an p2pkh address). Unlike getrawchangeaddress, gewnewaddress will create an address book entry that will allow you better ways to inspect/distinct what funds you have received with that address and therefore increases the chance of a reused address.
You should use getrawchangeaddress if you like to use the given address as a change output for your rawtransaction.


mac bitcoin wallet question. Private keys?

Your wallet program doesn't show the private keys because you usually don't need to see them.  In the same way that you almost never see your password to any website you use.  If it did show them then someone could take a photograph of them and later spend the content of your wallet.

It probably doesn't let you delete addresses because of the potential for harm.  If you ever gave that address to somebody and they some day transfer coins to the address, you'll wish you hadn't deleted it.  If you send someone an address and they use it to pay you, and then you think "that transaction's completed, I'll delete the address now", you'll lose the coins that were sent to you because they're still sitting in that address.  There's too much risk of people not understanding the system and losing coins as a result.

To send money from one computer to another:

first go to the computer that's going to receive the money, run the wallet program, go to the 'receive coins' tab, pick any of the addresses that are shown, optionally edit the 'label' field to make a note of who you're going to give it to.  In this case "My Mac" might be a good label.  Then copy the address to the clipboard and email it to yourself at the Mac.  Or write it down if you like.
then go to the Mac, run the wallet program, go to the 'send coins' tab, put the address from the previous step in the 'pay to' field, and the amount in the 'amount' field.  Optionally put a label in the 'label' field.  "My PC" might be a good label for this.  Click "Send".

I just noticed you want to send from a specific account on the Mac.  Do you mean you want to send from a specific address?  That's not yet supported in the standard client.  A patch has been submitted that adds this feature.  There's a description and video going into more detail.

Edit: it occurs to me that you really to mean "account" in your question.  Don't confuse accounts with addresses.  You don't need to send from a specific address to send from a particular account.  There's no support for accounts in the bitcoin-qt client though I don't think.

The upcoming 0.6.0 version of the Satoshi client adds a command to export an address' private key, so if you want to print it out and keep it somewhere safe you could use that.  But typically people just make sure they have a copy of their whole wallet.dat file instead.


Why does mining profitability tend towards zero?

As with all things related to supply and demand, the market will eventually find its equilibrium, where the cost of generating the Bitoins will be close to their sale price. If the costs were bigger, less cost efficient miners would not mine. If the price was higher, there would be more room for investment that would increase the difficulty, thus increasing the cost to mine every Bitcoin.

If you want to calculate how profitable mining is, just put the data into any Profitability Calculator.


Basically Mtgox's api sucks. It's not your fault, its theirs. It's almost impossible to programmatically get a good reading of their order book. socket.io only works about 20% of the time and the http api often gives just wrong information.

To get around this I have several server instances constantly reconnecting an disconnecting until a successful steam is established and then it reports back to me until it fails. The idea is to always have at least one working stream.

I realize this can be incredibly impractical so you may want to use a service like bitcoin charts which has their own api, but if you need data more then every 15 min you will either have to pay or come up with some round about solution.

Here's some other people complaining about the same thing. One suggests using websockets and claims that he's had more success.


Capabilities of Bitcoins and their place in the future

We are a long way away from VISA scale transaction volume (>4K transactions per second) however there are some methods for Bitcoin to deal with the data on that scale

Remote blockchain. In the current implementation of the mainline client, every client downloads and store a complete copy of the blockchain.  This is the best way to boostsrap the bitcoin network while transaction volume is low.  However at peak transaction volume most users will have no interest in downloading and storing terrabytes worth of data.  In the future if a client trusts an online entity they could query transactions against that entity rahter than store the block chain locally.  Obivously this requires a level of trust so it would be important to choose a trustworth "block chain provider" however it has the advantage of each client only needing to query transactions they are interested in (for example client could ask for all transactions involving a particular address (to get current balance) or number of confirms for a particular transactions (to update the confirmation status). Before someone cries "centralization" there would be no official blockchain provider but instead numerous independent entities offering this as a service (either paid or free). If someone is paranoid they could use/build a client which queries two different block chain providers to ensure they return same data.  Lastly if a person is sufficiently concerned about security they could trust no-one and compute the entire blockchain themselves.

GPU Acceleration of transaction verification.
GPU are currently used to find a hash to sign the block as this is cryptographically intensive and any performance increase pays huge dividends.  This isn't true for transaction verification as transaction volume is low.  As a result the bitcoind uses non-openCL CPU calculations to verify transactions.  If necessary an Open-CL GPU powered client would be able to verify significantly higher transaction volume.

A rough estimation of future computation power required.  The paper linked by author indicates it would take a modern CPU can only handle ~100 tps (transactions per second). For integer math (like used in cryptographic hashing) a high end GPU is (as of writing) roughly 20x as powerful as a high end CPU. That allows in the ballpark of ~2000 peak tps per GPU.  Furthermore even with say 50% annual transaction volume growth we are two decades away from VISA level transaction volume.  Moore's law would indicate that average CPU/GPU in 20 years would be roughly 1000x as powerful.  That would be on the range of 100,000 tps per CPU and 2 mil tps per GPU in 20 years. Even if growth in computational power slows as long as it isn't slower than the growth in transaction volume it will ensure that all transactions can be verified by off the shelf hardware.

Actual transaction volumes.
Bitcoin is digital cash.  Many people today chose not to use cash for online and offline transactions favoring instead indirect payment methods (check, debit card, credit card, gift card, etc).  It is probable that higher level payments systems built on top of bitcoin network will emerge.  Users of these systems should cause significantly lower transaction volume.  For an example lets look at how VISA transactions work.  An individual may have 200 VISA transactions in a month but only makes a single payment to the card issuer (a 200:1 multiplier between purchases and actual currency movement).  Likewise a company may have a thousands of VISA transactions in a day but recives that as a single currency payment (usually ACH).  Another thing to consider is "VISA level" is more an end game scenario.  A more likely interim goal (say over next 2 decades) would be a "PayPal level transaction volume" which despite being a modest 100 tps (vs VISA >4K tps) would indicate Bitcoin is a massive success.


How can somebody steal the Genesis block?

I assume this is referring to the duckduckcoin launch fiasco.

For pre-mined coins based on the Bitcoin software, the pre-mined coins typically just go to whoever mines the first few blocks. The idea is that you don't open the software up until those blocks are mined. But if you do, and someone else mines those blocks, they get the pre-mine. To protect against this, you must release the software with a checkpoint after the pre-mine. Apparently, somebody forgot to add that checkpoint.


What is the best BTC miner for intel HD 4000 card?

Theoretically, you should be using cgminer to mine a GPU coin with your GPU :). Maybe not the answer you're looking for, but you're going to get bored real quick when your miner returns 2 cents for the week.

I recommend mining Litecoin with your GPU. Convert to bitcoin on BTC-e.com if thats your favorite. Its practically the same challenge/experience that you're working at, but you'll at least see some progress. Good luck!


LND funding transaction stuck in mempool due to low fees

I solved the problem whit CPFP (children pay for parent).

I used the  unconfirmed change of the fund TX stuck in mempool to open a new channel.

At the time of broadcasting TX the median fee is around 150sat/vb, so i chose to slight increase at 200 sat to ensure good probability to push the first fund tx and the second one in the next block avaible.


What is a mnemonic frequency analysis and why do I only need 4 letters of my seed words?

There are multiple questions being asked here.

Firstly, some background info. BIP39 is a standard that includes word lists.

The English one can be found at https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt

  What is a mnemonic frequency analysis?

This is a fancy way of them saying that they figured out the minimum number of letters they need to store to uniquely identify what word from the word list you meant.

I'll do an analysis of a tiny word list (these words are in BIP39) right here as an example.

Imagine this is my word list:

abandon, ability, crane, crash.

It only has 4 words in the whole list, so the analysis is pretty simple.

Now, the longest words are "abandon" and "ability" at 7 each.

Noticing this, I could say at this point, that as long as I know up to the first 7 letters of any word in the word list, I can tell you what word it is in the list. This isn't very impressive though as I'm handing you back the same words you give me.

Alternatively, I could start from the lower end and see that simply knowing whether the first letter is a or c, I can already tell you which half of the word list your word is in.

The 2nd letter gives me no extra information as it will either be ab or cr - these are the only options.

The 3rd letter allows me to distinguish between abandon and ability but tells me nothing about words starting with cra.

The 4th letter, however, allows me to fully and uniquely differentiate every word in my word list.

1-letter frequencies

a = 2
c = 2

2-letter frequencies

ab = 2
cr = 2

3-letter frequencies

aba = 1
abi = 1
cra = 2

4-letter frequencies

aban = 1
abil = 1
cran = 1
cras = 1

Related xkcd: https://what-if.xkcd.com/34/

  Why do I only need the first 4 letters?

Because the analysis that cryptosteel did on the full BIP39 wordlist (not just my toy 4-word-long list) also had the same result - no more than 4 letters were needed to retrieve any unique word from the list.

  I am only using a mnemonic seed in the Greenbits Android wallet by GreenAddress. However, it uses 24 or 27 word phases and not 12. I tried to recover my seed from only the first 4 letters, but the wallet complains that some of them are no real words. I'm assuming GreenAddress is using something different to BIP39 seeds and the first 4 letter rule does not apply to all seeds, is that correct?

It is correct that the "first 4 letter" rule does not apply to all seeds. It is specific to the word list used in BIP39, so it would apply to seeds using the same word list, and likely seeds using a very similar list, but not at all to totally different lists. Additionally, not all the BIP39 word lists are in English so the "first 4 letter" rule may not apply to other languages in BIP39 (could be interesting to research).

Without having prior knowledge of the details of GreenAddress, you haven't provided enough information for us to know what GreenAddress is doing with its seed.

We can't know just from the length of the word phrase (12, 24 or 27) whether GreenAddress implements BIP39. Their FAQ mentions BIP32 (HD wallets) but not BIP39 (the specific wordlist for the seed), so that's also inconclusive.

Assuming that they do support BIP39, the error message you are seeing is still reasonable. It would just mean the software is programmed to only accept a 100% match against a word from the word list, not partial matches, even if that partial match would be unique.

Some wallets will autocomplete the BIP39 word for you as you type to work around this problem (or accept the 4 letter version of the word), but you can always do the lookup by hand for any BIP39 compatible wallet that doesn't make it easy for you.

For example, if your cryptosteel has the letters enve stored in it, you can refer to the word list I linked above to find the word envelope.


Anyone else having this 'disappearing' BitcoinCash issue with BitcoinABC wallet?

That send is from before the fork on 3/31/2017. That means that you sent Bitcoin on 3/31/2017 to 36uzTBVeWN2pvUu3YX22gCutovGwQg1eeS, and because Bitcoin Cash shares the same history as Bitcoin, you will see this send in your wallet.


Checkout pywallet. Its a python script that may be able to help you out by recovering your private key. I've had similar issues with Multibit in the past. Is your wallet encrypted?

https://github.com/jackjack-jj/pywallet


How do I keep my miners from doing duplicate work?

My understanding of the mining mechanism is this:

The miner connects to a Bitcoin client (or pool) and submits a getwork request
The client (or pool) responds with a chunk of data containing the block data, including the randomized bits, and the nonce (the bit which the miner changes)
The miner increments the nonce multiple times until it either finds a solution or overflows, at which point it submits a new getwork request to the client (or pool)

Since the client/pool is responsible for handing out the getwork requests, the client/pool is also responsible for guarding against duplication. Since the entropy of the data handed out by getwork must, by definition, be greater than or equal to the output entropy of SHA256 (2^256 bits) it should have the same or lower chance of collision (1/2^256).

In this case a "collision" would be handing the same work to multiple miners and so we can say that multiple miners being given duplicate work has so low a risk of occurrence as to be a negligible risk.

One of my favorite comp sci professors once told me that the chance of such a collision (per unit of work) is about the same as winning the state lottery 11 times in a row, then being struck by lightning, surviving and being elected president. And he had the math to back this up...


Why would Nicehash payout not change while BTC doubled

When your mining pool finds a block, each miner is paid out according to the share of work they contributed to the pool's total work. The amount of hashrate you 'own' on Nicehash is unchanging, so if other people add more hashpower to the pool over time, you will own a smaller share of the total. Historically, the network hashrate has consistently increased over time, meaning btc returns are almost guaranteed to decrease over time for any miner.

A smaller share will pay out a smaller amount of bitcoin. So over time, you should expect to see a diminishing return (measured in btc).

At the same time, the price has increased, so a smaller amount of btc is now worth more. In your case it is just a coincidence that your payout has remained steady at $3.80.


How can non-backed cryptocurrencies be stable (like by algorithm)

It's entirely possible, but no one would invest in such a coin because the return on investment would be predictable and low, and the value itself would be subject to manipulation by the creator. You are basically describing how a Federal Reserve works, and a cryptocurrency that acted like a Fed is useless.

Also, nothing in the blockchain indicates price, so you'd have to source price from an exchange. Each exchange price varies, so it's arbitrary and gameable which exchange is picked.


Is there incentive for those who run lightning nodes?

Yes, but just running a lightning node is not enough.

In order for your node to be able to earn fees, it has to have payments passing through it. For this you need to have a routing node, which has at least 2 open channels (where is payment coming from, where is payment going). The more open channels your node has, the more it will be chosen by the routing algorithms of the nodes that want to make a payment, to be routed through.

The amount of BTC/LTC/... you would earn as fees is not fixed, instead the market decides (supply & demand). It is very little though, like 1 Satoshi per payment. However, consider that Lightning is designed to have many more payments per second than Blockchains, so this could sum up.

The fees you may gain are probably lower for the Lightning Network than they are for on-chain payments (per transaction), but also your cost will be lower; there is no need for delivering any PoW, as this is provided by the underlying Blockchain. In fact earning fees through the Lightning Networks behaves rather like staking -> The costs mainly compound of the HW & electricity you need to run your node (aiming for 24 / 7) as well as the risk you expose your "staked" Bitcoin to, as they basically need to stay non-stop in a hot wallet.

Most of the time it will not make sense to have a routing node, but rather just a simple node on your phone so you can pay for your daily coffee. With this node you will probably not route any payments and consequently not earn any money with it.


How to burn confidential assets or pegged bitcoin on Bitcoin Liquid sidechain

destroyamount is the rpc call you are looking for

https://github.com/Blockstream/liquid/blob/3f937d39f7c516e49f62d05c12d41b63b79ca043/src/wallet/rpcwallet.cpp#L586


Missing Checksum error when importing multisig wallet via descriptor

According to the documentation, some RPCs need a checksum. importmulti is one of those.

You can use getdescriptorinfo to add a checksum to an existing checksum-less one.


Can a cryptocurrency exist in a closed system?

You could do this.

What you're describing is typically called a 'premine.' Ripple launched this way, and distributed half of the money, and kept the other half for development.

But from the sound of things, that's not really what you're looking for. For example, would you be okay with players transferring ingame currency in return for real money? Is it an important feature for players to be able to keep funds that aren't associated with any in-game account?

There are various things you can do to prevent those sorts of things, but they largely defeat the point of using a cryptocurrency.

Using cryptocurrency probably won't save you any time, either. At a rough guess, implementing a Bitcoin-derived solution for tracking player balances will take roughly fifty times more development time than a centralized solution.

Instead of creating a cryptocurrency, I suggest using a SQL table to track how much balance each player has. This is

faster,
simpler, and
allows easy central modification.


Using the Merkle Root to prove the integrity of a block's transactions

If every transaction is to be verified that it's included in the block, wouldn't you ultimately need to know all of the hashes anyway if you're going to trace back to each transaction separately?

A full node downloads the entire contents of the block, which includes all of the transactions. Having done that, the node can easily compute the merkle root for the block (this is required to ensure the block is valid). Note that the intermediate level hashes in the merkle tree (between the leaves and the root) do not need to be communicated, a node with the full tx list can generate and verify the entire merkle tree itself against the merkle root listed in the block header.

  Are these verifications only happening on request? or is it automatic before the block is added to the blockchain?

A full node will verify a block's contents, and only accept valid blocks. A wallet that uses spv will not perform the full block verification (that would entail downloading the full block), and instead trusts that the valid block headers it is receiving from full nodes in the network are indeed representative of the longest valid chain.

  When verifying one specific transaction, where do you go to get the various sub-hashes for the necessary merkle branches?

A wallet using spv will request the relevant info from the full nodes it pulls network data from.


I have Bitcoins in a local wallet, how do I get my Bitcoin Cash without using an exchange?

If your wallet has a Bitcoin Cash version of it (e.g. Bitcoin ABC for Bitcoin Core, Electron Cash for Electrum), then you can install that version in a second location and have it use a different data directory (the data for wallets is stored separately from the install location). Then just copy your wallet file into the second data directory and use the Bitcoin Cash version of your wallet as you normally would use your wallet. Since Bitcoin Cash has implemented two way replay protection, there isn't anything special that you need to do in order to properly create transactions for either chain.

If you do not have a wallet that has a Bitcoin Cash counterpart, you can export your private key(s) and import it into a Bitcoin Cash wallet. After the fork, you should first send your Bitcoin to another address that you control. Then you can export your private keys (excluding the private key for the address you just sent Bitcoin to) and import then into a Bitcoin Cash wallet. From there you can send your Bitcoin Cash coins to an address in the Bitcoin Cash wallet and spend normally.

NOTICE: Make sure to always backup your wallet.dat. I've heard of horror stories about people downloading bitcoinabc client and it overwrites their current bitcoin files. It's best to use a extra computer to download bitcoinabc and then use email or a USB to transfer wallet.dat to it.


BIP32 child addresses - anyway to corelate them?

No, from the outside all addresses look completely unrelated, there is no way to work out if two addresses have any relationship to each other, including if one is the parent of the other or sibling of the other, without the chaincode as well. That's because all derivations involve hashing, and hashing is designed to have an apparently randomly distributed output, regardless of the relationship between two inputs to the hash function the outputs should appear unrelated.


Issue after importing private key to MultiBit

Set the date in the import file to the date the key was created (date and time are in UTC, not local time).  Then do Tools -> Reset block chain and transactions.  This will cause MultiBit to rescan the block chain from the earliest key creation time.  It should then show your transactions.


VPS with 80 GB Space, can't download the whole blockchain?

Yes, pruning will reduce disk space needs to a few GB.  The whole block chain will still be downloaded (which may cost you something in bandwidth charges), but old blocks will be discarded as you go.

See How can I run bitcoind in pruning mode?


How to get the capacity of remote channel in Eclair?

While Eclair itself doesn't provide the information, you can use the information from Eclair to look up the capacity using some other block information provider.

The capacity of channels is not part of the gossip information broadcast over the Lightning Network. The capacities are looked up on the blockchain from the shortChannelId, which fortunately is returned by AllChannels.

The shortChannelID is a triplet consisting of a block height, the index of a transaction within the block, and the index of the output in that transaction. This is the funding transaction outpoint and the amount in the txOut it refers to is the capacity of the channel. Eg,508856x657x0 is this txOutPoint which has a capacity of 0.004BTC.

Perhaps of interest, Blockstream's explorer recognizes the standard shortChannelId encoding <height>x<txIndex>x<outIndex> for searching and will take you directly to the information. I'm not aware of any other block information providers which also do.

Eclair's API doesn't provide you the funding public keys to verify this transaction yourself, but you can probably assume that Eclair has performed the validation else it would not have been accepted into its database.


Who operates WeExchange, the first Ripple Gateway?

Nope.

The contact page lists

WeExchange Australia, Pty. Ltd.
WeExchange, Inc

Of course, I don't know that for a fact. The whois is registered to a privacy protection company, which doesn't really fill me with confidence.


Is it possible to spend bitcoins from private key 0?

While 0 is not a valid element to use as a private key, and as such whatever public key that your software generated which was then hashed to the address is also not a valid public key, the address 16QaFeudRUt8NYy2yzjm3BMvG4xBbAsBFM itself might be a hash of some other valid public key.  Since the scriptpubkey for this address only cares for a public key that is hashed to this specific address, and a valid signature for it, there might exist some unknown valid private key that fits for spending the funds sent to the address.

We will probably never know if such a key exist.


You won't be able to see a double-spend in the block chain, because it is invalid. You will see one of the transactions included in the chain though. Blockchain.info has a page showing the most recent double-spends.

Double spend is just two (or more) transactions claiming the same input, so they will look like an ordinary pair of transaction. One of them will get included in a block, the other will eventually be forgotten by the network. A conflicting transaction to the one included in a valid block can never become a part of another block (at least until the first block will become invalidated by a 51% attack).

The standard client will not flag any invalid transactions, but it will reject any transaction that conflicts with a known transaction. It will, however, accept a transaction that is a part of a block, even if it conflicts with a 0-confirmation transaction that you know of.


You cannot say for sure.
The three options are potentially true.
However, many clients build transactions with the change output as the last output.
So, following this convention, I would say option 2 is the most likely.


Normally class actions are opt out, not opt in.  That means you don't have to do anything if you want to be in the class.  But the decision as to whether it will be what they call "certified" as a class is probably a long way off.  If the court allows the class to be certified, they will then send notice to the class members giving you the chance to opt out of the class if you don't want to be in it.


Can a bitcoin transaction be used to send usernames?

I'm not sure how you would make vanity addresses work for this. You don't want to store an address for each user, and if you did you wouldn't need vanity addresses. If you force the user to create a vanity address, I don't see what they would do with it that would help you. It seems kind of bizarre to force them to transfer the coins to their own vanity address and then transfer them to you, so you can see the vanity address as the source.

One possibility is to publish a simple algorithm to convert their user name to a Bitcoin address (that nobody could claim). Then have them use the sendmany API call to send the payment to you and a satoshi to their user name's corresponding Bitcoin address. You would receive the funds and then know what user to credit them to by decoding the address that had received a satoshi. This would waste one satoshi for each transfer.

There are really only two issues with this. First, it's a bit of a pain for your users. They can't use the GUI to send the funds since it doesn't support sendmany. Second, the users have to be careful not to send the actual funds to the Bitcoin address corresponding to their user name. If they did, those coins would be lost forever. They need to understand that they should only send a tiny fraction of a Bitcoin to that address so as to 'mark' the transaction.

All in all, I think all the possible solutions are ugly and you should rethink the decisions that led you to these unusual requirements.


Does government really seize Bitconnect assets?

"Seizing"
Freezing is not seizing.
Seizing would mean transferring ownership of assets to the court.
Freezing means the subjects of the orders are not able to use or dispose of assets of theirs that are under the jurisdiction of U.S. District Court, Western District of Kentucky. The final disposition of the assets depends on the outcome of a court case or on the expiry of the order.
"Government"
Whether you consider this particular court "government" probably depends on where you live.
"Anonymous"
Bitconnect is not exactly anonymous, there are names of individuals in the company registration that is associated with the business. Whether those are real names is not guaranteed. There is also a named individual in the class action
Effectiveness
I doubt any of the business' assets are currently held within the jurisdiction of this particular court.
Compliance with the order probably depends wholly on cooperation by the people involved in bitconnect. So far as I know, the court has no way to apply any sanctions if they do not cooperate.

http://internationalbusinesslawadvisor.com/worldwide-freezing-orders-enforceable-worldwide/

Is a WFO Enforceable Outside of the Country Where it was Issued?
The short answer is no. The WFO applicant must register for enforcement in the foreign country where enforcement is sought.  At such time as the foreign court approves the WFO for local application, enforcement would be proper.
The U.S. Perspective
From the U.S. perspective, courts have been hostile to the kind of relief available in foreign courts with a WFO. While U.S. courts will, as a matter of course, issue a freezing order in support of a U.S. proceeding, they have repeatedly expressed extreme reluctance to do so in support of a non-U.S. proceeding as a matter of course

"Do as you would be done by" applies?


What does this comment in Chainparams.cpp mean?

The original 50 BTC coinbase is not spendable since it was not included in the UTXO set. Any transaction trying to spend it would be invalid, since the previous output from the coinbase tx does not exist in the utxo set.

The hex string is an encoding of The Times 03/Jan/2009 Chancellor on brink of second bailout for banks, along with the regular coinbase params. It is essentially a marker that proves that the chain was not premined before 03/01/2009 by including the headline from a paper on that day.


Trying to use Block Erupters with Ubuntu 13.04

to determine if they're being detected properly, use the 'lsusb' command.

Here's what they should look like if your system is detecting them properly (I run mine in a VM running Ubuntu:

$ sudo lsusb
[sudo] password for majorminer:
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 0e0f:0008 VMware, Inc.
Bus 002 Device 005: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 002 Device 006: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 002 Device 007: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 002 Device 008: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 002 Device 009: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light

Make sure they're detected by the miner by using sudo bfgminer -S all -d? -- I found this to be a lot better on linux than cgminer.

Then start your miner with sudo bfgminer -o $pool.goes.here -u $USER -p $PASSWORD -S all


Should I include the fee in the sent bitcoin amount?

The fee is going to be separate from the amount.

Using your exmaple:
If you need to send bitpay 0.05 btc, you enter 0.05 for the amount field and 0.02 for the fee field. Do not send bitpay 0.07 btc

If you specify a fee of 0.02 btc and you only have 0.06 btc combined in all of your addresses, electrum will alert you that you don't have enough.

Please note that the fee is something that you decide you want to include. It is not a fixed value, but there is a minimum if you want to get your transaction included into a block in a reasonable amount of time. Looking at the current block, 402557, transaction fees look like they are around 0.001 btc. The fee can depend on a couple of things like age of coins, size of transaction, and/or how fast you want your transaction included. You may also want to increase the fee since more and more blocks are reaching the size limit and miners will favor a more profitable transaction.


How do I know the public key of the person I need to pay?

I read through both questions, so please correct me if im answering the wrong question.

The user who you want to pay must send you their public key (or QR to scan) in order to send money to them. This is, of course, unless their public key (wallet) is listed on a public website. Please see https://en.bitcoin.it/wiki/Help:Introduction#Sending_payments
In general*, there is no harm in exposing a public key. This question on crypto stackexchange goes into more detail Is exposing a public key bad?


I am not sure your money is recoverable, and I don't know too much about the specifics of Litecoin, but I believe there is hope.  First, I think I should explain what appears to have happened (for anyone else who finds this question, since you seem to have a handle on it).

The address you sent to is a pay-to-script-hash (P2SH) address, which according to comments on this answer are valid on both chains.  This does not mean that you sent LTC to a Bitcoin (or Bitcoin Cash) address.  This means that you sent LTC to an identical, yet valid, Litecoin address.  However, this address is not one that currently has a private key stored in your Litecoin wallet.  This is why you would not expect to see the money there.

This means that in theory, you could claim the coins on the Litecoin blockchain by importing the private key(s) that correspond to the address on the Bitcion blockchain...which it sounds like are private keys that you have in your Bitcoin wallet.  I know nothing about the wallet services you are using, but if you can export your keys from the Bitcoin wallet that generated the address in question, and then import that particular key into your Litecoin wallet, you should be able to claim the coins.

It all sounds like this is what you are already attempting, but you are starting by seeding a new wallet.  If this isn't working, it could be because one of the wallet providers is using a non-standard way of generating addresses from wallet seeds.  You may want to try writing some code of your own (using a utility such as https://github.com/prusnak/bip32utils) to generate your own addresses based on your recovered seeds.  This may help you to find the specific private key for the address in question, and from there you can import that key directly into the Litecoin reference client and claim the coins.  This may or may not be worth the effort, depending on how much money is at stake.

Best of luck!


How do you make a coin resistant to soft forking?

You can't prevent miners from enforcing more rules than the rest of the network is. However, to actually turn that into a soft fork, a significant portion of the network also needs to start enforcing it.

However, the only way a softfork can affect users of the system in a negative way is by disallowing certain transactions that used to be useful. That problem is nothing more than the inherent censorship rights a majority of miners have over the system. The solution to that problem is not trying to prevent enforcement of rules (which is not possible; miners can do it even without announcing it), but by improving the privacy of the system. If miners cannot see what transactions are doing, they cannot selectively block.


Why does `connect` perform worse than `addnode` for synchronization?

If you use connect your bitcoind will exclusively connect to the nodes that you have specified in conjunction with connect.

When you use addnode your bitcoind will preferably connect to the specified nodes, but will also announce itself to other peers that are connected to them and try to make more connections.

The nodes that you had specified with connect might have been overloaded and therefore hadn't sent any data or even didn't accept the connection request. On the other hand, using addnode might have allowed your daemon to find additional peers that have seeded the data instead.


What happens if two miners mine the next block at the same time?

Yes, it is possible, and you can actually follow "orphaned blocks" here: https://blockchain.info/orphaned-blocks

Bitcoin clients always trust the longest chain, so if two blocks is mined on the same time, it's up to (51% of) the miners to decide which is going to be 'accepted' and which is going to be worthless.

This is one of the reasons why you shouldn't trust only a few confirms, as the confirms could be a orphaned blockchain. After "enough" confirms, everyone will mine on the "correct" blockchain, because any work(mining) on a orphaned blockchain is waste of power (unless your trying to perform a 51% attack).


Unable to return BlockHashes when I run this generatetoaddress

Open bitcoin.conf and its default location on Mac is $HOME/Library/Application Support/Bitcoin/bitcoin.conf

Save bitcoin.conf with:

regtest=1

Launch Bitcoin Core. You should see a logo color similar to stackexchange:

Open console and run the below commands:

A. getnewaddress
B. generatetoaddress 11 [Address returned in A]


What's the difference between xpub and bpub?

bpub appears to be the extended private key prefix for the Blockcypher testnet.

Bitcoin addresses and private keys usually have a prefix to help differentiate the network/type of key.

The original xpub notation comes from BIP32, meaning extended public key. This expanded into ypub with BIP49, and finally zpub with BIP49+ (used in BIP84).

Various coins can define their own prefix by simply altering the bytes. Litecoin, for instance, often uses Ltub.

It works the same way as changing the address prefix, except you change four bytes, instead of one.


Can bitcoin pools set a different difficulty value other than the network difficulty

First of all, please be careful with using the terminology "network difficulty." Network difficulty is the difficulty at which a hash is accepted by the network (as opposed to the pool). Technically speaking, if d is the network difficulty, then your probability of finding a valid hash is 1/(d*2^32). If your question is interpreted literally, then the answer is trivially yes, since no pool would do such a thing. If everyone submits shares at the network difficulty, then the only share submitted is the one that solves the block, which means that the block finder gets the entire block reward, negating the reason people use pools (to reduce variance).

I guessing you're actually asking the following: Can mining pools give everyone a different difficulty?

The answer is yes. Basically, I might be mining at a difficulty of 16, and you could be mining at a difficulty of 32. If we have the same hashrate, then I would be finding shares twice as often as you, but your shares are worth twice as much. In the end, it all evens out. Mining at a lower difficulty reduces variance, but for miners with a large hashrate, their variance is already low enough that they can afford to mine at a higher difficulty, and they generally do so to reduce the stratum load (since they must communicate with the pool every time they submit a share).

There are several ways a pool could implement different difficulties. One is to have a setting on the pool website that you can adjust on your workers page. Another is to have multiple strata, each with a different difficulty. Yet another (which could be used in combination with the previous technique) is called vardiff, where the pool adjusts the difficulty to an optimal level in response to its estimate of your hashrate. Note that adjustment of share difficulty must be done at the pool level; there is no way to tell cgminer to choose a certain difficulty. (Even if you could, trying to submit a share at a difficulty lower than the pool wants will end up getting rejected, and only submitting those shares at a difficulty higher than the pool specifies will not get any bonus points for the extra difficulty.)


Why does a same transaction signed separately have different witness values?

Bitcoin signatures have two components: s and R. To sign a Bitcoin transaction with private key k, the signing algorithm generates an ephemeral private key r. The R component of the signature is the x-coordinate of that ephemeral public key. The s component of the signature is calculated in the following way: s = r-1 (Hash(m) + k * R) mod p; where Hash(m) is the hash of the transaction data m.

Since, s changes with r, as shown in the equation above, the signature component will be completely different when you compare two transactions signed if their ephemeral key generation algorithm differs.

Most softwares uses RFC 6979 to deterministically but securely generate the ephemeral key used to sign transactions. So for two identical transactions, the ephemeral key should be the same and that is the reason you are seeing the same signatures on different Bitcoin Core software. However, RFC 6979 algorithm also allows the usage of other additional optional data while generating the ephemeral key. This additional optional data might be different for different softwares and as a result you are seeing different (s,R) signature from Bitcoin-Core and nBitcoin.


Can you delay transactions so that you pay no fees?

Transaction fees will always be expected by the network unless your order meets these conditions

It is smaller than 10,000 bytes.
All outputs are 0.01 BTC or larger
Its priority is large enough (meaning it has been on hold for a very long time)

you can also mine your own transactions, but as a general rule if your expecting someone to process your order for you, then they expect something in return, even if that something is only 0.0001 BTC.


The main challenge is how to secure user passphrases.
In the past we had a slack bot implemented in C# https://github.com/libertyswede/NxtTipbot you can use it as reference implementation.


Would a dual-funded channel be a single UTXO?

Yes, this is correct: a dual funded lightning channel is still represented by a single UTXO.

Generally, we would expect each participant to contribute at least one input to the transaction that creates the dual-funded channel (each participant may also thus end up with a newly created change UTXO as well). This method allows two participants to interact trustlessly to create a dual funded channel.

Perhaps worth mentioning: with a slightly broader definition of ‘dual-funded’, we can imagine ways to create a dual-funded channel, without requiring inputs from both parties. These methods may require more trust between parties than the trustless setup mentioned above, but they may be of interest anyways. Examples:

two parties share ownership of the BTC stored in a certain UTXO, and decide to open a channel using it as the only input
one party contributes a UTXO, while the other party makes an external payment to them. The initial channel balance is then split accordingly, to reflect this payment.
one party contributes a UTXO, while the other party makes an on-chain payment to them. As above, the initial channel balance is then split accordingly. This could be done atomically, which means participants will not need to trust each other. See: splicing in / out of channels.

Those are just a few examples off the top of my head. I’m sure there are other ways to accomplish dual-funding as well.


Why haven't a large number of cryptocurrencies copied Primecoin's mining algorithm?

One of the most important functions of mining is to secure the network, meaning that a user can be reasonably sure that their transactions are immutably recorded in the chain. With this in mind, it becomes very important that the game theory of mining incentivizes the miners to remain in consensus, and behave in the expected, 'honest' way.

In a simplified sense, this means that the cost of 'behaving well' (ie the way users want miners to behave, staying in consensus and securing the blockchain) must be less than the cost of 'behaving badly' (ie causing forks, withholding blocks, reorgs, etc). Likewise, the benefits of behaving well should outweigh the benefits of behaving badly.

  why have more recently created proof-of-work focused coins largely ignored Primecoin's mining algorithm in favor of Bitcoin's, which yields no epiphenomenal benefits?

There is simple answer: if the hardware and algorithm used for mining provide external benefit, then that hardware will have value outside of it's use as a cryptocurrency miner. Thus, if a miner behaves badly and attacks the chain, their hardware will still have value, even if the chain dies. This lowers the cost of behaving badly, compared to a cryptocurrency which uses an otherwise useless mining algorithm. The net result is that the blockchain has a lower security guarantee, because the miners are not as invested in maintaining the chain.

Currently, we see that Bitcoin miners are spending huge amounts of energy to secure the network. The naïve understanding is that this is wasteful, the nuanced understanding is that Bitcoin itself benefits humankind in ways that make this cost worth it.

For more information related to this, see this question.


Does the transaction fee of bitcored or bitcoind change everyday?

It will often change because it will estimate the fee for certain confirmation targets (e.g. confirm within 4 blocks). The fee estimation will update with each block, so it may change every day. It may also change more or less frequently than daily depending on the transaction situation for each block.

  Am I required to set transaction fee of bitcoind by using settxfee method?

No. You only need to do that if you want to specify the transaction fee instead of using the estimation. I recommend that you use the estimation as setting the fee yourself will often occur in overpaying or underpaying.


I checked your tx on blockchain.info and the transaction is there. If you are 100% correct that the receiving Exodus address is correct then the transfer went through.

First recommendation I have is to try and manually refresh you Exodus account. Follow the steps in the link below and let me know if this solves the problem.

http://support.exodus.io/article/76-my-wallet-balance-is-not-correct


An easy test is to sign a message using your private key and then verify the message using your public key (your receive address).  This can be done using Bitcoin-Qt by selecting File->Sign Message.

Sign a message by entering your receive address and some message text (anything you want).  Select Sign Message.  Copy the signature to the clipboard
Verify the message by entering your receive address and the message text (exactly as you entered it for signing).  Then paste the copied signature into the signature field.  Select Verify Message.
If everything is working correctly, you should get a message verified status.


Does Bitcoin script support nested IFs (OP_IF or OP_NOTIF inside one another)?

Do bitcoin scripts support nested ifs (OP_IF OP_NOTIF inside one another)?

Yes, Bitcoin support nested IF/ELSE. In fact we use the nested IFs in Lightning Network all the time when adding HTLCs to forward a payment.

  Is there any limit on how deep a nested if can go?

There is no explicit rules dictating how far deep the nested IFs can go but there are some constrains on the script itself:

Maximum number of bytes pushable to the stack should be less than 520 bytes
Maximum operations per script is limited to 201
Maximum size of the script is 10,000 bytes
Maximum number of values on script interpreter stack is 1,000 bytes

  Is there any examples (raw bytes/hex) I could look at?

As I mentioned earlier, we use nested IFs all the time while adding HTLCs in the Lightning Network implementation. Below is an output script of offered HTLC outputs for a peer.

# To remote node with revocation key
OP_DUP OP_HASH160 <RIPEMD160(SHA256(revocationpubkey))> OP_EQUAL
OP_IF
    OP_CHECKSIG
OP_ELSE
    <remote_htlcpubkey> OP_SWAP OP_SIZE 32 OP_EQUAL
    OP_NOTIF
        # To local node via HTLC-timeout transaction (timelocked).
        OP_DROP 2 OP_SWAP <local_htlcpubkey> 2 OP_CHECKMULTISIG
    OP_ELSE
        # To remote node with preimage.
        OP_HASH160 <RIPEMD160(payment_hash)> OP_EQUALVERIFY
        OP_CHECKSIG
    OP_ENDIF
OP_ENDIF


Does Litecoin have a higher chance of address collision than Bitcoin?

When encoding the 20 byte public key hash with base-58, a prefix for the version byte is prepended. In Bitcoin, this version byte is 0x00 so that bitcoin addresses always start with a 1. In Litecoin, this version byte is 0x48 so that addresses always start with an L. This also has the side effect that the base58 encoding of these hashes is 26-34 characters for Bitcoin, and always 34 characters for Litecoin. See https://en.bitcoin.it/wiki/List_of_address_prefixes

But this doesn't change the fact that there is 20 bytes of information being encoded (addresses are really just human readable short-hand for this 20 bytes of data), and each possible combination has a unique encoding. Therefore, the chance of address collision is exactly the same in the two coins.


Is it possible to rewrite past transactions in Bitcoin?

Yes. If you have more than half of the hashpower, you can eventually rewrite a chain of any length.

  For example, lets say, we have a super computer with any desirable speed

Cryptography is based around protecting against adversaries with finite computing power. As soon as you suppose that you're going up against someone with infinite computing power, there's no public key cryptography system that you can use, because your adversary can just try every possible private key.

It's kind of like asking, "How do banks protect against thieves that teleport money out of safes?"

  If so, the current network would accept our new (forged) chain and all the past transactions would become invalid.

Yep.

  Then you make the deal with the government to destroy bitcoin.

I don't really see why the government would care if people used Bitcoin. Given that there are really trivial things they could do to make it very difficult to exchange or use Bitcoin, which they are not doing, I doubt they care.