Reward schedule and maximum number of dogecoins?

The Dogecoin reward schedule
I subsequently found the information that the Dogecoin reward schedule provides random amounts sized between 0 and a halving maximum for the first 600,000 blocks:

Block 1 — 100,000: 0-1,000,000 dogecoins
Block 100,001 — 200,000: 0-500,000 dogecoins
Block 200,001 — 300,000: 0-250,000 dogecoins
Block 300,001 — 400,000: 0-125,000 dogecoins
Block 400,001 — 500,000: 0-62,500 dogecoins
Block 500,001 — 600,000: 0-31,250 dogecoins
Block 600,001+: 10,000 dogecoins

The random reward amounts are dependent on the hash of the previous block. (H/T @JesseBusman)
How much?
At optimal random distribution, the first reward interval would provide 50 billion dogecoins. Altogether, the first 600,000 blocks would provide an estimated ~98.44 billion dogecoins, leaving another expected 156,250 blocks to be mined with the subsequent constant block reward of 10,000 doges per block.
How long?
As the block time is aimed to be 60 seconds, the reward is expected to halve every 69 days, 10 hours and forty minutes. At optimal block time, the last block with a reward would be expected after 525 days, or one year and 160 days.
Update: Flat 10k reward forever
On February 1st, 2014 the Dogecoin developers announced that Dogecoin would not be capped at 100 billion dogecoins after all, but would continue to have a flat 10k dogecoin reward for each block after Block 600,000.
While not hard-capped, a constant tail emission is predictable and disinflationary:


What are some open source blockchain projects?

The most famous open source Blockchains are Bitcoin Blockchain and HyperLedger Blockchain.


Pretty good actually as it has become a lot easier after SegWit allowed for new script opcodes through soft forks. It might still be a few years out, as there are other priorities, but Gregory Maxwell is pretty active on CT.


Why do compiled binaries still require libdb, BerkeleyDB, and others?

The standard compile process does not static "include" dependencies in the executable file. It refers to the installed libdb, boost, etc.

This (dynamic linkes libraries) is an efficient concept. Otherwise each executable that uses – as example – boost would require to include the whole boost dependency in the binary.

The "official" Bitcoin-Core binaries offered through bitcoin.org are static compiled executables (they include everything). This is required to gain linux/distribution independence as well as to fully build the binaries deterministic (security/integrity).

You can build a static linked bitcoind yourself by following the "depends" build process:
https://github.com/bitcoin/bitcoin/tree/master/depends


Can an attacker create many nodes that approve blocks without work?

You're essentially talking about a "fork" - or a separate chain. It wouldn't and couldn't interface with bitcoin - merely work (at best) alongside it. Exchanges, merchants, and official bitcoin wallets could not be fooled into using this alternative. Someone would have to download a compromised client. As each block refers to the previous one, there would be no way for them to "inject" fake blocks in the way.


Can I use a passphrase as a private key?

The simplest and most common way of doing this is to do SHA256(passphrase) and to use the result as your private key. You can e.g. use the "Brain wallet" tab on www.bitaddress.org which is all javascript so that you can download it and do everything offline for increased security.

Be aware though that your pass phrase must be really long and truly unique since if someone would use the same pass phrase they would have access to your money. The comment from Pieter Wuille above is worth repeating:

  Be aware that when you do this, you expose your wallet to the entire
  world to do a brute-force attack on your password. If many people
  start doing this, it may become very profitable to try to find their
  passwords. Software like Armory and Electrum have the ability to
  generate a determinsitic wallet from a 'seed', but this seed is still
  randomly generated, in order to be sure that it is hard to attack


What does bitcoin.org mean when they say about Coldcard Wallet "the final software was not built deterministically like Bitcoin Core"?

Some security sensitive pieces of software like Tor, Debian and Bitcoin use deterministic builds to increase the safety of binaries for end users. Typically a piece of software will be built from source code by a maintainer, signed by them, and then uploaded to a repository. Small differences in the setup of the machine compiling the software, timestamps, and random values in the output mean that every time it is compiled the output is likely to be unique.
Deterministic builds replace this with a system called Gitian that produces identical binary output no matter who produces the binaries or when, allowing many people to independently compile the software and come to the same end result.
Deteminstic builds protect against:

Malicious software on the maintainers machine changing the behavior of the software, injecting a backdoor or other code
A single maintainer acting maliciously and altering the software
An innocent maintainer being accused of having made modifications they did not

The ColdCard product not being built deterministically means that even though the project is open source, you have no way of verifying that the binaries provided by the company completely match the source code.


Who are the key developers, and where can I follow their progress and decision making?

The core developers are listed on the main Bitcoin page, while everyone that contributed code are listed on the About page. Probably the most up-to-date info on what is happening with the code would be on the GitHub repo.


Try this:  start bitcoin-qt with the command line switch "-rescan".  That should re-download all transactions, including those in and out of your wallet.

I can't guarantee this will work, but I had to do this when I upgraded to the newest version of Bitcoin-qt after a long time of not updating.


Will merge mining patch make Bitcoin network mining power available to anyone?

The patch has no effect on the parent blockchain, it just allows the patched bitcoind to be used for mining on both chains simultaneously.  Only the child blockchain needs to be modified in order to support merged mining.  There's no way for the Bitcoin network to prevent merged mining, even if doing so were desirable.

Merged mining does have to potential to allow alternate chains access to greater hash power (and thus security against double-spend attacks) than they would have had otherwise.  However, this alone will not give them value as currency.

Bitcoin is able to sustain value because of its network effect.  The more active users it has, the more useful it is to each user.  The alternate blockchains have userbases that are a a few orders of magnitude smaller than Bitcoin's.  Newcomers to the cryptocurrency world will tend to choose the more useful and popular chain, further increasing Bitcoin's lead.


How can size of a block be significantly small?

Since the time between those blocks is so small (from 593576 to 593577 was only 16 seconds) a miner wouldn't have many transactions to add to the block they are mining (there just haven't been many transactions on the network within that period of time). Also, mining is random, if you happened to mine a block, wouldn't you want to get the block reward even if the block is small? The reward is much higher than the transaction fees. It wouldn't make sense to wait to try to mine a block until there are more transactions. In fact, you can mine a block with only the block reward and no other transactions, if you wanted.

So as more transactions come in, miners would presumably add them to their block in order to maximize the transaction fees they might get if they happen to mine the block.


You can start mining on Segwit2x official pool

http://pool.b2x-segwit.io

Best regards.


Using bitcoin-qt in bitcoin-core: How to tie my wallet to my email address?

Normally, the software doesn't support such things. The wallet doesn't store any personal information.

However, there are web exchanges like coinbase, that lets you to use email address when sending cryptocurrency. But, it was only for clients under the same exchange.


Paper wallet generator that can split a private key into multiple parts like a multi-sig transaction?

www.bitaddress.org offers something similar to your description. It's under the Split Wallet tab once you generate enough entropy. You can even specify a m-of-n multisig.


Does running a full node make rpc calls faster?

This has nothing to do with pruning.  RPC calls like getbalance only use data stored in the wallet and/or UTXO database.  They don't have any need to refer to the archive of old blocks, and having it available wouldn't help anything.

VPSs often don't have a lot of RAM, and bitcoind in its default configuration needs a lot - say a gigabyte or more.  Is it possible that you're short on physical memory and therefore having to swap?  This can make a system very slow.  You can reduce bitcoind's memory usage somewhat with different options (see How to run bitcoind in a low memory environment) but you may also have to configure your VPS with more memory (and pay more).

Another possibility is that your server is overloaded with other tasks.

Either way, running top will probably reveal something.


What internet data usage can I expect when mining in pools?

No, it's much less than you think. If you look at the Stratum protocol, you'll see that the pool server doesn't send you the full list of transactions of a block, but just their hash (in a merkle-tree fashion). So, each new block that they'll send you is only a few hundred bytes, every ten minutes or so.

Your miner will likely report shares, but this should be infrequent (once every few seconds at worst), and this is a few dozens of bytes.

All-in-all, you should be looking at less than 100kbyte / hour.

PS : you can join the lottery or... you can mine for science at the 3SUM pool (disclosure: I'm its author).


All transaction data is committed to the WTXID, unlike in the case of TXID's.

Malleability is found in the unlocking script/data of a transaction. It is malleable, because is not committed to the signature (circular dependency).

Sources of TX Malleability:

Signature Malleability
Input Script Malleability

See BIP62 for a great overview of TX malleability sources.

The unlocking script data is found in input scripts (non-witness tx's) and witnesses (witness tx's). For a witness transaction, if the witness is modified in a way that doesn't affect validity, this necessarily changes the resulting WTXID.

The TXID's of witness transactions are not malleable, because the input script is empty and witness data is stripped for its TXID derivation. Transactions are not referenced by WTXID, but by TXID's.


How Does One Make Money from Bitcoin Trading?

If you buy Bitcoins at one price and then sell them for a higher price, you make a profit of the difference between those two prices, less any commission that you paid. However, if the price goes down, you will be in the uncomfortable position of having to either sell them for a loss or hold and hope the price goes back up while risking higher and higher losses if the price continues to drop. Before the current rise to over $200, Bitcoins once dropped from $35 each to $2 each.

What I'm saying is that you should definitely not invest any money you cannot afford to lose, understand that you may have to take a big loss if you're forced to sell out when the market is weak, and also realize that the entire Bitcoin economy could collapse at any time.

The other issue you have to consider is how you're going to store your Bitcoins. You can store them yourself using the Satoshi Bitcoin client. But then if your computer is hacked or your hard drive crashes and your wallet isn't properly backed up, you can lose everything. If you use an online wallet service, like the one built into most exchanges, there is always the risk that the service will go out of business or steal your funds and claim you withdrew them.

There is huge upside potential, but the risks should not be understated.


How to block a Ripple account from a Gateway's perspective?

You seem to start out describing the "Authorized Accounts" feature of Ripple, but then you then pivot to freezing.

Authorized accounts which allows an issuer to explicitly approve which accounts may hold his issuances. The feature is described here: https://wiki.ripple.com/Authorized_accounts.

The "freeze" feature Ripple allows issuers either globally freeze all their issued funds or to freeze funds issued to a particular user. Frozen funds may only be sent back to the issuer. The feature is described here:
https://wiki.ripple.com/Freeze.


Do miners prefer RBF transactions over non-RBF transactions?

It is up to the miner, but typically they do not care whether it is RBF or not. There's no difference to the miner whether they choose one or the other; the miner still earns the same amount in transaction fees.


What happens if I mistype the address when making a payment?

Bitcoin is very resistant to typos because the addresses contain a built-in check code.  So if you had simply mistyped a few of the letters or numbers in the address, it's unlikely the client would have let you send them.  If, however, you pasted in a different and valid address, the coins are already transferred to it permanently.  In this scenario, Bitcoin works pretty much like cash--there is no way to get it back after giving it away.


Are there examples of scripthash transactions in the blockchain that do not use MultiSig destinations?


You should use multiple workers if you want separate statistics for them, or if the pool you are using limits the number of connections that are allowed per worker.


Before doing anything I would make some extra copies of those files onto some other media.
I think you should probably be able to download the latest version of the "Bitcoin Wallet" for Android (less ambiguously known as the Schildbach wallet) onto a new Android device, copy the backup file to the device, and then use the wallet's features to recover from those backup files. Menu, Safety, Restore, specify file. You might need to know the password you chose.
If a password was set, the files will be encrypted. There are programs that can help to find a password if you have some ideas about the password. One is btcrecover:

Bitcoin wallet password recovery support for
[...]

Bitcoin Wallet for Android/BlackBerry spending PINs and encrypted backups


Withdrawal of coins to Trezor did not happen, Where are my coins?

If you used the correct address, you have received that money already even if your Trezor doesn't yet know about them.
If the public blockchain (not the unrelated business who use that name) shows your address has the money, you already have it. The public blockchain is the only true record.
You won't be able to spend that money until you fix whatever problem is causing that reported network error (or until you use your safe backup copy of the seed phrase or private-key in another wallet)


What can I do?

You could find tools that automate the trying of various combinations of seed-words. Some are mentioned in similar questions here. For example btctools, btcrecover. Use them or adapt them to your needs.

Lost my Bitcoin wallet and have only 11 out of 12 mnemonic seed phrase words. How can I get my Bitcoins?
Need help to recover blpckchain.info wallet, my wife forgot her password and the brute force with btcrecover is not catching the password

I would

Not involve other people in this.
Not use software I can't build from source code I read and understand.
Not use the software on a computer that is connected to any network.

If I had no success after a solid year of trying every day, I'd consider handing the problem over to a third party I had very thoroughly vetted.

Obviously if the wallet contains $3.65 or some other trivial amount - just forget about it, the time is not worth spending on this.


Why I am not seeing received money in my electrum?

version 2.0.2 is very old. Before asking for help, please upgrade to the latest version.
if the issue persists, enter wallet.clear_history() in the electrum console, and restart electrum


Can anyone give me some help editing the Abe html?

I use CSS only.

Try this: Use default Abe html layout and use the following modified abe.css. The only changes needed are logo margins and color/font palette. Name your logo the same as abe's (logo32.png - makes things easier)

Click here for the modified abe.css

I modified the previous abe.py but found with the current version I'm using (0.8pre) that css is much easier. Most objects on the page can be manipulated.


Zerocoin vs. Zerocash ? are they the same ? Or two different protocols?

Zerocoin is a proposed extension on Bitcoin to make Bitcoin more private. Zerocoin only hides the origin of a payment, the destination and amounts are still public.

Zerocash is a further extension of the zerocoin protocol which hides the destination and amounts. Zerocash transactions are more compact than zerocoin transactions.

Zcash is an implementation of the zerocash protocol onto a new altcoin. Both Zerocoin and Zerocash were intended for extensions to Bitcoin (they would require a fork). However zcash is just an altcoin (it began as a software fork of Bitcoin) with the zerocash protocol on top.


Transactions compete with each other in regard to the fee they offer to the miner divided by the amount of blockspace they require to be included in a block.

Where does the fee come from?

When you craft a transaction, you first determine the amount that you want to send. After creating the sending outputs, you collect inputs that have sufficient value to pay for the sending outputs as well as that. Your software then crafts a payment order (transaction) that lists the inputs to be consumed authenticated by the corresponding signatures, as well as the outputs to be created. If the inputs total value exceeds what you wanted to send, you will often create an additional change output to send back the remainder to an address that you control.
 Obviously, you may not create outputs worth more than the inputs that you spend, but the opposite is required: The difference between the sum of the inputs and the sum of the outputs, i.e. the value that you have not reassigned to a recipient, is free-floating and may be collected by the miners in the coinbase transaction of the confirming block.

How big is a transaction?

The amount of blockspace required, is dependent on the type of script that you use in your input. e.g.:

a P2PKH input has 147 or 148 bytes
a P2SH 2 of 3 multisignature input has 295 bytes
variable for custom P2SH scripts

As far as I know, all outputs right now are 34 bytes.

To calculate the whole transaction size, you add up the transaction header (10 bytes), the inputs with their corresponding size (n*148 bytes for P2PKH), and the outputs (m*34 bytes).

Fee Rate

The fee rate is now the amount of freefloating fee in satoshis per the size of the transaction in bytes:

feeRate [sat/byte] = fee [sat] / txsize [byte]

Miners will generally select transactions by order of highest fee rate first.


Time it takes to Transfer btc from exchange to another wallet?

Transactions are sent instantly, but may not be confirmed for a long time, depending on the fee you paid. See this answer for more info on confirmations and fees: Why is my transaction not getting confirmed and what can I do about it?


Unable to send bitcoin from bitcoin core wallet

You are sending to a bech32 address. The current release of Bitcoin Core does not support bech32 addresses. The address box highlighted in read indicates that the address is invalid to the wallet.

The next release of Bitcoin Core will support sending to bech32 addresse as well as full Segwit wallet support.


Maybe you can look into Qtum's work. I am pretty sure they use the proof of stake concept. https://github.com/qtumproject/qtum


does blockchain.info have everyone's private key?

No, they have everyones encrypted private key. The private key get's decrypted locally on your client.

And of course they could change some lines of code and collect your private key. But this is true for every bitcoin client (thin client or not). That's why it is important to get the client binaries from trusted sources (and deterministic build).


timestamp different block explorers are not the same

Both explorers show two different time stamps. "Received time" is the time that the transaction was first seen by the block explorer (relayed over the peer-to-peer network).  "Mined time" (shown by blockchain.info under "Included in Blocks") is the timestamp of the block in which the transaction was included.  You'll note that both explorers agree about the mined time as being 12:05:22 UTC (note blockexplorer.com is displaying it in your local time zone, which I guess is UTC+1).

For received time, blockchain.info shows 12:00:17 while blockexplorer.com shows 12:05:22 (same as mined time).  So one possibility is that the transaction was actually created and posted to the peer-to-peer network at 12:00:17 (or earlier), and blockchain.info received it over the network at that time.  But for whatever reason, the transaction didn't make it to blockexplorer.com over the network; it didn't see the transaction until it got the block in which the transaction was included.

It's hard to guess why that would happen.  But it appears from the screenshot that this might be a non-standard transaction, which most nodes will not relay.  Maybe blockchain.info is better connected to those few nodes which will relay them.


How to Create Bitcoin Cash HD Walllet in Javascript

Use Bitbox
From http://www.bitbox.earth/docs/gettingstarted:

Visual Mnemonic & HD Path
Generate any number of BIP 44 accounts. Toggle their addresses between cashaddr/base58 as well as mainnet/testnet. Easily view the private key in wallet import format (WIF) and extended public (xpub) and private (xpriv) keys. Vary the amount of entropy from 16 bytes up to 32 bytes creating shorter/longer mnemonics. Set a custom mnemonic and/or HD Derivation Path. Optionally use a password.


The primary mechanism of attack in most financial systems, Bitcoin included, is a "double spend" attack which essentially allows the spending of the same money in multiple places either by duplication of funds or by revocation of the earlier of two transactions. We've actually addressed a number of such attacks on the StackExchange site here. Try looking at questions with the doublespend tag.

The two most commonly discussed are the 51% attack and the Finney attack.

The 51% attack requires the attacker to hold 51% or more of the complete hashing power of the Bitcoin network. Once the attacker holds the majority of all hashing power he/she may spend bitcoins and then fork the blockchain in such a way as to not include the block they were spent in. This is incredibly expensive and not arbitrarily done. It would also be somewhat detectable as the forking blockchain would regularly cause problems with other transactions until the 51% attack completed.

The Finney attack can be done by a solo miner without 51% of the network hashing power. The miner waits until they solve a block and place a transaction in that block in which they send all their coins to another address they control, but withhold their result. They then spend coins from the originating address elsewhere and then release the block. This essentially breaks the order of operations and makes the valid transaction impossible since the originating address no longer contains an adequate balance to have sent the coins.

These have both been discussed at great length and from many angles here on the StackExchange site. Again, try looking up the doublespend tag.


Mt. Gox API - getting confirmation of a trade order

The success message is telling you that your request to place an order was successful, not that the order has been fulfilled.  For that, you have to poll money/order/result.

Also, I use the order submission API in V2 and it does respond with an insufficient funds error.  If you're using the older V0/V1 APIs, you may want to upgrade.


What BIP32 derivation path does Electrum use?

It uses m/0/<n> for receiving addresses, and m/1/<n> for change addresses.

Here's some example bitcoinj code to generate receiving addresses from an extended public key.

String serialized_xpub = "xpub.....";
unsigned int address_num = 4;
NetworkParameters params = MainNetParams.get();
DeterministicKey root_xpub = DeterministicKey.deserializeB58(null, serialized_xpub, params);

DeterministicKey receiving = HDKeyDerivation.deriveChildKey(root_xpub, new ChildNumber(0, false));
DeterministicKey new_address_key = HDKeyDerivation.deriveChildKey(receiving, new ChildNumber(address_num, false));
String new_address = new_address_key.toAddress().toString();


which cryptocurrency using Slasher algorithm for Proof of Stake mining process?

etherieum, use the slasher
you can see here:
https://blog.ethereum.org/2014/01/15/slasher-a-punitive-proof-of-stake-algorithm/


Where in the Bitcoin Cash code is the retargetting period defined?

Looks like the answer lies here for bitcoin Cash:
https://reviews.bitcoinabc.org/rABC7ad1105f43d7bff158d4b5c882ab9bf1b74d6cce

More specifically it is here:
https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/src/pow.cpp#L73


Can payment from a P2SH address provide change to itself?

These two things are actually not related. There are no restrictions to address reuse in the protocol. You could get away with never using more than a single address ever (although that is not recommended especially for privacy reasons) and p2sh addresses are no exception there.

The redeem script encodes the conditions that have to be fulfilled in order to spend funds from an unspent transaction output (UTXO). What the sentence says, is that you cannot have a lock to another redeem script inside of a redeem script.


Attempting to implement the interface KeyCrypter is a worthy exercise but it seems to require more than a few simple lines of code. bitcoinj offers one implementation with the class KeyCrypterScrypt and you may wish to look at the source file for this class. However, because this implementation exists, you do not need to provide your own implementation of KeyCrypter if all you want to do is have the ability to encrypt and decrypt keys. This can be done as follows:

import org.bitcoinj.core.ECKey;
import org.bitcoinj.crypto.KeyCrypter;
import org.bitcoinj.crypto.KeyCrypterScrypt;
import org.spongycastle.crypto.params.KeyParameter;

public class Test {

  public static void main(String[] args){

  ECKey k1 = new ECKey(); // some random key

  // encrypting a key
  KeyCrypter crypter1 = new KeyCrypterScrypt();
  KeyParameter aesKey1 = crypter1.deriveKey("some arbitrary passphrase");
  ECKey k2 = k1.encrypt(crypter1, aesKey1);
  System.out.println(k2.isEncrypted()); // true

  // decrypting a key
  KeyCrypter crypter2 = k2.getKeyCrypter();
  KeyParameter aesKey2 = crypter2.deriveKey("some arbitrary passphrase");
  ECKey k3 = k2.decrypt(aesKey2);
  System.out.println(k1.equals(k3));  // true
  }
}


Sending bitcoin unconfirmed, now wallet balance is unconfirmed

The other guy is wrong, I have the same problem as you( http://prntscr.com/cv38x1 - the coins were confirmed in 2015 but it shows transaction status as unknown).
Your issue is most likely the one described below:
https://github.com/keepkey/multibit-hd/issues/862
- this didn't work for me, but I recommend you try it as it did help some other people.

Now if you still have the problem, I figured out how to recover around $100 out of $146 by using the Mnemonic phrase to generate my old private keys, but for some reason it only generated some of them (I suspect that the reason I couldn't recover all of them is due to an issue with BIP32 compatibility Multibit had a year ago).


Is one quad GPU rig better than two dual GPU rigs for Scrypt mining?

Theoretically you should see a net saving in electricity consumption for there ought to be some economies of scale in having a single motherboard with the 4 cards vs. 2 separate motherbs. each with 2 cards each.

The CPUs controlling such cards are consuming power themselves but such consumption doesn't get much bigger if you have 1, 2 or 4 cards in the same motherboard. Plus the inefficiencies in AC/DC conversion within the power supplies would double, so yes - you should definitely see some savings with that arrangement.

But then, such a machine would consume tons of power, which not a lot of power supplies would be able to yield - 500 Watts, 800 W? Plus all the heat they'd generate, which of course needs to be dissipated somehow - which means not just some big fans, but probably some heatsinks, Peltiers or just submerging the whole arrangement in a bath of mineral oil -- fluorinert would be even better, if you can afford it.

Such big initial investment costs could offset part of the savings, so I believe it would be barely more profitable than the 2 machines way.


Is Bitcoin Classic binary-compatible with Bitcoin Core?

Since Bitcoin Classic is a fork of Bitcoin Core, this should indeed be possible. The problem though is that, should Bitcoin Classic switch to larger blocks and Bitcoin Core stick with small blocks then it will not be possible to switch back without Bitcoin Core downloading the whole chain again. But in that case we are quite in trouble anyway :-)


Were anyone-can-spend transactions valid before SegWit?

there was nothing to "prohibit" a miner from spending/stealing someone else's funds

That was never true, so far as I know, miners have never been able to spend other people's funds seen in normal transactions with the right spending scripts.
A more accurate description of the situation you describe is perhaps that there was nothing to prohibit people from freely leaving their money unprotected in a public place for any passerby to take.


Setting up a mining pool will require some programming, so based on your self-identification as a business man, I would suggest to start with asking yourself how much this will be worth to you. Many would say that running a bitcoin pool is likely a bit of an altruistic endeavour: If you want to attract people to join your pool, you are competing with others. This competition drives pool payouts close to 100% payout of block reward plus earned transaction fees plus free insurance against the stochastic nature of actually finding a block, and possibly against the pool making a mistake such as losing bitcoin temporarily stored for participants.

However, if you are a business man through and through, there might yet be a profit motive to be found: Successfully running a pool certainly will gain you credentials in the bitcoin world, which could be valuable for doing other bitcoin business. Then hypothetically having a large pool could help in offering future services like enabling bitcoin businesses to more quickly accept bitcoin payments by insuring against double spending. Finally, I have been wondering about pairing a mining pool with a bingo-like gambling element, where customers could bet on when the pool will next find a block (for the combined effect of extra revenue and helping to insure the pool operator against not finding a block for a prolonged time). Note that both the payment insurance and the gambling idea is likely to raise legal issues and may be expensive to start in a law-abiding way due to legal/licensing overhead.

Whether running a pool is worth it to you depends on the value you attach to all of that. To help you make an estimate, consider that with your hashrate of 18 TH/s you'd contribute 0.15% of the total hashrate today (and less tomorrow), see e.g. the stats page bitcoincharts.com/bitcoin. That means you need to wait, on average, about 670 blocks or approximately five days until you find a block, with actual values fluctuating wildly according to the Poisson distribution, provided none of your miners maliciously cheats and withholds blocks found. Hence you will either need tremendous tolerance about actual block rewards and payouts possibly diverging purely by chance, or more hash power. Or a vain or altruistic outlook on this project, or a side business associated with running the mining pool.


signrawtransaction signs all inputs your wallet can sign. As multiple inputs in a transaction can exist, it might be possible that not all inputs are signed.

The signrawtransaction command returns whether the transaction is fully signed or not: https://github.com/bitcoin/bitcoin/blob/0.13/src/rpc/rawtransaction.cpp#L616
If it is fully signed, the output is not malleable.

The output is not unique as is discussed in the comments below.


Litecoin daemon is not responding to API calls

First add this line to litecoin.conf

rpcallowip=127.0.0.1

Then make sure you've added the litecoin command to your path

sudo cp litecoind /usr/bin/litecoind

and that your starting the litecoin daemon

litecoind -daemon

and test with

litecoind getinfo

if all that works then JSON RPC should work fine.

If none of that works try setting up the client by following this guide.

Also make sure your username and password are consistent across your PHP and litecoin.conf because they aren't in your example.


Getting "Can't run the JVM" when starting Ardor on Windows 10

If you edit the run.bat file you'll notice the last line that begins with start

I copied that line and made the java.exe paths absolute instead of relative and pasted this line into the command line window:

  "C:\Program Files\Java\jre1.8.0_191\bin\java.exe" -cp classes;lib*;conf;addons\classes;addons\lib* -Dnxt.runtime.mode=desktop nxt.Nxt

If Ardor starts, that just means your java paths are not working properly in windows.


How does IBLT_diff reveal the transactions that needs to be retrieved?

Then full node requests the transactions missing from the miner. Is this correct?

No. All transactions (including the missing ones) are already encoded into the IBLT (that the miner sent).

It's a little like a Sudoku puzzle. The miner sends you an empty sudoku with only the totals filled in. You throw in the transactions that you already know. And then you can work out all the remaining empty spots on your own.

And the main benefit is exactly to prevent having to ask the miner anything, because that adds round-trips around the internet and thus latency.

  not using the full transaction hash

Probably because the hashes are large and the chance of a hash collision is not very high and not really a problem if it happens once a year (that's a number I just made up). So to save some space and/or make the calculations faster.

  and then it says that in order to prevent brute forcing it adds a salt to it.

That's so an attacker can not generate 2 transactions on purpose that cause such a (trimmed) hash collision. If an attacker could do that, you would be unable to solve the Sudoku and you would be forced to get the transactions or block in a different manner (adding round trips and latency).

Note that there are other situations that would cause you to get stuck with an unsolved Sudoku. For example if you have just restarted your node, your mempool would be near empty so you don't have any transactions to start with.

Note that Rusty Russel also made a few blog posts on IBLT, those are more recent than Gavin's and might give you another perspective.


Ich habe bitcoin-qt auf neuen Computer installiert und komplette blockchain runtergeladen. Wie verbinde oder oeffne ich meine alte Wallet?

Close bitcoin-qt
Copy your old wallet.dat file into the directory that contains the wallet.
If you installed with standard path, it will be:
c:\users\yourpcusername\AppData\Roaming\Bitcoin\wallets
just rename or delete the old wallet.dat file.
Restart bitcoin-qt. It will now rescan, this will take a few hours.


I need to buy a gift card for PlayStation using bitcoins or altcoins

https://www.bitrefill.com/ is an option, looks like they offer gift cards for the PlayStation store.


There's a boolean parameter to that RPC call that'll return it as a hex string representing the binary contents of the block.

  If verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'

getblock 'hash' 0 should return what you want.


You only know the balance of the channels you have open with your peers. And because the payments to you can be routed through other people's channels, you cannot simply get the information about the sender's balance or other sensitive information.


But what if you really needed to pay someone a fraction of a transaction fee? Bitcoin is indiscriminatory in that regard.

Moreover, most transactions have two outputs, one crediting whoever you send your transaction to, and one crediting you back. It is quite easy to send the same small amount transactions to someone while still appearing to be sending a large amount of money in total (the remainder would be sent back to you).

Anyone can enforce arbitrarily low or high transaction fees and modify their software to exclude any and all transactions they don't like (for example, I have heard Luke-Jr's pool does not process SatoshiDice's transaction at all). In the end, it is the will of the people and the miners that will determine the correct fees and rules, not some fixed mandate.


Why would increasing the Bitcoin block size lead to a more centralised system?

The problem arises from the uneven propagation of information in the network. While the propagation of small blocks is fast, i.e., every miner gets to know a new block approximately at the same time, this is no longer true for large blocks.

Large blocks take a lot of time to be forwarded to every node in the network, since this includes miners, these miners are unaware that there is a new block and they'll continue mining on top of the old parent, i.e., they will work on a competitor of the newly found block. This means that they are actively wasting their computational resources on an obsolete solution if the propagating block gets accepted into the blockchain.

Big miners are likely to have a better connectivity with the Bitcoin network, resulting in them losing less of their computational time due. This in turn puts small miners at a disadvantage since they are now less competitive.

The extreme case would be one strong miner, with close to a majority of the computational resources making such big blocks that everybody else learns about its blocks very late, while it already has spent considerable time finding the followup block.

The uneven propagation is due to both network latencies and verification times of the block that is being propagated, so this is a compound problem from both slow verifiers and high latency/low bandwidth.

For more detail see Information Propagation in the Bitcoin Network (disclosure: I am the author of that paper) and Majority is not Enough: Bitcoin Mining is Vulnerable.


When is there a charge for sending/recieving BitCoins and other CryptoCurrencies

If you move the bitcoins now, the bitcoin cash will stay where it is. There are now two separate chains, one for bitcoin and one for bitcoin cash. There is no reason to move the bitcoins. You need to move the bitcoin cash.

To do that you need two things:

1) Some tool that can compose and submit a bitcoin cash transaction.

2) The private key for the account(s) the bitcoin cash are stored in.


How do private keys in Bitcoin-Qt's encrypted wallet differ from BIP38 private keys?

BIP38 provides a standard to create encrypted paperwallets (or physical coins in the case of Mike Caldwell). Bitcoin Core is wallet software which stores its most sensitive information in an encrypted format to protect against theft.

When you export a private key from Bitcoin Core, you're essentially doing the same as when you decrypt a BIP38 paperwallet: You're making the actual private key available in plain text. Obviously, the actual private key can be used to make a payment with associated balances.


How can I find out how much bitcoin is in existence with PHP?

Take a look at this, its the blockchain.info api. it gives a json feed for many things.


json-rpc of bitcoin not working for testnet(curl command)

You're passing invalid transaction to the gettransaction method.


How to get the generator G point for any new curve?

You can't just change N. N is the number of elements in the finite group. You can pick a new (prime) P close to 2^256 (or however many bits you want) and get a resulting N.

1) G is a point in the group that when added to itself produces another point in the group. Hence it can generate all other points with repeated additions (generator). If the number of elements in the group is prime then every point has this property and can be used as a generator (via Lagrange's Theorem).

2) Just use the curve equation. y^2 = x^3 + 7 => y = modsqrt(x^3 + 7) (everything is mod P)


Why miners solve a puzzle in proof of work

No, the time spent creating a block is tiny and even a simple cell phone could make it in a few microseconds, if we leave aside the puzzle-solving time.

The purpose of mining is not to find who has the most computational power, but to make those miners with lots of computational power to 'waste' electricity. I say 'waste' but it's not actually wasted because mining itself is important. I mean in the sense that, to create an artificially scarce resource - bitcoin - mining was designed to take advantage of naturally scarce resources: electricity and computer time.


Are the outputs of an unconfirmed transaction part of the global UTXO pool?

The transactions are considered spent from the nodes that already have the transaction in the mempool, that is, if you try to double-spend the transaction, they will reject the new one. However, if the transaction ends up not being included in a block, they will be dropped from the mempool after a certain time. After that, you will be able to create a new transaction that spends the same UTXOs, since from that point on it won't be considered double-spending.


How can one use multi signature transactions/addresses to improve the security of their services?

Well, the theory is that you have a buyer, a seller, and an escrow holder. This is for transactions like Bitmit or OTC or Silk Road where the buyer and the seller do not trust one another enough to reliably complete the transaction. If you run the website and offer the goods, then you'd either need to just build a good enough rep that you don't need to offer escrow, or find a third party escrow provider to keep you honest. Once M-of-N gains traction in the client software, I could foresee business sprouting up just to handle Escrow.

So buyer pays Escrow his fee first, then buyer, seller, and escrow build a 2-of-3 multisig address and buyer dumps his funds in. Goods are transacted, and if buyer and seller are both happy then they sign a transaction together releasing the multisig funds to seller. Escrow agent doesn't need to lift a finger when there's no dispute.
When there is a dispute, buyer and seller each craft and sign the transaction they think should happen (normally "I get all the dough", but more complicated spends are possible too) and submit those to Escrow agent along with their evidence as to how the transaction happened. Escrow judges between them and signs the transaction he thinks should succeed. 2/3 signatures makes the transaction valid.

As to "how will the client software actually work" and "what will the GUI look like", that's a fine question! It appears as though crafting the GUI is the final major obstacle towards this becoming a more widespread transaction type. :3

I've been posting on /r/bitcoin and chatting with Ferroh and others, trying to work out just how to do it the hard way at the command line. :P


You will have to build the transaction yourself instead of relying on wallet software. You can either create it all from scratch and use pushtx or use an online API that accepts explicit input references to previous outputs. For example (check the last paragraph):

http://dev.blockcypher.com/#transaction_skeleton


Calculate Segwit address from public address

Firstly, it is very dangerous to convert a public address to a different form and then use it, because the owner of that address will not be expecting payments on other forms, and could result in fund loss. Only use addresses which the recipient has asked you to use.

But there is a difference between a compressed public key and an address. Bitcoin addresses starting with 1 are base58 encoded keyhash with a checksum. To get the key hash which is the ripemd/sha256 hash of the public key, you must decode the base58 and ensure the checksum is correct. Then you simply use the keyhash in the redeem script, you don't need to perform any more hashing on it to form the P2WPKH script. Notice that there is no way to know if an address starting with a 1 used a compressed or uncompressed public key before it's spent, so if you tried to convert one which had an uncompressed key, it would be unspendable, very dangerous as I said earlier.

See here for more details: https://bitcoincore.org/en/segwit_wallet_dev/#creation-of-p2sh-p2wpkh-address


I can not find a clear mathematical proof method with details and example for "near to zero chance of generating the same pair key wallet"

According to https://en.bitcoin.it/wiki/Private_key

any 256-bit number from 0x1 to 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140 is a valid private key.

So if someone generates a private key using the usual random process, and then you generate a private key using a random process there is one chance in 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140 that you will generate the same key.
If my workings are correct, that is one chance in 115792089237316195423570985008687907852837564279074904382605163141518161494336
or one chance in around 1.158 x 1077
In terms of a probability, this is fairly close to zero. It is around
0.00000000000000000000000000000000000000000000000000000000000000000000000000000864

It is hard to grasp the scale of these numbers. According to https://www.universetoday.com/36302/atoms-in-the-universe/

it is estimated that the there are between 1078 to 1082 atoms in the known, observable universe

Related questions that might be informative

Is each Bitcoin address unique?
How long would it take to brute force an AES-128 key? (Bitcoin doesn't use AES but the answers give some idea of the scales involved)


The error messages you see are exactly what you get if you just start bitcoind without any proper configuration.

Did you make sure

you started your bitcoind with the -server flag at all? Only that will prepare your bitcoin node to allow connections from external workers such as bfgminer.
you waited for it to sync with the network? That can take up to some
hours


Why is downloading blocks taking longer and longer?

Very little of the time is spent downloading the blockchain data compared to how much time your computer is spending verifying each transaction.  Bitcoin does a ton of disk i/o for this.

As there are more transactions since April (thanks to SatoshiDICE, we now see 40K and more transactions a day) those blocks take longer to verify.

If you are on an encrypted filesystem, that will really be hurtful for perfomance.  If so, consider moving the blockchain and index to a filesystem that isn't encrypted and then symlink to them there.

Also, the latest release of the Bitcoin.org client (v0.6.3) has peformance improvements in this area over previous releases.

End uses generally will not need to run the client and instead use SPV (Simplified Payment Verification).  So individuals and organizations that do want to run the full client should recognize that to do so requires a beefy CPU and quick storage (SSD maybe even).

A future version (after 0.7) will include LevelDB which should make huge gains as far as performance.

In the meantime, you can always securely download a full set of blockchain data from   Sourceforge that is as-of a fairly recent point in time.


Short answer: yes, it will be anonymous

Long answer:

The following applies to all Cryptonote based coins, unless stated otherwise:

On the blockchain, all addresses are one time addresses. In Bitcoin, you are exhorted to not reuse addresses, but Monero enforces this. Every new transaction causes a new one time address to be generated, in such a way that the recipient can derive the private keys to that new one time address (and thus spend those funds).

Moreover, Monero uses ring signatures to obscure which outputs are being spent. Those ring signatures are made with 1 private key (the one you're spending) and an arbitrary of public keys, those of outputs that you cannot spend. The transaction you send will appear to spend one of that set. The trick is that you can generate signatures such that an observer (ie, someone finding the tx on the blockchain) can be assured that one of the outputs in that tx was spent with the corresponding private key, but cannot tell which one. On the blockchain, they only see the public keys of your spent output, and the N other public keys you picked from the blockchain.

So, to recap: an observer sees that an output among this set of outputs was spent, but does not know which one. And sees that it went to that new one time address, which has no link to the recipient's address (unless the observer has the recipient's view private key, nice trick to allow a third party read only access to your income).

Now, the devil's in the details. There are other ways inferences could be made, such as particular amounts being spent (ie, if you're sent a very specific amount of dust, it's the only output of that particular amount on the blockchain). The Cryptonote protocol splits amounts by denominations (ie, sending 153 monero will, create three outouts, 100 monero, 50 monero, and 3 monero, so it's a lot easier to hide). Monero is currently working on an adaptation of gmaxwell's Confidential transactions (https://lab.getmonero.org/pubs/MRL-0005.pdf), which can be used with ring signatures, so that this avenue will be fully blocked (this is Monero only, other Cryptonote coins do not have this).

So, yes, if you use Monero, your transactions will be private. Cryptonote is the state of the art in blockchain privacy, though Zerocash may top it once it is released, though Zerocash also has issues of its own, so this will be an interesting thing to see.

By the way, all the papers on https://lab.getmonero.org/ are worth reading if you want to know more about the details.


Choosing between blocks with chain same work- why pick the first received?

Consensus rule dictates that chain work is measured based on the production of a solution which satisfy the difficulty set by consensus. So as long as a produced block satisfy said rule, said produced block would be accepted.

It is technically infeasible to choose base on blocks with more transaction for a variety of reason. First, bitcoin lacks strong consistency (i.e. its impossible for nodes to share a consistent state for its mempools), if block acceptance requires that a block based on the highest number of transaction is accepted, then the blockchain will most likely be orphaned many times as miners compete to produce competing block tips and nodes would discard block tips literally each time a new block with more transactions is received. This results in more partitioning in the network, which leads to a poorer security as less work is focussed on any particular branch of the chain.


When was the first non-coinbase transaction?

The first non-coinbase transaction in the chain is in block 170.  Not sure what you would consider a 'real' versus a 'test' transaction, but given that there is an entirely separate blockchain for test transactions I'd consider it as real as any other.


So exactly what is the value of a Bitcoin in relation to the American dollar?

One Bitcoin is actually 10 000 000 units in a transaction record, meaning that a Bitcoin is divisible down to eight decimal places. 1 unit is called a satoshi, named for the creator of Bitcoin.

Most world currencies don't go below two decimal places in daily usage, and only in financial systems do they go below four decimal places.

When someone says "There's only 21 million Bitcoin!", they are unaware that while there is 21,000,000 BTC ever in the whole system, there are actually 2,100,000,000,000,000 units in the whole system. That's 2.1 quadrillion units. In the unlikely event that, several decades or centuries down the line, there is a shortage causing significant flow problems, it is possible to further increase divisibility.


Open the standard client
Go to "Receive coins" tab
You will have a list of addresses you can use

If you want to create a new address, just click "New Address..." on the bottom of the window.


Do all block explorers show all unconfirmed transactions?

There is no guarantee that a transaction propagates through the network at all.

Blockexplorers can only show transactions that they see. They're often configured in a way that will make them be more likely to see transactions, however.


Is there a service where you can generate public/private keys without anyone knowing? Like a tamperproof digital envelope

From what you describe, I'm guessing that what you are looking for is something like Casascius coins. These display the public key but conceal the private key behind a tamper evident holographic sticker. This means that when you pass a physical coin to someone, they know that you don't have the private key, so they are the sole owner of the bitcoins at that address.

If this is what you are looking for, there are a few problems to bear in mind:

The manufacturer of the coins puts the private key behind the sticker, so you are trusting that they did not also keep a record of the private key.
You are trusting in the effectiveness of the tamper evident sticker.
Since November 2013, Casascius no longer sells these coins, although there are many in existence sold before that point.

The first point can be solved by using 2 factor authentication, so that the string that the manufacturer hides behind the sticker is useless without a password that is never shared with the manufacturer.

So what you require is possible, although sidestepping the blockchain does introduce trust in the tamper evident nature of whatever method you use to conceal the private key. If the value stored by this method is sufficiently small per item to make the level of trust acceptable, then this may not be a problem.

Tamper evident method without the physical form

If you are looking to use this approach without the physical form, then I can't see a way of keeping ownership to just a single person without either a decentralised system that is effectively a parallel version of the block chain, or a centralised system where you have to place trust in those running it.

The solution to this problem of trust is the block chain - the public distributed ledger. If you want to avoid using the block chain, then you are going to have to live with the trust problem unless you can invent something new.

Anonymity

If the underlying reason for asking this question is that you want to conduct transactions anonymously, there are a variety of ways of doing this which you can learn about by browsing the anonymity tag.


just look at the Page where its written Sir

https://bitcoin.org/en/full-node#special-cases

2 Gigabyte RAM you must have,  otherwise fail you will ;)

And what i forgot to say, it is not the length of the Blockchain, it is the mass on Data for Transactions, forwarding money, Blocks and so, Mempool simple.


Does getblockcount return the correct block count when running in prune mode?

Yes, it will match. getblockcount is the number of blocks that you have already synced to, regardless of pruning.


Prior to BIP32, most wallets simply generated keys from random data provided by the operating system (or some other entropy source).

A handful of wallets implemented a brainwallet system, in which keys were derived from some kind of password, but they quickly fell out of use after it was discovered that most people selected easily guessable passwords which resulted in excessive loss of funds to theft.


Confirmation time is effected by two things: the time to find a block, and the transaction fee paid by a transaction.

Since a confirmation means that a transaction has been included in a block, one factor in the time for a transaction to confirm is the amount of time it takes to find a block. This is, on average, 10 minutes. However the time between blocks is not always 10 minutes, it can vary quite a lot, typically from a few seconds to 2 hours. This means that if miners just happen to be really unlucky for a certain block, then the confirmation time for a transaction could be very long.

The other limiting factor is the transaction fee. For a transaction to be confirmed, a miner must select it for inclusion in their block. The selection is based by transaction fee (specifically the fee rate). Transactions that pay a higher fee rate will be selected first. If there happens to be a lot of unconfirmed transactions, transactions with lower fee rates will take longer to confirm as they have to wait for the transactions that pay higher fee rates to be confirmed first. This will also effect confirmation times.


The Bitcoin network was launched in early 2009.

To recover your coins, you'll need to find the wallet file that contains your private keys. You'll need to remember how you stored your Bitcoin, did you have a run wallet on a personal computer? etc. Remembering the answer to that question is probably your only hope of recovering your Bitcoin.

Without any additional info, I don't think there is any way that anyone here can help you further than that.


Bitcoin Core 0.17 sethdseed then dumpwallet how to recompute extended private masterkey?

Bitcoin Core uses the method described in BIP 32 to generate the master private key from a seed. The seed here is WIF private key. To get the master private key from the seed, you will need to decode the WIF private key to get the byte sequence that it represents. Then you can hash it as described in BIP 32 and encode it to get the master private key.

You can use bx to do this:

bx wif-to-ec <WIF key> | bx hd-new


First of all, I would recommend that your users are informed that you will be doing CPU mining in the background while they browse your site, and that they agree to let you do this.

Secondly, you should not be CPU mining Bitcoin or any altcoin for which GPU mining or ASIC mining exists. CPU mining is much more inefficient than GPU miners or ASIC miners so you both won't earn much even with thousands of users, and potentially cause irreparable damage to your users' computers.

The best way to find the optimal percentage is to try it out yourself. Write your website software and other software and test it locally on your computer. Adjust it so that the parameters are what you are comfortable with. Keep in mind that the computer's cooling solution will need to work harder and the additional fan noise may not be acceptable to everyone. Once you find something that you are comfortable with (i.e. slowdown in other tasks is acceptable, CPU fan noise is acceptable, etc.), undercut that percentage by a bit.


When I try to download Bitcoin Core on MacOS it says "Apple cannot check it for malicious software"? Is it safe to download?

As mentioned by Andrew, this is due to macOS' enforcement of notarization requirements.
This can be bypassed by right clicking on the application, then selecting Open - A dialog will popup warning you that it is not verified, but this one will have an Open button.
Once you open the application through the above process once, a regular double click will work on it in the future.
You may need to go through this process again if you update to a newer version of Bitcoin Core.


Non standard transaction value negative, empty sigScript, empty Pubkeyscript?

Tx1 output value is negative

Definitely not.

  Tx2 sigScript is empty

Yes, so long as the script evaluates to true.

  Tx3 Pubkey Script is Empty

Yes, the scriptPubKey is not validated.

Tx2 and Tx3 will both be spendable by anybody in the network, other users will attempt to spend it instantly and miners will attempt to finney attack it out from under you even if you make the first spend with a high fee.


How does the Litecoin difficulty get calculated?

Litecoin is a fork of Bitcoin Core, and uses the same difficulty adjustment period (2016 blocks), which on Litecoin is 3.5 days because the block time is 2.5 minutes instead of 10.  See chainparams.cppL#85:

consensus.nPowTargetTimespan = 3.5 * 24 * 60 * 60; // 3.5 days
consensus.nPowTargetSpacing = 2.5 * 60;


Why not every [x,y] coordinate on the Secp256k1 curve corresponds to a valid uncompressed publicKey?

Both are valid public keys just that in the first case the uncompressed public key is not represented in a valid hexadecimal format. If you look closely, your Qy has 63 hexadecimal digits (so there is a 'half-byte'). Although hashing can be done in bit boundaries, most standard implementations out there do not support it.  Just try to concatenate '0' at the start of the Qy to get Qy = 0691AA44502212591132AA6F27582B78F9976998DE355C4EE5960DB05AC0A2A3 so that you get a full byte. So now your uncompressed public key is 04B8F0170E293FCC9291BEE2665E9CA9B25D3B11810ED68D9EA0CB440D7064E4DA0691AA44502212591132AA6F27582B78F9976998DE355C4EE5960DB05AC0A2A3, which would hash to P2PKH address: 17Y1XJiC72f2kyJnzwBdkaPQEGgaD1aroR


Bitmain AntMiner U1 1.6GH/s - USB Bitcoin ASIC Miner

You can't mine Litecoin with a Bitcoin miner. Bitcoin uses sha256 hashing, Litecoin uses Scrypt, which is about 1000x slower even when implemented in an ASIC, which is why you are calculating ridiculous profit numbers.


Wallet's dollar value of transaction is WILDLY off my actual dollar payment

I was using Safepal Wallet and moved my funds to Trust Wallet

The outcome might be affected by the method you used to move the funds. Generally there are three methods for non-custodial wallets - using a recovery phrase, importing keys and sweeping.
I can imagine that sweeping funds might mean that the wallet records the sweep transaction as the transaction in which you acquired those funds. Any dollar value  might refer to an exchange rate at date of sweeping rather than at the date the previous wallet received the funds. This is speculation though.
It is also possible that the wallet uses todays exchange rate to show you the dollar value of the amount of Bitcoin in any transaction regardless of transaction date. This would be a problem created by the wallet's developers (and target audience) treating Bitcoin as a dollar payment system rather than a separate currency. In other words, selecting USD instead of BTC as the display units might be intended to give you an easily understood idea of current purchasing power, not of exact amounts of dollars exchanged (the dollar payment would be external to the Bitcoin network itself and not part of the Bitcoin transaction - which is only ever half of the real-world transaction)

the hash/[txid] links to a transaction where I received 5 BTC for around $250,000, but the original and true amount was around $30.

The Bitcoin blockchain and Bitcoin network carries no information about dollar exchange rates or about any other currency, goods or services being exchanged, purchased or sold in any transaction. You can't use blockchain records as receipts and not as tax-receipts. You probably shouldn't rely on your Bitcoin wallet to tell you anything about dollar values for IRS tax purposes unless the wallet was explicitly designed for that purpose and its developers warrants fitness for that specific purpose.


Is this true?

Yes, it is true. In very very simpler terms, think this to be in a way wherein someone sends you a coin worth that amount. In other words, if someone sends you 10 BTC, they are sending you a coin that is worth 10BTC, while when they send you 5 BTC, they send you a coin worth 5 BTC. So, while you are spending that money, you have to spend the entire coin. This is exactly the concept with UTXO. When you need to send some bitoins, you have to consume the entire UTXO amount and send the difference back to yourself through a change address.

  How does lightning work with microtransactions then?

Lightning transaction works in the same way. When forwarding a HTLC you subtract the amount from your own balance and lock that in the HTLC. Eg. Alice and Bob have a channel. in the present state, the commitment transactions of the channel consumes their channel funding transaction and outputs to (1) Alice_pub_key and (2) Bob_pub_key. Say Alice wants to send X satoshis to Dave. Alice creates a commitment transaction with Bob that consumes the entire bitcoins from the funding transactions of Alice and Bob's channel, and outputs to (1) X satoshi to htlc; (2) Alice's balance - X satoshi (3) Bob's balance.

Similarly when Bob forwards to Charlie, he will be deducting X satoshi from his balance in his commitment transaction with Charlie. Same with Charlie and Dave. When Dave provides the preimage, he will claim the amount in HTLC output in the commitment transaction with Charlie. Charlie will then claim that amount from his commitment transaction with Bob and Bob will claim the amount from the htlc output in the commitment transaction with Alice.


Any advantages in terms of our location & East-West timing differences for self mining on a 100 th/s btc rig

What you read is not accurate.  There is no significant difference in mining performance depending on your location.

First of all, as far as I know, the vast majority of miners run their equipment 24 hours a day (since leaving them idle just wastes the investment in hardware), so time zone differences are irrelevant.

Also, to first order, your chances of mining a Bitcoin block depend only on your hash rate and the network difficulty; it makes no difference what other miners are doing at that moment.  So even if the rest of the world quit mining completely for several hours, it wouldn't help you at all.

Of course, the network difficulty is determined indirectly by how much mining is being done around the world, but the difficulty is adjusted only once every 14 days or so (2016 blocks), so variations over the course of a day would average out.

There is actually a very slight disadvantage in being in a part of the world that has relatively few miners.  Suppose, for example, that most miners are in New York and a few are in Bombay.  If New York-based Miner A finds a block (say at height 12345) and announces it on the network, New York miners will know about it quickly, while it will take a few tens or hundreds of milliseconds to propagate across the Internet to Bombay.  During this short time, Bombay miners are at a disadvantage.  If Miner B in New York and Miner C in Bombay both find blocks during this window, B's will be linked back to A's block, whereas C's will be linked to the block before A's.  Thus B's block is part of the longer chain and will be accepted by the network, while C's will be orphaned.     But since this window would be less than a second for each block, which happens roughly every 10 minutes (600 seconds) on average, the disadavantage is at most a couple tenths of a percent.

The most important way that your location would impact your mining profitability is your local cost for electricity.


SegWit introduced versioned witness programs. When satisfying a script to spend coins you need to provide a redeem script consisting of a version byte and a witness program. The version introduced with SegWit was version 0 (zero).
The Taproot proposal uses this SegWit versioning system by introducing spending rules for version 1. The witness program to satisfy a Taproot spend will be version 1.
The Taproot proposal also introduces a new versioning system in addition to SegWit versions called leaf versions. Each leaf of a Taproot tree will have its own leaf version. This is a version for spending rules from that particular leaf. The leaf version introduced with the Taproot proposal is version 0.
So in answer to your question there is just one leaf version with the Taproot proposal and a new SegWit version (to make two SegWit versions in total). The versions are there for future upgrades and as a user you do not need to upgrade anything like you might say upgrade the "version" of your Bitcoin Core software.
Remember that Taproot is still a proposal at this stage (July 2020) and so at the current time SegWit version 1 and leaf versions are not relevant to any transactions you might make on the Bitcoin network.
[darosior edit: There are 41 possible leaf versions (including version zero) for future upgrades as outlined in BIP-Taproot]


Is there a CUDA binary to convert a brainwallet string to a BTC address?

Brain wallets are now understood to be a very insecure way to store BTC.
The software which was the sort of final 'nail in the coffin' for the (lack of ) security of brainwallets can be found here: Brain Flayer.
Its not CUDA software, but may be relevant to you anyways.


mysql instead of leveldb for bitcoin core

There is no code for that, and it would be either very slow or nearly useless.

Bitcoin Core assumes it has exclusive access to the -database, and caches data very aggresively. It may take hours before actual data from the chain is on disk.

The data structures are very compact and specifically designed for efficient use in Bitcoin Core. This means only unspent transaction outputs and block/transaction disk location are written to the database, in a custom byte-level format. You'd have to write your own parsers for these. In the 0.12 release most of this data will be scrambled by default even, to thwart overly aggressive virus scanners that detect virus patterns inside the database.

In short, that's not what the database is intended for. If you want something to index the blockchain or query the UTXO set, there exist other projects that build databases specifically designed for that.


What is the difference between wallet balance, local balance and remote balance in the Lighting Network?

In each of your channels, you have a local balance. This is the balance that is yours in that channel. The counterparty of the channel has the remote balance. All lightning transactions change these balances with each one resulting in their sum being the same and matching the channel capacity. As all transactions in that channel just end up changing the balances, routing fees paid to you go into your local balance.
Your wallet balance is the total amount of funds that you control that are not in a channel. It's the sum of the UTXOs that you control.


According to our good friend Wikipedia (my emphasis):

  Intellectual property (IP) is a term referring to a number of distinct
  types of creations of the mind for which a set of exclusive rights are
  recognized—and the corresponding fields of law.1 Under intellectual
  property law, owners are granted certain exclusive rights to a variety
  of intangible assets, such as musical, literary, and artistic works;
  discoveries and inventions; and words, phrases, symbols, and designs.
  Common types of intellectual property rights include copyrights,
  trademarks, patents, industrial design rights and trade secrets in
  some jurisdictions.

So to attack Bitcoin you'd need to produce evidence that someone else got there first, or that Bitcoin is mis-using an existing technology beyond it's remit (breaking terms of a license for example).

This would be hard given the unique nature of Bitcoin, the open source license it was released under (MIT - a very permissive license) and the well-established cryptographic protocols and algorithms it uses (SHA-256, RIPEMD-160, elliptic curve DSA) all of which are taken from worldwide standards (think IEEE, ISO, FIPS etc).

However, I am not a lawyer, and the law varies across the world. It may be possible through some convoluted mechanism to attack it and lay claim to a patent of some kind, but it would take obvious collusion on behalf of the respective court of law to ratify it which may serve to discredit the attacker.


You should always be aware of scam/hacks/thefts. Millions of dollars is stolen from 'regular' netbanks every year, so this is not really a "bitcoin-only" problem.

Bitcoin is based on crypto, so use this to protect your wallet. You can secure bitcoins way better than any other currency, but if your storing large amount of bitcoins in a unencryptet 'hot' wallet on a unsecure server, then your begging some hackers to steal your bitcoins.

You can find a lot of tips about securing your wallet here: https://en.bitcoin.it/wiki/Securing_your_wallet

But heres also some simple tips:

Encrypt your wallet (the build-in encryption is (almost) unbreakable as long as you choose a strong passphrases)
Never store all your bitcoins in a 'hot wallet' (unless your going to spend them all at once)
Make sure to take backups, and store them securely offline! (bitcoin-qt has a build-in key pool).
And make sure to keep your computer clean for malware


How did you try to sign your transaction? There are no signatures in your transaction, so the OP_CHECKMULTISIG is failing.

Because you are using a custom script, signing software are unlikely to be able to sign your transaction because they can only sign for standard templates. You are not using a standard script template (because of the OP_3 OP_EQUAL) so no signatures are being created. To sign this transaction, you will need to produce the signatures manually (by computing the correct sighash and signing it) and insert them into the transaction manually.


Double check to make sure you didn't send your coins to the address of another coin. Sending BTC to BCH (BCC) is a very common mistake.
If you sent the coins to the wrong address, you'll need to contact the exchange and ask them to import that private key into your BTC wallet. Whether or not they will comply depends on the exchange.


What does "generate" mean when it appears as a transaction's type?

"Generate" transactions are coinbase transactions. These are a special type of transaction that is included in a block by a miner. They can not exist outside of a block. They generate new coins to an address configured by the miner. Those coins can not be spent until they have 100 confirmations. The reason for this is to prevent a messy scenario in which a block becomes disconnected or is no longer in the most-work valid chain, meaning the newly generated coins do not exist on the ledger any more.


Where exactly is the "off-by-one" difficulty bug?

From Litecoin wiki:

  Time warp bug[14]: the Bitcoin difficulty calculation is off by one block, so an attacker can repeatedly try to generate the last block of each retarget window, and use a fabricated timestamp of 2 hours into the future in order to make the time difference from the first block in the retarget window high, thus lowering the difficulty by 0.5%. Because of the bug, the bogus timestamp isn't used as the first block in the next retarget window, and therefore the 2 extra hours aren't being compensated for in the next difficulty calculation. Once the difficulty is low, the attacker can mine many fast coins, or in the case of a small chain, an attacker with 51% hash power could reduce the difficulty to 1 and mine a new fork from the genesis block. This isn't a feasible attack on Bitcoin, because the probability of repeatedly generating the last block once every 2 weeks at such high difficulties is negligible. Although fixing this issue in Bitcoin is possible, it should be done carefully (by adding rules that encourage nodes to upgrade over time) so to avoid a chain fork, i.e. old clients who didn't upgrade might operate with another difficulty and therefore disagree regarding which blocks are valid. In Litecoin this bug is fixed

The "off-by-one" or Time Warp Bug is caused because the difficulty calculation algorithm is not using overlapping periods, for the first recalc it uses blocks 1 up to 2016 and for the second it uses blocks 2017 up to 4032.

This alone is not a problem at all, but as the protocol has some allowance for time differences between the nodes this makes possible to lower the difficulty forging blocks with resolution time in the future.

The algorithm uses T(2016) - T(1) to calculate the speed of the network if block 2016 is created with a timestamp 2 hours in the future (max allowed by the protocol) then the difficulty will be a 0.5% lower of what it should be.

If then block 2017 is found and the time is real (T(2017) can be less than T(2016)) then the extra time added to block 2016 will not be compensated in the next recalculation as it would be if for block 2 used T(4032) - T(2016) to find the speed.

A more detailed attack scheme can be found at: https://bitcointalk.org/index.php?topic=43692.msg521772#msg521772


Authentication and key distribution in bitcoin

There is no "authentication" in bitcoin protocol. It is not encrypted also.

You can use wireshark to investigate handshake packets


Effect of price increase on usage of Bitcoin

Both inflation and deflation are bad for currencies, because they cause people to make decisions that don't really make sense.
Let me give you two examples. I sell toasters for bitcoin; you have bitcoin.

Inflation: You know that the price of toasters in bitcoins is going to go up, so you start buying toasters in bulk. You didn't really want all of these toasters, but at least your money isn't going to go down in value.
Looked at from your perspective, what you did makes complete sense; From a societal perspective though, nothing was gained through this transaction.

Deflation: You really want a toaster, but you know the value of bitcoin is going to double next week, so you hang on to your money. This sucks, because microwaving your bread just isn't the same.
Again, from your perspective, what you did makes complete sense. But from a societal perspective, it doesn't.

And that's how inflation and deflation - or even the threat of it - can damage an economy.


"so in this case he may have a deal with trader1 and partial deal
  with trader2."

This happens all the time in the markets. Majority of the people don't really notice this happen because the size of the trades are small enough relative to the liquidity of the market and get they get complete fills.

If you tried selling a huge amount, lets say, 1000000 XRP at a particular BTC price, you're likely not going to get a complete fill right away.

Another way to get a 100% fill is when some other trader places a market order bigger than the size of your limit order. In that case, the exchange will "eat through" your limit order and move on to the next best available order in the orderbook. Or may be there are multiple market orders that can be filled against your limit order, so your limit order gets filled as more and more market orders come through.

There's a lot to read about similar topics, search for order matching algorithms: https://stackoverflow.com/questions/13112062/which-are-the-order-matching-algorithms-most-commonly-used-by-electronic-financi


How to use bitcoin from command line in Windows?

If it's QT:
go to "Help" -> "Debug Window" -> "console"
type rpc command here

Or go from the commandline to the folder your bitcoin daemon is in and run a command from the bitcoin exe. NOTE: you may need to add server=1 to your bitcoin.conf in %APPDATA%


We don't have federated servers right now but we do utilize open source, publicly accessible libbitcoin nodes which both Airbitz and 3rd parties host. This is a fully compatible replacement to bitcoind nodes but provides much faster blockchain queries, similar to Electrum servers. If you'd like to run one, we'll include it in the list of servers that our clients could access.

Our Git encrypted storage "sync" servers are also peer-to-peer but currently only we host them.


What happens when a hardware wallet, like Trezor, suffers a hardware damage?

For Trezor specifically, just check their website for details.

Essentially, you need to have:

a new or wiped Trezor wallet.
your Trezor recovery card, filled out correctly.
a computer with the Trezor bridge software installed.

You plug the new Trezor into the computer, open the Bridge software, and and follow the "Trezor Recovery" instructions.  It will ask you to enter the seed recovery words from the your recovery card, which will recreate the wallet on your new Trezor device.

Other hardware wallets might have a slightly different approach; check with the prospective vendor about how to perform recovery on their device, then choose the device which suits your needs.

FYI, the recovery seed words are typically going to be compatible with any Hierarchical Deterministic (HD) wallet recovery process.  This means you could in fact recover your wallet into any HD-compatible software wallet. Pretty clearly, this means anyone with access to those seed words can recreate your wallet and steal all your funds.  Guard those recovery words with your life.


Is MtGox Pubnub API and Websocket API the same thing?

MtGox PubNub API and Websockets API

The two endpoints you are describing are indeed two separate endpoints which you will use under certain conditions depending on what you are seeking.  The Public stream feeds and more can be accessed by issuing a .subscribe() PubNub SDK instance method call from the PubNub Class. For now the MtGox WS API is in deprecation and recommended that you upgrade using a standard MIT open source PubNub SDK which you can find your language here: http://www.pubnub.com/developers/

For receiving data via PubNub Real-Time Network you can use an SDK like JavaScript to receive real-time trade events.

Mt.Gox Data Feed Stream:

<script src="https://cdn.pubnub.com/pubnub.min.js"></script>
<script>(function(){

// INITIALIZE PUBNUB
var pubnub = PUBNUB.init({
    subscribe_key : 'sub-c-50d56e1e-2fd9-11e3-a041-02ee2ddab7fe'
});

// MULTIPLEX SUBSCRIBE TO TICKER FEED AND ALSO TRADES FEED
pubnub.subscribe({
    backfill : true,
    channel  : [
        'd5f06780-30a8-4a48-a2f8-7ed181b4a13f', // TICKER
        'dbf1dee9-4f2e-4a08-8cb7-748919a71b21'  // TRADE (BUY/SELL)
    ],
    message  : function(message) {
        // FIRE EVENT WHEN DATA ARRIVES
        console.log( message.channel_name, message );
    }
});

})();</script>


There are a few currently operating Bitcoin security exchanges with non-negligible volumes:

Cryptostocks
https://cryptostocks.com/

Opened at the end of June 2012. Run by the owners of Vircurex, a fairly popular alt-currency exchange.

Bitfunder
https://bitfunder.com/

Launched mid-December 2012. Run by the owners of Hashpower, a mining intermediary of sorts.

BTC Trading Corporation (BTC-TC)
https://btct.co/

Currently in beta. Launched in November 2012 by the owners of Litecoin Global (a Litecoin-based security exchange; not affiliated with or related to Bitcoin Global, the GLBSE parent company).

MPEx
http://mpex.co/

Opened in August 2011. By far the largest of these in terms of (claimed) combined asset market cap and trading volume, but not at all newbie-friendly. Run by Mircea Popescu.

The Bitcoin stock exchange scene collapsed into utter chaos after GLBSE shutdown unceremoniously. You'll find many assets listed on multiple exchanges, some assets still being transferred from GLBSE, and some former GLBSE assets currently not actively traded on any exchange.

Try, learn, and have fun, but caveat emptor (buyer beware). Read the contracts carefully; make sure you know exactly what you're buying. Research the asset issuer in detail, particularly their past history, before you purchase. Don't equate legal identification with trustworthiness. If you're unsure about anything, ask someone more experienced for their advice - most are glad to help. Last but not least, never under any circumstances invest more than you can afford to lose.


We ( https://wwww.bitlc.net ) primarily, and strongly recommend, use of port 80 mining. With 8080 and 8332 fallbacks, but only over IPv4...

The regular pool.bitlc.net:80 is fully accessible over both IPv4 and IPv6.
pool.bitlc.net:8080 and :8332 works to, both there is no reason to use them...


How do I read peers.dat file to get a list of all peers seen or that bitcoind has connected to?

The easiest way to get peer information is via the JSON RPC interface has a command getpeerinfo.  Each peer returns a JSON object containing peer IP address info, connection time, version and subversion of the client.

You would probably be interested in this: Bitcoind API

Edit: Although this is not a way to read the database I presume that the data feeding the peers.dat file is pulled from both the IRC channels and the DNS seeds.  If you reported data on those nodes, you could use this data in combination with logs from the debug file to perhaps learn how your node discovered its peers.


How it is possible to validate existing Pay to Public Key Hash transaction without public key?

A transaction which spends from a P2PKH output provides both the signature and public key in the input script. So the public key is part of the transaction data, just the spending transaction, not the output creating transaction.


How are txns sorted correctly in Merkle trees between nodes and validated via Proof of Work

But the merkle root must be different to each miner/node due to transaction order and the generation transaction,

Correct.

so how do other nodes come to consensus if their transactions are different.

They don't. Every miner is fully responsible for the choice of their own transactions. There is no need for different miners to agree on the transaction selection. The winning miner decides the contents of the winning block, and other go along with it, accepting their transaction selection (unless the included transactions are objectively invalid, which makes the block invalid - to miners and other nodes).

I imagine they would use the nonce provided by the block creator to hash their own copy of the block and see if it in within the target.

There are many block validity rules that are performed by all nodes, including the verification of proof-of-work, like you say. Other rules include verifying that all transactions are valid, that no theft occurred, that no double spending occurred, that no money is printed by the block (beyond the permitted subsidy), ...

Wouldnt the tree have to be hashed again

Yes.
There are a number of layers involved to updating a miner's candidate block. Each is much faster than the previous one, but done much more often:

Typically the mining software will occasionally (say, every few seconds) build a new block template to work on, which includes transaction selection.

An intermediate layer changes the coinbase transaction (which includes payout address, as well as an "extra nonce") every so often. Every time this happens the Merkle root changed. However, by caching the inner nodes of the Merkle tree that are just right of the leftmost branch in the tree, this is just O(log(n)) work in the number of transactions (e.g. a block with 2048 transactions only needs 11 hashing steps to recompute the Merkle root).

The lowest-level hardware layer cycles through the 232 nonces in the block header, all with the same Merkle root. This is extremely efficient.

and the PoW would have to start from the beginning.

Yes, but this is irrelevant. PoW doesn't have "progress". You don't lose anything by starting over, as long as you're still trying hashes all the time. Every candidate block you try (combination of tx selection, coinbase tx, nonce) has an independent chance of meeting the PoW target (a chance equal to 2256 / target). If that chance is 1/c, and you perform h hashes per day, you will find h/c block per day - regardless of which transactions those attempts are for.


Why are SIGHASH flags signed as 4 bytes when only 1 byte is included in the transaction?

I assume it is simply the result of lazyness.

In the original client source code (and still today), the sighash type is represented as an int. The serialization framework by default serializes ints as 4 little-endian bytes.

I assume Bitcoin's creator did not bother converting it to a single byte before serializing.

If there is any other reason, I'm afraid you'll need to ask him.


ZeroMQ support in Bitcoin Core 0.16.0 out-of-the-box?

Yes, the official Bitcoin Core v0.16.0 binary works perfectly well with LND, no self compiling necessary.


Are unspent UTXO's on Bitcoin from before the AUG 2017 BCH fork at risk to a replay attack?

No, BCH and BTC transactions were never replayable to the other network.  Starting with the very first BCH block, all BCH transactions were required to use a different SIGHASH_FORKID than used in BTC. This mandatory replay-protection causes BCH transactions to appear invalid to BTC clients, and vice versa, BTC transactions to appear invalid to BCH clients. However, (pre-segwit) addresses remained compatible between the two network, which caused some user confusion.
I assume that the fact that the replay protection was always mandatory may have been lost on some observers, because BCH's replay protection was only made mandatory a couple days before BCH forked off, so a lot of the prior discussion and worries became obsolete last minute. Alternatively, the source of this worry may have been confused by BSV forking off from BCH without any replay-protection whatsoever.


What am I doing wrong with my BitcoinXT test net setup?

Solution
This solution gains access to the coins that are unavailable via BitcoinXT.

Using the bitcoin client, export the private key using the command bitcoin-cli dumpprivkey "accountname".
Uninstall BitcoinXT and remove the existing block chain (usually stored in ~/.bitcoin ).
Install Bitcoin Core (not Bitcoin XT), start the bitcoin-d server.
While the new chain is syncing, import the old key with bitcoin-cli importprivkey "keyExportedInStep1"
Wait for blockchain to sync.

Discussion and Lessons Learned

I was not sure that the testnet work had separated, but the fact that the transaction I was looking for was not in the corresponding block number was a huge indication.  After uninstalling BitcoinXT and installing Bitcoin, I now see the "missing" funds referenced above.

What this means is that the test network has reached that point where BitcoinXT no longer recognizes transactions and block chains that are approved by standard Bitcoin Core clients.  While BitcoinXT is compatible still on a public network, the test network is no longer compatible.

This also means that there is a need for a BitcoinXT faucet. At the time of this writing, I have not found a faucet for BitcoinXT compatible transactions.

The screen shot below shows that I now have access to the coins that were previously lost.


this is the partial answer, on the underlying logic. I cannot help with java script. The critical part would be the base58decoding, but it seems there are solutions already: https://www.npmjs.com/package/base58check

Underlying logic:

the scriptpubkey contains the RipeMD160 Hash, surrounded by some codes:
a9 14  87. This is a P2SH address.

the meaning of the codes is:

a9 -> do a RipeMD160 on the top stack item
14 -> push hex 14 (decimal 20) bytes on stack
87 -> check if the top two stack elements are equal

From your address, you need four steps, to come to this goal:

1.) base58decode the address
2.) remove last 4 bytes (this is a checksum)
3.) remove the first two bytes (the network prefix
4.) surround the codes to it

effectivly the procedure is the revers of the standard "base58check encoding": which answers, how to come from a pubkey in hexformat to
 an address:

0: have a Private ECDSA Key
1: derive the Public ECDSA Key
2: do a SHA-256 of 1
3: RIPEMD-160 Hash of 2
4: add address prefix 0x00 for P2PKH, 0x05 for P2SH
5. sha256
6. another sha256
7. take first four Bytes from step 6 as checksum
8. append checksum from step 7 to the result from step4
9. encode Base58

--> your bitcoin address !

help while testing: http://gobittest.appspot.com/Address
(hint: never put your production private keys into a webpage - you might/will loose the funds on it!)


If you're OK to exchange Bitcoin for Litecoin, then you have a few more options such as:

https://btc-e.com/
https://vircurex.com/
https://www.cryptsy.com/


Fixed this now, All you have to do is change it to this

floatval(trim()) ie ...    $betamount=floatval(trim($_POST['bet']));

for numbers

and this

and just trim()  ie ... $litecoinaddr=trim($_POST['address']);

for strings


You cannot. Bitcoin Core cannot reason about arbitrary scripts and does not have the capability to sign for them. As such, it cannot create arbitrary scripts and store them.

You can create the script yourself and import it into a wallet using importmulti. This will only add the script to the wallet to be tracked. This will only let your wallet see transactions and compute a balance. Again, Bitcoin Core cannot sign for arbitrary scripts, it does not know how to. So importing a script does not mean that the wallet will be able to sign transactions that use that script. It is purely for transaction tracking.


Bitcoin-qt and lost local blockchain files

If the blockchain files are gone, then your Bitcoin client has no way to match up the keys in your wallet with the transactions in the blockchain. Remember the balance is not stored in the wallet, but the keys in the wallet can be matched with transactions in the blockchain to calculate your balance.

Fortunately, the blockchain files are public and the same for everybody so you now just have to wait for them to download. It may take quite some time (days or more). You could try downloading a torrent of the blockchain to speed up the process, but this is optional.


How can I use multi signature addresses with Bitcoin Core?

My understanding is that one needs the private keys of Adres1 and Adres2 to be able to spend from MultiSigAddress. Is this correct?

Yes that is correct

What if one of the addresses belonged to someone else? How could I use the funds on MultiSigAddres using Bitcoin Core in that case?

You will need the private key for both addresses (public keys) in order to redeem funds from the multisig address.  So you will either need to have the owner of the other address sign the the redeeming transaction or have them give you the private key so you can sign it.

Thirdly, the address I created in this case is 2 out of 2. What if I wanted to create an address that is 2 out of 3? How can I create that using Bitcoin Core? Or is that only possible for multi-sig transactions?

The following bitcoin core command will create a 2-of-3 multisig address,

createmultisig 2 '["key1","key2","key3"]'

You can view the full list of commands here


How to update index when payment is received with Blockchain PHP API?

Your callback will update your server but the user would have to refresh the page to see the change, or you could use AJAX (but that can be wasteful as it will send several requests until there's an update). I'd suggest you use their websocket API to monitor for a transaction so that you can notify the user live on the page.

Below is a simple example, just be sure you update the address variable with the address you want to monitor. You can put your PHP output in the javascript like     var address = <?php echo $payTo; ?>;

User Page

Waiting for Payment...


No, "-" is neither part of the base58 character set 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz used to encode non-segwit addresses, nor the bech32 character set 023456789acdefghjklmnpqrstuvwxyz used for native segwit addresses.
This "address" appears to be Blockchair's representation of a malformed output script that received ₿2,609 in a series of transactions on 2011-10-28.

Bitcoin Talk user genjix explains that the output script 76a90088ac corresponds to a malformed standard P2PKH script which gave the address as 0.
A P2PKH output script 76a914<pkhash>88ac is composed of the following instructions:
OP_DUP (0x76), OP_HASH160 (0xa9), 0x14 (20 in hexadecimal, indicating a 20 byte push), <pubkey hash> (20 bytes), OP_EQUALVERIFY (0x88), OP_CHECKSIG (0xac)

whereas this malformed script uses an OP_0 instead of the pubkey hash:

OP_DUP (0x76), OP_HASH160 (0xa9), OP_0 (0x00), OP_EQUALVERIFY (0x88), OP_CHECKSIG (0xac)

Colloquially, these funds have been burnt by sending them to the address 0, which is of course not a valid address. (Since OP_HASH160 will always produce a 20-byte value, and that will never match 0, OP_EQUALVERIFY will resolve to false for any pubkey and the funds are unspendable.)


Bitcoin QT wallet crashed. Recovered using Bitcoin Core. Now password rejected!

As far as I know the versions should be backward compatible but I don't know how far back, 5 years is quite a long time, Bitcoin Core have had 30 releases since then.

I found two changes that might impact wallet compatibility in my opinion:

Version 0.9.0 (19 March 2014):

  Also, the first time you run a 0.8.x release on a 0.9 wallet it will
  rescan the blockchain for missing spent coins, which will take a long
  time (tens of minutes on a typical machine).

Version 0.13.0 (23 August 2016):

  HD wallets are incompatible with older versions of Bitcoin Core.

Anyways, I would suggest to make a backup copy of your wallet, download an older version of Bitcoin Core, copy the wallet to the data directory of that client (you might need to specify it using -datadir C:\bitcoin_old\data), start the client (no need to synchronize the blockchain), export the private keys, exit, move away the wallet.dat from the data dir of your new Bitcoin Core client, then start it and import the private keys to your newly created wallet.


What happens if you send tether (USDT) to a bitcoin address?

USDT is part of the omni layer on top of Bitcoin.

While the transaction will go through (since any omni transaction is a valid Bitcoin transaction), you will not be credited for the USDT as GDAX is a USD exchange. They don't support USDT, and hence won't be trying to detect omni transactions for it.

You should contact GDAX support about how to recover your USDT.


old wallet.dat from 2013/14 with some btc not confirmed or in mempool

It looks like you actually have an LTC wallet.

Bitcoin is the base source for many coins (Litecoin, Dogecoin, etc). Due to this, the wallet files are often compatible.

If you open the wallet for another coin, you will usually see the kind of situation you describe - unconfirmed transactions that don't show up on explorers/cannot be broadcast.

If you convert 15m5h2E3L4Hy4t7qnZn1ooVmegCRNdkezB to an LTC address, you get LPz2xEXsQiY2KgozxhmK5pZXrtZhVWZyEG, which has confirmed transactions on the litecoin chain.

Try opening the wallet in Litecoin-qt instead.