In Multibit HD, is there a way to see all of my receiving addresses? I understand that if I request a payment and delete the request, I still own the address and will receive Bitcoins that were sent to it.  However, I find it very uncomfortable to just "assume" that I own an address.  I would much prefer if I could look somewhere and see a list of the addresses that are mine.

Is there a place I can see all of my addresses?  What are the conditions under which I will no longer own an address?

I guess this question, unanswered for nearly 3 years, is obsolete
According to https://multibit.org/blog/2017/07/26/multibit-shutdown.html (retrieved 2018-08-17)

Multibit is No Longer Supported
July 26th 2017
Dear Bitcoin Community,
It is time for us to let Multibit go.
KeepKey acquired Multibit a little over 1 year ago. At the time, the engineers who originally built and supported Multibit had announced that they would no longer be working on it or providing support. Multibit played an important role in the Bitcoin infrastructure. We felt that it was important for Multibit to continue and hoped that with our existing support and development teams, we would be able to keep Multibit alive.
The reality is that Multibit is in need of a lot of work. It has stubborn bugs that have caused us and Multibit users much grief. Additionally, Bitcoin has gone through a fundamental change in regards to the way fees work. The addition of SegWit in the coming weeks will mean the Multibit software has fallen still further behind.
Unfortunately, KeepKey simply does not have the resources to support the current issues, nor to rebuild Multibit to ensure ideal user experience. By focusing our attention on the KeepKey device, we will continue building and improving the best hardware wallet available.
Thus, KeepKey will discontinue support and maintenance of Multibit, effective immediately.
We recommend that all Multibit users discontinue using it and you move your keys to other wallet software of your choosing.


Does 'simplified payment verification' work? I was reading the original bitcoin paper where they mention a simplified payment verification scheme in section 8. I was wondering whether or not this actually works.

A quick sketch: The scheme requires you to only store all the block headers (instead of the full blocks). When you need to verify a transaction, you simply need the merkle root of the transaction and see whether or not that merkle root appears somewhere in the stored block headers. If so, you know that the transaction was once verified.

But you would not be able to use this for actually verifying new payments, right? Suppose somebody pays, and in the transaction he uses 'ins' from some other transaction. With this simplified scheme I could then check that the transaction actually happened. But I can't check that he has not already spent the money, right?

So basicly this scheme is only useful for re-verifying an old transaction for some reason? (e.g. to confirm that someone has participated in some transaction). But it is not useful for paying.

Is that a correct interpretation of the scheme, or am I missing something?

Simplified payment verification can't help much with 0-confirmation transactions. But once the payment has several confirmations, this fact alone (which the SPV client can verify) implies that the transaction is accepted by the network, so the payment is secure.

SPV can also be used in conjunction with a server node that has the blockchain and can verify against double-spending. The client will still want the block headers and the Merkle branch of the transaction to keep the server node honest. Without this, the server can falsely report that the client received payment; with the simplified verification, the server would have to collude with the sender.


Downloading the pruned blockchain file directly from external source Using the bitcoin client to have a pruned version of the blockchain can take a lot of time, I was wondering what would be the drawback to simply download an already pruned bitcoin blockchain file from a reliable source like bitcoin.org then put it in my bitcoin directory and then use/update it from it there.

It introduces too much trust into the download source. It's the same thing as just uploading a datadir. You aren't verifying any of the blockchain history; what you download could be a fork of the blockchain. Having such a download completely defeats the point of running a full node.

Furthermore, with downloading a pruned datadir, you will have to download the chainstate. This isn't even verifiable without downloading the blockchain itself. The uploader could have modified the chainstate to include UTXOs that don't exist, and your node wouldn't know that. You could be forked onto a separate chain or just contain invalid things in the UTXO set.

At least with a full blockchain datadir download, you could ignore the given chainstate and just verify the blocks. But that's equivalent to the old bootstrap.dat download, and isn't actually faster.


In which ways is Earthcoin different from Bitcoin? Also, the name Earthcoin suggests to me that it may be somehow more sustainable with regards to the computing resources required to support it; is there any basis in that?

The official site appears to be http://getearthcoin.com/ which has some pretty logos but is woefully lacking in technical detail. As it probably always the case with an altcoin, it also has a thread on bitcointalk.org which seems to describe a very odd block reward system with some days paying 2 or 5 times the normal block reward.

As mentioned in the BitcoinTalk thread.

  Our goal isn't to compete, as much as compliment, create balance, and
  not divert into launching 9 more coins because we can.

It doesn't look there is much difference. It may have a different block time, reward, and cap, but that is standard stuff to change for an altcoin. There appears to be absolutely no technological advance. It donates a percentage of coins to charity but that means nothing if it has no value.


Blockchain: How do nodes know what Data is correct from Consensus process? How do nodes know what data is correct from consensus?

What about if two nodes execute two different consensus with 2 different Valid blocks with the same height at the same time, can that happen?

I’m talking about Blockchain in general, not bitcoin, not mining.

Not bitcoin related, Not mining related

Consensus

My understanding of this word, in the context of cryptocurrencies, is as follows:

In a finite network of nodes with independent data-storage, consensus exists if all, or at least a majority of, nodes hold a set of data that is identical to, or at least not inconsistent with, the data sets held by other nodes.

That is, consensus is a state, independent of the rules or mechanisms used to achieve it.

  How do nodes know what data is correct from consensus?

They don't necessarily. Consensus is sometimes really an emergent behavior, albeit a planned one. In some systems, nodes don't explicitly seek consensus - that is they don't confer about consensus as a subject - only about what blocks other nodes know of and have already validated.

In these types of system consensus emerges simply because nodes follow the same rules, for example that the chain with the most proof-of-work (or equivalent) is accepted and any alternatives are discarded.

  What about if two nodes execute two different consensus with 2 different Valid blocks with the same height at the same time, can that happen?

That can and does happen for a short while in at least some systems. For example, eventually one of those blocks will have more blocks built on top of it than the other. This block will be then accepted in place of the other by the node(s) that had previously accepted the other. The other block and all blocks built on it will then be discarded. Or there may be other ways in which rules resolve the Byzantine Generals problem.

In this specific example system, transactions in those discarded blocks are also then lost unless they have already been included in the rival block or in blocks built on the rival block. If not they may still exist in memory pools and be later incorporated into the blockchain. This is probably one reason why a significant number of confirmations are needed in this specific system.

Other sources:

Consensus in Blockchain Systems. In Short — Chris Hammerschmidt  — 2017


Understanding bitcoin-cli commands walletlock and walletpassphrase I am trying to understand two commands listed in the following link.

1. walletpassphrase

Stores the wallet decryption key in memory for <timeout> seconds.

2. walletlock

Removes the wallet encryption key from memory, locking the wallet. After calling this method, you will need to call walletpassphrase again before being able to call any methods which require the wallet to be unlocked.

So if I am clear in my understanding, to encrypt my wallet I need to call the walletlockcommand and to decrypt it I need to call walletpassphrase command. Am I correct?

No, use encryptwallet to encrypt the wallet, read this document:

Examples:

Encrypt your wallet

  bitcoin-cli encryptwallet "my pass phrase"

Now set the passphrase to use the wallet, such as for signing or sending bitcoin

  bitcoin-cli walletpassphrase "my pass phrase"

Now we can do something like sign

  bitcoin-cli signmessage "address" "test message"

Now lock the wallet again by removing the passphrase

  bitcoin-cli walletlock


How does bitcoin conversion (to/from $) handle round off error? If the transaction rate were $300 for each Bitcoin, and I try to convert $100 to Bitcoins then :

$100 x 1 BTC/ 300=  1/3 of a bitcoin (.33333 repeating)

How does conversion between Fiat and Bitcoin work when truncating recurring decimals?

The Bitcoin protocol doesn't recognize the concept of a dollar. Conversions of the kind you mention do not exist in the Bitcoin protocol.

Conversions might exist with services that recognize dollars (and bitcoins), but how they handle it is entirely up to them, there is no general answer.

But I expect that most will simply round down to an amount of satoshis. So in your example it would be rounded to 0.33333333 (8 places).


Why all blocks at Blockchain are relayed by Unknown now? only last week I could study which mining pool signed latest blocks.
Today this option turned status to Unknown

https://blockchain.info/

Any idea?

(formatted table)

Height  Age     Transactions    Total Sent  Relayed By  Size (kB)   Weight (kWU)
491728  31 minutes  352     196.23 BTC  Unknown     1,002.67    3,992.19
491727  31 minutes  266     920.01 BTC  Unknown     134.31  515.14
491726  33 minutes  1447    2,900.32 BTC    Unknown     1,017.02    3,996.92
491725  39 minutes  290     822.51 BTC  Unknown     132.29  494.91

There was an update to the site that changed its behavior to no longer properly identify who relayed blocks.

Until they fix the issue, you can use other blockexplorers to find the information.

Given your stated usecase, I suggest you look at http://coin.dance/blocks


Why is Ripple's effective genesis ledger at 32570? The documentation for Ripple says that the genesis ledger starts at 0 but the "effective genesis ledger" is at 32570, because some historical ledgers are "unavailable."

Why is this, and what does it mean for the average Ripple user?

It doesn't mean anything for the average Ripple user. In January of 2013, a bug in the Ripple server caused ledger headers to be lost. All data from all running Ripple servers was collected, but it was insufficient to construct the ledgers. The raw transactions still survive, mixed with other transactions and with no information about which transaction went in which ledger.

Without the ledger headers, there's no easy way to reconstruct the ledgers. You need to know the hash of ledger N-1 to build ledger N, which complicates things.


Convert back from BTC into a local currency, efficiently I receive rent income in the US. I'm using coinbase.com to convert from USD into BTC, with no problems.

I will be traveling outside the US, so I would like to convert back from BTC into a local currency. (I'm going to Ecuador; there are several exchanges but they seem set up for people to buy BTC.)

What I want is to convert from BTC into the local currency. What is the most efficient way to do this? (I may need to do this several times, which is why I'm interested in doing this efficiently.)

How should I set it up?

How about localbitcoins.com?
231 countries support,  can meet
people face to face from this website in country where you go and exchange your bitcoins for cash in local fiat currency.


How can I transfer the last little bit from my Bitcoin Core wallet to Armory? I'm moving my bitcoins to Armory because its deterministic wallets are SO much better for keeping good backups. But bitcoin core didn't make it easy for me to sent all my money - if I specified all of it, it complained that my transaction + the 0.0001 fee I specified was more than my balance (makes sense). But when I specified my balance minus 0.0001, it complained that my transaction + the fee of 0.0002 (which was twice what I specified) was more than my balance. Wtf right?

So I played around with it til I sent all but a few cents of my balance. So I have 0.000047 BTC left, which isn't a big deal, but it feels wrong to just leave it there to rot. How can i recover those micro bitcoins without losing the whole transaction to a fee?

Re: Bitcoin-QT Core

Your balance showing in BTC may not be the actual amount; is the Blockchain fully synchronised?
Your BTC may be spread over several private keys ie addresses in your dat wallet
The floating point value may be being rounded to an integer (ie 0.000297 may show up as 0.0003)

I'd go about it like this:

Open options under BitcoinQT settings;
tick "display addresses in txn list" &
"display coin control features"
Wait for Blockchain to synchronise
Open 'Send' tab

tick Coin Control Features; inputs
choose the input addresses with BTC in them

Fill out Sender address, etc
Right click the total BTC being sent; choose copy amount to send after txn fee
Paste this figure (BTC being sent minus txn fee) into the Amount box at the bottom
Send to your new address; leave Bitcoin-QT open so it can relay the txn


What if my Internet Service Provider decides not to let me send bitcoins? Since bitcoins are sent through the internet, what would happen if my Internet Service Provider prevented me from sending bitcoins?  If they can do that, does that mean that I don't really control my bitcoins?

Since bitcoins are sent through the internet, what would happen if my Internet Service Provider prevented me from sending bitcoins?

There really is no practical technical way to do this, but they could just have a rule.

  If they can do that, does that mean that I don't really control my bitcoins?

No, since you choose your ISP.


need the stratum url for zpool for sha-256 I'd like to use Zpool with my S9. I need the stratum URL to use for sha-256.

They give examples for X11 and Scrypt.

For example I could use the following:

Bitmain D3 Settings:
URL: x11.mine.zpool.ca:3533#xnsub
Worker: XkurctD63DTsfx7hEuHqS3dC9wQmu4qFtN
Password: c=dash,d=92

Bitmain L3+ Settings:
URL: scrypt.mine.zpool.ca:3433#xnsub
Worker: LeDKeCAUVAxhSk1L3XDN2EV1b7dHVjTcqz
Password: c=ltc,d=128000

I guess my issues are:

is the algo for the url sha256 or sha-256
what is the port to use at the end of the url? (looks like different ones based on algo)
what is #xnsub ? Is it needed?

is the algo for the url sha256 or sha-256

The URL should be sha256.mine.zpool.ca.

  what is the port to use at the end of the url? (looks like different ones based on algo)

For sha256 you should use port 3333.

  what is #xnsub ? Is it needed?

It turns on extraNonce, which gives your miner extra room to work.


How to synchronize with the bitcoin blockchain via bitcoinJ I'am writing my very first application using bitcoinJ api and I got a bit stuck. Maybe somebody can tell me what I am missing.

My practice app wants to write a sample contract in the bitcoin blockchain, but it seems like, when I try to do so. I get a message from bitcoinJ that says:

  java.lang.IllegalStateException: Cannot call until startup is complete

I think I need somehow to wait for the blockchain to synchronize, so I can send stuff to it right?

This is how my java code looks like:

import org.bitcoinj.core.*;
import org.bitcoinj.kits.WalletAppKit;
import org.bitcoinj.params.RegTestParams;
import org.bitcoinj.script.ScriptBuilder;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class SimpleExample {

    private WalletAppKit bitcoin;
    public  NetworkParameters params = RegTestParams.get();

    public SimpleExample() {
        bitcoin = new WalletAppKit(params, new File("."), "testfile" + "-" + params.getPaymentProtocolId()) {
            @Override
            protected void onSetupCompleted() {
                // Don't make the user wait for confirmations for now, as the intention is they're sending it
                // their own money!
                bitcoin.wallet().allowSpendingUnconfirmedTransactions();
            }

        };
    }

    public void timestamp(File doc) throws IOException, InsufficientMoneyException {
        // Hash it
        Sha256Hash hash = Sha256Hash.of(doc);

        // Create a tx with an OP_RETURN output
        Transaction tx = new Transaction(params);
        tx.addOutput(Coin.ZERO, ScriptBuilder.createOpReturnScript(hash.getBytes()));

        //Check if the Blockchain is synchronized before you do anything!!!!!!

        // Send it to the Bitcoin network
        bitcoin.wallet().sendCoins(Wallet.SendRequest.forTx(tx));

        // Transaction proof
        Proof proof = new Proof();
        proof.setTx(tx.bitcoinSerialize());
        proof.setFilename(doc.getName());

        // Grab the merkle branch when it appears in the block chain
        bitcoin.peerGroup().addEventListener(new AbstractPeerEventListener() {
            @Override
            public void onBlocksDownloaded(Peer peer, Block block, FilteredBlock filteredBlock, int blocksLeft) {
                List<Sha256Hash> hashes = new ArrayList<>();
                PartialMerkleTree tree = filteredBlock.getPartialMerkleTree();
                tree.getTxnHashAndMerkleRoot(hashes);
                if (hashes.contains(tx.getHash())) {
                    proof.setPartialMerkleTree(tree.bitcoinSerialize());
                    proof.setBlockHash(filteredBlock.getHash());
                }
            }
        });

        // Wait for confirmations (3)
        tx.getConfidence().addEventListener((confidence, reason) -> {
            if (confidence.getConfidenceType() != TransactionConfidence.ConfidenceType.BUILDING)
                return;
            proof.depth.set(confidence.getDepthInBlocks());
            if (proof.depth.get() == 3) {
                // Save the proof to disk
                String filename = doc.toString() + ".timestamp";
                try {
                    proof.saveTo(filename);
                    System.out.println("Proof complete - Saved to " + filename);
                } catch (IOException e) {
                    System.err.println(e);
                }
            }
        });
    }
}

So I think I found the solution to my own question after looking around a bit.

I modified the constructor to explicitly set the peer addresses, like this:

public SimpleExample() throws UnknownHostException {

        walletAppKit = new WalletAppKit(NETWORK_PARAMETERS,DIRECTORY, "test");
        walletAppKit
                .setAutoSave(true)
                .setBlockingStartup(false)
                .setPeerNodes(//Seed nodes for the test network
//                        new PeerAddress(InetAddress.getByName("seed.bitcoin.sipa.be"), 18333),
                        new PeerAddress(InetAddress.getByName("testnet-seed.bitcoin.petertodd.org"), 18333),
                        new PeerAddress(InetAddress.getByName("node3.mycelium.com"), 18333),
                        new PeerAddress(InetAddress.getLocalHost(), 18333));
    }

Another thing I did was to call 2 methods on the WalletAppKit to start the synchronisation:

walletAppKit.startAsync();
walletAppKit.awaitRunning();


Privacy issues with storing entire information in blockchain I have been learning about how blockchain can be implemented in IoT, or health where entire information of patient is stored in blockchain, or in case of governments having info about citizens.

However, I have a question. What could be the privacy issues in the long run and the implications. I am just curious.

They could be anywhere between no one but your doctors (and maybe your insurance company) knows anything and every single person alive knows all of your health records.

Showing the second case is easy: Build a blockchain for whatever purpose containing all health records of a country, a union, the world, whatever.

Showing the first case isn't much harder: Your doctor creates the health records + a long enough nonce and keeps them until the end of a constant period of time (e.g. til the end of the month), and hashes them + the nonce. They then send the hash to an authority which builds a blockchain from them for every doctor. In this case, no one even figures out whether you visited a doctor (Note that the data accumulated at the end of the month can be empty. In fact, it is likely to be empty for the majority of patients.) or which doctors you ever visited because of the blockchain.


How to check that I control an address I recently created a bunch of bitcoin addresses (public starting with 1, PK starting with 5) from a paper wallet, that I downloaded from their github (https://github.com/walletgeneratornet/WalletGenerator.net) and ran offline.

I imported the first PK in my full node, it translated to the pub address I expected and I control this address.

I don't feel comfortable sending coins to addresses I don't know for sure I control. How can I check securely and "easily" that I control them ? Adding all of those PK in Bitcoin core is long and decreases security.

Test the windows python code below with the private/public key generated from
website. Just to verify the correctness. If correct proceed.
Throw coin 256x get your private key.
Throw dice whatever, until you get 256 bits.
enter the private key in the code below.
you should get your bitcoin address.

Code:

# COMMENTS
import bitcoin
import binascii
PrivKey1 = 'e8ee7398abbbdc8920f53c8fd454e86eab74beae2a9c42d28bf86402f3d87fcb'
PrivKey1Type = bitcoin.get_privkey_format(PrivKey1)
print("Private Key types")
G = bitcoin.encode_privkey(PrivKey1, 'hex',0)
print("Type: hex", G)
G = bitcoin.encode_privkey(PrivKey1, 'hex_compressed',0)
print("Type: hex_compressed",G)
G = bitcoin.encode_privkey(PrivKey1, 'wif',0)
print("Type: wif",G)
G = bitcoin.encode_privkey(PrivKey1, 'wif_compressed',0)
print("Type: wif_compressed",G)
PubKey1  = bitcoin.privkey_to_pubkey(PrivKey1)
PubKey1type = bitcoin.get_pubkey_format(PubKey1)
H1 = bitcoin.encode_pubkey(PubKey1, 'bin')
print("Public Key")
print("Bin format", H1)
H2 = bitcoin.encode_pubkey(PubKey1, 'bin_compressed')
print("Bin Compressed format", H2)
H3 = bitcoin.encode_pubkey(PubKey1, 'hex')
print("hex format", H3)
H4 = bitcoin.encode_pubkey(PubKey1, 'hex_compressed')
print("Hex Compressed format", H4)
K1 = bitcoin.decode_pubkey(H4)
print("decoded format", K1)
Hash1 = bitcoin.bin_hash160((H1))
print("PubKey Hash from Uncompressed PubKey", binascii.b2a_hex(Hash1))
Hash2 = bitcoin.bin_hash160((H2))
print("PubKey Hash from compressed PubKey", binascii.b2a_hex(Hash2))
BTCaddress = bitcoin.pubkey_to_address(PubKey1, 0)
print("Bitcoin Address", BTCaddress)


What if some group of people start sending small transactions from wallet to wallet just to make the blockchain bigger? What if some government start using their computers to move the tiniest amount of Bitcoin possible, from wallet to wallet, just to make the blockchain REALLY big? Is this possible?

And also, is it possible to generate large amounts of transactions so that one winning node can't include them all in one 10 minute mining process?

The current maximum size of a block is 1 MB.  Current block sizes are about half that, so the absolute worse case scenario is that the block chain grows in size twice as fast as it does now.  That's not particularly scary.
It's easy to create more than 1 MB of transactions every 10 minutes.  If anyone does that, some transactions can't be included in blocks.  However, at present, there are almost always more transactions available than miners are willing to include in blocks, so we're already at the point where miners need to choose what transactions get included.

For the most part, miners choose based on fee per kilobyte of transaction data, so transactions that pay more fee/kB get included in blocks sooner.  If someone wanted to, they could create large transactions that paid large fees in order to raise the transaction fee the rest of us would need to pay.  Since that would cost the attacker money every block without actually preventing us from using the system (if we were willing to pay the higher fees), it's also not particularly scary.


Is it possible to limit bitcoin wallet balance? I'm not sure if this is a right question, but is it possible to create  bitcoin wallet address with specific amount of limit?

No that's not possible.

Therefor a transaction must be declinable if the limit is reached, but:

You can not decline a transaction to your address (even if you are a miner and you decline it, someone else could mine it). If one of your friends creates a transaction, if it's a valid transaction and if a miner includes it into a valid block, it's done.


Send addresses in Bitcoin Wallet for Android I have three addresses on my Bitcoin Wallet for Android, but when sending coins, I can’t find where to select which address I want to send from.
I set the second of the three addresses I’ve got as the main address, but when I sent some coins they have been sent from the first of the three.

There is no option in Bitcoin to control which address transactions are sent "from". The Bitcoin client will use one (or more) of your addresses which have previously been sent sufficient funds to cover your new transaction.

To make this clearer, consider an example. Somebody (person A) sends you (person Y) some coins.

A -> Y1 [2 coins]

Now somebody else sends you more coins:

B -> Y2 [3 coins]

Suppose you want to pay person B 4 coins. What happens is your Bitcoin client will create a transaction with the following three parts:

Y1 -> B [2 coins]
Y2 -> B [2 coins]
Y2 -> Y3 [1 coin]

Since you must always spend the entire amount allocated to an address, your client arranges the transactions so the 3 coins of Y2 are fully spent. Y3 is a new address created by your client for the change, which comes back to you and remains in your wallet.

If you then spend your remaining 1 coin to person C, your client will create

Y3 -> C [1 coin]

The address Y3 was created internally by your client and you don't have an option to choose what it is.

For more information, see:

How does change work in a bitcoin transaction?
Why do outputs need to be spent entirely?


BTC/hashes/second rates for various pools Do all pools have the same average BTC/hashes/second rates (for individual members of the pool)?

For example, this profitability calculator says 4 Th/s hash rates will produce 0.04 BTC per day, yet I've seen pools awarding 0.1 BTC every few days for 4 Th/s mining rates.

This is an interesting question, but also a very difficult one to answer.

No, all pools don't pay exactly the same.

But looking at how much a pool paid out over a few days is pointless due to variance. Another mistake common with beginners is to try to find some magic ratio between your hashrate and the pool's hashrate that will let you earn more. In reality this ratio has zero influence on your earnings. I will try below to tell you what actually influences your mining income in the real world.

The best data currently available is probably the BTC Mining Pool List at Bitcointalk. Note that the profitability graphs at the bottom do not (at the time I write this) take into account pool fees, merged mining and rejected work (the last one being very individual).

Which pool is most profitable to mine for you depends on a lot of factors. I'd say there are two main influences on how profitable a pool will be for you: variance and expected average income.

Variance is determined by pool hashrate and reward system (PPS, DGM, others). The more variance the more luck will influence your profits. The variance tells you how far the income is likely to vary from the expected average over the short term.

Expected average income is determined by a lot of factors, which many miners probably don't realize:

Which ratio of rejected work are you getting? Some pools have a higher average reject ratio than other pools. On some pools your individual reject ratio may be especially low. Some pools artificially lower your reject ratio by paying rejected work. This is not actually an improvement. It means people with low reject ratio (good setup) are forced to give some of their income to people with high reject ratio (bad internet line, bad equipment).
What ratio of orphaned blocks does the pool have? (ignore for pps pools)
What's the average income from a block in the pool?  (ignore for pps pools) Some pools will have a higher income from transaction fees. Some pools keep the transaction fees and don't pay them out to miners.
How much of a bonus do you get from merged mining? This depends on which other coins are merged mined, their difficulty, their current value compared to bitcoin, in addition to all the factors listed here but for the merged coin (average income per block for the pool, orphan ratio for the merged coins, etc.)
What is the pool fee?

I don't include pool hopping in this list, since most Bitcoin mining pools are not vulnerable to pool hopping. Things may differ in the altcoin world.

There are some factors that are the same for all pools, like bitcoin difficulty, bitcoin value and your expenses, like electricity. Bitcoin mining calculators seem to cover these well, but they don't cover most of the factors above that are individual to each pool.

All of that being said, there's a lot of other reasons for picking a pool than a small difference in mining income.


Can I have multiple working public keys per wallet? My Android Bitcoin wallet changes the Public key (the one I give to others) after every transaction for security.

However, I want to put up a Public key online for donations.

Does this mean that my one wallet has multiple public keys (and I keep all the bitcoins given to any address owned by me) or is it that my private key changes also, and all BC given to my old key gets sent into the void?

Your wallet keeps all private and public keys it ever used indefinitely. You do not lose coins on old private keys when you give out new addresses.

It is just a privacy measure to give out new addresses for each transaction. It prevents your business partners from knowing about other transactions you have received and sent.

All addresses can be used multiple times, so you can use any of your addresses as a donation address. It will continue to work even when you give out other addresses later.

Be sure to keep a backup of your wallet separate from your phone if you are going to manage significant funds with it.


What are some reasons that a rational miner won't switch to P2Pool? Besides the initial time investment of downloading & learning how to use a new tool ... what are some more reasons for a rational not to switch to P2Pool?

(Some reasons to switch is a slightly higher payoff in P2Pool due to bonus donations, and the overall contribution to a more distributed Bitcoin network).

Is running P2Pool more maintenance than using one of the larger pools? Is it more buggy, or has a lower total hashrate and thus higher variance?

Variance. Raw connection to p2pool will always have variance for a typical miner - if the pool is small there will be large pool-based variance, if it is large the share difficulty will be high and there will be large share-based variance.
Running a Bitcoin node is already nontrivial and going forward will become impossible for at-home miners. For example, some mining rigs run on a cheap USB flash drive, which may soon become insufficient to hold the blockchain.
Normal mining pools have additional features such as worker monitoring, SMS notifications, automatic conversion of NMC to BTC and so on.
Some of p2pool's suggested advantages are a bit exaggerated. The recent P2SH woes are a non-issue since miners who want to vote can simply go to a pool that votes as they want. The more generic concentration of power problem can alternatively be solved with smart miners (miners who generate blocks themselves or from an independent party, and submit shares with Merkle branches of the generation transaction which are accepted if it credits the pool).

Because of these reasons, I believe the future will be small PPS pools which act as a proxy to p2pool (with or without the use of independent block-issuing nodes). These will have low fees, no variance, as many features as the pool operator wants to implement, and will not be highly centralized. Until we see more of these I don't think there's much justification for p2pool going mainstream.


What is a previous transaction? I'm new in the bitcoin field and I need to understand about transactions.
When Bob is sending bitcoins to Alice, Bob will create a tx, he will add Alice's address, sign it and broadcast it in the network. But what is the previous transaction in this case? Is it a different tx from the one between Bob and Alice?

It's the transaction (or transactions) that bob got his bitcoins from.


math to make a full private key have a mini private key equivalent When creating a private key, how would I ensure that there is a mini private key equivalent, which could be substituted in place of the the full private key? What math would I have to use to create such a private key for bitcoins?

You can't create a minikey for a private key - you need to create a private key once you've created a minikey.

You need to ensure that the SHA256 of the mini key plus a question mark after it has a hash starting with 00.

Or, in Python:

sha256(candidate + "?")[0] == chr(0)

The following Python program will generate mini keys:

import hashlib
from binascii import hexlify as hx
import random
rand = random.SystemRandom()

B58_ALPHA = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"

def sha256(s):
    return hashlib.sha256(s).digest()

def gen_candidate():
    candidate = "S"
    for i in xrange(29):
        candidate = candidate + rand.choice(B58_ALPHA)
    return candidate

def test_candidate(candidate):
    return sha256(candidate + "?")[0] == chr(0)

while True:
    c = gen_candidate()
    if test_candidate(c):
        print c, hx(sha256(c))


Bitcoin transaction has been unconfirmed for over 24 hours... What should I do? I'm pretty new to Bitcoin and although the technology is pretty exciting, I feel as though the sluggish confirmation times are letting it down...

On 18th December I instructed a Bitcoin transaction (5314fb75a5d08caf563cd6f6aaf40f448e9a9c6e0ba6affa499accd3534b97f6), admittedly with a pretty low fee, but I still wasn't expecting it to take days to get confirmed... Will this soon be dropped from the mempool or is there a way I can accelerate the transaction confirmation process?

Yours,
citygent

It will be dropt from the mempool if it stays unconfirmed for a long time. If the fee is low, it takes more time to get confirmed. And just now the Bitcoin network is getting spamed by Bcashers. I would wait until the spam is over, and then put a fee in acordance to the time you are willig to wait until the confirmation.


Can an Ethereum contract be updated without having to be re-submitted? I am wondering - can an Ethereum contract be updated without having to be re-submitted? Say, if I find a bug in my contract, can I fix it without having to create a new contract and making my potential users have to update their references? As I understand, I can always upload a new contract and make that contract fetch the old data plus possibly invalidate the old contract, but that still doesn't let me redirect anyone using the old contract into the new one.

You can separate concerns - have a contract that the users interface with and that has a reference (an address) of another contract that contains the actual logic. Then, you can control the interface contract and update it with the address of the logic contract on updates.


What are the differences between Bitcoin and Libra? Recently, Facebook announced to launch a  crypto currency called "Libra". Libra is managed by associations under the name "Libra Association", see https://libra.org/en-US/association/.

What are the differences between the Bitcoin and Libra algorithms and protocol?

This question might be considered too broad and too opinion based according to the rules of this forum. However, tackling it from a technical standpoint based on facts rather than opinions might be on-topic and I will try my best to deep dive on that. Let's try to hit the five most important aspects that people might be interested in: security, decentralization, scalability, governance and privacy.

Security

The most important security consideration that needs to be given to a digital currency is preventing double spend (spending the same coin more than once), fraudulent transactions (spending what is not yours) or creating money out of thin air. Bitcoin prevents all three of this by storing its transactions in a blockchain that are almost immutable after
certain blocks due to the proof of work (PoW) algorithm. Supply is capped, coins can only be generated by the mining process, transactions are governed by cryptography and coins can only be spent by providing a valid signature. The PoW is also an important security consideration for preventing double spending that is sometimes overlooked by many. It signifies the inherent cost involved to modify blocks and also means that the malicious party amasses more mining power than rest of the network combined. After a certain number of blocks the transactions becomes extremely difficult to alter which means the they are immutable.

Libra operates on LibraBFT consensus, a class of the classical Byzantine Fault Tolerance (BFT) model. A model that operates on BFT can be trusted as long as there are at least 2/3rd honest nodes operating the network. So 33% of the nodes can come together and launch a malicious attack. They also need not spend money in terms of hash power like PoW in order to do that. So collusion could be an easier possibility with BFT models.

Decentralization

Bitcoin is one of the largest distributed network on this planet. Entire data is public to all the participants of the network and there are no gatekeepers or requirements to become part of the Bitcoin network. Every full node operating the bitcoin software validates all transactions in its entirety from the genesis block. When miners mine a block, every full node ensures that the block is generated according to the consensus protocol and rejects blocks which do not meet them. This ensures full decentralization, and ensures that power is not concentrated in the hands of the miners as claimed by many ignorant people. Try reading about the block scaling debate of 2017 and you will understand how the community played a major role in governing the network.

In Libra's current implementation, 'trusted' validator nodes are core to the security model. The Libra blockchain will be open to the public to read, but closed for writes.
This means that hard power is centralized around these few entities and the protocol itself depends on these entities to validate the protocol. This means the protocol depends on whatever they decide it is. These entities can freeze your coins, take your coins, issue new coins, or really whatever they want - the sky is the limit. Libra claims that in the future it might move to a permissionless model, but it is highly doubtful that such a scheme can succeed.

Scalability

Bitcoin was designed for transactions to be as secure as possible and that comes at a cost of sacrificing scalability for security and decentralization. However, the current Lightning Network implementation solves this issue and ensure that bitcoins can be transferred almost as fast as you can create and transmit them without sacrificing on the underlying security mechanisms.

Libra being 'permissioned' inherently has higher scalability. It is no different than doing a paypal transaction or spending via your credit card.

Governance

Trustlessness is the most important characteristics of Bitcoin. Bitcoin governance  emerges from users through the software they run on their computers. Nobody calls the shots. The entire Bitcoin code is public and you can go and verify the entire program yourself. The governance components also involve the decentralization and the security considerations that have been mentioned above. Also, Bitcoin developers have no special powers to make users switch to a new network. Even if the Bitcoin Core developers were to release a new version of the software to create such a new network, users of the older software implementations could simply ignore the update and continue using the existing protocol as they please. That is the power of decentralization.

Libra being a stable coin, one needs to ensure that for every coin that issued, balances of fiat currency is maintained. So there involves trust in the organization to keep the balance in fiat currency, trust in the fiat currency itself and the instruments (or banks) in which this balance is actually kept. Also, given the centralization involved in Libra, the sky is the limit in terms of what the 'trusted' validators think the protocol should be. Most of these validators are Fortune 500 companies, and they are not there for charity. Their main goal/incentive lies in improving shareholder value and one might now be incorrect to think they can potentially go to any extent to achieve that based on historical precedence.

Privacy

Bitcoin provides pseudo-anonymity. Although, many exchanges ask for KYC while buying bitcoins, the protocol itself does not need any verification. Even after buying from an exchange, you can do a CoinJoin transaction to hide your identity. Preventing address re-use and keeping keys under one's control will then ensure your privacy is protected.

At least from what I have read, the resellers of Libra will have to collect identifying data from users under current FATF recommendation if the amounts being transferred exceed $1,000. This data has to be managed and transmitted out of band from the blockchain. A lot of internet companies have come under flack recently for in-apt data sharing practices. If one were to draw a parallel, this data can be overwhelmingly be used for many other business enhancing practices as well.


Is there a list of charities that accept Bitcoin donations? Say someone wanted to donate some of their Bitcoins for charity, is there some comprehensive list of charities that accept donations in Bitcoins?

The most comprehensive list I can find is here: https://en.bitcoin.it/wiki/Donation-accepting_organizations_and_projects

There is also a website "Bitcoin-Charity" which converts BTC to $ on behalf of charities, promising not to put more than 1% towards admin costs. A neat feature of this site is that no technological knowledge is required by the charity to receive donations, and the total donated to date is listed (though it would be better shown in $ than BTC, or both). They currently have 9 charities listed: www.bitcoin-charity.com/charities/

Edit note: bitcoin-charities.com is no longer active.


My own bitcoin miner I am trying to write simple bitcoin miner on Java

How to request miner pool?
What is miner pool protocol?

How to send data to stratum pool? (socket, post request or ect...)
What need send there?

Thank you for help!

The mining protocol between miner and pool is called Stratum.

See https://en.bitcoin.it/wiki/Stratum_mining_protocol

How to open a TCP connection and send/receive data using Java; there should be plenty of resources you can find on that.


Lost my bitcoins, was I hacked? Last time I used my Bitcoin-qt client was a few months ago.  I made a backup of the wallet to an external USB drive.

Yesterday, I started the client and after it synchronized the block-chain, I saw that I had 0 bitcoins!  I restored the backup wallet.dat file and started it again, it said it was rescanning, and then the same result: 0 bitcoins! Even the transaction history is blank!

I had once done a paper backup but cannot find that now. Would that help?

Is there a way to know if I was hacked and my btc stolen?

Help... any advice and hints appreciated!

If your bitcoins had been stolen (by someone else who acquired the private keys), your client would show transactions sending those coins to the thief's address.  The fact that you see no transactions at all suggests that for some reason the client has not imported the keys correctly, or perhaps that your backup is corrupt.

If you know the addresses from your wallet, you can look them up on a site like http://blockchain.info and see if the coins are still in those addresses, or if they have been transferred out.


Transaction unconfirmed, send with Multibit HD, too low fee 2 days ago I tried to send BTC to a different address, using Multibit HD (then not knowing Multibit is dead).
It was send with a fee of 0,0001 (52.083 sat/B).
I now know this fee was too low.

The transaction is not being confirmed by the network. And after using the repair wallet in multibit a couple of times it is still saying sending. Older transactions are now saying receiving isntead of received...

I have not used BTC in a while and did not know that multibit is dead.
I am trying to google my way out of this but so far no luck.

Is there any way for me to cancel the transaction and resend it with more fee?

By the way I am not so good with software so some of the options I have come across are too risky for me.

Thanks in advance

EDIT: TX 4b0e68e0ca47f45f8adfbe749ff117ab91f871161b3c81e9a831550cf5c61899

As you have alread realised the Bitcoin mempool is currently (since the last 7 days) full of high-fee paying transactions.

Unfortunately I do NOT expect the number of transactions paying such high fees to drop significantly during the following days/weeks. But eventually with some luck when not so many new high-fee paying transactions are broadcasted your transaction may be confirmed.

MultiBit does not support replace-by-fee (RBF) as far as I know. Therefore you cannot do much more than sit and wait. If your transaction is not confirmed within around 1-2 weeks, then the network will drop if from the mempool and you can broadcast a new transaction with a higher fee.


How find own address in testnet using bitcoin-cli? I have bitcoin-core installed, I am running it in testnet mode. Now if I want to fund my wallet, I need to know the receiving address. How do find my receiving address, so that I can fund it and then complete a transaction.
I am using bitcoin-cli -testnet , what is best way to fund my own wallet so that I can send some coins to another address?

You'll want to use getnewaddress. Here is the output of bitcoin-cli help getnewaddress from Satoshi:0.17.0.1:

bitcoin-cli getnewaddress( "label" "address_type" )

Returns a new Bitcoin address for receiving payments.
If 'label' is specified, it is added to the address book
so payments received with the address will be associated with 'label'.

Arguments:
1. "label"          (string, optional) The label name for the address to be linked to. If not provided, the default label "" is used. It can also be set to the empty string "" to represent the default label. The label does not need to exist, it will be created if there is no label by the given name.
2. "address_type"   (string, optional) The address type to use. Options are "legacy", "p2sh-segwit", and "bech32". Default is set by -addresstype.

Result:
"address"    (string) The new bitcoin address

Examples:
   > bitcoin-cli getnewaddress
   > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/


How does Base58Check prefix character prediction work? I'm trying to implement Base58Check as a learning exercise and I came across the different types of prefixes as summarised here.

I wonder however how to arrive in the expected prefix characters from the prefix Byte.
Why the same byte can lead to different characters, and how those come to be.

My initial assumption was that the first character is the Base58 encode of the prefix byte, but that seems wrong, the address byte 0x00 maps to "1" because it's a leading zero, but the second example of P2SH with 0x05 should map to char "6" but instead it maps to "3". And the WIF prefix of 0x80 can map to either "5" (uncompressed), "K" or "L" (compressed) even though the prefix is the same.

Also on my tests that mapping only seems to work after I add the 4 byte checksum in the end of the array. If I encode the array without the checksum the result has different prefix characters.

So, how is the expected prefix characters of Base58Check derived from the prefix?

This is not unique to Base58 encoding (nor the Check part). It's about base conversion:

The number 13 in hex is 0x0d, the number 18 in hex is 0x12. Even though in decimal both start with 1, their first digits in hex are different. In fact, in Bitcoin's address format, unlike the example above, that would be comparing d with 1 instead of 0 with 1 because encoded Bitcoin addresses have different lengths.

What's common is the largest factor deciding the significant digits are the significant digits. That's why if you want to calculate a few first characters of Base58check instead of adding 4 byte checksum at the end you can add 4 empty bytes and the first characters of the result would be same. Most of the time, (unless a base is a power of another, such as base-2 and base-16. Also note that 1s in front of addresses in Bitcoin are specially handled) the length of the input should be the same to calculate the same first few characters.

  So, how is the expected prefix characters of Base58Check derived from the prefix?

We also need to have an input of constant length (including 4 bytes of Base58check). I assume we have the first few bytes of the input. We pad the rest with zeros and Base58 encode it. We than pad the rest with 1s (or 255s if bytes) and Base58 encode.

Then we open the Bae58 alphabet:

123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz

Suppose we calculated 1FGMQ... as the lower range and 1FJwz... as the higher range. As long as the input is of the same length, no matter what you fill in to the rest of the bytes the encoded address will be between those two.


Largest block (measured in Bitcoins) What is the block in the blockchain with the most Bitcoins transacted?

I can't say that I'm certain of it, but this is the largest block I've ever seen:

00000000000000fb62bbadc0a9dcda556925b2d0c1ad8634253ac2e83ab8382f aka nr 153509

It has a total output volume of 607,176.29050282 BTC, primarily because of this 550k transaction.


How can one figure out what version of Bitcoin-Core is used most? Where can one find statistics on how many nodes are running older Bitcoin Core versions or alternative clients?

Yes.

Go to https://getaddr.bitnodes.io/nodes/, click on the "User Agents" tab.

At time of writing:

1   /Satoshi:0.11.0/    2119 (35.22%)
2   /Satoshi:0.10.2/    1416 (23.53%)
3   /Satoshi:0.10.0/    437 (7.26%)
4   /Satoshi:0.10.1/    418 (6.95%)
5   /Satoshi:0.9.3/     352 (5.85%)

(You can also click on "more.")


What are the requirements for running a Dash Masternode? Dash Masternodes allow for InstantSend transactions and are paid a portion of Dash's mining revenue. What requirements does a Masternode need to fulfill?

Dash Masternodes are archival full nodes. They enable the PrivateSend and InstantSend feature. Masternodes get to vote on funding and governance proposals. Masternodes are paid for these services with 45% of the mining reward.

A Masternode needs to put up a collateral of 1,000 Dash, have a dedicated IP address and may not be offline for more than 1 hour in 24h. Anyone can run a Masternode.


How do you redeem a compressed key? There is very good answer here: How to redeem a basic Tx?
It works great.

But the algorithm is only for uncompressed addresses/keys, how can I change it to deal with compressed ones?

And the second question - how should I change the procedure to redeem several inputs?

Exactly the same way, except instead of putting the compressed public key in the redeeming script, you use the compressed one. Decompressing it won't work, as that would change its hash (the address).


If a single private key of the HD bitcoin account is compromised, is the whole HD account compromised? The subject pretty much asks it all. I asked the same question on the Mycelium web site but did not get an answer. An HD account can have multiple private keys. Suppose one of the previous private keys gets compromised (falls into hands of a hacker) and this private key has no bitcoins assigned to it. Would the hacker be able to re-create subsequent private keys based on this single one private key?

The question applies to Mycelium and all other HD accounts. Also, is there a standardized way how private keys are created or each wallet does it on its own?

This question is important to me since we see more and more bitcoin forks. To claim newly forked bitcoins I would need to import private key(s) into another wallet. Assuming the new wallet may be used to harvest my private keys and to spend bitcoins, I would like to move my bitcoins from my HD account from private_key1->public_key1->address1 to private_key2->public_key2->address2. If I now import private_key1 into a hacked wallet, the hacker cannot spend my bitcoins directly. But should I worry that he will be able to re-create private_key2 and therefore still be able to spend my bitcoins?

With just the private key, no.

However, if the attacker knows both a child private key and the xpub of the chain it is derived from, yes.

From BIP32:

  One weakness that may not be immediately obvious, is that knowledge of a parent extended public key plus any non-hardened private key descending from it is equivalent to knowing the parent extended private key (and thus every private and public key descending from it). This means that extended public keys must be treated more carefully than regular public keys. It is also the reason for the existence of hardened keys, and why they are used for the account level in the tree. This way, a leak of account-specific (or below) private key never risks compromising the master or other accounts.

This means you should either never give out private keys, or treat xpubs are highly sensitive secret data.

When using hardened derivation, this problem doesn't exist, but they lack the ability to publicly derive addresses.


Naming Convention In Bitcoin Source Code Is there specific reference for naming conventions in Bitcoin Core source code?
I see regularity in class naming with prefix "C" (Chain, CInv etc.) or pointer naming with "p" (pprev, pnode etc. ) and am wondering if there's more to my list of prefixes or other conventions.

Is there a Bitcoin-specific naming convention at all?

http://en.wikipedia.org/wiki/Hungarian_notation

C stands for Class
p for Pointer
f for Flag (boolean)
n for Number
sz for zero terminated string

These conventions are no longer mandatory when contributing to bitcoin core.

You might also read https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md


one time pad using blockchain I am thinking if secure encryption like one time pad (OTP) is achievable using bitcoin blockchain? The reason is bitcoin blockchain size is over 70 GB, which could potentially encrypt/decrypt 70 GB worth of data. All that is needed by the sender and receiver is blockchain and an application that encrypts and decrypts the data on the sender and receiver end respectively. Please share your thoughts if it is a bad or wild idea and why? How about using other public blockchains like Ethereum or private ones like Eris or Hyperledger. What would make it work?

The requirement for a one time pad to be secure is that it consists of uniformly random data, only known to the participants that should be able to encrypt/decrypt.

The blockchain is not random (it's created by miners and users creating transactions), certainly not uniformly random (blocks and transactions have a very strict syntactic structure), and worst of all it is designed to be known to the entire world (or in the case of private blockchains, to all those who should be able to audit).

Short answer: bad idea.


How Is Block Assembled? I think I understand mining well enough, but what I don't get is how the blocks of transactions are assembled. According to this post - What exactly is Mining? - the miners assemble the blocks and then solve for the difficulty.

So, once a block is solved and the miners need to create a new block, how do the miners decide how many transactions to put in the block? Could the miner just assemble a block with a single transaction? Could certain blocks contain more or less transactions than another? Thanks!

Technically a block with just one transaction in it would be valid. However miners have an incentive to add more transactions to the block they are currently mining because they receive the transaction fees attached to those transactions.


Is it possible to fly with AntMiner in a hand luggage? Question maybe for https://travel.stackexchange.com/

But maybe Bitcoiners will know - have you ever flew with AntMiner in a hand luggage?

Does airport security ask any questions?

These questions are much better posed to the TSA.

  Computer Parts

  You may transport this item in carry-on or checked baggage. For items
  you wish to carry on, you should check with the airline to ensure that
  the item will fit in the overhead bin or underneath the seat of the
  airplane.

  To help officers get a clear look at your bag and reduce the need for
  additional screening, we suggest you pack your bag in neat layers
  (layer of clothes, layer of electronics, layer of clothes, layer of
  shoes, etc.) and wrap cords tightly around electronics items.

  Even if an item is generally permitted, it may be subject to
  additional screening or not allowed through the checkpoint if it
  triggers an alarm during the screening process, appears to have been
  tampered with, or poses other security concerns. The final decision
  rests with TSA on whether to allow any items on the plane.

See: http://apps.tsa.dhs.gov/mytsa/cib_results.aspx?search=computer%20parts


Bitcoin library in python I need a good library for bitcoin and other BTC-like cryptocurrencies in python.
I'm looking for something similar to bitcoinjs but in python.
Minimal requirements:

generate an EC keypair and get public address from the public key
generate an EC keypair and compress it to WIF format.
get an EC keypair from WIF
generate a number of EC keypairs (a HD wallet) from a given seed
build a transaction
broadcast transaction

If you know any good cryptocurrency libraries let me know!

Take a look at Peter Todd's python-bitcoinlib.

From the github repo:

  This Python2/3 library provides an easy interface to the bitcoin data structures and protocol. The approach is low-level and "ground up", with a focus on providing tools to manipulate the internals of how Bitcoin works.


Does Armory work with a pruned copy of the blockchain? I'm recovering a wallet from Armory and the blockchain is taking too much space. My HD is 500 GB big but none of my partitions have more then 70 GB left. The folder .bitcoin/blocks already uses 37 GB and Armory is only at 52%. Any solution to this?

No, you'll need to make space for a full copy of the blockchain somewhere. AFAIK, Armory rescans the blockchain in order to build its own database only after Bitcoin Core has fully synchronized. Therefore, Armory needs access to a full copy of the blockchain which is currently about 118GiB. Armory's database itself then will take more than 20GiB additionally.


Can you create a bitcoin transaction where you specify the miner? I want to be able to specify which bitcoin miner receives the fee. Is that even possible?

Not directly. You could do it by transmitting the transaction only to the miner in question, and making sure that his software will transmit the transaction to no one else (note that standard clients don't work this way; they're happy to retransmit transactions quickly across the whole network). This would mean that only this miner is trying to include it in a block, so he's the only one that can get the transaction fee.

Note that this means it might take a prohibitively long time for this "transfer" to go through, since you have to wait for that miner (or pool) to find a block. In the case of a pool, the transaction fee goes to the whole pool, not a certain miner in the pool (unless you have some off-blockchain communication).


Easiest way to set up non computer-literate person with Bitcoin What would be the easiest/quickest way to get somebody who isn't computer-literate set up to have the ability to transfer money to me via Bitcoin? Also, Bitcoin touts that it is anonymous. Is it any more anonymous or untraceable than a simple cash transaction?

The easiest way would be to create an online wallet on blockchain.info, and use one of the easy deposit features it offers. This however is impractical both for traceability (his, not yours), and for fees (which might even be higher than the taxes AFAIK).

That said, bear in mind that usually you might convince people to use bitcoins when they have something to gain, not when you do: consider carefully why should they do it before asking them to.


Can I get all the information I need to create a payment transaction from BlockExplorer? Let's say I have a bitcoin address that I want to make a payment from.

I understand that to create a payment from that address I need to get the unspent outs. Can I get that information from BlockExplorer ?

And if so to create the payment do I just need the transaction hash of the transaction containing the out and the index of the out ?

*Update : *

You can assume I have the private key. So what I'm looking for is a list of unspent outs by public key.

I can see how to retrieve transactions for an address i.e. http://blockexplorer.com/q/mytransactions/1JjvT5HoVoqhyLN2cb9imMsN9HgYAK268m

*Update 2 : *

I should have mentioned that I want to do this programmitcally, i.e. through the BlockExplorer query API. http://blockexplorer.com/q

To create a payment, you need a private key with an associated public key that has funds, a public key of the recipient, have the hash of the last transaction made on your public key, and perform some hashing on all of those.

Block explorer provides all the information but the private key. If you have that, you can generate a valid transaction on your own.


How does Bitcoin Core estimate the transaction fee? I want to know how Bitcoin-Core estimates the transaction fee and what factors it takes into account to estimatesmartfee. What is the formula that it uses? Can you also refer me Bitcoin Core files where I can find it's code.

Your client [1] will make use of transactions it relays to build an estimation : by caching it (and the block height) when it first sees it. It will later be able to tell how much time (# of blocks) it took for it to be confirmed.
To build a reliable estimation, it will fill "buckets" (basically, a pack of transactions sharing a common characteristic) according to the feerate paid by each transaction it relays.
When comes the time to estimate the feerate for a transaction to be included in block before a specified number of blocks, your client will check the percentage of transactions confirmed in each bucket (so, with transactions paying that much on average) during this period of time. It will return the feerate of the first bucket with a success (confirmed transaction) rate higher to the threshold [2].
This probability threshold is set by the second argument to estimatesmartfee (CONSERVATIVE | ECONOMICAL).
To quote the documentation by Alex Morcos (who coded most of the fee estimator) :

/** \class CBlockPolicyEstimator
The BlockPolicyEstimator is used for estimating the feerate needed
for a transaction to be included in a block within a certain number of
blocks.
At a high level the algorithm works by grouping transactions into buckets
based on having similar feerates and then tracking how long it
takes transactions in the various buckets to be mined.  It operates under
the assumption that in general transactions of higher feerate will be
included in blocks before transactions of lower feerate.   So for
example if you wanted to know what feerate you should put on a transaction to
be included in a block within the next 5 blocks, you would start by looking
at the bucket with the highest feerate transactions and verifying that a
sufficiently high percentage of them were confirmed within 5 blocks and
then you would look at the next highest feerate bucket, and so on, stopping at
the last bucket to pass the test.
The average feerate of transactions in this
bucket will give you an indication of the lowest feerate you can put on a
transaction and still have a sufficiently high chance of being confirmed
within your desired 5 blocks.

[1]: Talking about each node, it goes without saying that all nodes on the network don't share the same estimation (as there is no consensus on the mempools).
[2]: this is simplified, the CONSERVATIVE and ECONOMICAL parameters have technically an influence across buckets (target / 2, target, target * 2) but it's conceptually the same logic.

Going further, this is the best (without using easily malleable data) we can do with the information we have at broadcast time but it's clearly not enough from a UX perspective as you'll never be able to predict the feerate.
For example if multiple megabytes of transactions are broadcast at the same time you broadcast yours, fee estimation won't help you.
This is why replace by fee.


What is required to generate a block? I've read a little about BitCoins and think the idea is very interesting.  I was wondering what is required to generate a block?  I assume there is some software you need.  Do I also need an account somewhere like Mt Gox?

MtGox is an exchange (i.e. a place to sell and buy bitcoins for USD, EUR, GBP, etc.). If you want to get a few coins quickly you can buy them there.

To generate blocks you need to use your computer's processing power (this is called mining). Currently, it is very hard to produce a block by yourself so most people mine in group and split the rewards (pool mining). Check this question for more information:

How can I start mining Bitcoin?


Can Bitcoin be stored in a computer without a wallet , just like a normal file? Everything on computers are stored in some type of files like .txt , .MP3 , ... Etc , so is it possible that BTC itself could be stored in a PC independently without a wallet , just like any other file on a PC or a phone ? Or is it compulsory to store it in a wallet , so that one couldn't make offline transactions , as that wouldn't be added to the ledger ?

On the technical level, there is no such a thing as a Bitcoin. What there actually are are transaction outputs. Transaction outputs consist of a output script and a value. The value is in satoshis, and that is what gives your wallet a "balance". The output script specifies a set of conditions  that are required to spend the value associated with that output.

Typically the output script requires that a digital signature be made with a public key whose hash matches a hash provided in the output script.

So, no, a "Bitcoin itself" does not have any associated files that you can store. However you can store the Bitcoin blockchain (thus store the transaction data, including transaction outputs) locally, and that is what nodes do. But storing it offline would mean that it becomes out of date very quickly and thus missing new transactions.

Alternatively you can store the private keys which are necessary to spend from the typical type of transaction output. These can be stored independently of any wallet software. But you still need some software to create a transaction and then broadcast it to the rest of the network. In order for a transaction to "go through", you must broadcast the transaction so that it can be added to the blockchain. Just making it offline won't do anything.


Is there an alternative to salvagewallet that keeps account info? I am using the accounts feature of bitcoind , if a wallet gets corrupted and bitcoind is started with -salvagewallet then the account information is lost.

So, is there any built in feature that will rebuilt also my accounts ?

This could be a solution once released:

"Add -zapwallettx function, a diagnostic tool to assist in wallet repair" - https://github.com/bitcoin/bitcoin/pull/3659


Which testnet am I on? How can I know which testnet am I on?

I just ran bitcoind -testnet, and I would assume it would connect to the most recent one, but is there a way to know it?

Bitcoin and bitcoind versions v0.3.14 - v0.3.19 used the first testnet.
Bitcoin, Bitcoin-Qt and bitcoind versions v0.3.20 - v0.6.1 used the second testnet.
Bitcoin-Qt and bitcoind version v0.7.0 and above use the third testnet.


Why are adresses not showing up in gettxout? I have a bitcoin node but whenever i try to gettxout i get this response:
user@bitcoin:~# bitcoin-cli gettxout "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098" 0
{ "bestblock": "0000000000000000007c11ddb3e10be41ef0f6a2a5dbc2915937df8a608c4af6",   "confirmations": 385308,   "value": 50.00000000,   "scriptPubKey": {
    "asm": "0496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858ee OP_CHECKSIG",
    "hex": "410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac",
    "type": "pubkey"   },   "coinbase": true }
user@bitcoin:~# bitcoin-cli gettxout "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098" 1

I have txindex=1 in my config file and it's reindexed. Anything else i can try?

Not every transaction output has an address. In this case, the output you are looking at, while it is a standard output type, it does not have an associated address. It is a Pay to Public Key script for which there is no address. Thus gettxout does not provide an address.


Can an old block be inserted into the blockchain? I've been shown how network time is enforced, but I'm still having trouble understanding how a false old block cannot be inserted into the blockchain with the entire chain remined or how a powerful miner cannot remine the entire chain.

Does difficulty prevent this because it would take so long to remine the entire chain, or is there another way that "old blocks" are forbidden?

How are new blocks distinguished from old blocks or new transactions distinguished from old ones?

If blocks older than 2 hours are rejected, how are old blocks never rejected?

Every block refers to a specific parent, resulting in all blocks together forming a tree structure. Typically it's just a single very long branch, with very occasional short side branches (1 to 2 blocks long).

You cannot "insert" a block into the block chain, as no block refers to it as parent.


What will happen to my bitcoin if my Ledger or any bitcoin hardware wallet will damaged? I want to buy a hardware wallet for storing bitcoin because it is safe than an online wallet but at the same time, I am thinking that what will happen to my stored bitcoin if my hardware wallet damaged. Can I recover my bitcoin?

Assuming the Ledger Nano S implements BIP 39, your hardware wallet probably showed you a 12/24/36 word Mnemonic code. If you wrote these mnemonic code words down, then you can restore your corrupted hardware wallet with just these words. Also, you can use these words to restore any wallet that supports BIP 39. This includes many mobile phone wallets and other hardware wallets. If you did not write these code words down, then you are probably out of luck for recovering your wallet keys.


Where can I sell domain names and earn in bitcoins? I want to sell my domain names and receive payments in bitcoins. Some platforms that I know of allow to buy domain names with bitcoins but won't let you sell and earn in BTC. Any platform that allows the same?If that's not possible, any reputed bitcoin-domain escrow that may be of help?Thanks.

There are no sites that automatically buy domains at all that I know of. Most of the domain marketplaces don't accept Bitcoin, but the ones that do don't have much traffic.

I use bitcointalk. Just go into their Digital goods section, make a topic called [WTS] INSERT DOMAIN, and in the message, put in the domain registrar, how much you want for it, when it will expire, etc.

If you want, you can host an auction.

Id recommend 100% to use escrow. Here's a list of the best escrows on the forum. https://bitcointalk.org/index.php?topic=855778.0


What client to use for an alternative special purpose blockchain? Lets say one wanted to create a blockchain for the purposes of providing a scalable back-end for accounting for the trade of some arbitrary unit between people. It would not be a tradeable currency.

A possible requirement for the client would be third party authentication to participate in the blockchain. I'm thinking this because a small niche population could render the blockchain vulnerable to 50% attacks, perhaps there are other ways to prevent this.

Political issues aside, some enhancements have been made to the main trunk code.

Are there any enhancements to the trunk code that are useful for general purpose implementations, or walled garden approaches?

This answer presumes that you need to retain the resilience of a P2P network where there is not a single point of failure.  It also presumes that you need an authoritative source that has the ability to maintain control so that the network is not vulnerable to a 51% attack.

I suppose you could fork the stock bitcoin client without too much effort to create an alt-chain that accomplishes this.

On the fork, add to the block verification a step to also check that each mined block includes a transaction from one of the authorized miners.  The way to tell if the block came from an authorized miner is to have the miner include a spend transaction that comes from a private key assigned to that miner.  (Miners would never broadcast these transactions, so if the transaction appears in a block it would mean only an authorized miner solved that block.)

There are a number of ways the client could learn the list of public addresses for the "authorized miners" list.  This list could be hard-coded into the client even, initially, if needed.

There's the risk of how to handle the situation where an authorized miner ends up compromised or otherwise needs to be removed from the list.

Maybe there's an approach here that kills two birds with one stone.

Have the master node broadcast a heartbeat transaction periodically.  This could be done by having the master mine a block that inserts a chunk of data, similar to how an altcoin that does merged mining works -- it has an exception as to what it considers as a valid proof of work.  In this case, any block that is from the master node is considered as a valid proof of work.  The method to use as proof that the block truly is from the master node is for the block to include a spend transaction from the public address owned by the master node.

That heartbeat from the master could also include a checkpoint hash (e.g., "confirmed by the master authority") -- to limit the damage a compromised miner could do.

Thus the end result is:

Normal nodes cannot mine but will exist as P2P nodes that store blocks and relay transactions.
Miners that are authorized do compete, on a proof-of-work basis.
A master node has power of authority and can intervene (i.e, always has 50%+1 majority) if needed.
Frequent checkpoints from the master can limit the risk from compromized miner nodes.

Only miners who are trusted would mine but even if one of them goes bad, the master can clean up by rewriting all the way back to the last checkpoint.

So it doesn't seem to be too much effort to fork the bitcoin trunk to work in this manner.  Centralized systems are always much easier than decentralized.


Is there any blockchains that has implemented a 2fa type of security measure? Currently someone can steal your btc private key and send all your funds away. But has there been a 2fa built into a blockchain that prevents something like this?

Say if you wanted to send something out from a btc address, it will require a 2fa generated token text to be provided in order send out.

I'm not talking about exchanges, but just the blockchain itself.

text to be provided in order send out.

Who would be sending this SMS, who would be generating the secret?

The Bitcoin blockchain does support multi factor authentication by way of OP_CHECKMULTISIG, where you can have multiple keys simultaneously control a single output. This is auditable (you can tell what keys signed) and requires no third party trust.

  Currently someone can steal your btc private key and send all your funds away.

Quite literally, the reason for wanting to protect the private key from being stolen in the first place.


Which altcoins have their own mobile friendly wallet created by the core devs? Was wondering how many coins have their core wallet software that is accessible on mobile devices? 3rd party devs do not count.

Only want a list of coins that can be used on mobile devices as this reduces the risk of theft as the wallet software is made by the core devs.

The Dogecoin Wallet was created by Max Keller, who is the lead developer for Dogecoin.

This Litecoin Wallet purports to be created by a third party developer who "teamed up with the Litecoin Dev Team". I'm not sure if that counts for your purposes.


RPC Command to send from multiple accounts to one account (default - "") in same wallet I have small amounts in multiple accounts in the same wallet. I want to send all of them to default account (usually named as ""). Is their any RPC command available for this scenario?

Thanks in advance

NOTE: Account features are deprecated and will be removed in Bitcoin Core v0.18.0, it is recommended to switch to the label API in v0.17.0 and later, see Release notes 14023.

Depending on what you are trying to do, you can either move them using the move RPC:

move "fromaccount" "toaccount" amount ( minconf "comment" )

DEPRECATED. Move a specified amount from one account in your wallet to another.

Arguments:
1. "fromaccount"   (string, required) The name of the account to move funds from. May be the default account using "".
2. "toaccount"     (string, required) The name of the account to move funds to. May be the default account using "".
3. amount            (numeric) Quantity of BTC to move between accounts.
4. (dummy)           (numeric, optional) Ignored. Remains for backward compatibility.
5. "comment"       (string, optional) An optional comment, stored in the wallet only.

Result: true|false           (boolean) true if successful.

Examples:

Move 0.01 BTC from the default account to the account named tabby
> bitcoin-cli move "" "tabby" 0.01

Move 0.01 BTC timotei to akiko with a comment and funds have 6 confirmations
> bitcoin-cli move "timotei" "akiko" 0.01 6 "happy birthday!"

As a json rpc call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "move", "params": ["timotei", "akiko",
0.01, 6, "happy birthday!"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

Or you can get the address of the default account using the getaccountaddress RPC:

$ bitcoin-cli getaccountaddress ""

and then send it to that address using the sendfrom RPC:

$ bitcoin-cli sendfrom <account-name> <to-address> <amount>


How does a client get the merkle branch of a transaction? When the Bitcoin client receives a transaction, it checks if the transaction is confirmed. This is done by verifying that the transaction hashes correctly, in the merkle tree, to the merkle root in a block.

How does the client know which block holds the merkle root of the transaction?

After finding the correct block, how is the merkle branch acquired?

There is no way in the current P2P protocol to request a historical (=confirmed) transaction, without requesting the block it is in. Supporting that would require the peer to have a full index of all transactions ever, which isn't necessary for normal operation.

To request a transaction, you will either:

Use getdata MSG_TX <txid> to request a memory pool or recently relayed transaction. In this case, no block information exists.
Use getdata MSG_BLOCK <blkid> to request a full block, in which case you get the block with it, and need to check the full merkle tree anyway.
Use getdata MSG_FILTERED_BLOCK <blkid> to request a filtered block (see BIP37), in which case you can check the partial merkle tree to verify the transaction is indeed part of the block.


Simulate HTLC in regtest c-lightning I have three nodes in regtest environment l1, l2, and l3
l1 create a channel with l2
l2 create a channel with l3
l3 create an invoice for l1.
l1 can pays it because use the route l1-l2-l3
I presume that here c-lightning use HTLC to accomplish it.
Where can I debug the script?
I'd like to see something like this
IF
  # Payment if you have the secret R
  HASH160 <H> EQUALVERIFY
ELSE
# Refund after timeout.
<locktime> CHECKLOCKTIMEVERIFY DROP <Payee Pubic Key> CHECKSIG
ENDIF

In order for you to see these scripts you'll have to force the channel on-chain, along with the HTLC. Only then will the HTLC be swept using the script, otherwise you'll only see the P2WSH output for the HTLC being added and then removed if the payment succeeds or fails.
Under normal operation you wouldn't therefore see the HTLC. When testing c-lightning we do however force this case, to verify that it is being handled correctly. There are two ways to force on-chain settlement:

Write a small plugin that simply holds on to the incoming HTLC on either l2 or l3 depending on which channel you want to observe the script.
If you compiled with DEVELOPER=1 you can also provide a file with instructions to disconnect if certain messages are seen. This is a bit more involved, but here's a test that shows how that works. It instrucs the l1 to disconnect as soon as it gets a WIRE_REVOKE_AND_ACK message which completes the addition of the HTLC.

Once the HTLC is stuck at some point you can generate a number of blocks until the HTLC timeout approaches, at which point the nodes will publish a unilateral close. Once the channel is closed, and the HTLC timeout expired, the nodes will sweep the HTLC output with the script you're looking for.


How to get a bitcoin address's balance? I know blockchain.info has an API: https://blockchain.info/q/addressbalance/134dV6U7gQ6wCFbfHUz2CMh6Dth72oGpgH
gets the bitcoin address's balance,but it's not open source and must connect to the Internet.

And I find the open source website blockexplorer.com has not show the right balance:
http://blockexplorer.com/testnet/address/134dV6U7gQ6wCFbfHUz2CMh6Dth72oGpgH
It gets 0 but not 1250000 from blockchain.info.

I tried bitcoin-qt client debug console:
getbalance 134dV6U7gQ6wCFbfHUz2CMh6Dth72oGpgH
But it returns 0 whenever the address is not mine.

How can I get someone else's bitcoin address's balance?
The bitcoin database is big and hard to check every transaction to get the balance.

Is there any source code or API easy to use?

blockexplorer.com does show the right balance. However, you are looking up in the Testnet blockchain.

The right request is the following:
http://blockexplorer.com/address/134dV6U7gQ6wCFbfHUz2CMh6Dth72oGpgH

If you open that link, you will see that it shows the right balance.

As you have mentioned, blockexplorer.com is open source, so you probably want to look at the source code to find out how the mechanism you are interested in works.


Atomic Swap - Problem? Can somebody explain me why atomic swaps are not flawed in that way:

When I give him/her my secret he/she could decide wheter to make the trade or not. If the price does favor him/her after a certain amount of time he/she will execute the trade if not wait for the timeout. Do I miss something?

There is a problem with the transaction favoring a party, and they can use the timeout to their advantage. But it is not as dire as some think.

Here is an example:

Alice creates a contract on the Bitshares blockchain that will pay Bob 1 Bitcoin if Bob can come up with the secret. If he does not do this within 24 hours, Alice gets her Bitcoin back.

Bob creates a contract on the Litecoin network that will pay Alice 2.5 Bitcoin if she comes up with the same secret within 12 hours.

Alice has a small advantage here. She has the secret. She can wait until near the 12 hour mark to decide if the price moved in her favor. If the price is not to her liking, she does nothing. Bob gets his Litecoin back, and Alice waits another 12 hours to get her Bitcoin back.

If Alice decides to take the Litecoin, Bob has few choices. He has to take the Bitcoin or leave empty handed.


Where do wallets such as Exodus store the blockchain? I recently installed Exodus and as soon as I configured my wallet it was ready to go. It did not appear to need to download gigabytes-large blockchain for any of the currencies I transferred into it. Other wallet apps—such as Bitcoin Core and similar—must download the blockchain for hours before presenting me with an accurate balance.

Where or how is the blockchain stored for wallets such as Exodus?

Exodus does not have a copy of the blockchain locally, instead it relies on a central server for fetching blockchain data.


PSBT encoding : what's the aim of convertBytes function? I'm currently working on PSBT and I try to understand all the part of the original implementation.
Dealing with base64 PSBT encoding: it seems that we convert the buffer from a base 8 to a base 6 using the convertBytes function.
Is someone that could explain me the aim of this conversion ?

PSBT uses Base64 encoding. As every Base64 character has 64 = 26 possibilities, they can store 6 bits of information. The ConvertBits function you link to takes input bytes (which consist of 8 bits each), and rearranges them into groups of 6 bits, which are then mapped to the Base64 character set.
ConvertBits<A,B> is not converting from base-A to base-B; it is converting from base-2A to base-2B.


How to setup https ssl letsencrypt for NXT / Ardor public nodes? I want to run my own public nxt / ardor node, but I also want https (letsencrypt). I have a ubuntu server with apache 2.4 installed already. What are the steps to get this setup?

As stated here: https://nxtforum.org/public-nodes-vpss/method-to-configure-https-for-nxt-public-nodes/

Requirements

1) A Linux server running Nxt, and configured for public API access. This should only require creating a nxt.properties under nxt/conf similar to this:

nxt.apiServerCORS=true
nxt.uiServerCORS=true
nxt.myAddress=SERVER_IP_ADDRESS
nxt.allowedBotHosts=*
nxt.allowedUserHosts=127.0.0.1; localhost; SERVER_IP_ADDRESS; 0:0:0:0:0:0:0:1;
nxt.enableAPIserver=true
nxt.apiServerHost=0.0.0.0

2) A subdomain (or domain) to access your node. This is required to use an SSL certificate. The subdomain should be included in the domain nameservers configuration as an A record pointing to your server IP.

Procedure

In this example, setup was done using root account. If you're using a non-root account, it needs to be in the sudo group and commands need to be run using sudo.

1) *Turn off Apache if you have it installed already first* Install letsencrypt (certbot) and generate the SSL certificate for your (sub)domain.

wget https://dl.eff.org/certbot-auto
chmod a+x ./certbot-auto
./certbot-auto certonly --standalone --email admin@example.com -d sub.example.com

2) Install apache webserver if you dont have it already and enable the modules for ssl and reverse proxy. If you have it installed, just enable proxy_http

apt-get install apache2
a2enmod ssl proxy_http

3) Configure the default apache configuration file.

nano /etc/apache2/sites-available/000-default.conf

Replace the default configuration lines with the following, replacing the strings in red with your (sub)domain. Just comment out the existing one and copy the entire thing below and adjust to your site/directories:

<VirtualHost *:80>
        ServerName sub.example.com
        Redirect permanent / https://sub.example.com/
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName sub.example.com
        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/sub.example.com/cert.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/sub.example.com/privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/live/sub.example.com/chain.pem
        SSLProxyEngine On
        ProxyPreserveHost On
        ProxyRequests Off
        ProxyPass / http://localhost:7876/
        ProxyPassReverse / http://localhost:7876/
</VirtualHost>
</IfModule>

4) Finally, restart the apache webserver.

service apache2 restart

If you run into 404 errors during install, you'll have to remove those packages like this: https://askubuntu.com/questions/896603/trying-to-install-letsencrypt-on-ubuntu-12-04-using-certbot-auto-program-but-ge/896614#896614

Remember to change your port if your going to use testnet 6876 or mainnet 7876.

Also be sure to open up your ports 7874 for peer connetions.

Ardor ports are testnet 26876 and live 27876

The above also works when making a public Ardor node.

Below is the output after a successful certbot-auto download:

MAKE SURE YOU TURN OFF APACHE BEFORE YOU DO THIS

root@localh:~# ./certbot-auto certonly --standalone --email info@xxxx.com -d ardor.xxxxx.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for ardor.xxxx.com
Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at
   /etc/letsencrypt/live/ardor.xxxx.com/fullchain.pem. Your
   cert will expire on 2017-09-20. To obtain a new or tweaked version
   of this certificate in the future, simply run certbot-auto again.
   To non-interactively renew *all* of your certificates, run
   "certbot-auto renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le


Can I send BTC from other node or wallet with my address? I'm trying to send bitcoins from node2 with my address using private key noted that my address is created in node1.I followed this link:
"https://en.bitcoin.it/wiki/How_to_import_private_keys"
I dump private key in node1 using this command:

bitcoin-cli -testnet -rpcuser=test -rpcpassword=test123 dumpprivkey "2N7YvA6ZBjFvXE3wuNQH4csev1QUWtrzYgA"

Then I imported private key in node2 through this command:

bitcoin-cli -testnet -rpcuser=test -rpcpassword=test123 importprivkey cNKbGVQvQgJsJuRy25ggZ71BRA9UZyEPCMekdntnZDWjYTg9TpRu

now I want to send bitcoin from node2 with my address to different address

can anyone please give me solution to make transaction using my address private key
  thanking you in advance

You can use createrawtransaction to create a raw transaction, in which you can specify your custom inputs and outputs.
In this case you would specify the input to be the address from node2, and output/outputs to be addresses you are sending bitcoins to. Use signrawtransaction to sign raw transaction it using your imported private key and sendrawtransaction to send it to the network.


Bitcoin API standard I'm trying to implement a bitcoin full node while learning a new programming language, but I can't find the full set of public API that the full node has to expose. I assume the standard will be bitcoin core, but then again the closest I can get is the https://bitcoin.org/en/developer-reference . Where should I start from?

You can check this github page about btcd, one of the concurrent of bitcoin core where they talk about their API which is fully compatible with bitcoin

  btcd provides a JSON-RPC API that is fully compatible with the original bitcoind/bitcoin-qt. There are a few key differences between btcd and bitcoind as far as how RPCs are serviced:

https://github.com/btcsuite/btcd/blob/master/docs/json_rpc_api.md


NXTcoin Startup - Error: Could not find or load main class nxt . Nxt I setup a new VM with ubuntu 12.04 installed and installed java 8. I cloned the nxt repo and it is throwing this error:

Error: Could not find or load main class nxt.Nxt

What is this error and how can this be resolved?
thanks.

You have to first compile by doing:

./compile

then:

./run.sh


How to create a simple lightweight wallet (without mining) for an Altcoin I am trying to create a wallet using electrum for an altcoin that uses the Scrypt algorithm. I am looking around for tutorials that can show a step by step process on how to create a simple wallet for this altcoin that simply sends, receives and stores your coin for windows, linux and android. Does anyone have any recommendations on how to do this or where I can look to build this myself?

I prefer using electrum because there are multiple clone repos for electrum and its pretty simple to use but I am open to other easier options.

Thank you again!

you can probably modify https://github.com/OutCast3k/coinbin/ to your needs


How Bitcoin node discovery work? When you install Bitcoin client, how does it discover the nodes to get a copy of the blockchain?
Are their seed nodes ? Are they vulnérables? SPOF ?

There are several hard-coded DNS seeds, which work AFAIK as a DNS round-robin to provide connection to several random nodes.

Once initially connected to nodes, peer discovery is automatic and your node could easily learn about the entire network through just a few connected nodes.

There is a slight chance that a malicious ISP could hijack DNS or for that matter, all Bitcoin traffic, either preventing peer discovery or alternatively providing false or limited results. This has already been asked elsewhere. Provided you are able to connect to just a few well-connected nodes on main-net everything will work as expected.


Working with Bitcoin node on Windows as a developer? I'm a web developer looking to integrate a Bitcoin node into a PHP application and I am unsure how I would go about interacting with the Bitcoin core in a developer environment for my machine.
My goal is to pull transaction history on a particular address without using any 3rd party APIs and as such I need to use some sort of Bitcoin interface to do that.
I believe that I need to use the Bitcoin daemon in some sort of manner however I do not know how to use it on my current PC as It is a Windows 10 machine.
Any advice would be greatly appreciated.

I'm a web developer looking to integrate a Bitcoin node into a PHP application and I am unsure how I would go about interacting with the Bitcoin core in a developer environment for my machine.

The most straightforward way of doing it would be to just use JSONRPC to hit bitcoind's API.

My goal is to pull transaction history on a particular address without using any 3rd party APIs and as such I need to use some sort of Bitcoin interface to do that.

bitcoind doesn't allow you to directly access an "address mapping". Some applications (notably Electrum servers) build additional indexes which allow them to expose you "by address" APIs and other handy informations.
This usually is a tradeoff between storage vs efficiency.

I believe that I need to use the Bitcoin daemon in some sort of manner however I do not know how to use it on my current PC as It is a Windows 10 machine.

Bitcoin-core allows you to build on Windows and provides Windows binaries as part of the releases.

More subjectively, I usually recommend the Esplora API (which is more precisely the electrs fork of Blockstream's API) which uses quite a lot of storage but is very efficient for address-based requests.
You can start it quite easily by using the Docker instructions, and for example set it up behind an nginx reverse proxy on a server so you can hit it (or just use Docker on your Windows machine).