Bitcoin-QT wallet.dat prior to adding passphrase On almost any Bitcoin-QT tutorial I notice people recommending to:

(step 1) back up your wallet.dat before adding a passphrase.
(step 2) Add a passphrase and copy your new wallet.dat to a USB ....
(step 3) Write down on a piece of paper the used passphrase .

Isn't (step 1) problematic?

Say I copied wallet.dat prior to adding a passphrase and just dumped it somewhere on my computer or god forbid on a USB and the USB gets lost or computer is hacked,  wouldn't an obtained wallet.dat prior to adding a passphrase, will grant access to the new (and thought to be passphrase secured) wallet?

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


Refer to UTXO by output index or output full address in blockchain? I'm writing my own simple crypto and wondering whether input in a transaction should refer to unspend output only by it's TXID and vout (index in outputs vector in a transaction) OR by it's TXID and full address in a blockchain - that is block height, transaction index in a block and output index in a transaction.
The first approach seems to have a flaw - it's unlikely but possible for two different outputs to have the same TXID and vout.
But in the second approach I don't even need TXID when I have the full blockchain address right? I don't want to double on bookeeping - when there's duplicate data you need to make sure it's consistent.
So my two question's are:

How to avoid the problem with two transaction's accidentally having the same hashes in an elegant way that - ideally - doesn't require storing full addresses?
How is it done in Bitcoin? (here I guess that bitcoin's Bip34 update was addressing this flaw I mentioned - but I don't understand how)

General advices on solutions are very welcome. Thanks in advance!

In Bitcoin, it was originally an assumption that miners producing blocks would use a unique address per transaction, making sure that the coinbase of each block had a unique TXID. As this was not enforced, users accidentally made duplicate transactions by setting the same destination address for multiple solved blocks. BIP34 simply adds a new field to be validated to the block, requiring that the height is also part of the hash, ensuring uniqueness for all future blocks.
For the two special cased BIP34 blocks, the outcome is rather simple. The first instance of the TXID creates the UTXO, the second invocation does nothing at all because the output already exists, and if they were ever spent the UTXO can only be removed from the database a single time. The money involved in the second instance of the TXID was destroyed, causing a loss of 100 BTC total.


Are Bitcoin and Ethereum really de-centralized? Or is federated a better term? By looking at the bitcoin and ethereum mining pool hashrate distribution I feel that only 5-10 relevant full nodes exist. So it's more like a federated system among those.

Am I seeing something wrong here?

Yes Bitcoin and Ethereum are still decentralized. What happened is it got to risky to mine solo so miners banded together to have a better chance of getting blocks. I suppose you could say that Bitcoin or Ethereum could be federated but the fact that these pools are competing against each other destroys that idea.
 Federated means (with reference to a number of states or organizations) form or be formed into a single centralized unit, within which each state or organization keeps some internal autonomy.* According to the definition of federated I would rather say that each mining pool is a federation of miners in itself. But with all these different federations involved it is still decentralized system because not one of these federations control more than 50% of the hashrate.

*Definition from Google Dictionary


Decrypt my private key using KeyCrypter I am trying to decrypt my private key bytes using the KeyCrypter interface. But i do not know how to implement and call the decrypt() function. Initially i encrypt the bytes of my Private Key of my ECKey.

Here is my code:

private ECKey myKey;
private CharSequence password = "myPassword";

public KeyParameter deriveKey(CharSequence password)
            throws KeyCrypterException {

        String s = password.toString();
        KeyParameter keyParameter = new KeyParameter(s.getBytes());

        return keyParameter;
    }

    public EncryptedData encrypt(byte[] plainBytes,
            org.spongycastle.crypto.params.KeyParameter aesKey)
            throws KeyCrypterException {

        plainBytes = myKey.getPrivKeyBytes();

        EncryptedData myData = new EncryptedData(plainBytes, aesKey.getKey());
        System.out.println(myData);

        return myData;
    }

    public byte[] decrypt(EncryptedData encryptedBytesToDecode,
            KeyParameter aesKey) throws KeyCrypterException {
        // TODO Auto-generated method stub

        return null;
    }

which is the byte [] result=...returning from my decrypt() function?

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
  }
}


What is the link between address and use of the UTXO? I state that I'm still a beginner. I need some clarification. I am using the Testnet. This is the information regarding the address I used to receive funds from a Faucet

 bitcoin-cli validateaddress 2N7MaihNErbNH8XTkuZWtJYPzMQAWMPVKHd
{
  "isvalid": true,
  "address": "2N7MaihNErbNH8XTkuZWtJYPzMQAWMPVKHd",
  "scriptPubKey": "a9149ac58ff47e27214b158b38da04bc8cbf72def14387",
  "isscript": true,
  "iswitness": false
}
bitcoin-cli decodescript a9149ac58ff47e27214b158b38da04bc8cbf72def14387
{
  "asm": "OP_HASH160 9ac58ff47e27214b158b38da04bc8cbf72def143 OP_EQUAL",
  "reqSigs": 1,
  "type": "scripthash",
  "addresses": [
    "2N7MaihNErbNH8XTkuZWtJYPzMQAWMPVKHd"
  ]
}

  What do data mean? I interpret that my address will receive UTXO
  blocked by P2SH type scripts, correct? "iswitness": false means that
  this address cannot use UTXO segWit?

On this address I received the following output as input:

{
      "value": 0.01944571,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_HASH160 9ac58ff47e27214b158b38da04bc8cbf72def143 OP_EQUAL",
        "hex": "a9149ac58ff47e27214b158b38da04bc8cbf72def14387",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "2N7MaihNErbNH8XTkuZWtJYPzMQAWMPVKHd"
        ]
      }

The blocked UTXO is as follows:

"txid": "a61389ff9af670770182198a984a4c1785625c60795bd57645ecc78765b23679",
    "vout": 1,
    "address": "2N7MaihNErbNH8XTkuZWtJYPzMQAWMPVKHd",
    "label": "",
    "redeemScript": "0014778daf651b21684b572644b47d551fce0ff71c74",
    "scriptPubKey": "a9149ac58ff47e27214b158b38da04bc8cbf72def14387",
    "amount": 0.01944571,
    "confirmations": 116,
    "spendable": true,
    "solvable": true,
    "desc": "sh(wpkh([7de694b7/0'/0'/7']032c27921f2d15e7eca768c0e8a8b1aeb863328c74d6c194d41dde2888d4b0e75b))#6z7uwusp",

"Sh (wpkh ())" describes a P2SH-P2WPKH output and the public key with which it is associated.

  The descriptor is telling us that the hash (sh) script incorporates
  wpkh (Witness - Public - Key - Hash) output. In simple words the
  RedeemScript should match the HASH of this public key, correct?

When I unlock and use this UTXO my input will generate a separate txinwitness field.

"scriptSig": {
        "asm": "0014778daf651b21684b572644b47d551fce0ff71c74",
        "hex": "160014778daf651b21684b572644b47d551fce0ff71c74"
      },
      "txinwitness": [
        "3044022034a07f088dd88396cd378912a4ed6a156701b075f0facbbae810677048c390e602205df07e13bf4d56feece791a1b5e4d94bec9c93aae14bb87a1b4c6c54ae9bf2f701",
        "032c27921f2d15e7eca768c0e8a8b1aeb863328c74d6c194d41dde2888d4b0e75b"
      ],
      "sequence": 4294967295

I can't understand the link between my address information ("iswitness": false) and the ways in which I received / spent the UTXO.

Because the address you are using is a P2SH-P2WPKH address as you mention (sh (wpkh ())), you get the output

"isscript": true,
"iswitness": false

It is talking only about the top level (P2SH), because it is a P2SH address, regardless of what the script "inside" it encodes. It doesn't "see" the underlying P2WPKH when you call validateaddress. The only time isscript and iswitness are both true, is for P2WSH addresses. You can view the code which creates this RPC isscript/iswitness output here.
When you spend it, you reveal the script inside the P2SH. Because it is a P2WPKH script, which is OP_0 <keyhash>, that script is then evaluated as such (using the key/signature data in the witness).


Preventing secretly mined chains In order to prevent attackers from secretly mining chains (which they could later publish to perform double-spending attacks), would it be possible to require some information to be included in the next block that can only be known if the last block in the chain was published to the network? Something like a random number that is only generated in response to the block being public.
That way, secretly mined side-chains can automatically be rejected by the network.

This is precisely what federated byzantine agreement algorithms like that used by XRP and Avalanche do. But this is a such a huge change that you can't really consider the algorithm to be proof-of-work anymore.
What happens is that a block is not accepted when it is mined but some subsequent process that can only happen once the block is public is required. So if the block is not made public, it will never be accepted.
The scheme Arthur Britto, Jed McCaleb and myself developed for the XRP Ledger in 2011 allows each participant to choose whose signatures they will require before they locally consider the block valid. Only when you collect sufficient signatures do you accept the block. There is no way to obtain the signatures unless the block is made public.
A somewhat complex algorithm handles the case where a chain is built privately and then revealed later. That chain may have more work but it will have fewer signatures in the intermediary blocks. There's "preferred ledger by branch" code that detects this and heavily discourages adoption of the one with the fewer intermediary signatures.
Again, this is such a radical change that the result is not really proof-of-work but a different algorithm. In the case of the XRP Ledger's algorithm, it doesn't use any proof-of-work at all. But you could use this "preferred chain by branch" logic and the signatures as proof of the chain being made public in connection with proof-of-work if you wanted to.


What are the major reasons for various Bitcoin-related projects' downfall? The Bitcoin community is a very dynamic place, especially when the USD/BTC exchange rates are high. Many Bitcoin-related projects have sprung up in the past, but a lot of them failed for various reasons.

What are the major reasons for such projects failing? What things should an aspiring developer keep in mind to avoid such mishaps with their project?

One factor is that people's enthusiasm for Bitcoin drives them to step well outside their comfort zones and do projects they wouldn't otherwise. Bitcoin is a new startup economy and the plethora of opportunities is tempting. But the lack of experience or skill can lead them to mistakes which bring about the end of the project. Bitomat.pl is a great example - the owner tried to make use of AWS without having a clear idea how they work.

Another factor - especially with business ventures - is overestimation of the Bitcoin market size. The market is very small, and I have the feeling that people's general excitement about Bitcoin isn't matched by their willingness to actually use it. If it's a niche service the target market is the intersection of people in this niche with people who are using Bitcoin, which is tiny, and for more mainstream services, those that are founded just to offer the service in Bitcoin are often inferior to established mainstream offerings (see above point). It comes down to the revenue not justifying the overhead costs, so the project is abandoned.

Creating a successful alt currency is an immense undertaking, and so far has mostly been tried by people who seem to think that changing a few parameters is all it takes.

I don't have any specific suggestions how to avoid this, other than trying to be realistic about the viability of the project and the personal ability to carry it through. This shouldn't, of course, come at the expense of being a bit bold and daring.


Why are blocks in a permissioned blockchain linked together? My question: Do the blocks in a blockchain without proof-of-work (i.e. a permissioned blockchain) have to be linked together via a cryptographic hash?

Longer version of my question:

(Please correct me if some of my remarks contain mistakes)

The blocks of a blockchain are linked to each other so that after proof-of-work their content cannot be easily faked, right? If several new blocks were created on top of a block which contains my transaction, I can be pretty sure that I'm on the longest blockchain and my transaction can't be faked (i.e. the double spending problem is solved).

However, in a permissioned blockchain there's no proof of work. As far as I know, in permissioned blockchains agreement on the longest chain (i.e. consensus) is reached by having a majority of blockchain participants agree on the longest chain. But since there's no proof-of-work, 51% attacks (pretending to be the longest blockchain while containing blocks with tampered transactions) are much easier to achieve, or am I wrong?

So why would you need to add a hash of the preceding block to a new block in a permissioned blockchain since there's no proof of work and thus linking the blocks in this manner does not provide any help to solve the double spending problem?

I think you're mistaking PoW for a mechanism that guarantees the chain's correctness, rather than just a means for finding consensus.

A blockchain (without PoW) is just an ordered list of batched updates to a database.

PoW is one mechanism to guarantee that everyone eventually ends up on the same chain, but it doesn't guarantee that this chain is valid. Validity is enforced because non-miner full nodes actually validate all the operations in the chain to determine correctness.

If you remove PoW, you need another mechanism to obtain consensus. One way of doing that is having the block by signed by a trusted set of nodes. This means you're trusting those nodes to not sign multiple conflicting chains. However, it does not necessarily mean you trust them to assert validity of that chain. You can still have full nodes that verify that the chain being created is valid. In order to do that, your set of updates must be identifiable. A hash chain is one way of doing that.

If you're going to fully trust whatever your trusted parties sign without any validation, just use a replicated database instead. What a blockchain adds is simply a mechanism for identifying and auditing updates.

To be clear, I don't think there are all that many uses for permissioned blockchain technology, and a lot of the claimed advantages are hype. However, some of them will likely turn out to be a modern instantiation of BFT systems with auditability, and be boring but quite useful.


How does ScriptPubKey know the public key of an Bitcoin address? I am currently having a blonde moment.

The ScriptPubKey provides a hashed version of the receivers public key.

  scriptPubKey  OP_DUP OP_HASH160  OP_EQUALVERIFY
  OP_CHECKSIG

However, if I give someone my bitcoin address to send me money - how does the sender retrieve my public key and then hash it? As the pubKeyHash != my bitcoin address

I am probably forgetting something very obvious - but it has had my head bambuzzled this morning.

Addresses are really just shorthands for particular scripts. The standard address type (starting with a '1' on mainnet) does in fact correspond to the exact type of script you gave above.

If you base58 decode such an address, you end up with a byte string of the form 0x00 + [20-byte hash] + [4-byte checksum]. The corresponding script is OP_DUP OP_HASH160 [20-byte hash] OP_EQUALVERIFY OP_CHECKSIG.

So, in a way, your address does contain the public key's hash.


I'm running an antminer solo on my local bitcoind 'pool' will i get paid? I'm running an antminer 'a' solo on my local bitcoind 'pool' plus an S5. Both are hashing away lovely, but only the S5 goes through bfgminer, 'a' is connected to my bitcoind 'pool' directly . My question is - what wallet will it use if any i.e. my bitcoin core wallet or can i add my own wallet to bitcoin.conf or some other way as bfgminer does not recognize 'a' or am i missing something here ?

Your chances of any return whatsoever with a pool that's just you are essentially non-existent.

Pool mining works since pools can accumulate a large amount of hashpower from thousands of users. The pool's chance of finding a block is then fairly high, which then allows them to use the block reward to pay proportional amounts to all their users.

As JBackzuk's comment says, solo mining is essentially probabilistically impossible. You either find the entire block, or nothing - no partial shares.


Number of Trials Required For Brute Force Attack To Have x% Of Success? I'm making an informational video about how unlikely it is for an attacker to successfully brute force a specific bitcoin address. Obviously, it will deal with impossibly huge numbers ("not in earth's lifetime with today's technology"), but I would like to include the number of trials required for an attacker to gain 1%, 50% and 90% confidence of success.

Normally I can get away with using Excel for statistical problems. However, Excel doesn't do really big numbers so I'm unable to calculate.

If I were to use Excel, I would use the below formula that tells me the chance of getting 0 successes in ???? trials. I would subtract the result from 1 and that % represents the possibility of success.

=1-BINOM.DIST(0,????,2^-160,TRUE)

For a simplified example of what I'm looking for: If I were to play a game with a 1% chance of winning, I would have about a 90% chance of 1 or more successful efforts after 250 trials, 50% chance after 70 trials, and 1% chance after 1 trial.

91.89%=1-BINOM.DIST(0,250,0.01,TRUE)

50.52%=1-BINOM.DIST(0,70,0.01,TRUE)

1.00%=1-BINOM.DIST(0,1,0.01,TRUE)

Can anyone calculate how many trials would be needed for 90%, 50%, and 1% possibility of success against a single bitcoin address? The possibility of landing the address correctly is 1 out of 2^160.

Kudos if you can do the math in your head.

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

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

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


Spying on a bitcoin user after knowing all of their addresses I'm new to Bitcoin and trying to figure out some question about it and blockchain technology.

My question is simple: Is it possible to spy on a person, if the attacker (criminal, government) somehow got knowledge of all or most of the victim's Bitcoin addresses?

Furthermore, is it possible to know how much money this person has?

Is there a measure or mechanism to avoid such a person-address linking and thereby a way to stay anonymous with one's payments online?

If you know all the addresses the person has, you automatically know their bitcoin balance. Generally, it's not easy to know all the addresses associated with a person because creating an address costs almost nothing. Proposals like BIP47 create them on the fly based on the wallets of the two parties, so yes, there is a way to stay anonymous at least on the blockchain.

The thing you have to worry much more about isn't the bitcoin aspect, it's actually everything around it. If you ever order something from NewEgg using bitcoin, that associates the addresses to you right away. If you have an account at Coinbase, that associates you to your address. It only takes one slip before a determined adversary can associate you and your bitcoins.


How to goto a nxt / ardor wallet with a default address set in the url? Is there a way to open up the nxt / ardor wallet in the browser and immediately go open up the account you want to view? How would you put it in the url parameters?

In Ardor you also need to specify the chain i.e. https://ardor.jelurida.com/index.html?account=NXT-YD9C-ZKZW-ZZLZ-BNB3W&chain=IGNIS


two block are broadcast almost at same time, which will be accepted? Because miners can choose which transaction will be added in block by themselves, so what if two miners broadcast two blocks almost at the same time, one is bigger(has more transactions), another is smaller. Which of the two blocks will be accepted?

Currently the Satoshi client will simply pick the one it sees first. Since most mining pools use the Satoshi client as their connection to the Bitcoin network they will build on top of the first block that is propagated to their node. The block that is propagated the furthest is therefore most likely to be the winner, i.e., the block that is part of the longest blockchain.

As you probably may have guessed there are also other strategies to pick the block to build on top. For example it might be the case that a block with more transactions offers more transaction fees to be claimed, hence a purely selfish miner may replace an earlier block with a new block that offers a higher reward. By that time however the miner has already spent some time trying to build a new block on top of the block with fewer fees, and it might have found a successor already.

So in the end, miners always work on the block they saw first (mining on top of an old block is rarely advantageous), and if they are selfish they may chose to replace their current base for a newer block if it offers more fees. Such a higher value block might however not be propagated to all miners, but that's another story.


How to check my address balance in regtest? I have created a regtest address and I want to check it's balance.

I have run the commands:

-regtest generate 101
-regtest getbalance
-regtest sendtoaddress n4MN27Lk7Yh3pwfjCiAbRXtRVjs4Uk67fG 10.00
-regtest generate 6
-regtest getbalance n4MN27Lk7Yh3pwfjCiAbRXtRVjs4Uk67fG

after the 5th step the balance is still 0.

Why this happened since I have already sent 10 BTC to my address?
Do I have to sign any outputs in order to claim the bitcoins?

The argument for getbalance is not an address. It is for an account, which is not the same as an address. To get the entire wallet balance, do getbalance with no arguments.


Bitcoind how to get my bitcoin cash So our server has bitcond and we have bitcoin on it.

How do we get our bitcoin cash?

Bitcoin to Bitcoin Cash Options

Option 1)
Seems a bit more confusing but a splitting tool available: https://github.com/NicolasDorier/BCCSpliter

Option 2)
The wallet.dat is what holds our wallet private keys. DO NOT EVER DELETE wallet.dat

Here is where you can get the Bitcoin Cash bitcoind, bitcoin-cli, etc: https://download.bitcoinabc.org/0.14.6/

[Windows] Make sure you backup your bitcoin core windows wallet if you have one. Or send the bitcoin to an exchange. This will overwrite your bitcoin core on windows.

Always backup the wallet.dat

Steps (Windows):
- Download https://download.bitcoinabc.org/0.14.6/win/
- Sync with network
- Find path (mine was C:\Program Files\Bitcoin)
- Put wallet.dat in AppData folder

[Linux] Setup a separate Amazon AWS for bitcoin cash.. This is for safety because I read that Bitcoin and Bitcoin Cash can conflict if not done correctly.

Steps (Linux):

Setup AWS Instance
- Sudo su
- passwd root
- Yum install wget
- Cd ~
- Wget https://download.bitcoinabc.org/0.14.6/linux/bitcoin-0.14.6-x86_64-linux-gnu.tar.gz
- Tar xzf bitcoin-0.14.6-x86_64-linux-gnu.tar.gz
- sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-0.14.6/bin/*
- Bitcoind
- Let sync then upload the wallet.dat


What does "Green address verification" mean in the context of transaction validation? I am only new to Bitcoin and I would like to know what a "Green address verification" is. I have an Electrum wallet ver 3.3.6 and I think the term is being used in the context of faster transactions but I am not sure. Any info would be appreciated.

It is a way to validate a transaction without the need to wait for the blockchain confirmation, basically peoples will declare that they trust an adress and so people trusting them can directly transact with this new adress.

More infos and similar question here: https://bitcoin.stackexchange.com/a/1731/95422


How often should I call getblocktemplate? I'm building a basic Bitcoin client in c# to better understand the mining protocol.
I need help understanding Getblocktemplate. I have read the Getblocktemplate wiki, but I'm still having an issue understanding the protocol. The wiki states "Since you're making all the blocks yourself, you really don't ever need to get another template... until it's invalid". When is the template considered invalid? How often do I need to call Getblocktemplate?
If a new block is mined every 10 minutes, with some coins that is every 1 minute, do I need to call Getblocktemplate every 10 minutes (1 minute depending on the coin) so that I have the latest "previousblockhash"?

The steps I'm using:

Make a rpc call to bicoind server for Getblocktemplate.
Parse data and build a merkle root.
Build a block header (version, previousblockhash, merkleroot, curtime, bits, nonce).
Get a header hash. headerHash = Hash(version, previousblockhash, merkleroot, curtime, bits, nonce).
Repeat step 4 by 2^32 increments of nonce.
I understand I can then increment "curtime", (which doesn't have to be precise?), so increment curtime and then repeat step 5.

Is this correct?

How long can I keep incrementing "curtime" before I need to call getblocktemplate again?

At what point do I need a new block (i.e. new previousblockhash and new merkle root)?

One fundamental, expected way to make a valid template invalid: someone else finds a block, and it's time to switch.

You can technically keep incrementing "curtime" until it's 2 hours in the future, though my gut tells me I should try to avoid pushing "curtime" anywhere near that far into the future until after I've exhausted everything else.  I haven't spent too much time looking into GBT, but you should be able to make at least some changes to the coinbase data on the generation transaction (you probably won't have complete freedom, as I'm guessing there's a way for the pool to force things like /P2SH/ to show up in there for example) to get a different Merkle root.  People often call this the "extranonce".

As for when you should ask for a new template, immediately after the spot you quoted in the bitcoin wiki, it says this:

  If your template included a "longpollid" key, you can queue a request for a new template to be executed as soon as the pool decides you should change. This is the same as any other template request, except that you include the "longpollid" parameter that the pool provided in your request. If there is already a new template, the pool might respond immediately, so be sure not to depend on a delay!

In other words, you should be able to do a "long poll" request that won't return any data until the pool server decides for you that it's time for a new template.  You definitely shouldn't rely on guessing that "desired block interval" ought to be good enough.


How to get crypto currency wallet balances I am trying to build an app that will pull in all my wallet balances. I can easily do this with exchange apis, but how do I get balances that are stored in wallet?

Do I need to set up bitcoind, litecoind, neo equivalent, and all of the rest? That sounds like a lot of work and A LOT of server space / resources?

I'm surprised I haven't been able to find a single unified api provider, where I can just send a BTC address, or a LTC address or a NEO address and it returns me a balance. Does such a thing not exist?

Thanks :)

Do I need to set up bitcoind, litecoind, neo equivalent, and all of the rest?

You don't have to; you can use different APIs for different coins. But not all coins will have a service that offers that, so for those you will need to run your own node software.

  I'm surprised I haven't been able to find a single unified api provider

You've answered this yourself:

  That sounds like a lot of work and A LOT of server space / resources?

It's simply too expensive for someone to do that.


'01' at the end of signatures I am confused about the end marker at the end of signatures (in my case, individual sigs for a Tx that spends a P2SH) in pybitcointools:

  pybitcointools:
  304402204dae851c29a117383c5c535086a7fe899c9c5f0d927a4e680498fdd9b244cb15022058fea40a9f8c3988b17556fceacdce063860057fd8c6ad84de40515d287758dd01

  Bitcore:
  304402204dae851c29a117383c5c535086a7fe899c9c5f0d927a4e680498fdd9b244cb15022058fea40a9f8c3988b17556fceacdce063860057fd8c6ad84de40515d287758dd

These are two same signatures (i.e., same Tx, input, private key). Only, in pybitcointools' implementation, you have a 01 at the end. Why?

Does it perhaps have to do with the hashtype?

Thx

It is the hash type, in this case it is SIGHASH_ALL. To verify the digital signature inside of the Script language, it is required to have a hash type appended to the end of the digital signature. However if you verifying the signature using something like openssl, the bitcore signature would be valid.


How many bits are in a Bitcoin? I need to track an amount of Bitcoins in a database.  Is a UINT64 sufficient?

I'd rather not deal with floating point types, and the rounding errors they end with.

yes, UINT64 is sufficient, which is in fact how the Bitcoin protocol works internally. The conversion factor from UINT64 to BTC is 1.0e8.

Not using floating point numbers is a very good idea indeed.


is bitkingdom.org legit? My grand father invested in a bitcoin scheme few years back he died recently.In his whatsapp he had all details about this investment. I Have no idea about how this works. I tried looking around for the site mentioned in the DMs but couldn't  find any trace of the site "https://www2.bitkingdom.org" "https://www.bitkingdom.org". I just want clarification whether my grandpa was mugged or he made it big? Any help I would really appreciate.
thank you,
jabes

A quick websearch found me a review on BehindMLM. The site indicates that BitKingdom was a multi-layer marketing scheme. Unless your grandfather happened to be one of the first investors and actually cashed out, the funds are probably lost.
Disclaimer: I'm only familiar in passing with BehindMLM, but they had a lot of useful background information on BitClub and OneCoin in the past. I have not further verified this initial take.


Bitcoin economic nodes, concensus, and historical nodes With regards to the recent dos + inflation bug, and seeing that most nodes on the network have still not upgraded with the patch (lukedashjr's chart here: https://luke.dashjr.org/programs/bitcoin/files/charts/security.html), I think the least understood aspect of Bitcoin to me is this idea of economic majority.  Can you someone elaborate on the economic majority?  Suppose in a scenario, I have a node running following the rules of Bitcoin Core v0.17.0 and if I die, but I still want those rules to be enforced, can I do that?  Do ancestor nodes have any consensus role to play or only the ones being used today ("economic" nodes, i.e. exchanges, miners, merchants) matter?

the recent dos + inflation bug

That would be CVE-2018-17144

  Can you someone elaborate on the economic majority?

A definition from Concensus as a service, Swanson, 2015

  A consensus mechanism is the process in which a majority (or in some cases all) of
  network validators come to agreement on the state of a ledger.  It is a set of rules and procedures that allows maintaining coherent set of facts between multiple participating nodes.   In the case of Bitcoin, the “longest chain” – the  chain with the most
  proof-of-work – is  considered to be the valid ledger.

Active nodes reject transactions or blocks that don't meet the rules. If some nodes have a different set of rules, there can be effectively a fork in the blockchain.

Ultimately it is the longest version of the blockchain that prevails. This has the most proof-of-work embodied in it.

In the  case of the bug mentioned, as more nodes get upgraded, they will reject any blocks that contain transactions that attempt to exploit the bug. There will be invalidated blocks.

Only active nodes play any part in enforcing concensus rules. Nodes which are not currently propagating transactions or blocks play no part in this.


Block Chain API for BTC transactions I want to fetch transactions for an address from the following api:

https://blockchain.info/address/$btc_address?format=json

The thing is understanding the json returned from the api, I don't understand which of them are the transaction and the time when that transaction took place and the confirmations of a transaction.

Can any one help?

The result returned from that API is a compound JSON object containing:

Address basic information and summary
List of transactions associated with that address

The transactions are included in a JSON-encoded list under the txs key. Every transaction itself is a dictionary-like object holding pertinent information.

It should be pretty clear when you visualize it into a tree structure. You can use JSONView plugin for Firefox or Chrome - it'll render all application/json responses in a nice hierarchical and clickable tree and help you understand it.


How do hardware wallets communicate with the outside world? Hardware wallet has more security than software wallet because they
  store private key in offline hardware, which online attackers cannot access. Thus, they sign
  in the hardware and then send the transaction with signature out to Bitcoin network.

At this points, I'm wondering some stuff:

If user make a payment, who broadcasts the transaction into the Bitcoin network? I know that hardware wallets has no Bitcoin node software that can communicate with peers. So who is responsible for this work?
bitcoin-cli is a program for querying a bitcoind node, but hardware wallets has no blockchain similar database thus, it can't query any information locally. How does hardware wallets check their transaction state?

A hardware wallet only has responsibility for handling private keys. This includes generating addresses (when receiving), and signing transactions (when sending). It needs some sort of communication with the outside world to do this. There's multiple hardware wallets on the market, and they don't all operate the same way. However, the principles are the same.

1) How is the transaction broadcast? After the transaction is signed, the hardware wallet can export this in raw format. Anyone connected to the Bitcoin P2P network can then broadcast this raw transaction. One way of doing this is through bitcoin-cli sendrawtransaction. Another one is through a web wallet interface. This is typically provided by hardware wallet manufacturers.

2) How does a hardware wallet query the blockchain? It doesn't. It has to have an external source of information about this. This could either be a full node like bitcoind, or a lightweight SPV wallet like Electrum.

Common for both of these are that the hardware wallet needs to communicate with something externally. Trezor and Ledger does this by USB connected to your phone or computer (some Ledger models also have bluetooth), Coldcard uses micro SD cards.


Why do we need SegWit (technical explanation) After reading a lot of articles, whitepapers and videos I am still confused why do we need SegWit an Lightning instead of just bigger blocks. I don‘t want to debate Bitcoin vs Bitcoin Cash but what are the technical arguments? For a non-involved Bitcoin developer the debate is just crazy and both sides have their pros and cons but there must be technical arguments or not..?

DISCLAIMER: I do not have Bitcoin Cash but Bitcoin

After reading a lot of articles, whitepapers and videos I am still confused why do we need SegWit and Lightning instead of just bigger blocks.

It's not a question of one or another. They are all approaches to capacity increases, and I expect that in the long term, all of them will happen. However, due to the risks and tradeoffs involved some were far easier to deploy and get agreement across the ecosystem on.

SegWit is a solution to the transaction malleability problem, introduced in a way that also provided a moderate capacity increase. By design, SegWit is backward compatible - meaning that it did not require the entire ecosystem to migrate to different software.

Lightning is one proposal for a layer on top of Bitcoin that makes much more efficient use of transaction capacity, as well as giving instant transactions. Implementing Lightning became much simpler with SegWit. It only affects those who use it.

Just a block size increase is a bit underspecified, as SegWit for example was technically a block size increase too. If you mean increasing the capacity without any other changes, that is something that I expect will happen in the long term, but has multiple issues. One is that it is a hard fork, which means the degree of consensus needed for it happen without incidents across the network is much greater.

The biggest issue - and this is certainly subjective - is that it is not a solution at all to scaling. It offers a way to double the capacity of the system while making everything twice as costly (in terms of resources) for participants to validate the system's security. If we want to make Bitcoin accessible to the world, no such approach will help. Blocks could be made 2x bigger or 10x bigger, but the result is only 2x or 10x more transactions. Who cares? That does not fundamentally enable use cases that weren't otherwise possible. In my view, the part of the ecosystem that views capacity increases in this way as a necessity do so from an expectation that all transactions need to happen on the blockchain. That's just not what the technology is good for. Building layers on top is harder, and will require time, research, and money. But it may bring us a world where billions have access to a currency without third party control. In contrast, larger blocks risk setting the ecosystem on a path where its only way forward is ever increasing blocks size.

Lastly, there is the issue of immutability. Bitcoin is hard to change if people believe it is hard to change. And this on itself is an incredibly valuable property. This means people can rely on it retaining the properties they signed up for, even if potentially powerful entities would like it to change. If controversy is a reason to step away from this, it's an avenue to outside influence. This does not mean change cannot happen at all, but it must happen in a way that is cooperative, and without rush. We're in it for the long term…


"always spend all balance of paper wallets" - Then why am I using my paper-wallet for multiple transactions without any problem? I'am very confused. I just read on the most popular services for paper wallets that "You should always spend all the funds on a paper wallet, not part of it or you will lose the rest" . It links back to a reddit discussion with a short explanation that I don't really understand.  Apparently it has to do with change addresses. This sucks.

In the last 3 months I've been using paper-wallets for several transaction of partial amounts without loosing anything. I generated privatekey + public key with vanity gen, imported the read-only public address into blockchain mobile app, and went on spending (scanning private key at need) and receiving on that very same address. Am I being lucky, wrong, or what? I really don't get it

I also printed several paper wallets for friends and workshops and after being imported (electrum, blockchain.info app) I saw people making partial transaction without losing the other part.

Most clients will return change to a newly-generated change address, which is not the same as the address on the paper wallet.  So if you spend a partial amount, the rest of the coins will go to a change address in your client and the wallet will be empty.

You mentioned using Blockchain.info as your wallet.  The Blockchain.info wallet behaves differently than most wallets.  When you spend coins from a Blockchain address, the change goes back into the same address that you spent from.  That's why your change remains in the paper wallet.  But as far as I know, Blockchain.info is the only wallet software that works that way.  If you were using any other client, you would have run into the change address problem by now.

It's generally not good practice to reuse addresses, because it makes your financial activity easier to track.  And it's not a good idea to reuse a paper wallet.  Once the private key has touched an Internet-connected machine, it's not necessarily safe anymore.  It's possible that some malware on your phone might steal the key and empty your wallet.  The whole point of a paper wallet is to keep your private key from touching the Internet.  Once you've spent coins from a paper wallet, you really shouldn't reuse it.  You should move the rest of the coins to a new paper wallet.


Bitfinex get credits and convert timestamp to JS Date I'm fetching my active credits in BFX and trying to discover when I'll have my funding back. This is a response example:

/v1/credits

[{
    amount: "294.4316181",
    currency: "USD",
    id: 15778083,
    period: 2,
    rate: "16.816",
    status: "ACTIVE",
    timestamp: "1454846632.0"
}, ...
]

But new Date(1454846632.0) returns a very old date, what makes me think this timestamp isn't there to be converted into a real date at all.

I am doing something wrong? How can I discover the remaining time of a credit I provided?

The problem is not with the timestamp, it's with your method of converting the timestamp to local time.

As this SO question describes, convert it this way:

var dt = new Date(0);
dt.setUTCSeconds(1454846632);
console.log(dt.toString());

Which prints Sun Feb 07 2016 07:03:52 GMT-0500 (EST).


Bitcoind suspend when Synchronizing blocks My bitcoind started synchronising blocks. The bitcoind version is 0.93. When the bitcoind found an orphan blocks in the synchronising process, it seems stop and did not work. the message from the log like this:2015-01-08 06:08:19 ProcessBlock: ORPHAN BLOCK 184, prev=0000000000000002d79cd7069cedd05f49716354590bd5518b18a513b3b4d513

I need restart it and it would continue synchronising. This case happens many times. sometimes the bitcoind found orphan blocks in the synchronising process, it would continue work.  I don't where is wrong. Any ideas? Big thanks.

note: my system is CentOS

The new version (0.10 / RC1) has a rewritten block-download mechanism which significantly improves synchronization which could result in less similar issues.

A workaround for the current version is to deploy the -maxconnections=<n> option and set it to a low number to reduce parallelism and thus receive less orphans in total. Set -maxconnections=1 to receive little to no orphans (essentially only for the newly announced blocks).

You can also use the -maxorphanblocks=<n> option (which has a default value of 750), try decreasing it and the daemon will probably bypass the stall point, as keeping less max orphans will prevent your system from running out of resources (eg RAM), which I suppose is what currently happens.

Another workaround is to just download the bootstrap.dat torrent if you are still many weeks behind the current block.


Visa, MasterCard or any other network copy Bitcoin blockchain tech? I read an article (below) that explained how complicated the payment industry is and thus is why it is relatively expensive.

Could a network like Visa eventually copy Bitcoin, and thus cut everyone else out?

Would this potentially end Bitcoin?

This is the article: THE PAYMENTS INDUSTRY EXPLAINED: The Trends Creating New Winners And Losers In The Card-Processing Ecosystem

It would make no sense for Visa to copy Bitcoin.
Visa is a company built around control of a payment network. Visa's system only works because they control access and payment verification, which is what makes them money.
In Bitcoin, no single entity is in sole control. There is no way to make money off of the transactions on the network except to put in the validation work and reap the mining reward. By copying Bitcoin they'd destroy their own business strategies.

What they could do is to bastardize the Bitcoin system into a centrally controlled "Private Blockchain". However, if you're not trying to achieve decentralized control, there is little other incentive to use a blockchain in the first place. They could create a much more efficient system with themselves in control, as blockchains are inherently inefficient – it's the price for being decentralized.


what's the point of "n" in "vout"? getrawtransaction It seems like "n" is the index, is that true? If that is the case, why is the "n" key necessary?

Example:

bitcoin-cli getrawtransaction b13b4765e46228f3239858c9f18e766b72bed24a56c52b9692e7f021c376e7ce 1

One of the resulting vouts:

  "vout": [
    {
      "value": 0.40000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 a88433dd5e9fcee779efdea952e397cf3bfe8aac OP_EQUAL",
        "hex": "a914a88433dd5e9fcee779efdea952e397cf3bfe8aac87",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "3H43pNLbFEU1tWNwZeWxmrLwrLzAxwiC4b"
        ]
      }
    },
...

Since it's an array, couldn't you just use the array index? Seems redundant, but i'm sure there's a reason. Thanks

The vout index (n) that you see after calling decoderawtransaction is added by bitcoind. It is not present in the raw transaction data.

If you manually decode the serialized tx for your example, you get this for the output section:

02  # Number of outputs
# value lockscript_length lockscript
005a620200000000 17 a914a88433dd5e9fcee779efdea952e397cf3bfe8aac87
# value lockscript_length lockscript
c587841500000000 19 76a91402952d768c840f30a49e20af5bd4219210a14d2488ac

Notice how there is no index field. It is simply calculated by the node when deserializing the transaction.


Bump zero fee transaction with CPFP I want to first create a transaction with 0 fee (tx1).

Next, I am going to use an output of tx1 as an input in another transaction with the necessary fees.

The issue is now that tx1 gets rejected by full nodes. Why can't I broadcast a 0 fee transaction?

In order for a node to relay a transaction, the transaction must satisfy the node's minRelayTxFee. This fee rate cut off is by default set to 1000 satoshi per kvB (= 1 satoshi per vbyte).
Your first transaction could get included in a block if the miners were aware of it, but likely it doesn't reach them.
You should try to either broadcast the first transaction with 1 sat/vbyte or to directly submit them to miners via their respective APIs.

Update 2019-09-29:
There was recently a change of the Mempool Acceptance rules merged to Bitcoin Core that allows multiple transactions to be relayed as a package. This explicitly facilitates transmission of CPFPed transactions that wouldn't usually meet the fee minimum of the receiving node.

The Bitcoin Optech Newsletter #65 describes the pull request as follows:

  Bitcoin Core #16400 refactors part of the mempool transaction acceptance code. We don’t usually cover refactors, but this one has a tantalizing comment: “this is in preparation for re-using these validation components for a new version of AcceptToMemoryPool() that can operate on multiple transactions (‘package relay’).” Package relay could allow nodes to accept a transaction below the node’s minimum feerate if the transaction came bundled with a child transaction whose fee was high enough to pay the minimum feerate for both it and its parent. If widely deployed, package relay would allow users who create transactions a long time before broadcasting them (e.g. timelocked transactions or LN commitment transactions) to safely pay the minimum possible fee. When it came time to broadcast the transaction, they could use Child-Pays-For-Parent (CPFP) fee bumping to set an appropriate fee for the current network conditions.


Should I put my bitcoin wallet on an encrypted disk or not? Is it really beneficial to put my bitcoin wallet on an encrypted disk (LUKS encrypted)?

This only helps when someone malicious has physical access to you hard drive while your computer is not operational (shut down, account logged out, screen locked, etc.). When your operating system is running, an attacker running malware on your machine won't even notice your disk is encrypted.

Make sure your wallet is encrypted. That's much more important. Of course, having your disk encrypted has other benefits but as long as someone with physical access to your machine isn't trying to steal specifically your money, there is no advantage in this regard which would not already be there if you used an encrypted wallet. But the latter has the additional advantage that malware capable of reading your files can't just send your private keys to the attacker when you're using your computer and your files are available.


Move from CoPay Wallet to Coinbase What is the current procedure (as of 12-8-17) to move/send Bitcoin from a CoPay wallet to Coinbase?

Open a coinbase account -> get a 'receiving' address from your coinbase account -> send a transaction from Copay to coinbase. Right now the network is congested due to high traffic, so it may be worth waiting to make this transaction if you'd like to save money on fees. Getting a quick confirmation right now will be expensive.


What currencies does Electrum support? The Bitcoin-Wiki page for Electrum says it's a Bitcoin wallet.

However, there is also a Litecoin version.

What currencies does Electrum support?

Electrum (http://docs.electrum.org/en/latest/index.html) only supports Bitcoin.

There is an Electrum clone (https://electrum-ltc.org/) that supports Litecoin.


why my bit coin txn is still processing for more than 24 hours? Can any one help me why this txn is pending for more than 24 hours?

https://blockchain.info/tx/df040a6a683f99cdbf5ba92410c143bad2a2b042288630a07dad6c59cbd9be5e

The fee you paid for the transaction is currently non competitive at 149.712 sat/B.  The transaction volume for legacy transactions on the Bitcoin network is at capacity which means people are paying much higher fees than usual.

Sites like https://bitcoinfees.earn.com/ can help you estimate a competitive fee.  Looking at their estimates for 141-150 S/B transactions it looks like 5x as many transactions have been processed in the last 24 hours than are currently waiting to be processed.

If your transaction is time sensitive, look into "Replace By Fee" to speed up your stuck transaction.  https://bitcoinmagazine.com/articles/what-to-do-if-your-bitcoin-transaction-gets-stuck-1481042383/


Options for a Client Only C# application If I want to create a client only, C# desktop application, what are my options for working with Bitcoin?

I could try to port BitcoinJ, which seems like a lot of overhead in terms of initial effort and keeping the project up to date.
I could try to create a local Bitcoin process which runs a tiny BitcoinJ-based server, and talk to it from C#.

Neither of these seem appealing.

I could use the Blockchain API.
I could set up my own server and run the wallets on the server.

Neither of these seem appealing either.

Anyone know of an easier way to run a Bitcoin client without a full blockchain using C#? I would ideally like users to retain control over their wallets, with the client code finding incoming payments and facilitating the sending of coins.

Have you guys see this recent GitHub? I too have been poking around looking for a standalone library.

https://github.com/TangibleCryptography/BitSharper

I have it downloaded, just trying to fix dependencies so I can compile.
Looks promising.


Is there a way to link a bitcoin user's transaction to entering a lightning network channel? Since lightning channels are offchain. When you send bitcoins to a lightning network node or wallet. Is there a way for companies like chainalysis to see if your on the lightning network? And then from there track your coin movements there?

Is there a way for companies like chainalysis to see if your on the lightning network?

Not really. Funding a channel will look just like sending coins to a P2WSH address. Closing a channel cooperatively also just looks like that P2WSH address sending to two addresses. This does not tell any outside observer that you are actually using the Lightning Network.

  And then from there track your coin movements there?

Coin movements over LN are not easily trackable since not all LN nodes see all LN transactions.


Seller asks me for my BTC address to confirm my payment So I'm down to my first bitcoin transaction on a purchase with a webshop. Now that I'm at the actual checkout process, I'm asked for my bitcoin address so they can confirm my payment.

Since this is my first purchase using bitcoin I'm wondering the following two things:

Is it normal to ask for someones bitcoin address for confirmation?
Should I just give them the address that I would also give for receiving bitcoins? (A random one at that)

Thanks.

It is normal to have a new address for every costumer since a customer's money doesn't necessarily come from a single address. You can see that in this transaction money from 5 addresses was transferred to 2 addresses. It might be that in the case of money coming from several addresses, the seller expects their customers to give them the first addresses of the transaction input or any address of the transaction input but I don't know that.

Most transactions, go from 1 address to 1 or 2 addresses. If there are 2 target addresses, usually one is the address of the recipient and the other one is one of the sender's addresses so they get their change.

The seller probably tries to receive all payments on a single address and wants to link the money received back to the sender's account so the seller knows who paid and who didn't.

It's important that you don't give the seller any address your (probably HD) wallet gives you. From an outside perspective (everyone but you), these addresses are independent of each other. You have to give the seller the address your money came from.

If your wallet doesn't show you which addresses it used to send the money, that's no problem. You can simply go to https://blockchain.info or https://blockexplorer.com, enter your transaction ID, and see which addresses the money came from and which it went to.

Someone knowing your address doesn't mean they can steal your money. In fact, you can just go to https://blockchain.info or https://blockexplorer.com, click on any transaction that's flying by, and see the addresses involved in the money transfer.


NXT uses transparent forging to detect who will solve the blocks. How can DDOS be prevented? Since NXT does transparent forging and it select a node to be the main one to solve blocks. How does it prevent a DDOS attack? And if a ddos was sucessful on the node during forging, what happens then? does it solve blocks half way only?

I am a developer for NXT and am currently programming an automated defense system for the network, aside from this if a forger is DDOS'd my understanding is that the network will skip to the next node and not process the block the attacked node produce(s/d).


mining with one client on multiple mining pool Is it possible to mine on different mining pool using one client?

Ok, I know that this sounds ridiculous, but my thoughts are as follows: if I already calculated a lot of hashes for a work for one mining pool may be I will be able to use them for another mining pool. Has anyone thought of it?

The hashes generated by your miner is only usable for a unique set of transactions that your pool decided to include.  In addition each pool orders transactions differently and that too will affect the resulting hash.

Unless the pools cooperate and synchronize all the details of a given block (nonce, merkle tree, etc)  then any hash that is generated is useless to any other pool.


What are the downsides of Hodl Invoices? As far as I understand hodl invoices enable some interesting use cases. However, I heard that they can be detrimental to the network. Is that correct and in what way? Additionally, at a talk at the Lightning Conference 2019 it was mentioned that people should avoid relying on them in the future. Why?

I didn't attend the conference but here is my take on Hodl invoices. In a normal Lightning payment, the sender pays an invoice which contains the payment hash and the payee releases the pre-image to that payment hash for the successful resolution of the payment. In a hodl invoice the sender pays an invoice to the receiver, but the receiver does not release the pre-image instantly. Instead it waits for other conditions to be satisfied for the payment to be released. To cite an example, let us say you are in an apparel shop and you did not find a T-shirt of your size. The owner tells you that they need to check in their inventory to see if the item is available and they will courier it to you if it is available. But for they ask you to pay in advance. In this case, you pay the invoice, but the shop owner will only release the pre-image if the item is available.

This can possibly create some routing issues. Since hodl payments are identical to normal payments, intermediate nodes cannot tell the difference. So, by forwarding hodl payments the intermediate nodes are locking in their liquidity in invoices that will take long time to settle, thus hindering their ability to route more payments. Even if the amount is small, Lightning implementation allows only 483 concurrent HTLC payments to conform with the standard transaction size, which will take up the transaction number space. Although this might not be an issue now, but as Lightning gets more adoption it might have he potential to squeeze the liquidity out of the network.

Another issue that I see is that if the receiver does not cancel the payment or send the pre-image within the min_final_cltv_expiry, than the penultimate node will force close the channel with the receiver through an on-chain settlement. If the penultimate node had opened the channel, then under the current specs, it is liable to pay the fees associated with it (including the HTLCs). Moreover, with hodl invoices you are trusting the receiver to do the right thing in terms of releasing the pre-image or not, based on other physical/virtual conditions.


Can you create multiple transactions per block in chronological order? Say I buy a coffee mug, a box of tea bags, and a half liter of honey in the span of five minutes using Bitcoin.

Since the Bitcoin network creates a block every ten minutes or so, these transactions will be within one single block.

Once the block containing the transactions is created can I use a blockchain explorer to view the transactions in chronological order?

Yes. The transactions will be in the correct order chronologically, or else block validation would fail because there would be missing inputs to the transactions out of order. See Is there a fixed order for all transactions in the block chain?

Another way to do this is to see which previous outputs each transaction references. If they are in the same block, they will reference each other and you can determine order that way. See also Can multiple transactions transferring the same bitcoin be done in one block?. You cannot use a timestamp, because the block is what is timestamped, so all transactions in the block have the same timestamp.


BitCoin Price Index -Studies on Relation to Network Hashrate and Block Difficulty? Are there any available studies, articles or blog posts on this topic?

I am currently working on a market analysis including major bitcoin exchanges and the bitcoin price index. I'm specifically interested in the relevance of the network hashrate and block difficulty for spikes and drops in the BitCoin Price Index.

I have had some discussions with few traders, and there seemingly is no such study. I expect no surprises, but I feel like this should be measured, described and written down, rather than passed on by hearsay and witty comments.

Hence, I'm looking for anything related to the above mentioned topic, to compile it into a single piece for future reference.

I know of one researcher off hand who has worked in this area, Adam Hayes. You can find his papers on the subject at:

http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2648366
http://www.economicpolicyresearch.org/econ/2015/NSSR_WP_052015.pdf

You could also look around on http://arxiv.org/. Just searching for 'bitcoin price', I found:

http://arxiv.org/pdf/1406.0268.pdf
http://arxiv.org/pdf/1405.4498.pdf


Funds from coinbase never showed in my Multibit wallet I know this question has been asked and answered a bunch of times so I am sorry for doing the same. I am basically a moron when it comes to this stuff and very new to digital currency.
So here's the deal opened an account with coinbase got my funds in there. I tried to use bit coin-qt but that has been syncing for literally 10 days now so I used multi bit instead. Did a small $5 transfer from CB to my MB wallet no problems I even figured out how to send it to someone else after that. Here is where the problem starts I went to deposit more funds from CB to my MB wallet using the same wallet. CB went through the pending process which took about an hour on the CB site it says transaction went through but the funds never arrived in my MB wallet. I tried resetting my blockchain and nothing. So now I see all of the kind folks on here talking about going to the GO function ( I run Mac OS ) or searching hidden files or searching something like ~librara/username/.wallet or something of the sort. So like I said in the beginning I am a moron and know nothing about what that means. Please help me figure out where on my computer that wallet and money went. Oh and bye the way the bitcoin wallet address still shows in my wallets list and its the same address that CB sent the funds to. Thanks in advance for any and all help

Hopefully you understand already that the coins themselves are in no way on your computer -- your wallet is just a key that lets you spend coins that are yours.

Everything you need to verify that you own those funds in question is available in the blockchain (and on your Coinbase account).

Simply look at your Coinbase transaction where it says it sent BTC to your wallet address. Click advanced details if you want the actual bitcoin transaction information. Here you can verify that your wallet address was the recipient of the BTC you sent to it. You should be able to click on the link for that address to see the value being held on it.

If you're feeling paranoid and want to cross-check Coinbase's blockchain data, just head over to http://blockchain.info/ and do a search on either the transaction hash or your wallet's receiving address. You should see the exact same information that you found on Coinbase.

I can't help you figure out how to use Multibit, but needless to say, if you lose the private key stored in your wallet, then you will be permanently unable to access the funds at that wallet's address. I can offer only the following tips based on your question:

Make backups (duh).
Mac OS X is closely related to UNIX (and Linux-style operating systems), where files and directories can be hidden by prefixing them with a dot. Similarly, the ~ character is short for your home directory.
You can view hidden files and folders easily by learning how to use Terminal (really, the ls -a, pwd, and cd commands would be all you need at this point, and are safe to mess around with... but MAKE BACKUPS).
You can view inside hidden directories using the finder by using the Go to Folder command (from the Go menu, or shortcut command-shift-g) and then typing the UNIX-style path of where you want to access. Note that you still won't be able to see any hidden files within this directory.
The ~/Library directory is not prefixed with a dot, but it is hidden by default on new Mac OS X systems. You can still get to it easily by using one of the methods listed above, or by opening the Go menu and then holding option, or if you want it to be visible permanently, navigate to your Home folder and hit command-J (or View menu -> show view options), and then check the box for "Show Library Folder".


After all possible Bitcoins are created, won't transaction fees eventually consume all Bitcoins? After all possible Bitcoins are created, won't transaction fees from miners validating transactions eat away from the total and eventually consume all Bitcoins?

Right now, because new Bitcoins are still being created, kind of like planned inflation, mining fees are adding Bitcoins to the circulation.

But after all Bitcoins are created, it seems that an infinite number of transactions would transfer all Bitcoins via fees to miners, self-defeating the currency.

I wonder if this problem, if real, is another reason why a little bit of inflation is a good thing, since some types of fiat currency transactions consume fees (e.g., credit card transactions) but others do not (cash, direct bank transfers, ATM withdrawals from member bank systems) or don't per transaction ( flat monthly checking account fees). It seems a little bit of inflation prevents fees from taking an ever greater percentage of a currency.

I'm skating on very thin ice with my limited understanding of Bitcoin and currency in general, and that's why I'm posting here.

Fees are a mammoth devil in the details of the world economy, maybe including Bitcoin.

=======
MAJOR EDIT ADDITION

There seems to be a misunderstanding about my question. I'm not questioning the value of miners. I'm wondering about the mathematics of compensating miners after all 21 million bitcoins are created. This isn't a moral judgement. Miners are creating bitcoins now, providing a valuable service. But since there's a finite number of bitcoins, 21 million (?), after they're all mined won't miners still be necessary to process all transactions? But instead of creating new bitcoins, after the maximum of 21 million coins are created, won't miners then be taking bitcoins from other people instead of creating new ones? Just mathematically, after all 21 million bitcoins are created, wouldn't an infinite number of transactions transfer all bitcoins to miners? I'm just wondering about the math theory of mining after all 21 million bitcoins are created.

There are two objections I would raise:

Miners have expenses. You need to pay your power bill. You need to pay your employees. You need to pay for new ASICs when the old ones inevitably become obsolete. You need to pay off your initial investment in ASICs. All of these things cost money.
You might object that miners wouldn't be doing this unless revenue exceeded expenses. This is true, but it's also true of every other profession. Therefore, we should view 'miners will eventually have all the money' the same way we view 'dentists will eventually have all the money.'

In general, people don't acquire money for the sake of having money. It's usually in service of some other kind of goal, like financial security, providing for someone else, or buying food. Sitting on a hoard of money that you cannot spend accomplishes none of these goals.


How did lose my bitcoin? I met this guy online and he wanted to teach me trading. so he  said I needed to log in my wallet in my wallet which I did then he sent a link of team viewer (https://www.teamviewer.com/en/download/windows/).

The next thing my wallet was sending my bitcoin to an address.. I did not do this, how did it happen? Everything happened so fast.. Nobody knew my password or even my wallet key... How did my wallet send the initiate the transaction by itself?

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


Upcoming Fork - Wallet Safety In downloading the newer client, do I need to worry about my addresses and hence bitcoins disappearing, or will everything in the old wallet transfer nicely into the new?

Everything should transfer just fine, but as with any change to your system you should take a backup of your wallet before upgrading, just in case.


BitCoinJ custom transaction I'm trying to learn a few things about the API. I've managed to send coins on testnet via wallet.sendCoins(Peergroup,Address,BigInteger) so I don't think I have a network problem.

Here's what I'm trying to do, assume my wallet has the transaction, a Peergroup already exists and is connected, and the blockstores and such exist:

    Transaction tin = wallet.getTransaction(
            new Sha256Hash("015a7cff7048b622315fe610e9e72347420a5528b938bffc931ddacf24b9ce88"));

    System.out.println("Input transaction: " + tin.toString());

    Transaction t = new Transaction(nwp);

    t.addOutput(Utils.toNanoCoins(4, 10), new Address(nwp, "mmhmMNfBiZZ37g1tgg2t8DDbNoEdqKVxAL"));
    t.addOutput(Utils.toNanoCoins(4, 0), new Address(nwp, "mrtUDRNFuwVPrKgwaGLuc3VvRCVYbayLkC"));

    t.addInput(tin.getOutput(0));
    p.broadcastTransaction(t);

As you can see, the transaction is trying to spend a specific previous transaction of 8.10 incoming by sending 4.10 back to the faucet and 4 back as change.

Unfortunately it doesn't propagate on the network. What do I need to do? I've been trying to follow the code in Wallet.java, but it's pretty complicated. From what I can see it's some checks on the amounts, coin selection, and locks on the coins to be used. Attempts to sign the transaction cause a warning (already signed) and a crash.

Can someone let me know what the minimum necessary steps for creating and sending this transaction are?

Right, figured it out. It's a matter of picking the correct output from the previous transaction and running signInputs. After that it works.


Please explain getwork Request:

POST / HTTP/1.1
Host: de.btcguild.com:8332
Accept: */*
Accept-Encoding: deflate, gzip
Content-type: application/json
X-Mining-Extensions: longpoll midstate rollntime submitold
Content-Length: 44
User-Agent: bfgminer 2.99.1

{"method": "getwork", "params": [], "id":0}

Response:

HTTP/1.1 200 OK
Server: nginx/0.7.65
Date: Sat, 13 Apr 2013 21:55:23 GMT
Content-Type: application/json;charset=ISO-8859-1
Connection: keep-alive
X-Long-Polling: /LP/
X-Blocknum: 105632
Content-Length: 607

{
"error": null,
"id": 0,
"result": {
"data": "00000002df54a70cd769d78b9605c0a6574638db799e86bdd1183cfc000001c2000000009e7ed0ae4ccdb1dbf283f4ab608791f21b1a5f437f405f4f9ba0bb3b693506a95169d43c1a022fbe00000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000",
"hash1": "00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000",
"midstate": "24a747c3d16eadbc1481bd342b5558b2e235301c11353faf4bc25a384102c9c9",
"target": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000"
}
}

In the request/response what does id do?
In the response what is data and how is it generated?
What is midstate?
How does target work?
In the request what are these X-Mining-Extensions: longpoll midstate rollntime submitold parameters for?

Look at http://www.jsonrpc.org/specification: "An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null [1] and Numbers SHOULD NOT contain fractional parts [2]." To put it simply, it is really just an identifier for a message.
https://en.bitcoin.it/wiki/Block_hashing_algorithm
To put it simply, midstate is just the hashing done on the first half. We need the hash done on the whole data, but since the first part of the data doesn't change, we can just calculate it so that we don't have to perform full hashing everytime.
The target specifies the difficulty. Only a hash that is smaller than the target is accepted. In other words, you can also say that the target specifies the number of trailing zeroes required in the hash.
https://en.bitcoin.it/wiki/Getwork


How to compress transaction fee as much as possible? I would like to simulate through "offchain" transactions micro payment. To do so, user will need at the beginning to depose some amount as a "credit".
My goal is to compress transaction fee as much as possible and the only constraint is a "big" transaction per month to deduce user credit accordingly to their actions.

My thought was to use only one bitcoin private key per month to reduce from n utxo to one in order to compress size from the "input side".
To differentiate user deposit, I was wondering about providing a specific token to user and "asking him" to store it into the OP_RETURN field of his transaction.

It is worth to try or should I use HD wallet as recommanded even if it will increase the "input size" inevitably ?

Each customer's transaction will use the same number of output bytes regardless of whether it pays a public key that was already seen on the network or a new public key, and when you go to spend the outputs, it will take the same number of input bytes to spend them whether they paid different public keys or not.

For that reason, it makes sense to use different receiving public keys to differentiate between customers rather than appending an additional output with an OP_RETURN.

To reduce transaction fee as much as possible, you should reduce the byte size of a transaction as much as possible.  Here are a few things you might be doing already but which (if you aren't doing them) can help:

Ensure you use compressed public keys (33 bytes) rather than uncompressed public keys (65 bytes).
If you don't need users to pay addresses but can instead get them to pay arbitrary scripts (e.g. you're using custom software or the BIP70 payment protocol), consider accepting payments using pay-to-pubkey (P2PK) rather than pay-to-pubkey-hash (P2PKH); this will save about 24 bytes for each payment.
When segwit becomes available, switch to using it as miners will be able to fit more segwit transactions in a block than they can fit traditional transactions, so they will likely charge you less fee.
Combine multiple payments if possible.  If you can get multiple customers to pay you in the same transaction (using something like coinjoin) or if you can pay multiple customers at the same time, you'll produce smaller transactions because you won't need to repeat some fields in a transaction (such as transaction version or locktime).  When paying to your customers, you can save quite a lot because you'll only have one change output no matter how many n customers you pay.


What happens if you send tether (USDT) to a bitcoin address? I have both a GDAX and a Binance account. I chose to withdraw my tether and move them into GDAX into the bitcoin address. After about an hour of the transaction, it said it was complete with "10 confirmations"(the number of confirmations keep increasing). I have checked into my GDAX account however and it still shows no BTC or transaction history, whereas it shows that it is complete within Binance.

Is this transaction valid (will it work)?
If so, how much time does such a transaction normally take?

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.


Can I use my Bitcoins to buy household commodities just like ordinary money? Can I use my Bitcoins to buy household commodities just like ordinary money?  You see, I'm a newbie and have yet to learn the basics including all the facts about Bitcoins.  However,  I want to be ascertained as to whether my time and efforts in learning the trade will be rewarding in such a way that,  I'll be able to use whatever amount of Bitcoins I may earn someday to actually purchase things from the nearby store.

Currently there are relatively few shops that accept Bitcoin. If you want to know whether your local stores accept it, you will have to ask them. (Be prepared to be told "no" or more likely "I have no idea what you are talking about.")

Your title about "legal tender" is actually asking something different. "Legal tender" is a legal term, referring to a method of payment that must be accepted to settle a debt. As far as I know, Bitcoin is not legal tender in  any jurisdiction. However, people are still free to accept it if both parties agree (unless other local laws forbid it). In any case, legal tender is irrelevant to retail purchases, where no goods have already changed hands and no debt exists ahead of time. The seller can decide what forms of payment they do or don't want to accept.


How to store data on the blockchain? I am wondering if it is possible to give someone a bitcoin transaction ID and with that he can read some hidden data, like the blockchain.info notes on transactions, but for real, stored in the blockchain forever.

I had this idea but I don't think if it would be a good practice:

Send the minimum amount of BTC possible, wich is 0.00000001 BTC, or 1 satoshi, to an address, and in that address would be the data.

1 ArFAXhvMbwJuub4ujnVbLFszqX3McuzsX

As far as I know, the address is formed by 30 letters in base58, but since the first char must be 1 and the last four have to be the checksum, then you have 25 letters in base58, and that's like 17 bytes.

So, you have to pay like 0.0001 BTC for the transaction fee, and after that you can add data to that transaction at a price of 17bytes per 1 satoshi, by sending satoshis to many addresses that contains the whole data. Imagine if we could store data there forever,.. and communicate with the future...

Is there any other technique of doing this? Is this technique a good practice?

then you have 25 letters in base58, and that's like 17 bytes.

20, actually.

  So, you have to pay like 0.0001 BTC for the transaction fee, and after that you can add data to that transaction at a price of 17bytes per 1 satoshi, by sending satoshis to many addresses that contains the whole data. Imagine if we could store data there forever,.. and communicate with the future...

You're going to run into two problems with this: transaction fees and dust rules. Transaction fees mean that each transaction will cost you a couple of cents. Dust rules mean that transactions with outputs below a certain size will simply be dropped. The rationale behind this is that you're sending a transaction so small that the fee required to redeem it will be more than the money that you're sending.

In the longer term, the data you're sending is going to look identical to all of the other data that's in the blockchain. That means that you need to identify your transaction somehow. That's usually done by providing the txid, which is 32 bytes.

  Is this technique a good practice?

It depends on what you're trying to accomplish. For example, are you trying to communicate anonymously? You should use BitMessage via Tor instead. Do you want to embed transactional data, like Counterparty does? Embedding the data in Bitcoin is probably the best solution for that.

  ... and communicate with the future...

Well, the Internet Archive crawls all webpages (including this one!) so you're already uploading the things you've typed into a distributed, long-lasting datastore.


Multibit security — How anonymous is it? Hi and I hope someone here can answer these security questions for me.

I have downloaded the Multibit client onto both a windows laptop and also a separate download onto a laptop running ubuntu linux.

My questions are for both operating systems and they are:

When I am online and start the Multibit client is my IP address broadcast at anytime when I am using it such as when it syncs with the BTC network?
If I create say 10 wallets in the client and issue one receiving address from each wallet to ten different people so they can pay me, is it possible to see that all those addresses and wallets reside within the same Multibit client?
Can those addresses or wallets be traced back to either of my laptops and if so how can I stop this from happening?

I think what you are asking is this:

Because Multibit is a lightweight SPV wallet, it uses Bloom filters to request the status of its own wallets from other peers rather than collecting the latest blocks.

Could those other peers, who already know the IP address, conclude that the request for information concerning certain addresses imply that this IP address is looking after these addresses?

The answer would be yes it could conclude this, but it could never say for sure if the private keys were also owned at that IP address it could only assume this.

The matter is further complicated because connection to peers is fairly random according to their availability.

EDIT I am updating my reply, as it appears that some research has been carried out which may contradict what was thought to be the case, but this is not strictly related to Multibit, but all wallets that use internet protocol. The Coindesk article points to the paper:

"Eavesdropping" attack


Can someone explain how the Bitcoin Blockchain works? I'm trying to figure out how the blockchain works and how to read it via blockchain.info website. Is there a laymen way of explaining how the block chain works and how to read the blockchain to trace transactions?

What I know so far is:
the blockchain is just a public ledger of transactions on the bitcoin network.

If you are completely new to Bitcoin, you may find my second answer more accessible, which is a less technical description.

As you said, the blockchain is a log of all transactions that were ever verified on the Bitcoin network.

The transactions are collected in blocks, which are found approximately every ten minutes in a random process called mining. As transactions transfer ownership of Bitcoin balances, each of these blocks represents an update of the user's balances on the network.
By following the blockchain from the Genesis Block and applying all transactions that were validated in each block in the correct order, you arrive at the current status quo.

Each block header contains:

 [Illustration by Matthäus Wander (Wikimedia)]

Timestamp:
The time when the block was found.
Reference to Parent (Prev_Hash):
This is a hash of the previous block header which ties each block to its parent, and therefore by induction to all previous blocks. This chain of references is the eponymic concept for the blockchain.
Merkle Root (Tx_Root):
The Merkle Root is a reduced representation of the set of transactions that is confirmed with this block. The transactions themselves are provided independently forming the body of the block. There must be at least one transaction: The Coinbase. The Coinbase is a special transaction that may create new bitcoins and collects the transactions fees. Other transactions are optional.
Target:
The target corresponds to the difficulty of finding a new block. It is updated every 2016 blocks when the difficulty reset occurs.
Nonce:
An arbitrarily picked number to conveniently add entropy to a block header without rebuilding the Merkle tree.
The block's own hash:
All of the above header items (i.e. all except the transaction data) get hashed into the block hash, which for one is proof that the other parts of the header have not been changed, and then is used as a reference by the succeeding block.

As many miners compete to find the next block, often there will be more than one valid next block discovered. This is resolved as soon as one of the two forks progresses to a greater length, at which any client that receives the newest block knows to discard the shorter fork. These discarded blocks are referred to as extinct blocks (sometimes also referred to as orphaned blocks, although their complete ancestry is known).

When a transaction is submitted to the network, it is passed on peer to peer by all clients. Upon discovery miners will put it on their list of transactions that they want to verify and update the Merkle Root.

On Blockchain.info you can track a transaction either by requesting the page directly with the transaction hash

http://blockchain.info/tx/<transaction-hash>
e.g. http://blockchain.info/tx/37df28642f97db7003a7bc6663467eb1e9cb4493b6c94bf089ee77f87acdae3d

or by calling one of the involved addresses through

http://blockchain.info/address/<address>
e.g. http://blockchain.info/address/1DrZtRNsSu9BqGcY4D9etFno4H95DqNmKb

Either way for each transaction you will see a line with a big arrow that shows you which addresses' were used to fund the transaction and what addresses received which portions of the transaction.


where to get cryptocoins data i want to create an API. where do Crypto Currency exchanges get their data from, Like the exchange rate, difficulty of coins, blocks and rewards.

I want to create a website which displays all the data related to the coins and i dont want to use any existing API.

Can Anyone suggest how to create an API.

Thanks

Let's start with the exchange rate. Any exchange, be it for stocks, real currencies or decentralized peer-to-peer virtual crypto currencies, naturally generates an exchange rate simply from its normal operation. After all, it allows customers to trade, and the price at which trades were last executed is then called the exchange rate on that exchange. So they don't get that data from anywhere, they generate it (not arbitrarily, of course, but according to how their customers place orders and how trades result from matching orders).

All the other quantities you mentioned (which, if I may, I'd like to explain and correct to difficulty of mining blocks, total number of already mined blocks, reward for mining a new block) are specific to each crypto currency. You have to extract them from a client for the specific crypto currency, and the typical approach is to run such a client and use its (local) API.

Your question is how to write your own API. I suppose that means you want to run a website that offers a public API for querying the kind of data you mentioned. A natural approach would be to simply translate the calls for the data inherent to each currency (difficulty, blocks, rewards in your list) to a client you run for that currency. You may want to cache the results for some brief time if you anticipate high usage of your public API.

The exchange rates on different exchanges are more tricky, because the only authoritative source for an exchange's exchange rate is the exchange itself. You will have to find their API and use that. Also, here it would be a bad idea to just forward queries made to your public API. Instead, you should record the exchange rates and answer queries to your public API from this stored data.

There is a chance that many exchanges can still be accessed using only one kind of API convention. Have a look at what API the site bitcoincharts.com requires exchanges to provide. Presumably at least all the exchanges listed there provide it, and probably accept queries from anybody, not just from bitcoincharts.com.


What are the key features of eMunie, a crypto-currency that's not a Bitcoin fork? https://bitcointalk.org/index.php?topic=220530.0

The ANN is not super clear. From what I understand, the supposed key features are:

Immunity to 51% attack
"protection against hoarding" ??? (someone please explain this)
A built-in messaging system

Can someone explain/elaborate?

  So whats different

  eMunie has similarities to current crypto-currencies by way of a
  public ledger, blocks and transactions.  These however, are where the
  similarities end and innovation for a better system comes into action.

  The network is composed of clients, seeders and hatchers, the
  functions of which will be explained in this announcement.  Any node
  can take task in one, or any combination of these roles dependent on
  the users wishes.

  The network is resiliant to any type of "51%" attack, as the models
  required to perform such an attack are not present.

  Currency generation within the network is a collaborative effort, and
  created currency is distributed according to a set of requirements.
  This distribution should help to ward against hoarding, which can
  further lead to volatility of the currency.

  The network performs extensive verification of itself, more so than
  the BitCoin algorithms, to ensure that all participants are honest
  nodes and for additional security overall.

  A secure, anonymous peer 2 peer messaging system is built into the
  network, allowing secure, untraceable communications between 2 or more
  parties.

What are the key features of eMunie, a crypto-currency that's not a Bitcoin fork?

First off, if the eMunie guys can't provide a compelling answer, then stay away from it.

Second, they are making a lot of bold claims without backing them up.  For example:

immune to 51% problems but transactions are verified by only two hatchers, so it's unclear that is any better..
With eMunie, both hatchers would get a near equal share of that reward - So? Bitcoin already has worker pools which implement the same concept.
The main problem there is that you get a handful of miners with massive hash power - Citation needed. The majority of Bitcoin is mined in pools that payout most of their profits to their workers.   This does not concentrate the wealth.


what if the timelock is in the past? I just started learning about bitcoin scripting and wonder:

what if the timelock in CLTV is in the past?
what if the timelock in nLocktime is equal to 500.000?

If the nLockTime is less than or equal to the next block height, it can be included in the next block.
To explicitly answer your questions:

The CLTV op restricts the nLockTime field of the spending transaction, therefore if it is set in the past the condition is already fulfilled.
If the nLockTime field of a transaction is set to 500 000 it is valid to be included in any block which height is superior or equal to 500 000.
This basically means any block right now if there is no block chain reorganization deeper than 160 000 blocks :).

This mechanism was cleverly used to discourage reorgs. First introduced in the bitcoin-core wallet, but now most wallets set the nLockTime field of their transactions to the next block.
This prevents, in a future where miners would mainly be compensated for their work by transaction fees, a pernicious incentive to rollback the last block if it included a high fee-paying transaction.


Batching transactions to safe on fees I have some bitcoin spread across multiple addresses.  I would like to move these to different addresses.

I've heard about batching and was wondering if it is possible to batch the transaction to multiple addresses and save on transaction fees?

I want to move my bitcoin from BISQ to my bitcoin-core wallet.

‘Batching’ generally refers to making payments to multiple addresses, all within a single bitcoin transaction. Put differently, this means you would craft a transaction with many outputs, each one paying out a different customer, for example.

In your case, you are trying to consolidate funds (UTXOs). The outcome is similar: a more efficient use of block space, and thus lower fees for you.

To consolidate all your UTXOs, you could simply send a transaction from BISQ to your bitcoin-core wallet, that empties the BISQ wallet entirely. This should spend all your current UTXOs as inputs, and create a singular output that will be spendable from your bitcoin-core wallet.

EDIT: I misread the question, so the lined-out text above isn't relevant to the answer OP is looking for. Lets try again:

Generally, batching transactions helps to save on transaction fees, by using block space more efficiently. In this case, the goal is to apparently also maintain some privacy, by not linking all of your previous addresses together through a single spend consuming all of your UTXOs, and sending the balance to a new address.

There is an often-cited 'common-input-ownership-heuristic' that seeks to identify users under the assumption that all inputs to a transaction are likely owned by the same user. So in the case of creating a batched transaction, someone viewing the ledger may infer that a single entity owns all of the input addresses.

By paying out to many addresses, you may gain some privacy against 3rd party observers (they may assume each output is owned by a separate user, for example), but the common-input-ownership-heuristic will still be working against you, to group all of your current UTXOs together.

It is worth mentioning that this heuristic is not always true! It is possible to craft transactions with inputs provided by several users in a trust-less manner, but these transactions are currently more rare on the network.

All of that said, most wallet software does not include functionality to craft multi-output transactions, so while I am not familiar with BISQ, my guess is what you are trying to do is not possible using that software. Bitcoin-core does include this functionality, so if you are motivated enough you could perhaps export your private keys (or seed phrase) from BISQ, import them into bitcoin-core, and then craft the transaction manually to move the funds to new addresses in the desired fashion.

It is perhaps worth watching the mempool to make this transaction during a time of low fees, for maximum savings.


Instant BTC to USD transfer? is there a way to have BTC sent from somewhere to my wallet and then that amount is immediately transferred to USD? I know that Coinbase offered this once but they have since removed that feature. I am just wondering if there is a similar service out there.

Thanks.

You may want to check BTCPay Server

More links for source and documentation.

In the past I would have recommended BitPay, but they've had too many red-flags that show that this company does not have the best interest of Bitcoin in mind.


I was never asked to create a password for my Bitcoin Wallet Last week I downloaded a Bitcoin Wallet from bitcoin.com.  It is on my iPad.  I also put the same wallet on my iPhone.  As I was setting the wallet up, I recorded my 12-words, placed them in the proper order when asked, I wrote them down, then sent my wallet info to iCloud using the provided address and created a password for that.  It is a file in iCloud named "wallet.data"... but... is that the only password I need?  My iCloud password??  I don't recall being asked to create any other password than that.  Please help.  My Wallet now has 1000's in funds received but will I ever be able to spend it??  I'm a bit in a panic at the moment.  Please help.

A few things...
As a general rule do not store your seed phrase on services like iCloud or Google Drive etc. If your account is compromised by someone with malintent, your crypto will likely disappear forever.
You don't need a password and even if the app required you to make a password to login you wouldn't really need the password to access your coins. You only need your seed phrase.
You can input your seed phrase with the same bitcoin wallet program or almost any other
and gain access to your coins again. As long as you have the seed phrase, your good.
Also, I would move those coins to a new address with a new seed phrase if you value those funds.
One more thing, hardware wallets are generally your most secure option.


Is the seed everything I need to recreate a wallet? During creation of my wallet, I was given a list of 12 words ("the seed") that I scribbled somewhere.

Let's assume that I lose all my storage, everything related to my wallet -- except for the seed.

Are these 12 words enough to recreate my wallet from scratch and regain access to my bitcoins?

Yes. If you specified one, the password is also necessary (e.g Trezor).
It's worth knowing that the seed covers everything (on Trezor at least) such as the bitcoin (and other coins) wallet, the 2fa secrets, password store etc.