listsinceblock parameter: target-confirmations listsinceblock help returns:

listsinceblock ( "blockhash" target-confirmations )

Get all transactions in blocks since block [blockhash], or all transactions if omitted

Arguments:
1. "blockhash"   (string, optional) The block hash to list transactions since
2. target-confirmations:    (numeric, optional) The confirmations required, must be 1 or more

I sent a coin to my wallet and a few seconds later I executed listsinceblock 1. My transaction was just broadcasted so it had 0 confirmations, as expected. Note the target-confirmations parameter above which must be greater than 0 no matter what.

So for my test I executed bitcoin-cli listsinceblock 0000000008eb5d53efbb39d2cb9f595e5bd567c295936de5c2282bbb8ef46cf0 1 which returned:

{
    "transactions" : [
        {
            "account" : "",
            "address" : "mzE6DJMHPghYpVg4GCurMbxSSXBfW1KCFH",
            "category" : "receive",
            "amount" : 1.00000000,
            "confirmations" : 0,
            "txid" : "917248d57293a7fd3a88aa3a26026d2e4d6a1d4eef898519b20419f2339c265c",
            "walletconflicts" : [
            ],
            "time" : 1399200157,
            "timereceived" : 1399200157
        }
    ],
    "lastblock" : "0000000004ba22e9f8cea2e843b34f7eeaa2c3b7004ddcf19bfd8af0215fc0cc"
}

Note that the above transaction has 0 confirmations, however listsinceblock is supposed to operate beyond 1 confirmations (which is weird, as I am polling listsinceblock to get new transactions that are always unconfirmed, after Gavin's tip on: How to know there is a new transaction?).

What am I missing here?

As per: https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

We have,

  [target-confirmations] intentionally does not affect the list of returned transactions, but only affects the returned 'lastblock' value.

What does this mean? It means the lastblock entry in your returned object is the last block you can see on the blockchain (as it the block that currently has exactly 1 confirmation as indicated by the argument you passed in). The lastblock entry is the only field you can affect by changing the target-confirmations argument.

This means that if you want all transactions with at least 1 confirmation, you need to filter this list. This begs the question, why isn't the target-confirmations argument used to do this filtering?

This is because the way the function works currently allows for a use-case in which you can constantly call listsinceblock with the value of lastblock that was returned in your last call. By doing this, your transactions list will contain transactions that reach X or more confirmations on the blockchain in exactly one of those calls, (where X in this case is 1).


Can you specify Antminer overclock settings in bfgminer config file? I've just started upgrading my USB miners with Antminer U2's and so far everything is running well.  I am able to run all of my miners OC'd to 2.0GH/s with the following command:

bfgminer --set-device antminer:clock=x0981 -o POOL_URL -u POOL_USERNAME -p POOL_PASSWORD -S antminer:all

However I would like to know if it is possible to specify these overclock settings in a config file... I normally have a config file with various options set up that I load using bfgminer's -c flag.  I tried the obvious:

...
"shares" : "0",
"kernel-path" : "/usr/local/share/bfgminer",
"scan" : [
        "antminer:clock=x0781@/dev/ttyUSB0",
        "antminer:clock=x0781@/dev/ttyUSB1",
        "antminer:clock=x0781@/dev/ttyUSB2",
        "antminer:clock=x0781@/dev/ttyUSB3",
        "antminer:clock=x0781@/dev/ttyUSB4"
]
}

but unfortunately that didn't work.  Also my attempts at googling
I found plenty of examples of people setting overclocking using the command line (or batch files) but none using a config file.

Try:

"scan" : [
        "antminer:clock=x0781"
]


Can bitcoin transactions be modified during mining Wherever I read about fraud in bitcoin, it talks about modified a transaction that is already in a block and changing the receiver and then trying to create a longer chain.

However, I was wondering, if we can modify a transaction thats already in the block, why can not a miner, modify a transaction at the time of mining itself. And if he is lucky, he can find a block that will make the transaction unmodifiable.

PS. Kindly excuse me for such a silly question, as I am a student in bitcoin and blockchain.

Generally, no. Most transactions contain a digital signature which signs a hash of the transaction. Usually this hash includes the entirety of the transaction, so changing any part of the transaction would invalidate the signature and thus invalidate the entire transaction.

There are some exceptions though. There are some signature hash types which don't include specific parts of the transaction thus allowing output to be changed, inputs to be added, etc. There are also some transaction output types which don't require a signature. However these signature hash types and output types are not created by wallet software. Making them requires you to know exactly what you are doing and either make it by hand or use custom software. The vast majority of users will never need to use or make such transactions.

Whoever told you that transactions can be modified in a block and then the blockchain extended to make that transaction valid is completely wrong. Besides the fact that transactions cannot be changed like this and still be valid, including a transaction in the blockchain does not automatically make it valid. It must be valid to be included, and if it is invalid, the block is invalid and nodes will reject it so it isn't actually added to the blockchain that everyone is following.


I have bought bitcoin in the past but forgot which wallet it was. Anyway to find it with wallet address? Is there any possible way? I bought it back in March, 2017 and forgot about it and now I remember I bought it in the past with coinmama but forgot which wallet it was sent to.

No.  Bitcoin addresses conform to a standard, and that standard purposely does not include any indicator of the wallet that generated it.  As such, any bitcoin address could be generated from any wallet.


How many bitcoins do bitcoin faucets give away per day on average? I just found out about bitcoin faucets. Apparently they give away very small amounts of bitcoins (or satoshis, for that matter) in exchange for performing some minor tasks, like solving CAPTCHAs or rolling dices. How many bitcoins do these faucets give away per day on average? Are there any statistics? How profitable is it compared to bitcoin trading or mining?

Just curious.

Bitcoin Faucets were useful once upon a time, when 10000 BTC still bought you only a single pizza (and even by then, they were starting to die out).

Presently, you will earn next to nothing with faucets - in fact, most faucet websites usually make you earn in DOGE or other coins with much lower values, as the time taken to earn enough BTC to be able to withdraw without losing it all to tx fees is far too large.

If your goal is to acquire BTC cheaply, your best bet would be to get a regular job and simply buy it - even $10 a day would buy you more BTC than any faucet would give to you in months.


Generating addresses starting with certain characters such as "JoeAnonymousUserB7pMqyVa8JRcpZdCQLQ" Similar to how the SHA256 hash competition exists to validate a transaction, I wonder if this concept can be ported to addresses, so that the first few characters is significant to a human reader.

Is there value in making a public key address start with human readable text?
What approaches exist to accomplish this?  Must the key pair be re-generated continuously or there there space to place a nonce?
Could this cause legal issues?  ...such as a key that contains text matching censored information which is replicated to countries that ban that information

Yes, the concept is known, and called "vanity address". The problem with it is that it takes a lot of computing power. However, there is also a "split-key" method of generating vanity addresses, which lets you commission other people for the computing work. And finally, I created a website called Vanity Pool that handles a sort of free market of vanity miners and buyers.

As for the legal issues, I have already included a so called "illegal number" in the block chain as a part of my master thesis. So far Bitcoin hasn't been banned;).


Blockchain over 36GB and causing disk space issues I want to install the bitcoind daemon on a computer with relatively little free space (about 35GB available). I thought that the blockchain was some 20 GB in size and figured that would be no problem, but I'm running into disk space issues. What I did was:

First I tried the torrent file to bootstrap the blockchain. I downloaded the whole dat file and then tried importing, but on importing it I ran into disk issues. About half of it was imported before the disk was full.
I then removed the bootstrap file and let bitcoind load the blockchain from peers. I seems that it did use the half-imported bootstrap file so the first bit was quite fast.
However, I now have 36GB in the blocks directory, and my drive is full. Still not all is downloaded!

My question is:

Is the blockchain really this big?
Are there any files I could remove, given my particular way of going about this?

I have a blk00001-00253, and rev00001-rev00253 in my blocks directory. Can I remove those rev files perhaps?

Depends what you want to do. Remember, to use bitcoin you don't necessarily need a full-node. You can use many of the lightweight clients that exist out there which rely on Simplified Payment Verification (SPV). But if you want to be a full node (perhaps you're mining or you want to verify transactions yourself), then you need to download the entire blockchain which is almost 35GB large: https://blockchain.info/charts/blocks-size


How do I get my purchsed bitcoins from a old bitcoin wallet? I had to refresh my computer do to updates and all my installed software such as Bitcoin wallet was gone after the process. I did back up my wallet almost everyday and also I did it on a external hard-drive, but when I re-install the Bitcoin wallet from bitcoin.org it give me a new receiving address and even if I have all back -up data and my previous receiving bit coin wallet where all my bit coins I have purchased were I do not know why is it not showing it in my new wallet. I have tried to recover and open my back up wallet files but it does not show my Bitcoins. Please help.

I did watch the recovery do to a failed hard drive but I can not access the files and I do not know how to get my Bitcoins from my old receiving wallet which I backed up on 2 places.

Go to your backup file of %appdata%/bitcoin/wallet.dat
Go to your local file of %appdata%/bitcoin/ and delete the wallet.dat
Replace the old Wallet.Dat

You should have all your bitcoins back now.


Entropy gathering from already generated bitcoin keys? Say someone has generated n bitcoins. Now, these are from very good entropy. When regenerating new keys, would it be a good idea to take the keys for entropy improvement? On the one hand, the entropy is already destinated on the other hand, it comes from the best sources? As special case, would talking only parts of it be a better idea?

In basic terms, entropy is good when it is secret and not good when it is known to the attacker or guessable.

Adding the keys would not improve your already existing entropy (although they wouldn't worsen it either). They are just derived from that entropy, so an attacker who breaks your "very good entropy" can just compute those keys. He can also just compute the required parts.

If you have "very good entropy", just use that for how ever many keys you want. Any decent PRNG should have a sufficiently long period until it starts repeating.


How is node capacity determined on 1ML.com? I have set up a Casa node, using lnd, and opened 15 payment channels. The capacity of my channels, after almost 3 weeks, is exactly what it was when I opened the channels, leading me to believe that I have earned no fees.
However, when I look at 1ML.com, my capacity is 22% higher. Are these fees generated (I hope!) or is my node including the capacity of some private channels that my node is linked to? In short, how does 1ML.com calculate the capacity of my node?

Since 1ml is closed source I obviously cannot be 100% sure how it calculates the capacity of your node. But from my experience I can say that it does it in the same way as any other lightning node do it.

It takes the capacity of all payment channels which have been broadcast by the gossip protocol and have been received by the node in question and adds them up. This should be handled in the same way on your casa node. In particular 1ml has no chance of adding private channels (since they are private and not announced on the gossip protocol)

I believe the difference of the amount that you see comes from a different understanding of what capacity means. Let me elaborate:

The capacity of a payment channel is the amount of bitcoin that has been provided by the person who opened the channel (as long as dual funded channels are not implemented).
Your balance (or your funds) are the amount of bitcoin that you own in that particular channel.

So I believe what happened is that after your node was online for some time other nodes opened channels to your providing your node with more capacity (which is depicted on 1ml) but your funds / balance has stayed the same since those nodes only opened a channel but did not send money to you.
Therfor when you looked on the user interface of your casa node you saw a different amount because you most likely confused capacity with funds / balance.

In particular 1ml can only see the capacity of the channels and not the actual funds that you own as that data is private to you (and for each channel to your channel partner). Also I would highly doubt that you have earned more routing fees than a couple satoshis. The node of Alex Bosworth has some high routing fees configured and despite being online for a long time and very well connected the routing fees have not been high.


International shipping times for Butterfly Labs ASIC hardware The Butterfly Labs FAQ says they use USPS for shipping (except for Mini Rigs), and displays the options "Standard" and "Express" during the checkout process:

However, the USPS website appears to offer "Express" shipping (1-3 business days) and "Priority" (6-10 business days) for international shipping.

I'm sure people out there have received FPGA devices internationally from BFL in the past, probably with the same international shipping options. Can anyone confirm that delivery times of BFL hardware are equivalent to the two options I found on the USPS website?

I am in London, United Kingdom. I selected the standard shipping option, which came to $38.00 (hardware was $149.00). I made my order back in April 2013, and they shipped in October 2013. ButterflyLabs used USPS (United States Postal Service) shipping option. I could track the order via the USPS site, although it says it got to the UK, and then was held - for about a month (presume they were working out import tax on the product) and then returned to Butterfly Labs, without informing me. Butterfly labs are now ignoring any communication from me, as I  try and resolve the issue.

My advise would be to look for another option, as the issue appears to be with USPS, and if you get any issues Butterfly Labs will blank you, as they already have your money, and there is not much you can do about it.


51% attack + ignore blocks not mined by yourself If you own 51% of the mining power and decide to ignore all blocks not mined by yourself.
You would eventually end up having the longest chain, and would eat up the 49% of block-reward you werent getting prior.
And now control 100% of the blocks, and could censor transactions etc, since any blocks not mined by you would eventually be a stale fork.

Is there some measure that would stop this?
It seems if you control 51%, it would be in your economical interest to ignore blocks not mined by yourself.
(other than it being bad publicity for btc, and maybe crash the price)

Yes. The owner of 51% can get 100%. This is attack-51 itself.

  Is there some measure that would stop this?

no


Can I increase or decrease the block reward an year after launching my altcoin? Can I increase or decrease the block rewards or coin per block once I make my coin public and people start mining it.

You can do whatever you want, so long as the people who mine it agree to mine on top of your change.

In Bitcoin, the block reward goes down on a set schedule.  Everyone knows this, and it's baked into the protocol.  Any mining nodes producing blocks that don't conform to this (or any other part of the protocol) are wasting their effort since nobody will accept their blocks.  The rest of the network will continue as if nothing happened.

You can create a coin that says "on Sep 18 2018, the block reward will half", and have that rule baked into the protocol.  Maybe people will mine it...maybe they won't.  If they do, they do so knowing that the block reward will change on that day, and will reject blocks from nodes that don't follow that rule.

You could also create a coin that says "the block reward will never change", and then have some mining nodes change it anyways a year from now.  This would create a hard fork, and again, maybe people will mine on top of the fork...maybe they won't.


Do all Banks and Credit Unions in the U.S. accept Bitcoin? Do all Banks and Credit Unions in the U.S. accept Bitcoin for deposits or withdraws?

Certainly all banks and credit unions do not accept bitcoin, and I'm not aware of any that do.

Banks and credit unions can be thought of as nodes in their own network that is not actually so dissimilar to Bitcoin.  The function of this network is to create, store, and transfer money.  Most fiat currency is not created by the central bank, but is lent into existence by the process of fractional reserve banking.  In other words, a bank is inherently part of the currency it operates with.  It plays a role in the money creation process.

With this view, your question is similar to asking "can the Litecoin network transfer bitcoin?", or "can an Ethereum miner create a Bitcoin block?".  These are separate networks, operating with different sets of rules.  The same is true of Bitcoin and the traditional financial network.

That said, many traditional financial institutions operate small-scale foreign currency exchanges for the convenience of their customers.  You can often go up to a bank teller in the US and exchange a small amount of euros (leftover from a trip abroad) for dollars, usually only if you are a customer or memeber.  I do not know of any traditional bank or credit union that has added bitcoin to the list of currencies it exchanges, but I doubt there are many...if any at all.


Bitcoin-Qt wallet is taking forever to synchronise. Can I just use the same address elsewhere to collect coins? It will take several days before the wallet is in sync. I already purchased a bitcoin and am waiting for it to transfer into my account using the address that was generated by Bitcoin-Qt. Can I just re-divert the Bitcoin to a cloud-based wallet that doesn't need to synchronize?

Are you sure the syncing is not advancing? If you hover the icon in the lower right corner, you should see the block count. Can you see it increase?

You can export your client's wallet.dat file and import it into a new Bitcoin-Qt wallet or into another Bitcoin wallet, either using the wallet.dat file directly or by extracting the private keys from it.


How can the output of an unconfirmed transaction be spent? This transaction has been stuck for a few days:

af660c5eafe582f22254c9778d18a628d1d2fdea812e983713379458b7c2c9df

https://blockchain.info/tx/af660c5eafe582f22254c9778d18a628d1d2fdea812e983713379458b7c2c9df

How is it possible that one of the outputs is spent if the transaction is unconfirmed?

It works just fine.  "Spent" here just means that a second transaction has been broadcast whose input is an output of the first transaction.  You don't have to wait for confirmation in order to do that, and you can continue the process with arbitrarily long chains.

However, the second transaction can't be confirmed until after the first one is confirmed.  (Or, they can both be confirmed in the same block.)


What happens if you set prune= to a value between 0 and 550? Today I saw a question about what Bitcoin Core would do if you set prune=1. The documentation on bitcoin.org states:

  A value of 0 disables pruning. The minimal value above 0 is 550.

Apparently, the log upon setting prune=1 states:

  2017-03-11 10:51:03 Block pruning enabled.  Use RPC call pruneblockchain(height) to manually prune block and undo files.

Will Bitcoin Core prune to the minimum disk usage now, or does it just enable manual pruning?

The asker was running Bitcoin Core 0.14.0, if it makes a difference.

It turns out that prune=1 is a new special case which enables manual pruning. For values of N from 2 to 549, prune=N shows an error.

Bitcoin Core parses configuration arguments in the init.cpp. Depending on the value of prune=<N>:

N < 0 – returns the error: "Prune cannot be configured with a negative value."
N = 1 – Activates manual prune mode as described in Pieter's answer. It causes Bitcoin Core not to advertise blocks anymore and enables the pruneblockchaincommand, but it doesn't automatically prune the blockchain data.
1 < N < 550 – returns the error "Prune configured below the minimum of N MiB.  Please use a higher number."
550 ≤ N – Sets N as the limit of MiB available for block data.


How to create ECPoint from raw private key How to create a bouncy castle ECPoint from a raw private key hex string?  I am getting a private key using the 'dumpprivkey' RPC and removing the header byte and the 4 bytes of checksum + 1 byte of discriminator trailer bytes, resulting in a 32 byte raw key LIKE this example (this sample comes from here).  It causes the following exception.  Decoding public keys this way does not have this problem.

This is the code:

public static void main(String[] args) {
    String priv_key = "E9873D79C6D87DC0FB6A5778633389F4453213303DA61F20BD67FC233AA33262";
    BigInteger value = new BigInteger(priv_key, 16);
    ECCurve BITCOIN_CURVE = new SecP256K1Curve();
    ECPoint point = BITCOIN_CURVE.decodePoint(value.toByteArray());
}

But it results in this exception:

Exception in thread "main" java.lang.IllegalArgumentException: Incorrect length for infinity encoding
    at org.bouncycastle.math.ec.ECCurve.decodePoint(Unknown Source)
    at Btc.main(Btc.java:19)

A raw private key is not on the elliptic curve, so there will be no ECPoint.  It is a random number as described here.


Why is input number non-existent in bitcoin API? Why when I use this public Bitcoin Api to practice a command, the input value of BTC does not show up?

API Call can be found here:

API Website

Transaction from block explorer can be found here:

Explorer Tx

{
    "result": {
        "txid": "1e12864a9852ebd2b71a743752cc1561b000663f47bd71bc383b0cacad614d86",
        "hash": "bf43137e355def3d6292c296c864d9f6a9da353db6e4bd40c55e7cc4df245774",
        "version": 2,
        "size": 249,
        "vsize": 168,
        "locktime": 0,
        "vin": [
            {
                "txid": "9de8923855b2c56bc903c39418298fa8c185e5feb99cb32bfa31b9d06700ced8",
                "vout": 1,
                "scriptSig": {
                    "asm": "00140b67d98b0069797e0b5c94964f94d69476bea509",
                    "hex": "1600140b67d98b0069797e0b5c94964f94d69476bea509"
                },
                "txinwitness": [
                    "30440220625b6fd7299cfd14e6bdaa63cef809da54d4016c6caf5d268fc80c48d7fb41cc02200da35a319d63926112aa26952933ce590e67023993072ab10ab2bfb44f55704f01",
                    "03c97015da537daded1ac5fd4b5f9cfe55d1d77aed63da77da097d2af087361339"
                ],
                "sequence": 4294967295
            }
        ],
        "vout": [
            {
                "value": 1.99550000,
                "n": 0,
                "scriptPubKey": {
                    "asm": "OP_DUP OP_HASH160 b0fe30da6628923202cbf6e877405ea6d484e9eb OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a914b0fe30da6628923202cbf6e877405ea6d484e9eb88ac",
                    "reqSigs": 1,
                    "type": "pubkeyhash",
                    "addresses": [
                        "1H8rSFYmaZoSbdsXjF4Q5zb53FHNYAdTLj"
                    ]
                }
            },
            {
                "value": 82.88960000,
                "n": 1,
                "scriptPubKey": {
                    "asm": "OP_HASH160 fe7dfeeb1cbf6330590bc7ee2c47a2de593f1920 OP_EQUAL",
                    "hex": "a914fe7dfeeb1cbf6330590bc7ee2c47a2de593f192087",
                    "reqSigs": 1,
                    "type": "scripthash",
                    "addresses": [
                        "3QteVcFbTqoS8fSFYgwuet1yWD8YGfuas4"
                    ]
                }
            }
        ],
        "hex": "02000000000101d8ce0067d0b931fa2bb39cb9fee585c1a88f291894c303c96bc5b2553892e89d01000000171600140b67d98b0069797e0b5c94964f94d69476bea509ffffffff0230e4e40b000000001976a914b0fe30da6628923202cbf6e877405ea6d484e9eb88ac007e0fee0100000017a914fe7dfeeb1cbf6330590bc7ee2c47a2de593f192087024730440220625b6fd7299cfd14e6bdaa63cef809da54d4016c6caf5d268fc80c48d7fb41cc02200da35a319d63926112aa26952933ce590e67023993072ab10ab2bfb44f55704f012103c97015da537daded1ac5fd4b5f9cfe55d1d77aed63da77da097d2af08736133900000000",
        "blockhash": "0000000000000000000dfeca4aac6372aa5aff5beb3bd13105eedb2269375723",
        "confirmations": 103,
        "time": 1541981822,
        "blocktime": 1541981822
    },
    "error": null,
    "id": null
}

That is how it works, you need to look up the previous transaction where that output exists in order to get the value. The equivalent call using bitcoin-cli is:

$ bitcoin-cli getrawtransaction 9de8923855b2c56bc903c39418298fa8c185e5feb99cb32bfa31b9d06700ced8 2

then you can find the vout with index 1.


How is a stratum connection secured? Does stratum mining use something similar to "https" to secure traffic between the pool and the miners?

No, all traffic is plaintext. The connections are hijackable and attacks against this have occurred in the past where ISPs redirected hashrate to themselves.


Litecoin litecore-lib receive UTXO and current balance I have coded NodeJS script for bitcoin for send all balance from by address to some other one. Now I want to do this for the litecoin. For bitcoin I have used bitcore-lib and bitcore-explorers libs to do that.

For litecoin I have found forked and adopted lib litecore-lib, but I can't found solution to receive UTXO data for some LTC address like I do it in case of bitcoin:

var Insight = require("bitcore-explorers").Insight;
var insight = new Insight(network);
insight.getUnspentUtxos(sourceAddress, function (error, utxos) {
    // determine balance, fee and sign transaction
}

How can I do this for litecoin? Thanks!

I used the request library to manually retrieve information from the insight API. I also used the litecore-lib library to create the transaction.

var Litecoin = require("litecore-lib");
var request = require("request");

//manually hit an insight api to retrieve utxos of address
function getUTXOs(address) {
  return new Promise((resolve, reject) => {
    request({
      uri: 'https://insight.litecore.io/api/addr/' + address + '/utxo',
      json: true
    },
      (error, response, body) => {
        if(error) reject(error);
        resolve(body)
      }
    )
  })
}

//manually hit an insight api to broadcast your tx
function broadcastTX(rawtx) {
  return new Promise((resolve, reject) => {
    request({
      uri: 'https://insight.litecore.io/tx/send',
      method: 'POST',
      json: {
        rawtx
      }
    },
      (error, response, body) => {
        if(error) reject(error);
        resolve(body.txid)
      }
    )
  })
}

//your private key and address here
var privateKey = PrivateKey.fromWIF('YOUR_PRIVATE_KEY_HERE');
var address = privateKey.toPublicKey().toAddress();

getUTXOs(address)
  .then((utxos) => {

    let balance = 0;
    for (var i = 0; i < utxos.length; i++) {
      balance +=utxos[i]['satoshis'];
    } //add up the balance in satoshi format from all utxos

    var fee = 1500; //fee for the tx
    var tx = new Litecoin.Transaction() //use litecore-lib to create a transaction
      .from(utxos)
      .to('TO_ADDRESS', balance - fee) //note: you are sending all your balance AKA sweeping
      .fee(fee)
      .sign(privateKey)
      .serialize();

    return broadcastTX(tx) //broadcast the serialized tx
  })
  .then((result) => {
    console.log(result) // txid
  })
  .catch((error) => {
    throw error;
  })

Cheers!


How do I revoke a multisig transaction? Let's say that I am using 2 of 3 multisig. I know how to use signrawtransaction and sendrawtransaction to send the funds if at least 2 of the parties have agreed on the transaction, but I don't know how to revoke it and send the funds back to the first person.

How do I do that?

You simply can't 'revoke' transactions. If the output defines a 2-of-3 restriction, 2 of the 3 keys must sign the transaction spending it. If no two parties will agree to sign a transaction spending the output, the money is simply lost.


How the bitcoin network solves the double-spending problem by adding all the transactions that happened at the same time into one block According to my research, I understand if person A sends 2 BTC to person B and at the same time person A sends the same input to himself before the input is considered as spent. So, now there will be a different route for each transaction while broadcasting (where nodes will check transaction chain to verify the history of ownership by the previous transactions) in the bitcoin network and might be the wrong one got confirmed first. Obviously, the second one will be rejected and the network will give contradiction while consensus. So, according to my understanding bitcoin network solve this issue by adding all the transactions that happened at the same time into one block of the block-chain. Please let me know if I am wrong. I will appreciate your guidance. Thanks
So, My question is: How the bitcoin network solves this issue by adding all the transactions that happened at the same time into one block?

according to my understanding bitcoin network solve this issue by adding all the transactions that happened at the same time into one block of the block-chain.

This is not true.
Same time
You should remember that the Bitcoin network doesn't really try to keep accurate time. Blocks are not always in sequence by timestamp in the block. So long as they do not seem to be more than about 2 hours wrong, it will be accepted. So the notion of "happened at the same time" is ill-defined.
There is a limit to the size of a block, so it would often not be possible anyway.
Choosing transactions
Miners choose transactions for incorporation into a block. They choose transactions from a pool of unconfirmed transactions they have received. This pool is called the mempool.
Which transactions miners choose is entirely up to them. They could choose on the basis of highest fees that the transactions will pay to the miner. They might choose on any other basis that their operator feels makes sense for them.
What might be causing some confusion is that if an unconfirmed transaction B spends the output of another unconfirmed transaction A, I believe miners will find it necessary to include A in any block that contains B.
Double spending
A miner cannot include in one block two transactions that spend the same input. Such a block would be rejected by everyone else.
If a miner includes in a block a transaction that spends an output already spent by a transaction in an earlier block, the later block will be rejected by other nodes. So miners don't do this if they can avoid it.


Bitcoin cloud trading Is there a trading bots that trades automatically and can also be hosted by the company that is providing the service?

I've found BTCRobot and Butter Bot. Any reviews on the validity behind these companies and maybe some personal experience would be more than appreciated.

I'm going to give a general answer here and say any off the shelf BTC trading software is not going to be profitable. Why? Because there's absolutely no reason a functional trading bot would be sold when it could be used to generate income.

Profitable bots would be custom made and not advertised.

Any claims made are dubious at best on these websites.


how to double spend Bitcoin transaction? How it's possible to double spend a transaction if the transaction outputs are already spent? and why these types of attacks are not preventable?

is it about blockchain sync time between nodes?

Double spending is not possible because there are many miners checking the data independently and then verifying the result against each other.  The first 'spend' that gets put into the blockchain and verified is the only one that can count - if another one comes along, it is ignored.

A simple, and elegant, way to keep double spending impossible.


Why can the same 12 words produce different seeds in an Electrum wallet file? I was looking through an Electrum wallet file (from Electrum 1.9.6 for Windows if it matters) trying to understand what information was contained in it, and I couldn't initially figure out exactly where the private keys were stored (or even if they were perhaps stored in some other file).  I'm guessing the "seed" field in the default_wallet file contains sufficient information for the private keys, public keys, and 12 word mnemonic to be generated.  Am I right so far?

To experiment a bit more, I wanted to see if 2 wallet files that use the same 12 word mnemonic would be identical.  Not surprisingly, when I did not encrypt the wallets, the same mnemonic appeared to lead to identical wallet files.  However, I also tried encrypting each wallet with the same password, and to my surprise, the files had different values in the "seed" field.  This surprised me, so I'm wondering if this is expected behavior and why is this happening?

It's actually a good question. Let's take a look at what is happening. First, Electrum hashes your mnemonic to generate a seed. The seed indeed contains all the information necessary to generate the Master Public Key and the Master Secret Key, first being used to generate the sequence of public keys (adresses) and the second being used to derive a secret key from a public key (actually it's slightly more complex). Then, Electrum saves the wallet file, which contains the seed and the keys being actually in use, the whole sequence of key pairs unless it hits 5 consecutive unused adresses. It can store it either unenrypted or encrypted. In the first case, the seed value in the file will always look the same, as will private keys. In the second case, however, they won't. Why? The Electrum documentation says:

  Electrum uses AES-256-CBC to encrypt the seed and private keys in the wallet.

What does it mean? AES-256 is simply a block cipher. It takes a block of data (128 bit in this case) and a block of key (256 bit) and outputs 128 bits of encrypted data. But it is not what Electrum does. Actually, noone uses block ciphers like that and noone ever should. Instead, so called modes are used. In our case it is Cipher Block Chaining (CBC) mode. Electrum first generates a random initialization vector (IV), mix it (by exclusive or operation) with first 128 bit of input and uses AES-256 on this mixed block to produce first encrypted block. For any subseqent block it does the same, except instead of IV it takes previous encrypted block to mix with the plaintext block. The IV is saved alongside with the file. Finally, that's why you always arrive with a different seed value in a file, even when using the same password (which results in the same key for AES-256-CBC encryption [1]) -- a different IV is used each time.

[1] It is not probably the case either, as Key Derivation Function is likely to be used to deliver a key from your passphrase, in which case additional random salt value is added to the passphrase before hashing it and saved alongside, similarly to the IV.


How can the transaction history be checked when new addresses are generated? When a new transaction is executed via a Bitcoin-client, the sender will have a different address than the ones used in previous transactions. I also know that all the full nodes in the Bitcoin network maintain a ledger, which is basically a history off all Bitoin transactions ever made so the nodes can check the integrity of the system and the current amount of bitcoins people have available in their wallets.
How is it even possible to check all the transactions when there are constantly new addresses being generated? You can't even link a current transaction to the previous. Is there something I'm missing?

One thing you might be missing is "there are no balances".  The network doesn't know about wallets or balances, it only knows about outputs.  These outputs are either spent or unspent. Once you have this concept it's easier to understand.

If your wallet says you have a balance of 1.2345 BTC that means it "thinks" there are X number of unspent outputs that you "control" that add up to 1.2345.  It's basing this on the keys it knows about and the transactions it has seen so far. There could be 1 output with a value of 1.2345 or 100 outputs with a sum of 1.2345, or any combination.

See any transaction on blockchain.info and you'll see the inputs on the left side.  These inputs are previously unspent outputs.

https://blockchain.info/tx/ad646bbac1e44e4db199420e12fec2966903a0e078da99fab97b3156455f252a

On the right side are the new unspent outputs.  Once an output is used it's now spent and carries no balance.  Since the outputs you are using probably don't add up to exactly what you want there is a concept of change.

https://en.bitcoin.it/wiki/Change

So what about new addresses? The network doesn't need to know anything about new addresses.  When a node sees a new transaction it only has to verify the outputs being spent are not spent already i.e. they haven't been used by any other transaction (along with other verification like signature, amounts etc..)

So all transactions are linked to previous ones in that way.


What are bitcoin miners really solving? As with mining, what are the bitcoin miners really solving? I read they are solving hashes, but what does that really mean. Can we see what they are solving? Can someone give an example of what a bitcoin mining machine sees to solve?

Here is an extremely simplified sketch of the problem, but it should give a pretty good idea of what the problem is.

The data:

This is the hash of the lastest block (shortened to 30 characters):

00000000000001adf44c7d69767585

These are the hashes of a few valid transactions waiting for inclusion (shortened).

5572eca4dd4
db7d0c0b845

And this the hash of one special transaction that you just crafted, which gives 25BTC (the current reward) to yourself:

916d849af76

Building the next block:

Now, let's use a gross approximation of what a new block might look like (the real one uses binary format). It contains the hash of the previous block and the hashes of those 3 transactions:

00000000000001adf44c7d69767585--5572eca4dd4-db7d0c0b845-916d849af76--

Now let's do mining by hand! Our goal is to complete this block with a nonce (a piece of garbage) such that the hash of the new block starts with 13 zeros (considering the previous hash, it seems that 13 zeroes is the current difficulty!).

Mining (trying to finalize this block):

Let's try with nonce=1, and compute the hash of the block (I'm using the md5 hash algorithm, but Bitcoin uses double sha256):

> echo "00000000000001adf44c7d69767585--5572eca4dd4-db7d0c0b845-916d849af76--1" | md5sum
8b9b994dcf57f8f90194d82e234b72ac

No luck, the hash does not start with a 0… Let's try with nonce=2

> echo "00000000000001adf44c7d69767585--5572eca4dd4-db7d0c0b845-916d849af76--2" | md5sum
5b7ce5bcc07a2822f227fcae7792fd90

No luck…

…

If we pursue until nonce=16, we get our first leading zero.

> echo "00000000000001adf44c7d69767585--5572eca4dd4-db7d0c0b845-916d849af76--16" | md5sum
03b80c7a34b060b33dd8fbbece79cee3

For nonce=208, we get two leading zeroes!

> echo "00000000000001adf44c7d69767585--5572eca4dd4-db7d0c0b845-916d849af76--208" | md5sum
0055e55df5758517c9bed0981b52ce4a

Continue like this… If you finally find a hash that has 13 leading zeroes… you're a winner! Other miners will now build upon your block, you've just got 25BTC.

But you'll have to be fast!

Back to step 1…

If someone manages to build a block before you do, you'll have to start again from the beginning with the new block's hash (the one of the winner).


Ardor configuration settings to connect to remote node without downloading entire blockchain locally What configuration is required to run the Ardor wallet software without downloading the entire blockchain, but only connect to a remote node?

You can install and Ardor node then choose the light client option during installation or later set the following property to true in your nxt.properties file:

nxt.isLightClient=true


How to get history trades of last 10 days from Bittrex using Bittrex API? I want to know how to programmatically get history of trades for period - last 10 days from Bittrex? I saw bittrex API, but using function getmarkethistory I can get only last 200 trades items. But I need to calculate volume buy and volume sell separately for last 10 days and I can't find functions in bittrex API that can help me do this. I saw coinmarketcap.com and bitcoinwisdom API, but I didn't find any solution for this task. Can anybody help me? Thanks.

I have tried to do the same, and as far as I know it is not possible. The best solution may be to start today, and in 10 days you will have 10 days worth of trades :)


BFL Single averages 800 Mhps on BitMinter Client. Advertised rate is 832. What explains the difference? I'm using a BFL single with the BitMinter client and I never see my Mhps exceed 825 and it often goes down to 780 Mhps.

What could be an explanation for this difference?

Are the specs on BFL theoretical speed?
Is the closed source BitMinter client stealing cycles?
Is there a software or hardware inefficiency?

Finally, this chart from BitMinter says I'm running at 600 Mhps

According to Butterfly Labs' customer service department, their chief operating officer, and their vice president of product development, the speeds they claim for their BitForce products are all nominal speeds and a variance of +/-10% is permitted. As of this writing, they say speed claims are based on a combination of synthetic benchmarks and averaged real-world data, with real-world figures tending to be slightly lower. The hashrate you see may be affected by high network traffic, speed at which your pool provides work, whether other people's equipment has supplied enough confirmations that your unit's current work is no longer relevant, and luck.

You can compare results with different mining programs--such as bfgminer, cgminer, and Ufasoft Miner--to what you're getting with BitMinter to check for software inefficiencies.

If the front LED is flashing slowly, the device has overheated and has disabled its processors until they cool down. This is called throttling; the unit does no work while this is happening. Their FPGA units can be loaded with different firmware to select an operating speed that will work without throttling. Butterfly Labs provides software called EasyMiner (on their Drivers page) for loading firmware manually, or through a process they call autotuning.

Their FPGA-based units are highly sensitive to temperature at the air inlets  which, depending on arrangement of nearby items and and other heat sources, can be significantly warmer than the ambient temperature of the room. A core temperature of 51.2 degrees Celsius is a little high, but not inherently bad as long as the unit isn't throttling. Their FPGA units also exhibit significant variation in contact of the heatspreader to the MPU cores, heat tolerance of the MPU cores, and application of thermal interface material (TIM). Some of their fans have been shown to operate at lower or higher speeds, as well. Examination of some early units has shown partial or complete separation of the primary heatsink, possibly during shipping. In the case of partial separation, the primary heatsink normally reseats itself (due to spring loading) but this can cause air cavities to form in the TIM. Air cavities will prevent proper contact and cause premature overheating. Later units use nylon bolts instead of spring-loaded pins to secure the main heatsink.

(Note that one of the webpage screenshots provided above shows a claimed speed of 832 MH/s, NOT the "850" originally mentioned in the question's title. I don't remember whether I saw any ads that claimed higher speeds.)


Egoistic miners combined with large transactions destroy PoW? EDIT
There is a clearer description of some parts of the problem in the link questions.

If there is a transaction value much higher than the payment for mining 10 new blocks, how can you trust this transaction?

To go more in detail. If I am a bad boy and pay with a proof-of-work cryptocurrency a large sum. Large means that the value is much higher than the payment for mining 10 new blocks. After that I wait some time - for example, so long, that 10 new blocks are mined in between - so that everybody thinks the transaction is sure. Than I bribe the miners with half the value of my transaction to create a new chain without my transaction. Because half the value of my transaction is very much and the miners are egoistic, they will create the new chain to get more payment in this way.

Is there any solution for such attacks in the construction of any cryptocurrency working with proof-of-work?

The only solution I see is, that we trust only transactions values which are comparable with mining-costs. But then the cryptocurrency is very inefficient.

I think what you're describing is a 51% attack, but with a 3rd party that is not a miner, incentivizing the miner's 'bad behaviour'. Even with an off-blockchain bribe, you would need 51%+ of miners to make this attack work (otherwise the 'original chain' would always outrun the 'bribed chain').

So, if an 'egoistic' miner wanted to perform this attack, I think it would make more sense for them to do it for their own transaction, not for someone else. Performing this attack with the involvement of a third party only increases the risk for the miner (what if the third party doesn't pay the bribe? etc). I think it makes more sense for a miner to just perform the attack themselves: send 1000 btc to an exchange, convert to altcoin, withdraw, and then roll back the btc chain to remove the transaction that sent coins to the exchange.

There is a reason this sort of attack hasn't occurred: miners see it as being less profitable in the long run.


How can I get my node listed on Blockchain.info's connected nodes list? We are running bitcoind on our server and its blockchain is synchronized with the network. Do we automatically become a node and get listed on http://blockchain.info/connected-nodes, or is there something we have to do to be seen by the network?

Running BitcoinQT or bitcoind you are a full node in the Bitcoin Network - you receive and transmit Blocks and Transactions. Even better, if you have port 8333 open on your router and machine, other peers can connect to you which is also very useful for the Network.

To be listed as a node connected to blockchain.info, you need to connect to their client (with a specific runtime parameter for example, or by chance). I am not aware as to what IP they are using. However, you don't need to be connected to blockchain.info to be a node - being connected to anyone else on the Network using the standard client makes you a node.


any website tracking history of circulating tokens of any coin? Is there any website dedicated to tracking history of circulating tokens of any coin?

Ideally, for each time a crypto has tokens added or removed to its circulating amount, we'd want to know:

amount
exact date
sent to whom (even if burnt, we want the address)

I am currently writing an analysis about many different coins and found this information incredibly hard to get (in most cases).

Token distribution is the base so I would expect a website or sort of organization dedicated to this task, but maybe I'm wrong.

If you have a look on blockchain.info, you can type in the block number to bring up this page for block# 510223 for example.

In that block, the first transaction is the coinbase transaction for the block reward (No Inputs (Newly Generated Coins)) and the output is the recipient address.

Note that you should wait until a block has six confirmations before you consider it final (is buried under six additional blocks).


Chat online using Bitcoin addresses? I was surfing on the web and trying to find a chat app that uses Bitcoin address instead of phone numbers or any other identifier. Do you know about any project in this field?

The idea was around for some time, and as Pieter mentioned, using addresses without any additional obfuscating seems like a bad implementation.
There are few other projects, the one that is most serious is Microsoft's ION decentralized identity project. It's not the chat-app itself, rather the way of signing into apps using bitcoin-generated identity.
When it comes to chat apps, there is a pretty rapid development in the field of lightning network. As messages on LN are onion-routed, it seem to be a good idea for privacy-preserving communication.
There are two projects I heard about, self-custodial Juggernaut and centralized (so what's the point) Sphinx.
I'd be very hesitant in using these solutions, they are working as untested, beta-version projects, so they may not be as stable and secure.


MtGox bancruptcy: Filing proof of claims I owned bitcoins at mtgox during bankruptcy, am I a creditor and thus have to file a proof of claim?

From the mtgox website:

  Please be aware that confirming the balance on this site does not constitute a filing of bankruptcy claims under the bankruptcy procedure and note that the balance amounts shown on this site should also not be considered an acknowledgment by the bankruptcy trustee of the amount of any bankruptcy claims of users.
  Bankruptcy claims under a bankruptcy procedure will be fixed through filing of claims and the investigation procedure. The method for filing claims will be published on this site as soon as we are in a situation to announce it.

This implies that yes, you as a creditor will have to file a claim to avoid forfeiture, even if the bankruptcy trustee already knows about it from mtgox' data, and even if the current website confirms that to you. There is a deadline for filing your claims that apparently has recently been moved to May 29th 2015. The last sentence from the quote suggests that the trustee is struggling to provide a means of filing claims that scales to the thousands or tens of thousands of creditors.

All of this is based on taking the information at the mtgox website at face value. A better answer would include whatever big money creditors or their lawyers say---but I have no source for that.


BTC that i received 2 days ago are missing, how come? I received 0.8 BTC 2 days ago, transaction was confirmed and i saw the money in my wallet, now i just log in to my wallet and the money dispersed include the confirmation from my transactions history. What that means? PLEASE HELP.

Transaction ID is:1CbZ3neNZxgfXzgswQpWJuHLGxMDQBaSVq

Maybe someone was monitoring your bitcoin wallet. You should enable 2 factor authentication to increase the security of your wallet. Furthermore, some transaction needs at least 3 confirmations before the proposed money enter your bitcoin wallet finally. Some scammers may use this method to collect money from their victims and cancel the transaction before all confirmations were made.  So please be careful.


BTC Source code amount.h file I have question about the source code, under src/amount.h I see the max coin supply being 21.000.000 (million) under the variable called MAX_MONEY. I want to ask what other variables mean,

CAmount COIN

CAmount CENT

And I want to know how they're used. As an interest in forking coins, I am analyzing source code and I would like to see how these numbers affect the blockchain.

Here is the link.

https://github.com/bitcoin/bitcoin/blob/master/src/amount.h

I see the max coin supply being 21.000.000 (million) under the variable called MAX_MONEY.

MAX_MONEY is not what controls the maximum coin supply. It is just a variable for use elsewhere that estimates the coin supply. The actual coin supply is regulated by the halving interval and the starting generation amount.

CAmount COIN
CAmount CENT

The base unit in Bitcoin is actually a satoshi, which is 1/100000000th of a Bitcoin. So COIN and CENT are used as multiplier values to convert units in Bitcoin (for COIN) and bitcent (1/100th of a Bitcoin) (for CENT) to the actual value that would be found in transactions which is in satoshis.


Hyperledger fabric vs Sawtooth lake which platform is appropriate for Supply chain management? I am planning to build supply chain management system with Blockchain. I have read many blog posts related to the topic, and eventually, I get Hyperledger as a right choice for Blockchain Network. but now I have two more option in that.Hyperlegder fabric & Sawtooth lake, now I am confused about the platform so can you please suggest me which platform is better for our Domain.

There is not a definitive right answer here. Fabric and Sawtooth both designed towards a similar end goal: building a general-purpose, enterprise-level, permissioned blockchain. As a result, many of the core features are pretty similar, and there is no reason you couldn't build a supply chain on either of them.

That said, there are some reasons you might want to choose Sawtooth over Fabric in general (full disclosure, I am a Sawtooth maintainer, and might be a bit biased):

You can develop for Sawtooth in a variety of languages, including Ethereum's Solidity smart contracts (with Fabric you must develop in Go)
If you need Byzantine Fault Tolerance, Sawtooth offers PoET consensus which is hardware assisted resulting in trivial CPU usage (Fabric does not yet have any BFT solution)
I would argue that Sawtooth does a better job of isolating application logic from the core blockchain logic, making development easier
As Ferg mentioned, there is already a supply chain implementation on Sawtooth, which you could use as a starting point: https://github.com/hyperledger/sawtooth-supply-chain

As for reasons to use Fabric . . . you may find there are more external tools available. For example, Hyperledger Composer is pretty nifty, and though there has been some talk of porting it to Sawtooth, currently it only works with Fabric. That's all I can really think of, but obviously I am much more familiar with Sawtooth, so I might ask around before making a decision.

UPDATE: Sawtooth now offers PBFT consensus in addition to PoET, RAFT, and PoET-simulator. This is a BFT algorithm which does not have hardware dependencies.


Will my wallet be extended or replaced when I recover another wallet in Breadwallet? Will my current balance combine with the balance on the other wallet I want to recover?

Or do I need to empty the wallet on my phone before recovering the wallet that was on my old phone?

If you start or recover a wallet it is completely isolated from your old one, the balance will not be combined. You don't need to empty it first, but it will be awkward to keep swapping backwards and forwards between two wallets if you choose to do so (you'll need to re-sync each time).


Setup bitcoin cash with bitcored I saw that https://blockdozer.com has insight-api for bitcoin cash blockchain. But i cant find doc how to setup bitcoin cash with existing bitcore node. I have already synchronized full bitcored node and able to use it insight-api.

https://blockexplorer.com also has this same functionality. I believe some bandaids need to be placed on insight-ui in order to get the cashaddr format working fine, but there is a branch of bitcore that is designed to work with bitcoin cash.

https://github.com/bitpay/bitcore-lib/tree/cash


Bitcoin Cash accidentally sent to Bitcoin address. Can I get them back? I managed my Bitcoins Cash in a Electrum Cash wallet on my PC.
From there, I accidentally sent them to another internet based wallet, but didn't notice that this wallet is for Bitcoin and not Bitcoin Cash.
In the Bitcoin Cash blockchain I can see that the transaction actually took place and that the adress now owns the Bitcoin Cash. The problem is, that this address is a Bitcoin Cash address, and I cannot get access to it.

Is there a way to reclaim this Bitcoin Cash address? I own the address on Bitcoin, but not on Bitcoin Cash.

In my case I sent the Bitcoin Cash to an address created by a Mobile Bitcoin (!) wallet from btc.com.

The support from btc.com told me the solution:

  B) You have sent BCC to your BTC wallet:
  1. Use your BTC recovery PDF at https://bcc-recovery.btc.com/ (click on 'forgot password' to use your backup PDF)
  2. Recover the coins to an address from your BCC wallet

There was not even the need to click on "forgot password". I just logged in there with my username and password of the mobile Bitcoin (!) wallet and then it started to scan some addresses - and actually found the address I had send the bitcoin cash to. It then allowed me to specify another bitcoin cash adress where to send the money to.

So, I am lucky now, I have back the bitcoin cash the I thought I would never see again


Cannot send BTC. "Insufficient funds" Yesterday I've sent transaction from my 2-of-4 Multi-sig wallet in Copay for Mac.
Transaction was signed by me and 1 more user.
It was broadcasted to Blockchain (As Copay says).
But when I copy TX ID and search it on Blockchain.info or Insight - i see "No transaction found" message.

For now, I cannot create new transaction from this wallet because I receive an error "Insufficient funds".

Is there any workaround for this?

It was self-fixed. Frozen Transaction just disappeared.


How do you run one daemon for multiple users? I have installed Bitcoin v0.18.1 as user1.
Everything is fine, but now I need to let user2 access the same run so he can use bitcoin-cli as well.

However, once I log into the VM instance as user2 I get this error:

error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set.  See -rpcpassword and -stdinrpcpass.  Configuration file: (/home/user2/.bitcoin/bitcoin.conf)

It does not matter if the users use the same wallet, I just need bitcoin-cli to work for both users and use data from user1 (full sync)

bitcoin-cli attempts to read the credentials from $HOME/.bitcoin. Since user2 will have a different home directory, bitcoin-cli will not able to find the credentials.

You can either symlink .bitcoin from user1's home directory to user2's, or alias bitcoin-cli for user2 to use -datadir=user1home/.bitcoin.

You may need to play around with the read permissions in either case.


confusion about open/close values on 1800 seconds periods I'm pulling tickers from Poloniex using this python API wrapper, with intervals of 1800 seconds.

I get back dictionaries that look like this (here I show two consecutive ones for 'BTC_XRP'):

{'close': '4.402e-5',
'date': 1491163200,
'high': '4.89e-5',
'low': '4.333e-5',
'open': '4.849e-5',
'quoteVolume': '51355222.751243',
'volume': '2370.18161649',
'weightedAverage': '4.615e-5'}

{'close': '4.38e-5',
'date': 1491165000,
'high': '4.6e-5',
'low': '3.888e-5',
'open': '4.492e-5',
'quoteVolume': '92451720.795809',
'volume': '3902.07294323',
'weightedAverage': '4.22e-5'}

Why is the opening price of the second one not equal to the closing price of the first one? Isn't a period ending when the next one begins?

For each period:

  The opening price is the price of the first trade that occurs within the period.
  The closing price is the price of the last trade that occurs within period.

Note that the last trade in the 1st period is not equal to the first trade in the 2nd period.
Since these trades are different, their prices can and usually are different.

In general the market price near the bid/ask spread can move around without having actual trades occur. The data feed is based on trades that occur within some period. This means there can be gaps between periods. Here is a video that covers the difference between the last price and the market price: Maket price vs Last price


Stealth addresses how does recipient use the bitcoins? I've been reading on what stealth addresses does:

Sender generates unique address using the recipient's stealth address for every transaction
If multiple senders send bitcoin to recipient, then blockchain sees sender's addresses going to different random looking addresses

My question is: How does the recipient use the bitcoin he receives? In the recipient wallet, does he have a list of those generated address (made by the sender)? How would he then use those bitcoin without revealing transaction linkability?

How does the recipient use the bitcoin he receives?

Stealth addresses require you to scan all the transactions of the blockchain It is a fairly inefficient process but the stealth address implementations that I've seen have two improvements:

prefix: each stealth address has a required prefix and you must bruteforce your txid to match the prefix encoded in the stealth address. That way the receiver must only test a subset of transactions.
dual-key system: a scanning key is introduced to allow the receiver to scan whilst their wallet is locked.

  In the recipient wallet, does he have a list of those generated address (made by the sender)?

Yes. A new address is derived from the stealth address and the ephemeral key (provided in the additional output with OP_RETURN). This address is then imported into the wallet.

  How would he then use those bitcoin without revealing transaction linkability?

Transaction linkability generally means that you can not link a transaction to a published address (obfuscating the destination). The concept you're aiming at, is transaction traceability (when creating a transaction, how do I obfuscate the source output).


Is it true that colored coins or digital assets (counterparty / ethereum / nxt assets / etc.) have an issue of paying fees? I'm looking to setup my own digital asset or coin on either counterparty or nxt assets or ethereum to distribute to my loyal customers, but I noticed that even if I created an account for my customers, they have no way of sending that token back to me when they wish to redeem it as these platforms require their transaction fees be paid in their native currency.

Is this a flaw in these systems or is there an alternative solution to this problem? Or what solutions have others come up with thus far?

I noticed that even if I created an account for my customers, they have no way of sending that token back to me when they wish to redeem it as these platforms require their transaction fees be paid in their native currency.

That's kind of true for Counterparty. The transaction fees are paid only in Bitcoin (which is a native currency of Counterparty), but not in Counterparty (XCP) which is the other native currency.
If holders want to redeem their token(s) for a good or service, they only need to pay a small transaction fee (that goes to bitcoin miners) which is expected.

I wouldn't say other systems that do require their own currency for this are flawed, it's how they decided to do things, as karask noted. Counterparty's approach emphasizes the use of BTC while XCP have been only where necessary (at least that's been the case so far).


Need to I.D. address I am trying to I.D. the owner of an address.
The address is 18y1M4fCUDvKwqbmPKd1N5QLTTiAVQiUCf
And they are drawing money out of my account.
Can anybody help?

ohbeone

It not possible to identify the person behind a wallet address. Maybe the address is written on a personal website or something like that. But if it isn't there's no way to get more info about the person behind that address.


How do I spend my Bitcoins without waiting for Bitcoin-Qt to sync? I purchased $50 from ExpressCoins and now it's transferred to the address, but I hadn't realized that to use your program, I have to download 20 gigs of information.  Is there a way to access my coins without doing that and transfer them to the market in order to spend them?  I can't use the address at another wallet that doesn't do that?

A clear step-by-step would be a godsend at this point, and looking for threads and faqs to read has just confused me with more vague answers and piling on new programs and terms.

If you use an iPhone, give bread wallet a try, the Blockchain app is cool, too. On Android I'd probably use mycelium.

All of those have nice and clean interfaces. Send some coins back and forth to get a feeling for it.

It's better for the network to run a full node (=use a client that downloads the whole 20Gig blockchain) but you don't necessarily need to, to send and receive BTC. All the apps I mentioned before dont require you to download the blockchain.

Technically Blockchain (the company) is an online wallet, which means they hold and secure your private keys (= the keys that allow sending money) while with bread wallet and mycelium you hold the private keys.

Blockchain = the company

the blockchain = the public ledger of Bitcoin


How do you reliably estimate mining fees? I'm asking this question because sites seem to yield widely different estimates.
For instance, if I want a transaction to be accepted within 6 blocks, this is what I currently have to pay according to various calculators:

https://bitcoinfees.net - 5 sat/vB
https://www.buybitcoinworldwide.com/fee-calculator - 123 sat/vB
https://privacypros.io/tools/bitcoin-fee-estimator/ - 356 sat/vB
https://btc.network/estimate - 230 sat/vB

Why are the numbers so different? Who's right?
For the record: at first, I was convinced that bitcoinfees.net had to be wrong, but then, someone sent me a transaction (4a129199006935cad810f99a41c14b2e2cdc4f8043732fde8f6db3f7aa899dfc) with a mining fee of 5 sat/vB... and it received its first confirmation within 20 minutes. It makes me even more confused because I see many transactions currently paying a much higher mining fee.

TL;DR: you don't, you enable RBF and adapt the transaction fee to the block space market (or use a wallet that does).
Best effort(s)
First of all, in order to be reliable the estimation must not be game-able by miners (or at least, most of the estimations must not be).  Therefore it must not be mempool-based (such as the electrs additional implementation, or by looking at Johoe's before making a transaction).
In this sense, the Bitcoin Core fee estimation (block chain based) is the most reliable.
Secondly, reliability is expensive. It can be measured by the statistical probability to get confirmed in less than N blocks. And by this metric, the most reliable method is again Bitcoin Core's.
Finally, i think you are interested in the most optimal estimate: that is both reliable (you are going to be confirmed before your target, and for the cheapest possible fee).
But such an estimate does not exist: the block space is a free market and no matter the statistical reliability of your estimate, if someone wants to fill the blocks up to your target with megabytes of high-fee-paying transactions, they just can.
A guess isn't reliable
Since you cannot reliably estimate transaction fees, you need to adapt your price to the market. However you will only witness the market actions after broadcasting your transaction. This is the reason behind Replace-by-fee (you need a way to bump your fees post-broadcast).
But RBF is opt-in, you need to enable it before performing a transaction. In case you already broadcasted your transaction, you can fall back to CPFP (spend the unconfirmed output with a second, high fee paying, transaction that pays for both --example with Electrum).
Conclusion -- what should i use?
It depends on your usecase.
If you are an occasional onchain user, you can afford the game-able and less reliable mempool estimations (see for example https://bitcoinqueue.com/#0,24h or the friendlier https://mempool.observer/).
If you are building an application, prefer Bitcoin Core's block chain estimations as:

For users reliability often outweighs cost (stuck transactions really aren't fun).
With a larger sample of transactions, statistics are on your side.
If all applications start relying on mempool estimations and fees continue to rise it becomes attracting for miners to collude :)

In both cases, when possible start with a lower estimation, enable RBF, and bump the fees as you are approaching your desired target without being confirmed.


Why does the Bitcoin conversion rate change wildly? I don't understand why the conversion rate for bitcoin changes wildly. Why does it?

As with any traded commodity the price largely depends on the confidence of the buyers and sellers in the future evolution of the price. Basically you pay whatever you feel it is worth. Like stocks this changes over time, as the company or the bitcoin economy in our case evolves.

The wild price swings are not that really that surprising then when it is mostly sentiment driven. Any sudden move in either direction may cause uncertainty, triggering reactive selling or buying that will again trigger more reactions. This cycle is then broken by people seizing the moment to buy in cheap or sell high, stopping the momentum, possibly triggering a move into the opposite direction.


Is there anyway I can be notified on my phone when I receive bitcoin? I am not talking about getting notified on my desktop, but I am talking about my phone.

Yes.

Many wallet applications support mobile notifications, either through native notifications, SMS or email. CoinBase etc. populars should do this.

Furthermore if you know Bitcoin addresses some third party services like block.io can be used to send notifications when a certain address receives a transaction.


What is the marginal energy cost of a bitcoin transaction? According to this web page: https://arstechnica.com/tech-policy/2017/12/bitcoins-insane-energy-consumption-explained/

...one bitcoin transaction consumes about 250 kWh of energy.

Is this the marginal energy cost of each additional transaction, or the average electricity cost of continuous mining (that would happen no matter whether there are transactions or not) divided by the relatively low transaction count?

What is the marginal energy cost of one additional bitcoin transaction? I.e. if the number of transactions would increase by one, by how much would the energy consumption of the bitcoin network increase?

Would the energy consumption of the bitcoin network double if the number of transactions doubled?

If each bitcoin transaction consumes 250 kWh, that would seem absurdly high. I do several hundred ordinary bank or card transactions per year, making the energy use about 75 000 kWh per year if I used bitcoin, which is 25 times higher than my current direct electricity use and probably still 10 times higher than my current direct and indirect electricity use combined.

Related: https://skeptics.stackexchange.com/questions/39910/does-one-transaction-on-bitcoin-require-215-kwh (I initially considered asking this on Skeptics, but they seem to have a habit of closing perfectly valid questions).

Yes, this number is the total energy consumption of mining, divided by the number of transactions confirmed.  The total energy consumption has basically nothing to do with the actual number of transactions, at least not directly.

There's an indirect relationship: since the total number of transactions (or rather, total size in bytes) that can be confirmed per block is limited by the protocol, then if there are more transactions, you would expect transaction fees to increase.  This in turn would increase the revenue of mining, and hence you would expect more miners to enter the network to compete for this revenue, increasing total energy consumption.  But since transaction fees are a relatively small fraction of total revenue (it's dominated by block reward), this relationship will be far from linear.

It's hard to say what the actual marginal energy cost of one transaction is.  One way to look at it is that, roughly speaking, every full node on the network will check the transaction for validity.  Looking at the logs from my own server as it synchronizes with the network, in one second it's able to validate blocks containing about 5000 transactions.  At full CPU, this machine draws about 15 watts, so that's about 3 mJ per transaction.  (Of course, much of this is overhead, since the machine is powered on regardless and used for other things.)  Now https://coin.dance/nodes estimates around 10000 full nodes currently on the network, so if we extrapolate from my machine, we have 30 J per transaction, or 8.3e-6 kWH.  If you make 1000 transactions, that's 30 kJ or 8.3e-3 kWH.

If you want to exclude overhead, you could suppose that if not for verifying transactions, my server would have been idling its CPU during that time, in which state it draws about 10 watts.  So the marginal CPU usage is about 5 watts, or about 1/3 of the values above.  This logic takes you to 10 kJ per transaction.  On the other hand, my computer is pretty low-power compared to most (it uses a mobile CPU), so you may instead want to increase those values.  But this should be on the right order of magnitude.


Bittrex Market History Confusion So I recently made a very small test order of Digix DAO in the Ethereum market (Using bittrex), and I noticed that it showed up in the Market History section.

It looked a little like this (NOT EXACT)

BUY - RATE 0.0... - TOTAL 0.0... ......

So I bought X DGD with Y Ethereum.

However, there was no SELL order to compliment my BUY order.

When I bought the Digix DAO, I bought it from a seller, who sold it to me. Why isn't his SELL order in the market history, but my BUY order is?

This also applies for the opposite: What does it mean when there is a SELL order with no BUY order to compliment it?

SELL means someone sold at the bid price rather than creating an order that is higher than the market price.

BUY means that someone bought at the ask price rather than creating an order that is lower than the market price.

There is never a compliment between the two for exchange markets.


How to check a bitcoin account from a dead person My father in law died 4 months ago.
On the tablet of my mother in law we noticed he had invested in bitcoins.
How can we check this still exist/that this is real?
Does he have a customernumber or how can I check this?

thank you in advance

Best Regards

How can we check this still exist/that this is real?

You have to find some more information, the name of a Bitcoin exchange, some email messages from a Bitcoin exchange, some written notes.

A Bitcoin address usually looks like these examples

1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2.
3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy.
bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq

A Bitcoin transaction ID might look like

f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a6

You don't need to keep a Bitcoin address secret. You don't need to keep a transaction-id secret. However it is vital that you keep any passwords, seed-phrases or recovery-phrases secret from everyone including helpers.

If you have some Bitcoin-addresses or Bitcoin transaction-IDs,  you can check if there is still unspent money by typing those addresses or transaction-IDs into a public blockchain explorer

  Does he have a customernumber

He might have had a customer number if he gave his Bitcoins to some business to look after for him. You would have to find some of his email or written notes that give the exact name of the business he used. There are thousands of them.

If he kept his Bitcoin in his own private wallet, he wouldn't have a customer number. He would more likely have one or more of

a wallet program on a PC or Mac
a Wallet app on a smartphone.
a hardware wallet (looks a bit like a USB memory stick)
a paper wallet (random looking numbers and letters)

He might have written down a wallet-recovery phrase - a set of 12, 18 or 24 dictionary words that can be used to recreate a Bitcoin wallet.

Don't give his passwords or recovery phrase to any helper. Don't type them into any website. Any helper should simply tell you how to use those but should not observe or participate in using those. Don't give anyone else access to your father in law's computers, phones, email accounts etc. You are likely to be contacted by a great number of very honest seeming tricksters who will steal from you and demand unlocking fees / release fees and any other kind of fee they can think of.


Testing BIP47 test vectors BIP47 is a new secret-sharing protocol which succeeds BIP64 (stealth addresses).

The test vectors are here.

I am stuck on part 2.iv. We multiply S0 = B0 * a0 (024ce8e3b04ea205ff49f529950616c3db615b1e37753858cc60c1ce64d17e2ad8 *  8d6a8ecd8ee5e0042ad0cb56e3a971c760b5145c3917a8e7beaf0ed92d7a520c = 03f5bb84706ee366052471e6139e6a9a969d586e5fe6471a9b96c3d8caefe86fef).

From that we are looking for:

s = HMAC-SHA512(x, o)
"x" is the x value of the secret point
"o" is the outpoint being spent by the first pubkey-exposing input of the transaction.

What does HMAC-SHA512(x, o) mean, first of all? What is o specifically? And how does this factor in with the test vector values?

Per the creator of BIP47 (Justus Ranvier), it's RFC2014 notation:

https://en.wikipedia.org/wiki/Hash-based_message_authentication_code#Definition_.28from_RFC_2104.29

https://tools.ietf.org/html/rfc2104


Unwanted peers connecting to Altcoin I am building an altcoin using the litecoin source code.

I have removed all of the Emplace Seed calls in chainparams.cpp for DNS seeding, changed my default node communication port to port 421 and commented out all of the baked in seed nodes from chainparamsseeds.h, even added the dnsseed=0 and seed=0 to my config file and deleted my peers.dat before launching the core daemon, yet I still see clients connecting to my VPS for all different kinds of coins and swiftly ending up banned.

What am I missing? I can't find a single reason why these peers are connecting to my VPS.. Though it's not the end of the world because it has latched to my chain and only syncs blocks/headers with my other nodes, it looks very unprofessional. Any help would be appreciated!

Thanks!

Schwifty

Took care of this with a combination of changing pchMessageStart values, baking my VPS seed node address into chainparamsseeds.h and adding rules to block outbound traffic to ports 9333 (and the other strange unsolicited connections to other altcoin nodes).


Is txindex=1 necessary in the latest versions? A few months back when I wanted to use getrawtransaction API call on any txid other than my bitcoin core wallet it would return an error. The error was resolved by adding txindex=1 to the conf file and restarting the daemon with -reindex option.
Now while teaching the concepts to a colleague, I was hoping they would search for the solution when they faced a similar error and would update the conf file. However, the API called returned with the transaction details for any txid and there was no bitcoin.conf file created.

Has the implementation changed which I am not aware about?

getrawtransaction's behaviour has not changed since Bitcoin Core 0.8 (up until at least 0.14).

It will always work:

For mempool (unconfirmed) transactions
For confirmed transactions that have unspent outputs left.

So, -txindex=1 is only needed in order to query for confirmed transactions of which all the outputs are spent. It also speeds up querying for confirmed transactions in general.


Can a company handle 70% of all bitcoin trading? In this paper about Mt. Gox, it is said that:

  By 2013, it was handling 70% of all bitcoin trading.

Doesn't it contradict the 51% rule, saying that if a single agent controls 51% of the bitcoin market, it will collapse?

@MaxSan is correct. Mt. Gox was only an exchange where people would buy and sell bitcoin. The 51% rule applies to a single entity (miner/pool) have 51% of the hashing power of the entire bitcoin mining network.


Does bitcoin mining power add up and how does this affect the difficulty? I read that if my hashpower remains constant, and total network hashpower increases, after 2016 blocks difficulty will increase. Now as far as I have understood, difficulty increases if blocks are mined before 10 min and I find no co-relation of this statement with previous one.

Say current total hashpower is 100,000 MH/s. If 2 people have joined network with hashpower of 50 MH/s. Total haspower is 100,100 MH/s. There are large pools having 5,000 MH/s or even more on current difficulty, mining at block/10 min, chances are very low that that these new miner with much low hashpower can calculate block @ <10 min.

This thing make sense if all machines in mining pools (say 50 MH/s), work on different blocks, then new miners can get block possibly in less than 10 min. But if hashing power is added i.e. 5,000 MH/s is used for finding block, then such minor additions should have no effect on difficulty.

So what exactly is going on here ??

Mining is a lottery, not a race.

Think of mining as digging for gold in your own piece of land. Everyone has an equally large piece of land, but some people can dig faster than others (=hash power).

One in every billion grains of sand contains gold. Despite that very low fraction, there are still plenty of gold grains out there. There are so many grains of sand out there that even just in your own piece of land, there are plenty of good ones.

However, the gold is randomly mixed with the pieces of sand, so every grain of sand you dug up has an equal chance of being good. Certainly those who dig through more sand faster stand a higher chance of winning, but even the very first grain you look at has a chance of being gold.

So how long does it take for a gold coin to be found? On average, as long is needed for all miners together to go through one billion grains. So does it matter if someone only adds 1% of the digging power to the total? Sure, he now has a 1% chance of finding the next gold grain. That isn't much, but on average that will absolutely reduce the time needed for a solution by 1%. And the difficulty (the ratio of sand to gold) will go up occordingly.


how EC Public key is generated from the private key effectively if my private key is 123456789123456789, doesn't that mean I have to dot G point that many times to generate my pubkey? there must be a shortcut to generate pubkey, otherwise the time complicity of generating the pubkey is the same compare to brutal force from trying from 1 to k? Am I missing anything here?

according to the article here: https://arstechnica.com/information-technology/2013/10/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/

it looks like generating pubkey from a random generated private key(which could be a 32 bytes BigInteger) requires to dot many times = integer value of the private key. which is impossible considering the key size for the private key is 2^256(32 bytes key space).

There are a number of more efficient algorithms to compute the multiplication than just the naive method described. A simple one is double-and-add where the point is repeatedly doubled and then added with previous doublings in order to calculate the final public key. There are a number of more complicated methods which are more efficient.

You can read about these on Wikipedia.


Does there exist a SPV-client in another language than Java? The only (active) project I know that implements a full SPV client is BitcoinJ, which is written in Java.

Does somebody know if there are any SPV implementations in other languages (like C) too?

I'm writing a BitcoinJ port for .NET (C#, Visual Basic, etc), but since I'm doing it on my free time, it's nowhere near complete.

Other way to use BitcoinJ in .NET is through IKVM (which I didn't use due to some limitations).

I don't know about other languages, but I hope this is helpful.


Namecoin: This transaction requires a transaction fee...But I have NMC When I am attempting to reserve a name using the command:

namecoind.exe name_new d/

I keep getting this error...
error: {"code":-4,"message":"Error: This transaction requires a transaction fee of at least 0.005 because of its amount, complexity, or use of recently received funds "}

However, I have more than .005 in my namecoin wallet, that I am attempting to register from. I have .01 in fact.

What is going on here?

You have enough to reserve the name (the .01 network fee) but then not enough to pay the transaction fee. If you wait a day or so for the coins to age, it might work.


Blockchain.info, does recovery phrase recover all wallets? I need some help understanding blockchain.info.

1.

Under the Default wallet, I can generate multiple addresses and also see the Extended Public Key (xPub). If I go to the iancoleman BIP39 mnemonic converter, and input my backup phrase, it shows all the addressed I generated in the default wallet, and also shows my Extended Public Key (xPub).

But:

If I add a new wallet by clicking "Add", and create addresses under it, I do not see these addresses on the bip39 page:
https://i.imgur.com/0LZcxWq.png
This wallet also has a different xPub that is not on the bip39 page:
https://i.imgur.com/WDlXZHz.png

Can someone please explain this?

2.

The wallet recovery backup phrase, does it only backup the default wallet (and all addresses in it)? Or does it backup all wallets within blockchain.info ? (I am talking about wallets created using the "Add" button, NOT another account with a different email).

The reason I'm confused, as I stated above, if I input the recovery phrase in the BIP page, it only shows the xPub and addresses associated with the default wallet only.

If someone help please?

Thank you!

Blockchain.info follows the BIP 44 standard for derivation paths, so the default account has a derivation path of m/44'/0'/0'/0. The derivation path for each account follows the format of m/44'/0'/i'/0. So for each account, increment i to get the address for it. On https://iancoleman.github.io/bip39/, when you scroll down, click the BIP 44 tab and increment the number in the "Account" box to get the next account you made.


I have bitcoin core wallet with missing btc I have a bitcoin core wallet with out me sending transactions it sent out several times sent to the same address ..will it come back in my wallet

Have a look at the transaction ID, try entering it into a block explorer and checking they really were moved. If they were, then no, it's unlikely you can get the coins back, your computer may have been compromised


Bitcoin Cash full node Whats bitcoin cash is it a description on how BCH/BCC should run ?

I need a full node BCH/BCC If I run bitcoin ABC or UNLIMITED will I get the bitcoin cash blocks ?

or are there difference in blocks between ABC and UNLIMITED

Bitcoin ABC, Bitcoin Unlimited Cash, and Bitcoin XT are Bitcoin Cash node clients. They do the same job, and the most important difference among them is their developers: They are developed by three independent development teams.

Some other differences:

Bitcoin ABC uses Compact Blocks, Bitcoin Unlimited uses XThin, Bitcoin XT uses both Compact Blocks and XThin to download new blocks.
94% of the nodes are Bitcoin ABC, more than 5% of the nodes are Bitcoin Unlimited, and only a few (1-5) nodes are Bitcoin XT.

Update: It was 94% when this answer was written (when edited, there are more BU nodes!). You can see the live statistics here

Other than their brands and those ^ differences, they're all the same.

If you really want to help the network, I'd suggest to run XT or Unlimited, because if a node crashing bug was found in Bitcoin ABC, it'd affect 90% of the network. If the network was 33% Bitcoin ABC, 33% Bitcoin Unlimited and 33% Bitcoin XT, then no such bug would be important that much, and the network would be more decentralized.


Anonymizing bitcoins? Is there any way to anonymize bitcoins? It doesn't need to be AML-proof, or even completely anonymize their source, I'd just like to obfuscate the source of the bitcoins more effectively than sending them through a chain of addresses that would be easy to follow.

Yes. With Zerocoin. It completely and properly and mathematically anonymizes the source, it seems. http://zerocoin.org


Ripple two types of trust. Or no? I tend to distinguish two types of trust:

a) I trust you to lend me XXX in quantity up to N units.

b) I trust you to borrow from me YYY in quantity up to M units.

However, ripple documentation appears to not make such a distinction. At least not clearly and explicitly.

Using ripple.com client I can trust someone to lend me, but I see no way to trust someone to borrow from me.

Can you help clear this conceptual hurdle for me?

I've been lending & borrowing all my life and never, ever was I confused about who owes me and whom do I owe. Now, with the advanced mathematical currency & exchange system I am not sure about that anymore.

The only risk would be that somebody owes you money and doesn't pay you back. If someone lets you owe them money, they are taking all the risk. You have to choose to take a risk, but normally you'd have no reason to want to control whether other people take risks.

  a) I trust you to lend me XXX in quantity up to N units.

This is the type of trust you extend when you create a pathway.

  b) I trust you to borrow from me YYY in quantity up to M units.

If you mean you trust them to pay you back, they would have to agree to pay you back and you would have to accept and act on that agreement. That would take place outside the Ripple system. The Ripple system just tracks balances, the terms on which those balances are paid back is outside the system.

I'm not sure why you would worry about someone giving you money without you having any agreement to pay them back. All the risk is on them.

And to this comment:

  Incidentally, when people just send me XRPs or BTCs to my ripple address at ripple.com, or when I do the same to them, no trust setup is involved.

No trust is required to hold or transfer XRPs. They're a native currency in Ripple. And no new trust is required for someone else to transfer balances to you where that money is held by someone you already trust. You set up trust in the first place so that payments will "just work".

It's basically this simple: If you want to hold BTC on Ripple, pick a gateway you trust and create a pathway to them. Set a limit. So long as you don't create any other pathways or reach that limit, people can pay you BTC is by making that gateway owe them to you. If you create only one pathway for each currency and it's to a gateway you trust, everything "just works". You can receive payments from and make payments to anyone who is reasonably well connected.


bech32 addresses for segwit support in mycellium and coinomi? Does mycellium and coinomi for android support bech32 addresses for segwit? If they don't would it throw an error if you tried to send it there?

Mycelium doesn't support segwit at all right now. I don't know about Coinomi but it looks like they support Segwit (at least receiving from a segwit address) but not BIP 0173. Since neither support this format, there's no way to generate bc1~ address within the wallet, so no way to send any bitcoin to them using this format.


Using a Bitcoin or Litecoin miner for attacking PBKDF2 / SHA-256 I'm wondering if it would be possible to utilize a Bitcoin or Litecoin miner to attack, say, a password database that uses PKBDF2 with HMAC / SHA-256. PBKDF2 uses multiple iterations of a PRF - usually HMAC-SHA1, but sometimes HMAC-SHA-256 - for protecting passwords. The idea is that these calculations have to be performed for each password, so that makes it more difficult for an attacker to test all passwords. The PBKDF2 method is defined in RFC 2898.

Sometimes statements are made that these functions are insecure because of attacks with ASICs and often total amount of Bitcoin SHA-256 hashes is shown as example of what can be done. Now I'm wondering if it would be possible to program a Bitcoin or Litecoin miner to find a password using brute force or a dictionary attack.

Assumptions:

HMAC SHA-256
the salt is known
output of PBKDF2 is 256 bit (the output of the hash) or less
"high" number of iterations, say 4K to 40K

To do this you would have to program HMAC using a single SHA-256. Furthermore, you probably would have to have a method to perform the iterations. The iterations use the same key (derived from the password) for HMAC but the data is dependent on the previous value. Obviously there also needs to be some way to generate or retrieve the candidate passwords.

Would it be possible to reprogram a miner to do this work, or are all the current miners too specialized to perform such operations? Is there a - possibly older - miner that can be reprogrammed to do this work?

Note that this question is about reprogramming/re-utilizing a hardware device. It is not a generic question of using the Bitcoin network to perform cryptographic tasks.

I've added Litecoin to the mix. Litecoin uses scrypt, which is already a Password Based Key Derivation Function in itself, which uses PBKDF2 as underlying PRF (hope that's OK, no answers yet).

Would it be possible to reprogram a miner to do this work, or are all the current miners too specialized to perform such operations?

A Bitcoin mining ASIC can only do a single task, mining, it has no ability to do anything further than take an 80 byte header, hash it, and return a nonce if it has a large enough of zero bits. In terms of applicability to general SHA256 computing tasks, it has no relevance whatsoever. They can not do single SHA256, return under any circumstance but a low hash, and can not hash arbitrary data. Scrypt based ASICs do exist, but they are hardcoded to stupidly low parameters nobody would use for password hashing in the real world, the other caveats also apply.

  Is there a - possibly older - miner that can be reprogrammed to do this work?

A FPGA can be reprogrammed to do almost any task you take the time to author a bitstream for, it would be possible in some circumstances use FPGA for attacking hashes. The Bitcoin mining FPGA that were used in around 2013 do not have much relevance however, as they were never designed for high bandwidth performance between the host and the chip. You might have been communicating over a 9600 baud serial connection which is too slow to send any significant amount of data across.

GPUs are generally used for this sort of task instead, where you have extremely fast and low latency connections to the CPU and a high degree of concurrency for computing hashes. The efficiency is not as high as dedicated hardware (FPGA or ASIC), but they are commodity devices which can be used for a lot more of these sort of tasks. A high end card can compute in the order of half a billion SHA256 hashes a second when the input is only several compression rounds long, though it will burn upwards of 400W while doing so.


Bitcoin-cli createrawtransaction with 3 outputs example Is this possible to do?

I am trying to create a transaction with 1 input that will have 3 outputs.

I tried:

bitcoin-cli createrawtransaction "[{\"txid\":\"b0d6607323d5dadcd67dd1b5b6d6e5f08b70c45d187c8cf17ebfa00f9c0fb65e\",\"vout\":1}]" "[{\"2Mxmxo19LaqUePqkshcYQDzwW8SY6CpxzjN\":0.00989748, \"2N1ozs19uHsk2maPA5PiK8TEZQP8HfTd4Zn\":0.23247816, \"2NDgJmx7PykJRMK4QKTqUrfC6ewmccaq6fq\":0.0001}]"

But get an error:

error code: -8
error message:
Invalid parameter, key-value pair must contain exactly one key

I don't understand what I'm doing wrong since the inputs and outputs both take in an array of values.

Any ideas?

This is version 0.17.0.

Here's the pretty print json

I'm pretty confident that there is no syntax issue.

"[
    {
        \"txid\":   \"b0d6607323d5dadcd67dd1b5b6d6e5f08b70c45d187c8cf17ebfa00f9c0fb65e\",
        \"vout\":   1
    }
]"
"[
    {
        \"2Mxmxo19LaqUePqkshcYQDzwW8SY6CpxzjN\":    0.00989748,
        \"2N1ozs19uHsk2maPA5PiK8TEZQP8HfTd4Zn\":    0.23247816,
        \"2NDgJmx7PykJRMK4QKTqUrfC6ewmccaq6fq\":    0.0001
    }
]"

You need to use (simplified notation) [{addr:amount},{addr:amount}] for the outputs, not [{addr:amount,addr:amount}]. This is to permit multiple outputs with the same address (which wouldn't be valid JSON in your assumed syntax).

A simpler alternative also exists, namely {addr:amount,addr:amount}.


Are there many Namecoin domains in use? I know that the idea of namecoin is to create distributed DNS system.
I also know that one can by bit address with namecoin.

But I have never seen any bit domains. If they do exist, how reliable are they?

.bit domains are not recognized by ICANN, the company that runs the main internet DNS. This means that most operating systems have no support for them built-in.

So, to be able to visit .bit domains, you will have to do some configuration first. You basically need to let your computer know where to search for the IP address translation of the .bit domain, as most computers head over to ICANN's DNS servers for doing that.

Considering the reliability of the network, that's not easy to measure. I'd suggest you look at the number of clients connected to the Namecoin network (I cannot find a reference for that.) and the amount and speed of the available DNS proxies. On the page I just mentioned, you can see that a decent number of DNS proxies exist for Namecoin. I have no experience with using them. Considering you choose one that is close to your physical location, I'd guess they are fast enough.

On the amount of available domains, I think the .bit TLD is not quite adopted yet. But you can see on the Namecoin explorer page that new addresses are added at a fast pace. Here you can find a list with some popular .bit addresses.