Could there be an exploit by creating millions of meaningless transactions? Would it be possible to hamper the network's efforts in validating blocks by creating millions and millions of bogus transactions- simply sending back and forth say 0.1 BTC from address A --> B --> C --> A and so on endlessly? Obviously this would hard to do by hand but if there were an automated script it could be done theoretically quite easily..

Or would this strategy have absolutely no effect?

You need to provide fees on bitcoin transactions, in which case, you are producing economically valid transactions and will run out of money eventually.

Currently the min fee is 0.0001 (BTC).

Listed here - https://en.bitcoin.it/wiki/Transaction_fees


Update (or is it an upgrade?) from 12.0 to 13.2 I am currently running 120100 bitcoind. Apparently, the software is now at 130200. What is the procedure for updating? Can I just do:

sudo apt-get upgrade bitcoind

or is it more complicated than that? Operating System is Debian 3.16

(This box does not have a wallet and is only used for getting information from the blockchain, so I do not need any strict security protocols.)

Ok it seems you are running on Debian Jessie. No you cannot simply do sudo apt-get .... You can either download the binaries from somewhere, or you can build the binaries from source. I personally would advise you to build the application from source, as it is a great learning exercise. It is also safer in principle to personally ensure the program you are running is really tied to the open source code which has been released.

One of the difficulties of building bitcoin core from source is to make sure all dependencies are correctly installed first. In particular, if you want to use a wallet as part of the software you need to build the Berkeley Database version 4.8.30.

Download the file db-4.8.30.NC.tar.gz from this page. Check the hash of the downloaded file:

$ sha256sum db-4.8.30.NC.tar.gz
12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef

Then uncompressed the archive:

$ tar -xvf db-4.8.30.NC.tar.gz

Before stepping inside the newly created directory, create a directory db4 for the sake of installing the Berkeley database:

$ BDB_PREFIX="$(pwd)/db4"
$ mkdir $BDB_PREFIX

So we can now build the Berkeley database as follows:

$ cd db-4.8.30.NC/build_unix
$ ../dist/configure --enable-cxx \
                    --disable-shared \
                    --with-pic \
                    --prefix=$BDB_PREFIX
$ make install

Note that make install does not require super user rights, since the project is configured with a --prefix option which means the binaries
are installed in a file system hierarchy which you own. Once make install terminates, you can check that your db4 directory has been duly set up with bin docs include and lib sub-directories.

Having installed the Berkeley database, you can now focus on building bitcoin core (and its other dependencies which are easier to install). First install the official bitcoin source repository:

$ git clone https://github.com/bitcoin/bitcoin.git

Then move to the bitcoin directory:

$ cd bitcoin

Check the available version tags:

$ git tag

Synchronize your local code with the version you want:

$ git checkout v0.13.2

From this point on, everything is explained in the file doc/build-unix.md I am repeating things here for emphasis, as it may bring light on a few points, but this post will be out of date soon and you should really refer to doc/build-unix.

Add the following line to your file /etc/apt/sources.list with the right mirror:

deb http://[mirror]/debian oldstable main

Then:

$ sudo apt-get update

Then install the packages described in doc/build-unix.md (build requirement). When it comes to boost, hopefully the debian repository version is enough:

$ sudo apt-get install libboost-all-dev

As indicated in the file, also install these packages:

$ sudo apt-get install libminiupnpc-dev

$ sudo apt-get install libzmq3-dev

At this stage, you need to install the GUI dependencies as per file.

Once this is done you can start the build. However, you will need to refer to your db4 directory created while building the Berkeley database version 4.8.30. The simplest option is to create a link:

$ ln -s ~/path-to/db4 db4

Then the build can start:

$ ./autogen.sh
$ ./configure LDFLAGS="-L/path-to/bitcoin/db4/lib/" \
              CPPFLAGS="-I/path-to/bitcoin/db4/include/"
$ make
$ make check
$ sudo make install

Your software should be installed now, and you can check this is the case:

$ which bitcoind
$ which bitcoin-qt
$ which bitcoin-cli

Note: since you already have v0.12.0 running, you should have a directory ~/.bitcoin with your config file, debug file, wallet file,  blockchain data etc. Your new installed version should pick things up from there (in particular you will not need to sync the blockchain again).


What are stale shares and what can I do to avoid them? When I mine at a pool, only a part of my shares are accepted. There is a small percentage which is marked as stale.

As far as I know I only get paid for accepted shares, so what are these stale shares and how can I avoid them?

Stale shares are the shares that were sent after a block was already solved, that is to say, they were sent late and were no longer valid. To avoid stale shares, best to have a reasonably fast mining rig (so you won't take too long to calculate a share, probably not a problem for most machines), reliable internet connection (stable, not necessarily fast), but also an up-to-date mining software (if you are mining with some really old miner it might not communicate in the most efficient manner with the pool).

In short - update your miner every now and then, make sure your internet is running okay, and don't mine on really weak rigs.


Cannot access my bitcoins because my wallet is still synchronising. What can I do to spend them immediately? I have purchased bitcoins and have downloaded Bitcoin-QT, but my wallet is taking forever to synchronize to the network.

I can't access my wallet because it is still in the sync process. I have the record of me paying for the Bitcoins, the confirmation email, etc., and the address it has been sent to. I desperately want to start spending them. What can I do to gain access immediately without waiting for the synchronization to run its course?

One solution is to export (in your privacy) the private key connected to the address on which you received your Bitcoins (or simply all private keys). This can be done using a command line tool known as pywallet.

Then, you can import this key (or all your keys) into another wallet. Browser-based wallets such as https://blockchain.info/wallet do not require syncing. Hence you can immediately spent your coins. For the bĺockchain.info wallet the procedure is described on their website.


How often is a block mined on the bitcoin testnet? I've been watching testnet for a few minutes and I haven't seen a block come in yet. I'm testing some code that works with incoming validated blocks, and I'd like to test it out.

Blocks on testnet3 are intermittent; sometimes there's hundreds of blocks a second, massive reorganisations that strike out tens of thousands of blocks, or no blocks for many hours. This is largely due its zero value and the difficulty adjustment rules that don't deal well with changes in hash rate. Generally no software is tested here other than for public demonstrations as a result.

For more reliable testing the regtest mode exists in Bitcoin Core which allows you to instantly create blocks on demand in your own isolated testnet with as many peers as desirable.


Looking for a tool that gives a score based on the likely hood of a 0-confirm deposit being douple spent I know there is gap600, but it's proprietary, closed source and most likely expensive. If there is an open source free solution then please let me know.

Zero-confirmation transactions are inherently unsafe to be considered as completed payments. It is not possible to create a tool that could give a truly reliable indication of whether or not an unconfirmed transaction will in fact confirm (or not). If it were possible to reliably predict such a thing, we wouldn't need a blockchain record in the first place.


Official DiabloMiner.app Where can I get official DiabloMiner.app? Is it safe?

By safe I mean that it neither will try to steal my wallet nor will dig for somebody else.

It's hosted at github.

Downloads are here.

It's open source, so you can check the code to see how safe it is.

There's an old but still active thread on the bitcointalk forums.

It looks like the program is java code and so doesn't need compiling for OSX, and also that there's a script DiabloMiner-OSX.sh that runs it on OSX.


Address Reuse for Multisig Address It is De facto standard that address should not be reused, and even Bitcoin officially emphasis address should not be reused. Does the same condition apply for Multi-signature address ?, If Yes apart from privacy what is the need ?
Thanks

It is De facto standard that address should not be reused.

Indeed.

and even Bitcoin officially emphasis address should not be reused.

There is nothing official, anywhere, in Bitcoin.

Does the same condition apply for Multi-signature address ?

Yes.

If Yes apart from privacy what is the need ?

Privacy - for you and those you interact with - is pretty much the only reason for discouraging reuse, multisig or not.


NBitcoin Transaction sign(secret, bool) is giving error. Instead of bool it says to pass Coin Object I am using NBitcoin (I'm new to it) to sign a transaction. Here Transaction sign(secret, bool) method is giving error. (I've searched the Internet, but got no help.) Instead of bool it says to pass Coin object, I'm using the latest stable version of NBitcoin. How should I do this? Here's my code:
var fee = Money.Coins(0.0001m);

        Transaction payment=Transaction.Create(bitcoinNetwork);
        payment.Inputs.Add(new TxIn()
        {
            PrevOut = new OutPoint(fundingTransaction.GetHash(), 1)
        });

        payment.Outputs.Add(new TxOut()
        {
            Value = amount-fee,
            ScriptPubKey = toAddress.ScriptPubKey
        });

        var output = fundingTransaction.Outputs[0];

        payment.Outputs.Add(new TxOut()
        {
            Value = output.Value - amount - fee,
            ScriptPubKey = output.ScriptPubKey
        });

        var message = "Thanks :)";
        var bytes = Encoding.UTF8.GetBytes(message);
        payment.Outputs.Add(new TxOut()
        {
            Value = Money.Zero,
            ScriptPubKey = TxNullDataTemplate.Instance.GenerateScriptPubKey(bytes)
        });

        Console.WriteLine(payment);

        payment.Inputs[0].ScriptSig = fundingTransaction.Outputs[1].ScriptPubKey;

        payment.Sign(secret, false); // the problem arises here

        using (var node = Node.Connect(Network.Main))
        {
            Console.WriteLine("Doing version handshake");
            node.VersionHandshake();
            Console.WriteLine("Sending message");
            node.SendMessage(new InvPayload(InventoryType.MSG_TX, payment.GetHash()));
            node.SendMessage(new TxPayload(payment));
            Thread.Sleep(500);
        }

Sign method expects two arguments: private key and coins to be spent
false makes no sense in that line according to the documentation mentioned in the below link but I found similar code in another question NBitcoin: signing a transaction in TestNet so I will have to try on my system in VS 2019:
https://programmingblockchain.gitbook.io/programmingblockchain/bitcoin_transfer/spend_your_coin#sign-your-transaction

transaction.Sign(bitcoinPrivateKey, receivedCoins.ToArray());

UPDATE(I tried the below things and it worked for me):
Create a Private key and get address:

Send some amount to the address: https://blockstream.info/testnet/tx/6266c8262610ab0790f9f1841930bb27666588be8ab343a7e0470b7bb48a655b
Use the below code to create a Tx, sign and broadcast it:

            var bitcoinPrivateKey = new BitcoinSecret("cPof7e5g6xfgB6AZrc6XVTVwA4efLJurh9kVxa6FRChbr8Jyqaon", Network.TestNet);
            var network = bitcoinPrivateKey.Network;
            var address = bitcoinPrivateKey.GetAddress(ScriptPubKeyType.Legacy);

            var client = new QBitNinjaClient(network);
            var transactionId = uint256.Parse("6266c8262610ab0790f9f1841930bb27666588be8ab343a7e0470b7bb48a655b");
            var transactionResponse = client.GetTransaction(transactionId).Result;

            var receivedCoins = transactionResponse.ReceivedCoins;
            OutPoint outPointToSpend = null;
            foreach (var coin in receivedCoins)
            {
                if (coin.TxOut.ScriptPubKey == bitcoinPrivateKey.ScriptPubKey)
                {
                    outPointToSpend = coin.Outpoint;
                }
            }

            var transaction = Transaction.Create(network);
            transaction.Inputs.Add(new TxIn()
            {
                PrevOut = outPointToSpend
            });

            var myAddress = BitcoinAddress.Create("tb1q5va20jy9dg30zdyy0nakg5y95trdr3gtw5jy9d", Network.TestNet);

            var txOutAmount = new Money(0.01m, MoneyUnit.BTC);

            // Tx fee
            var minerFee = new Money(0.0005m, MoneyUnit.BTC);

            // Change
            var txInAmount = (Money)receivedCoins[(int)outPointToSpend.N].Amount;
            var changeAmount = txInAmount - txOutAmount - minerFee;

            transaction.Outputs.Add(txOutAmount, myAddress.ScriptPubKey);
            transaction.Outputs.Add(changeAmount, bitcoinPrivateKey.ScriptPubKey);

            transaction.Inputs[0].ScriptSig = address.ScriptPubKey;

            //Sign Tx
            transaction.Sign(bitcoinPrivateKey, receivedCoins.ToArray());

            //Broadcast Tx
            BroadcastResponse broadcastResponse = client.Broadcast(transaction).Result;

            if (!broadcastResponse.Success)
            {
                Console.Error.WriteLine("ErrorCode: " + broadcastResponse.Error.ErrorCode);
                Console.Error.WriteLine("Error message: " + broadcastResponse.Error.Reason);
            }
            else
            {
                Console.WriteLine("Success! Tx:");
                Console.WriteLine(transaction.GetHash());
            }

Tx: https://blockstream.info/testnet/tx/0ada6696fb134ebc4f96a55a3d5b60d90e5a723ec2e27634bb1777730e7df914


Could BTC be changed so that it limited the amount of computation power a given miner used? I am assuming this would be hard or impossible to prevent miners from circumventing but would there be a way to change the algorithm to limit how many transactions a given mining installation could process per day, etc.? This is to address the energy use concerns we are recently hearing about.

No, it does not seem possible to impose limitations as proposed on miners without severely impacting key properties of Bitcoin. The proposed change would at least require registering miners and instituting some sort of oversight mechanism to evaluate their participation. The likely outcome would be some mix of reduced utility and evasion of the oversight at the cost of increased complexity and centralization. Either way, the Bitcoin network can only be upgraded by convincing the vast majority of participants to run software enforcing the updated rules—and a proposal with such mixed trade-offs sounds like a tough sell.
While it is possible to form a ratio from Bitcoin's energy consumption and on-chain transaction count, that number is not as meaningful as one might think at first glance. The payment mechanism is a necessary function of the Bitcoin system, but Bitcoin's predominant use has been emerging to be as a long term store of value. Bitcoin's mining expenditures now secure savings worth about $1T.
I'd like to explain a bit further why comparisons with other payment systems are often inapt.
Bitcoin is not book money like PayPal or banking balances. An on-chain Bitcoin transaction is an irreversible transfer of a bearer instrument directly from sender to receiver that finalizes in minutes. Consider being able to directly hand someone cash or a bar of gold on another continent without any intermediaries. A system like that is useful, e.g. to gain access to banking-like services, to facilitate international payments, or to hedge against the rampant inflation of their national currency.
Leveraging Bitcoin's digital nature, the Bitcoin network is used as a base layer to build additional systems on top, much like the internet is built on top of TCP/IP. Even today, most Bitcoin payments are not recorded on-chain but happen on second layer systems like the Lightning Network or in the form of book money between users of custodial services—akin to transactions on Fedwire vs payments on PayPal or the VISA network.
I suppose our argument is that the uses and benefits of the Bitcoin network justify its energy consumption even when taking into account its environmental impact.


Is there a multi Sig Explorer or Stats provider? Is there a resource where I can get the past and current number of multi sig transactions, all types?

Are you looking for 'bare multisig' transactions by BIP-11?

Have a look here: https://webbtc.com/stats and here: https://webbtc.com/scripts/multisig

Or may be you are interested in BIP-16 mostly used for multisig?

Take this link: http://p2sh.info


How do I start a bitcoind server in deprecated mode for multiple functions I have a bitcoind server running bitcoin-core version 0.17. Now since I need to use deprecated RPC methods I need to start the bitcoind server in deprecated mode, so I am already able to run it to support the accounts rpc methods by running the following command

bitcoind -deprecatedrpc=accounts

However, I found that signrawtransaction has also been deprecated, so I ran the bitcoind server with the following command :

bitcoind -deprecatedrpc=accounts,signrawtransaction

The server started successfully, however I was still getting this error :

"signrawtransaction is deprecated and will be fully removed in v0.18. To use signrawtransaction in v0.17, restart bitcoind with -deprecatedrpc=signrawtransaction.\nProjects should transition to using signrawtransactionwithkey and signrawtransactionwithwallet before upgrading to v0.18"

So I started the server again with the following command :

bitcoind -deprecatedrpc=signrawtransaction

And this time the transaction went through, however I need to start the bitcoind server to support both the deprecated methods. How can I do that?

Set the two flags independently.

ie, -debug=bench -debug=net


What is an obfuscation key? This message appears in my debug.log:

2017-01-21 00:16:42 Opened LevelDB successfully
2017-01-21 00:16:42 Using obfuscation key for /home/<username>/.bitcoin/blocks/index: 0000000000000000

As does this:

2017-01-21 00:16:42 Opened LevelDB successfully
2017-01-21 00:16:42 Using obfuscation key for /home/<username>/.bitcoin/chainstate: <removed>

What is an obfuscation key used for?

Either accidentally or intentionally, the Bitcoin Core chainstate database (which is a LevelDB database directory containing the UTXO set at the current tip) used to occasionally trigger anti-virus software. It would recognize certain byte patterns in it, and automatically quarantine and scan the file, resulting in database corruptions.

This was resolved by making the software use an obfuscation scheme for the non-hashed data in it. The scheme is very simple - a randomly chosen (per database) 64-bit value that gets XORed into all values in the database. This is fast, simple, and so far, effective.


Bitcoin Daemon Syncing Crashing Server. CPU through the roof we run a Bitcoin Daemon on a Linode server.

We're seeing huge CPU usage to the point its crashing our server.

We're not mining, simply running a node.

Can you help?

The bitcoin daemon takes around 24 hours on a good server to sync to the network. During this time CPU usage is very high as it is verifying the blockchain from scratch.

Once synced, bitcoind is a far lighter program.


Qt client not exiting on Linux I am running Ubuntu 12.04. When I close bitcoin-qt (or any of its derivatives, like litecoin-qt or dogecoin-qt), sometimes it does not completely exit. I then have to run killall -9 bitcoin-qt, or sometimes when even that doesn't work, killall -9 bitcoin-shutoff (apparently the client calls a bitcoin-shutoff process to shut itself down). I am wondering if there is a fix for this, to prevent the client from refusing to close in the future.

Have you set a proxy?

From my experience slow shutdown seems to have to do with slow proxies (for example, Tor).
There is an issue for this: https://github.com/bitcoin/bitcoin/issues/2954

If it is not the network thread that hangs, but database synchronization, then killing with -9 can be dangerous.

I'd suggest debugging this by running in gdb, Ctrl-Cing when it hangs, and then getting backtraces for every still-running thread.


How are BTC-e orders filled? When there is some price overlap, i.e an ask and a higher priced bid, who will get the difference? In other words, will the seller get an "extra", or the buyer a "discount"? I'm interested in BTC-e mainly, but general knowledge about exchanges is useful too.

I looked around here and found similar questions, such as this one, this one, and this one, but still I don't fully understand how it works.

This answer seems to suggest that the effective price will be that of the order that was in the book, the one placed first. So, assuming volumes match, an ask at $1000 with a bid at $1050 will be filled at $1000 if the ask was placed first, or at $1050 if the bid was placed first.

Here it's stated that "the exchange will match the buy order with the lowest sell orders", but it's not clear to me if that's the case just in the example given in the question, or always. This other one agrees with the other two, but doesn't say what happens in the opposite case (swapping bids and asks).

Its exactly as you state in the third paragraph.

If you (limit) sell 1 BTC for $1000, you would expect to get $1000. But if someone just placed an order to buy 0.5 BTC for $1050, you will sell to that guy first (so only half of your order) and will receive $525 for that. The other 0.5 BTC you want to sell, sells for $500 (so $1000 / BTC) if someone has that order. So you receive $1025 in total (but fees need to be subtracted), more then you expected.

The same happens when you buy 1 BTC at $1050. If someone just placed an order to sell 0.5 BTC at $1000, you buy that half coin first for $500. The other 0.5 BTC you ordered is bought for $525. So in total you spent $1025 instead of $1050, but you will receive a whole BTC.


How does bitcoins power consumption compare to other financial institutions/exchanges? (ie banks, stock exchanges) So recently in the news there has been some negative reporting bout bitcoins power consumption. "the Bitcoin network is consuming power at an annual rate of 32TWh—about as much as Denmark."  arstechnica

The article makes this look like a bad thing by comparing it to Denmarks power consumption,  But I'm wondering how bitcoins power consumption compares to A) other crypto currencies,  B)  to other financial instuments like The New York Stock Exchange, Nasdaq, or the the US banking system.  I can't seem to find this information by googling.

How does bitcoins power consumption compare to other financial institutions/exchanges?

So many people have an opinion, but nobody is doing the calculation. I'll give a helping hand: an Antminer S9 can do 13TH/sec, and uses 1.2 kilowatt, if it runs one hour, it uses 1 kwh. I multiply this with 24 (for the day) and 365 (for the year). This is a bit less than 10'000 kwh.

Now I am looking at bitcoin.info, in the charts, how many terahashes are approximatly used. As of today (2018march05) I read 23mio TH/sec. I divide this 23mio TH/sec by the power of a single Antminer, to get an idea how many there might be in the world. This gives me 1.77mio Antminers. They consume all together per year 1.77mio * 10.000 = 17'700'000'000 kwh. Divided by 1000 for megawatthours, and another 1000 for gigawatthours and another 1000 for terawatt hours. 17,7 Terawatthours per year (well, it is growing at an enourmous speed...).
How many power supply units does this make? A huge carbon plant or atomic system provides 1000 Megawatt, equivalent to 350 wind turbines. 1.77 mio Antminers consume roughly (1.77mio * 1.2 kw) 2.124 Megawatt. This means, on the other side of the power plug must be roughly two atomic or carbon power plants.

Wikipedia says, that there are 3mio ATMs worldwide. I found different sources for ATM power supply, and found between 125Watts and 750 Watts. So lets only work with 125 Watts. This is 0.125 kW times 3mio installed systems gives me 375 Megawatts. So only the ATMs consume roughly one third of the Bitcoin miners.

I think this gives a good relation, and now the experts can extend this with the amount of power for printing dollars, distributing dollars, office space of the employees, transportation costs of the employees, and much much more. For sure this is still a naive comparison, cause the dollar reaches literally everyone, whereas bitcoin is still in its infancy (with constantly growing power demands).

Oh, on the power supply of Denmark: there are 5.75 mio inhabitants, and consumes per inhabitant 0.6kwh, so Denmark consumes 3450 Megawatt, which requires a bit more than three atomic or carbon power plants. But as Denmark is champion on windenergy per inhabitant, it is more like 1000 wind turbines :-) This gives an annual consumption of ~30 Terwatthours per year.


Using funds that have not been completely transferred yet for a new transaction What happens if I start a new transaction with funds from a transaction which isn't 100% complete?

Let's say, the incoming transaction shows 2/3 of the green dot, but the sum is counted as full by my Bitcoin Wallet for Android.

The green dot in Bitcoin Wallet for Android represents the number of confirmations an incoming transaction has. Once the first slice appears, the transaction has its first confirmation; i.e. it was included in the blockchain. Additional slices will appear when succeeding blocks are found, AFAIR marking up to six confirmations.

There should not be any issue or delay to spending any funds that have at least one confirmation as long as you include a sufficient transaction fee.


How can I detect which network I'm connected to? I'm in a unit test and I would like to use different test addresses depending on which network I'm connected to, to keep test output limited to the network I'm actually connected to.

I know I can run validateaddress to figure it out, but how can I detect this directly?

getblockchaininfo should tell you which chain you're on. For instance, on the main chain, you should get something like:

{
    "result": {
        "chain": "main",   <======= This is what you want
        "blocks": 519338,
        "headers": 519338,
        "bestblockhash": "0000000000000000001822f09f1821deb6b3b74e36ea1de4e232e5c60fa30ed9",
        "difficulty": 3839316899029.672,
        "mediantime": 1524358671,
        "verificationprogress": 0.9999957624003699,
        "chainwork": "0000000000000000000000000000000000000000018fa8011b05ef506160c4ff",
        "pruned": false,
        "softforks": [
            {
                "id": "bip34",
                "version": 2,
                "reject": {
                    "status": true
                }
            },
            {
                "id": "bip66",
                "version": 3,
                "reject": {
                    "status": true
                }
            },
            {
                "id": "bip65",
                "version": 4,
                "reject": {
                    "status": true
                }
            }
        ],
        "bip9_softforks": {
            "csv": {
                "status": "active",
                "startTime": 1462060800,
                "timeout": 1493596800,
                "since": 419328
            },
            "segwit": {
                "status": "active",
                "startTime": 1479168000,
                "timeout": 1510704000,
                "since": 481824
            }
        }
    },
    "error": null,
    "id": null
}


Are the miners to decide if a consensus rule is accepted or not? Or are the buyers in power? I get the impression that every time a consensus rule change is suggested then people assume that the miners/mining pools have the last word if this rule accepted or not. But isn't it up to the buyers?

Take the blocksize limit for example: A lot has been talked about which pool would go for which approach regarding the blocksize. Now let's assume one part of the miners would got for approach "big blocks" and the other would go for "small blocks". This would result in a fork of the blockchain: Bitcoin would essentially be split into two currencies: BigBlockBitcoin and SmallBlockBitcoin.

If I where to buy some Bitcoins after such an event, then I'd expect Bitcoin exchanges to offer me these two coin types. I would be able to buy the coins mined under the rules I like, it would not matter if they where mined by 90% of the miners world-wide, or by 10%.

Eventually one approach would lose traction and the coins value. So isn't it ultimately up to the buyers to decide if a coin is successful or not?

Yes. Even more direct: owners of Bitcoins before the fork will suddenly own both types of coins after the fork and can start selling the side they don't want.

However, in general, this is a very messy and damaging way of deciding consensus: in times of uncertainty a lot of people will decide to move to USD to sit out the storm (causing both sides to drop in price). Another fact is that a lot of people do not follow all the day to day drama and will not notice the fork until they're too late. Those people will take the largest losses.

Those things combined make it a further red flag for people considering investing in Bitcoin in the first place: why invest in something that radically changes course every x years through dramatic and damaging civil wars? Where you could be the one losing out if you blink your eyes. A currency needs stability to become trustworthy.

Also: Miners do have to make a choice fairly quickly after a fork, if they mine the wrong side, they will lose a lot of money. And yes users should not want to stay on a 10% mined chain very long: 10% security means that a 51% attack is incredible easy, so that coin would not have enough security to really survive.

All in all it's much better if consensus is reached in a peaceful manner. Luckily the long term goals of both miners and devs are fairly well aligned with the long term goals of users, so those coming to a consensus says a lot. As well as that users (as a group) have a lot of influence over what devs do or don't do (as is the nature of open source), as well as pressure over miners.


Bitcoin pool with GETWORK support I study bitcoin and found a simple open source miner on githab. It runs on the CPU, and uses the outdated GetWork protocol, but it's enough to study. Is there now a bitcoin pool that still supports the GetWork?

GetWork requires you to make a new request every 2**32 nonces, modern miners would be making 50,000+ requests a second. No pools have supported this since 2011.


How to transform a private key into an ECKey? I´d like to construct an ECKey from a hardcoded private key but it´s not working...
First try
If I run the code in this example the key import is working just fine. But since I actually want so send money I need to import my own key...
I tried this private key L48r9sYN2dtsWHWwJ1Xez27W7a3X7RvG6obrmVgU2JLTFQeUCnkh and used this site to generate it. When I try to make the private key an ECKey like this:
ECKey key = ECKey.fromPrivate(Base58.decodeToBigInteger("L48r9sYN2dtsWHWwJ1Xez27W7a3X7RvG6obrmVgU2JLTFQeUCnkh"));

I´m getting the exception
Exception in thread "main" java.lang.IllegalArgumentException: private key exceeds 32 bytes: 304 bits

Second try
I tried the solution form this question with this code
String priv = "L48r9sYN2dtsWHWwJ1Xez27W7a3X7RvG6obrmVgU2JLTFQeUCnkh";
ECKey key1 = DumpedPrivateKey.fromBase58(TestNet3Params.get(), priv).getKey();

Which leads me to this exception
Exception in thread "main" org.bitcoinj.core.AddressFormatException$WrongNetwork: Version code of address did not match acceptable versions for network: 128
at org.bitcoinj.core.DumpedPrivateKey.fromBase58(DumpedPrivateKey.java:59)
at com.javamaster.TicTacToeApplication.main(TicTacToeApplication.java:42)

Third try
I tried another solution form this question
    byte[] b = priv.getBytes();
    System.out.println(priv);
    ECKey key3 = ECKey.fromPrivate(b, true);

It results in the same exception as from the second try.
What is wrong with the key? Should I use another way to generate the private key?

The valid private key is L48r9sYN2dtsWHWwJ1Xez27W7a3X7RvG6obrmVgU2JLTFQeUCn not L48r9sYN2dtsWHWwJ1Xez27W7a3X7RvG6obrmVgU2JLTFQeUCnkh. You mistyped and added "kh"


Why are the fees for converting Ripple to Bitcoin so high? So I've very recently gotten into cryptocurrencies and after making a bit of money on bitcoin, I decided to try an altcoin. I used Changelly to convert my bitcoins into XRP and the fees were very low. Then, a few hours later I tried to convert 180 XRP (41 USD) to bitcoin using the same method. The "estimated amount" I would get (as indicated on Changelly) was quite close to this 41 USD amount, so I went ahead and exchanged. When the transaction was approved however, I only received 29 USD!!!! Is there something I did wrong? Is this normal? Why are the fees so high? Please do keep in mind that I've only started investing a few weeks ago. Thanks a lot!

This is most likely explained by the high fees on bitcoin. These services still have to move the bitcoin from one wallet to another and you have to pay a fortune at this time, about $6- $19.  You didn't do anything wrong this is something that will be fixed on the #bitcoin chain once #segwit and Lightning Network are highly adopted.


How do I protect my mining rig from brownouts and electrical surges? My mining rig consumes 1,250w.  What additional information do I need, or how do I shop for a product that will protect me from Brownouts and Electrical surges.

I'm not interested in UPS functionality, however I'm mostly concerned about protecting the equipment and would rather shut the rig down than pay the expense incurred with a battery backed UPS over a long duration.

You need whats called a Power Filter.

There are varying levels of filters, some cut the tops off of AC signals, others take dirty input current and consume it, then create a completely new AC signal for device use.

The C2 is a good intro, but if you want superior protection, look for something called a Power Conditioner.

Here are links to the current leading brand:
http://www.google.com/search?hl=en&tbm=shop&q=apc+power+filter

http://www.apc.com/products/category.cfm?id=15&subid=85


Fees for bitcoind sendmany, limits for number of end addresses I have two questions, both about sendmany.

First, is there any limit on how much transactions can I send with sendmany? (Apart from bash's limit with maximal parameter length.) Is sending about 500 transactions OK?

Second, what will be the fees used when I send a lot of transactions (and thus, probably creating a big transaction)?

You can calculate your transaction size before sending the transaction. Here's some more info on that:

How to calculate transaction size before sending

A single transaction isn't limited to how many outputs it has, rather, there are some limits to how big a block is. You can read more here:

How many different destinations can a single transaction have?

EDIT:
After calculating the size, you can further calculate fees by using this method (it takes into account some code in main.h):

What is the exact formula for calculating transaction fees?


Why do Bitcoin API services offer Block details? I understand having APIs around addresses and transactions, but I'm less clear why I need to know what's happening with a Block(s). This is to confirm one's transactions? Might someone provide some context?

E.g. for debugging purposes, for miners, for parties who work directly with Bitcoin protocol.

"I see only block X on my local bitcoind, but the latest on blockchain.info is Y".

Application developers are less interested about blocks.


Will reinstalling bitcoin core give me access to the previous wallet? If I reinstall Bitcoin Core, will my previous bitcoin wallet still be accessible or will I get a new wallet? The previous wallet backup became corrupted. Will reinstalling give me back my old wallet or is my wallet lost forever? I don't have a wallet backup.

I'm sorry to hear that your wallet got corrupted, hopefully you did not have too much value in there.
I'm afraid that if your wallet.dat file got corrupted and you don't have a backup there is not much you can do.
Back up the wallet.dat file and see if you can find tools to help you fix it.
Reinstalling core will not do much to help you restore a corrupted wallet file.
Can you open the old wallet at all?  Perhaps you can export the private keys that are in it?


Timelock Transactions I would like to know if timelock transactions are considered standard with the current bitcoin client. If the answer is no, this means that you should use a different client or is it up to user choice?
Furthermore, if someone wants to construct such a transaction which is the structure it should have?

nLocktime has always been standard and is used to prevent fee sniping.

OP_CHECKLOCKTIMEVERIFY is currently not implemented and is not enforced.

A non-standard transaction can be mined by a miner, but will not relay around the normal peer to peer network. A transaction who has a nLockTime which has not been passed is invalid, and won't be relayed or included in a block until this time has passed.


How exchanges manage funds and addresses I have heard many exchange works like, Holds all their users funds into the exchange main wallet not directly to their user's wallet. These exchange just provide a deposit address to their users for depositing BTC or ETH and their users are never given private keys. So when a deposit is done under any user's address, Its actually transferred into the exchange main wallet at the same time or at the time of selling coin? Selling coins to exchange does not cost any fee for miners?

I want to learn more regarding this matter, Can anyone redirect me to any link that can explain this in easy words and easy way to setup such wallet?

There is no "user's wallet" when you are using an exchange. What you might think is a "user's wallet" is actually the exchanges wallet. When you deposit any cryptocurrency into an exchange, you are not depositing to "your exchange address", you are depositing to an address owned by the exchange (thus part of the exchange's wallet) and the exchange promises to give you the same amount of cryptocurrency that you deposited to that address if you want to withdraw from the exchange.

When you buy or sell on the exchange, no actual transactions happen; they just update some entries in a database. No money is transferred anywhere; it is all held by the exchange in their wallet.


Setting keypool size in the conf file I used keypool=10000 in the conf file but bitcoin-cli -getinfo shows "keypoolsize":1000. Why?

keypoolsize only shows how many keys are currently in the keypool. It does not reflect the maximum size of the keypool. The keypool=<n> option does not automatically fill the keypool to that size, you will need to refill it by using keypoolrefill.

If after keypoolrefill you still do not see a larger keypool, then that means your bitcoin.conf file is either named incorrectly, located in the wrong location, or formatted incorrectly.


unable to read macaroon path (check the network setting!): admin.macaroon: no such file or directory on lncli getinfo Just started lnd for the first time connected to a bitcoind node. Do lncli getinfo and this is the error message. How can I get past this?

EDIT: Would like to add that I'm using lnd on testnet, however lncli is looking in the mainnet folder

Found the issue, lncli needed to be set to testnet and you need to create a wallet as well

lncli --network=testnet create
lncli --network=testnet getinfo


Why is the USD spread of the order book on GDAX kept very low most of the time? I noticed that there is a difference in the appearance of the order books among different exchanges.

On GDAX, the USD spread is kept very low most of the time ($0.01). At these times, the buy and sell orders closest to the mid market price amount to a higher BTC value than what is actually traded.

This inherently leads to a trade history that is much more stable on a short time scale, which makes me think that it has something to with "manipulation" of the current BTC price, for example by use of bots.

Other exchanges usually have a much higher USD spread (in the order of dollars), and thus a trade history which is less stable over short periods of time.

GDAX screenshot

(USD spread $0.01)

Bitstamp screenshot

(USD spread $12.11)

What is the reason for this discrepancy? What is the gain of forcing a more stable short-term BTC price?

Edit: Another screen shot from a moment ago. This is kind of ridiculous. Bots gone awry?

GDAX offers 0% fee to maker (traders who's trades are being matched by a seller or buyer). That incentives traders to try to match bid and ask as close as possible thus reducing spreads.


Are channel ids inherently linked to node ids in the Lightning protocol? I'm wondering if it is possible to shut down my node, change my node id, but persist my channels in the Lightning protocol. Is there an inherent limitation to the protocol that prevents this from happening? From looking from BOLT2 it seems like there isn't?

BOLT#7 outlines in the rules for receiving channel_announcement messages, that any previously known channel with differing node_ids, should result in the blacklisting of all associated nodes for both the current message and the previously known channel.

if it has previously received a valid channel_announcement, for the same transaction, in the same block, but for a different node_id_1 or node_id_2:

SHOULD blacklist the previous message's node_id_1 and node_id_2, as well as this node_id_1 and node_id_2 AND forget any channels connected to them.

EDIT:
I suppose a potential way around the above would be to wait over 2 weeks and publish no updates. Since the software will generally forget about nodes or channels which they have not received an update for in two weeks, then when you broadcast a node_announcement for a previous channel under a new node_id, then other network participants will just see it as a new channel.
This would need negotiating with the channel partner to not close it and to re-establish it under a new node_id, which there is currently no means of doing so in the existing spec.


I lose my private key on my blockchain wallet Can you please tell me how can I get my blockchain private key. I want to sell my coins. Please help me.

look through all your devices that you accessed the wallet with- surely you made a copy of your private key somewhere
Only you had control of that ...
what service diod you use initially?
MEW or ? an exchange ?


How vulnerable are offline users of bitaddress.org, who don’t use Ubuntu? By not installing Ubuntu and not removing the hard drive, I suppose I am vulnerable when I open bitaddress.org offline and enter the 64 random hexadecimal characters I have generated without a computer to find corresponding public address.

Yes, I clear the browser before re-connecting to the net. I never use the mouse to copy the private address (or indeed keep any computer record of it) but, if malware can pick up the 64 random hexadecimal characters which I typed in or if it can take a screenshot of the private WIF address I am screwed.

Depends on what you are going to do with your address. As for me there are three main cases to consider:

Will you store so huge amouts of bitcoin to fear attackers who are targeting yourself directly?
Are your computer as unsecure as most of non-technical people computers (and therefore: is it possible that it is already infected by some virus)?
Or last but not least: are you doing some controversial business and fear being spyed by government or someone else who may want to know either your private keys or just that certain address belongs to you?

In fact in everyday life situations there is no need for security better than just keeping your antivirus up to date and avoiding storing generated keys on disk (which could lead to a leak if your computer gets compromised in the future). Unless you've put all your savings in BTC.


How do you start the Ardor funding account monitor via the command line? I want to fund accounts I tag via account properties using the account monitor, but I want to understand how it can be started.

The ardor account monitor can be started via the gui: https://ardordocs.jelurida.com/Account_Monitor

When starting the monitor via the GUI, do you have to leave the browser open?
What about starting it via the command line?
Also how does fee-ratio work? Is there an example?

There is no specific command line option to start the funding monitor.
You can probably start it using a curl command after starting your node.

Q: When starting the monitor via the GUI, do you have to leave the browser open?
A: You can close your browser just keep your node running like with forging and bundling.

Q: Also how does fee-ratio work? Is there an example?
A: Fee ratio works like in any other API it is the conversion rate between child token and parent token used when the monitor submits its funding transactions.


How to claim BTG from an Electrum wallet? Claiming BTG after the Fork did not work

I have tried :
using Coinomi wallet,this way.

I could not locate the address holding eligible for BTG value.
All addresses i tried was contained no fund.
In the history tab i could not spot the addresses details.

Try this: Claiming my BTG from my BTC private key
Worked for me

To know where your BTG are use this explorer: https://bitinfocharts.com/bitcoin%20gold/


Why doesn't Bitcoin use a DHT to store its blockchain? Why doesn't Bitcoin store its blockchain in a DHT, but instead makes each (full) node store the entire blockchain?
related questions: "Why doesn't Bitcoin use a DHT for choosing peers?" and "Why doesn't each node store only a portion of the blockchain?"

Full nodes don't even need to store the entire blockchain (bitcoin core has a pruning mode). They must process each block at least once to ensure they have the correct UTXO set, then the raw block data can be discarded.


Can we estimate how many node has the Bitcoin network? Is it possible to estimate the amount of nodes (hosts) are connected to the Bitcoin network in a given time?

Note: Here node means host.

Not very accurately, because it depends on what you consider a node. A host is even more unclear.

Is it only full nodes?
Does it include light clients?
What minimum level of verification must it be doing?
Must it be listening for peers?

Websites such as bitnodes.io provide a number of listening nodes, but that doesn't necessarily guarantee that they are operating as such, or doing any transaction verification:

  Bitnodes is currently being developed to estimate the size of the
  Bitcoin network by finding all the reachable nodes in the network. The
  current methodology involves sending getaddr messages recursively to
  find all the reachable nodes in the network, starting from a set of
  seed nodes. Bitnodes uses Bitcoin protocol version 70001 (i.e. >=
  /Satoshi:0.8.x/), so nodes running an older protocol version will be
  skipped. The crawler implementation in Python is available from GitHub
  (ayeowch/bitnodes) and the crawler deployment is documented in
  Provisioning Bitcoin Network Crawler.


Bitcoin transaction fee is more than balance? I have some bitcoins which values 2.45 USD in my wallet.
When I want to send my bitcoins, blockchain (my client) prevents to do it. It tells me that my fee is more than my current balance!
I can't understand it! Then how can I use my money ??

Bitcoin fees aren't set as a percentage of the amount being transferred, but based on the number of bytes needed to encode the transaction.  In principle you can set any fee that you want, but miners will choose the higher-fee transactions to confirm, and others may never be confirmed.  It can be a little tricky to get your money back in that case, depending on the software you are using, so some wallet providers (like blockchain.info) may not let you set a low fee.

According to https://bitcoinfees.earn.com/, the currently recommended fee level is around 0.00000016 BTC/byte.  At the current price of $6,663 USD/BTC, that's about US$0.001 per byte.  So if your transaction would need to be larger than about 2.5 KB, you can't afford to send it.

In particular, if you received your bitcoins in many small transactions, then in order to spend them, your outgoing transaction has to list all the previous transactions you are spending, with a signature for each one.  This requires about 180 bytes each.  So, did you receive more than about 12 transactions previously?  Or are you attempting to "split" your transaction to send coins to many different destination addresses?  That will also increase the transaction size.

There isn't very much you can do about this.  It's possible that transaction fees will be lower in the future, but since it's market-based nobody knows for sure.  Otherwise, you might as well assume those coins are unusable, and make sure in the future to receive coins in larger increments.


lightning-cli listnodes is empty. Am I missing something? I want the result of listnodes like the following. How can I do that?

{ "nodes" :
    [
        { "nodeid" : "028e5a8e86540f703e1f58880d35d1e318a54c27d84ec1edbcde04a78ed4469a1e", "alias" : "???? EXANTE", "color" : "007f39", "last_timestamp" : 1516636793, "addresses" :
            [
                { "type" : "ipv4", "address" : "148.251.53.235", "port" : 9735 } ] },

https://gist.github.com/coinables/19223b8bf09a24a3a6e8240433df04bf

This is what I did:

Installed c-lightning referring to https://github.com/ElementsProject/lightning/blob/master/doc/INSTALL.md#to-build-on-ubuntu
Add config file as the followings.
Open firewall for port 9735
Check netstat. but 9735 is NOT listing. ("netstat -anp | grep 9735" is empty)

$ cat ~/.lightning/config
alias=xxx
rgb=008000
network=bitcoin
bitcoin-rpcuser=xxx
bitcoin-rpcpassword=xxx
bitcoin-rpcconnect=xxx
bitcoin-rpcport=xxx
announce-addr=xxx:9735
log-level=debug

$ ./cli/lightning-cli getinfo
{
  "id": "xxx",
  "alias": "xxx",
  "color": "008000",
  "num_peers": 0,
  "num_pending_channels": 0,
  "num_active_channels": 0,
  "num_inactive_channels": 0,
  "address": [
    {
      "type": "ipv4",
      "address": "xxx",
      "port": 9735
    }
  ],
  "binding": [
  ],
  "version": "v0.7.0-41-g1cd0ae1",
  "blockheight": 567741,
  "network": "bitcoin",
  "msatoshi_fees_collected": 0,
  "fees_collected_msat": "0msat"
}

$ ./cli/lightning-cli listnodes
{
  "nodes": [
  ]
}

In order for list nodes to provide some output you need to first connect to at least one peer on the network. Because the peer is giving you all the information from the gossip protocol about announced nodes and announced channels.

So do lightning-cli connect 03efccf2c383d7bf340da9a3f02e2c23104a0e4fe8ac1a880c8e2dc92fbdacd9df@144.76.235.20:9735 to peer with my node.

In case I change my node in the future you can try any node from a node explorer or find the address of my node at https://ln.rene-pickhardt.de

Also keep in mind that syncing the network over gossip takes some time (currently a couple of seconds) after you connected so you should not call list nodes right away.


How can non-Coinbase customers pay to Coinbase from Android? Scenario: Say I want to create a shopping app on android. After filling the shopping cart, when the user wants to check out, he is asked to pay me the bitcoins.

I have created an account on Coinbase.com.

Questions: After adding the items in the app to the cart, the user is directed to the coinbase payment page. How is the user going to pay me, if he doesn't have a Coinbase account but some other wallet? If he pays me the required bitcoins, how will I relate the user's payment with the invoice of the order generated for him?

The coinbase payment page has a "pay to address" option that will generate a unique address associated with your order and display a QR code. User can simply send payment to that address.


Security of online Electrum wallet after deleting wallet file I just created an Electrum wallet using my computer which is connected to the Internet. Suppose I send my bitcoin from an online exchange to that wallet, then delete the wallet file. Are there any risks that my bitcoin will be stolen if the computer is hacked?
Suppose I've stored the seed phrase on paper or using some metal engraving device. And after deleting the wallet file, I've also used some disk utility to truly wipe it from my hard drive. At this point, unless my computer had already been hacked before I deleted the wallet file, everything is safe, right? Obviously, the drawback is usability, in that now I'd need to restore the wallet using the seed phrase (rather than wallet file + password). But suppose I don't plan on performing any transactions in the near future. Is this solution safe for hodling?

Are there any risks that my bitcoin will be stolen if the computer is hacked?

Yes.

Uninstalling software or deleting files will not remove actual data in disk blocks that have been deallocated. Mundane file recovery software may be able to recover those contents.

Any computer connected to the Internet may have already been compromised by a hacker without the user being aware. Any access to a wallet in the past makes unsafe all future deposits to addresses controlled by the original seed-phrase.

Remember, wallets don't contain money. They contain a secret number that controls the spending of amounts of money that are kept track of in a public transaction journal that every wallet has a copy of (or indirect access to a copy of).

after deleting the wallet file, I've also used some disk utility to truly wipe it from my hard drive.

Overwiting all unallocated space once with zeroes would normally suffice to protect against item 1 above.
Prudent people have disk backups. You need to consider them also.


Is it possible for more than 21 million bitcoins to exist if 51% agree? One of the commonly cited advantages of bitcoin is that there's guaranteed to be only 21 million bitcoins.

However, my understanding is that the bitcoin protocol is patched by an opensource community, is it possible that the bitcoin miners could start using code that allows for more than 21m bitcoin?

Maybe. It would require a split in bitcoin users. Those who wanted the change could switch to a new version of the bitcoin software with the code changed to allow it. The problem comes from the fact that it would have to be a voluntary change. Some would want to change, others wouldn't, and this would split the bitcoin community. Any transactions that occur in the either chain wouldn't be reflected in the other. But any balance you had at the time of the split would be reflected in both chains.

It would be a matter of semantics on whether the new, modified bitcoin would even be considered the real 'bitcoin'. If the majority of the community thought it was an invalid change, then the new would take the role of just another altcoin and people probably wouldn't even call it bitcoin. If the majority liked the change, it's possible that the old bitcoin would lose value and be considered just another altcoin while the new version takes it's place (or even cease to be used at all). Or, it could be even and they could coexist, but that seems unlikely to me.

I don't think such a fork is something that the BTC developers would do to the community. Open source communities are generally afraid of forks anyway because they tend to kill projects by splitting the development team. Beyond that, doing so has the power to really lower the confidence in BTC as a currency. The people who already have coins would feel mistreated because the protocol change would mean the minimum value of their coins would be lower. It would essentially be equivalent to the gold conversion being lowered on the dollar during the gold standard.


Does getting shares when mining mean that I have earned a reward? So I have 13 Total Shares (Non Rejected) and my pool is Mining Pool Hub. It does not show that I have gained any Ethereum when I go to Dashboard (Under Ethereum) on Mining Pool Hub. Do accepted shares mean that I earned coin or no?

You probably have gained no Ethereum as of yet because even if your shares were accepted by the pool it doesn't mean they were accepted by the network. When your pool mines it's next block the percentage of your shares of the total network will be the percentage of the block reward you get.


Blockchain and Transaction Validation How do the miners check that I have enough Bitcoins. I cannot believe that they will walk through the huge and always growing blockchain established from 2009 to check each Transaction I made to calculate my balance ?

Bitcoin uses a thing called the Unspent Transaction Output Set (UTXO set), not accounts or balances. A transaction will consume UTXOs as inputs and create UTXOs as outputs. When a node receives a block (either during initial sync or normal relay), it will update its own internal database which contains the UTXO set. In this update, it removes the UTXOs that have been spent and adds the UTXOs that were created. Because it does this for every block, if a node is fully synced, it should know what all of the UTXOs are and have them stored in the database.

When a node receives your transaction, it will look up the UTXOs that your transaction spends in its database. If they don't exist, then it discards your transaction as invalid. It does not need to traverse the blockchain; the data it needs have been pulled out and put into another place where it can be easily looked up.


how to use bitcoind jsonrpc for regtest or testnet server in php? i used bitcoind with jsonrpc service.

but i added regtest=1 in bitcoin.conf at .bitcoin folder.

used:

  bitcoin-cli -regtest generate 101

  bitcoin-cli -regtest getbalance

  50.00000000

but I can't see the balance in php.

  $bitcoin->getbalance()

it doesn't show me the balance. it returns nothing.

if I remove regtest=1 from bitcoin.conf and start bitcoind -daemon.

  $bitcoin->getbalance()
  it gives me the the real server balance.

what is solution for this problem???

Very likely you need to tell your PHP JSON RPC client to connect to the right port.

If you start bitcoind without -regtest (= main net), it opens up the RPC server on port 8332.
If you use -regtest, the port will be 18332.

I can't see what kind of PHP JSON RPC client you are using, but there must be a way to tell it should use port 18332.


I have accidentally sent LTC coin(Using Bitcoin ATM) to my BTC wallet(Luno wallet). I have not received the coins yet I have accidentally sent LTC coin(Using Bitcoin ATM) to my BTC wallet(Luno wallet). I have not received the coins yet. how can i recover it back to my luno BTC wallet.

I have not received the coins yet.

You cannot receive LTC through the BTC network.

  how can i recover it back to my luno BTC wallet.

You cannot receive LTC into a BTC wallet. You generally cannot reverse cryptocurrency transactions.

I am not familiar with Luno. If Luno is a multicurrency wallet that supports both BTC and LTC, you may be able to use it to receive your LTC. Hoever it appears to support only BTC and ETH. I suggest you find wallet software that supports LTC.

The general principle is to export your private keys from your BTC wallet and import them into a LTC wallet, then sync the LTC wallet with the LTC blockchain.

I don't know how closely aligned LTC and BTC are, it may be that LTC doesn't support all the address-types supported by BTC - if so there is a chance your LTC are lost - or need more complex assistance to recover.

Remember to never give your private keys to a helper. Never give a helper passwords for or access to a funded wallet.


ccminer JSON-RPC call failed: Method not found I am having issue with running ccminer with bitcoin-qt.exe (Solo mining)

I am receiving error below upon start:

[2017-01-26 14:23:57] 1 miner thread started, using 'bitcoin' algorithm
[2017-01-26 14:23:57] Binding thread 0 to cpu 0 (mask 1)
[2017-01-26 14:23:57] JSON-RPC call failed: Method not found
[2017-01-26 14:23:57] json_rpc_call failed, retry after 5 seconds

How to resolve this issue?

What I did:

my ccminer running parameters:

ccminer -a bitcoin -o http://127.0.0.1:8332 -u USER -p 123456789 -R 5 -D

my bitcoin.conf file:

rpcuser=USER
rpcpassword=123456789
server=1
daemon=1
listen=1
#rpcallowip=127.0.0.1
rpcport=8332

I have tried to add -P into ccminer running parameters, and the result is

* Rebuilt URL to: http://127.0.0.1:8332/
* Hostname 127.0.0.1 was found in DNS cache
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8332 (#1)
* Server auth using Basic with user 'USER'
> POST / HTTP/1.1
Host: 127.0.0.1:8332
Authorization: Basic xxxxxxSOME_BASE64xxx
Accept-Encoding: identity
Content-Type: application/json
Content-Length: 45
User-Agent: ccminer/8.05-KlausT
X-Mining-Extensions: longpoll noncerange reject-reason
X-Mining-Hashrate: 0

< HTTP/1.1 404 Not Found
< Content-Type: application/json
< Date: Thu, 26 Jan 2017 11:19:41 GMT
< Content-Length: 76
* HTTP error before end of send, stop sending
<
* Curl_http_done: called premature == 0
* Closing connection 1
[2017-01-26 16:19:41] JSON protocol response:
{
   "error": {
      "code": -32601,
      "message": "Method not found"
   },
   "result": null,
   "id": 0
}

[2017-01-26 16:19:41] JSON-RPC call failed: Method not found
[2017-01-26 16:19:41] json_rpc_call failed, retry after 30 seconds

I thought, maybe bitcoin-qt.exe does not accepting any connections, but when I run bfgminer with parameters:

bfgminer -S opencl:auto -o http://127.0.0.1:8332 -u USER -p 123456789 2>logfile.txt

everything works fine...

P.S. everything is up to date:

Bitcoin v0.13.2 (64 bit)
ccminer v8.05-KlausT
pthreads static 2, 9, 1, 0
libcurl/7.50.3 WinSSL WinIDN

Thanks in advance

Above question was also asked at Github

  Sorry, but Bitcoin solo mining is no longer supported, because they
  removed the getwork command. Trying to mine Bitcoin is useless anyway,
  the difficulty is too high.


Bitcoin backed fiat currency Generally,  fiat currencies have a number on them that identifies one paper note with other. Can a Bitcoin backed fiat currency be used or is in operation?

Let's say we have gold and their equivalent(approx.) as fiat currencies in the market.

So can it be possible to have a currency in offline market that correspond to bitcoins, so that bitcoins could be more effectively used?

It wouldn't be a fiat currency.

  fiat money: money without intrinsic value that is used as money because of government decree

(N. Gregory Mankiw (2014). Principles of Economics. p. 220. ISBN 978-1-285-16592-9)

No government decreed its people to use Bitcoin. Quite the contrary: One of Bitcoin's goals is to take control away from governments, whereas fiat currencies are a means of governments to achieve and maintain control over their peoples' funds.

You appear to mean to ask whether it's possible to distribute banknotes the value of which is backed by Bitcoin which is what I assume to be the question I'm responding to in my answer.

In principle, it's possible.

The banknotes have to be created by an entity which is:

able to create banknotes which are hard to counterfeit and of which it's easy to spot a forged one.
trusted to keeps its promises.
predicted to last a long time.

The 1st point requires advanced knowledge about creating verifiable documents and the ability to keep secrets.

The second point adds the willingness to keep those secrets as well as the willingness to actually pay out money in Bitcoin if asked to and provided banknotes sufficient in value. This means that the entity has to have something to lose.

The 3rd point should be trivial. If the entity disappears after giving out the banknotes, people can't exchange them for Bitcoin.

As far as I can see, these requirements can only be met by states or large companies.

However, even though it's possible, fully backed banknotes are very unlikely to ever appear again. No matter whether they are backed by gold, Bitcoin, or anything else scarce. We live in a world where barely anything is backed. The credit a bank gives you not only isn't backed by some scarce good but also not even backed by banknotes lying in the bank's vault. Yet most people seem to be fine with this.

If people's attitudes shift to more critical thinking about money, of course, partially or fully backed banknotes become more plausible. Such banknotes can be backed by any scarce good. This scarce good very well can be Bitcoin which has great advantages over gold:

It's easy to transfer.
Reserves can easily be proven to exist without endangering them. And I mean actually to be proven to exist. Not just "Here is a video someone made 10 years ago, look at all those shiny gold bars we totally didn't put in there using CGI." or anything alike.
Gold – which is a resource needed for to manufacture certain things (with far lower value than it's being currently traded for, though) – doesn't unnecessarily lie around in vaults.
Its volume can't be inflated. There is a huge amount of gold in Earth's crust. If an easy way to mine it emerges, its available volume is greatly inflated, decreasing its value dramatically.


How could I do everything manually? I don't like asking coin base to create an account for me and having them give me my private key. How can I do all of this process myself?
Either bitcoin or ethereum

If you want to do everything yourself, download a wallet program on your computer and run it instead of using coinbase. For example, if you use a wallet like Bitcoin Core, it is completely under your control on your own computer, and its completely open source so you can review it all yourself. Thus you don't have to trust any third parties like coinbase. That is the principle behind why bitcoin is designed the way it is, and bitcoin core is the evolved version of the original bitcoin software Satoshi wrote to be trustless in this way.

  having them give me my private key.

As Pieter mentioned, coinbase will not give you any private key.

  for now just open an account. i don't know if i could not use a wallet and manage my money myself.

Just to clarify a nit with this point, bitcoin doesn't have any "accounts", in the way you might be thinking. You just have private keys, which correspond to addresses, which bitcoins can be paid to. There is no "balance", just unspent bitcoins sent to addresses, which are known as UTXOs (unspent transaction outputs). By installing a wallet on your computer, it will store your private keys for you, and watch the blockchain for transactions sent to your addresses. It doesn't ever "register an account" anywhere :)

  btw.is there a way to purchase btc and make sure that i will get what i pay for? i guess i should trust coinbase for that one. but maybe you know of a better way

Currently you just have to trust a seller like coinbase, yeah. If you pay via credit card and don't recieve it I imagine you could contact your credit card provider and ask them to reverse the payment or something though, not sure. But yeah there's no way I know of to trustlessly exchange BTC for fiat currency.


How can I define the change address of a transaction using createrawtransaction? This question is almost the opposite of How to find the change / sender address given a txid?

If I am making a transaction using createrawtransaction how can I define the change (sender) address?

In Bitcoin, change is a normal output which sends the remaining money to one of your addresses. When creating a transaction with createrawtransaction, you have to add change output manually (just like any other output), otherwise that money would go to the miners.


How does `createrawtransaction` and `fundrawtransaction` work with Elements? I know how to create and fund bitcoin transactions using createrawtransaction and fundrawtransaction methods. I tried to use the same methods in Elements to create a transaction on regtest and I'm a bit confused now.
What I'm trying to do precisely is having a node who only have a watch-only wallet creates and funds transactions with the UTXOs it has on watch and sign later on another machine.
So I have this watch-only node, and it watches 2 outputs, one with L-BTC and the other with some asset, let's call it X.
I first create a transaction that have only one output of 0.5 asset X:
e2-cli createrawtransaction "[]" "[{\"$ADDR\":0.5}]" 0 false "{\"$ADDR\":\"$ASSETX\"}"
Now I decode the transaction and I see this:
{
  "txid": "4d941354157530580ac49d97fad4690a5aab5b1a3bca4a38d7b26969455edec8",
  "hash": "4d941354157530580ac49d97fad4690a5aab5b1a3bca4a38d7b26969455edec8",
  "wtxid": "4d941354157530580ac49d97fad4690a5aab5b1a3bca4a38d7b26969455edec8",
  "withash": "d0d3b17552f63780c06e5558483412d8384702cd777404f52a8a9680304fe582",
  "version": 2,
  "size": 110,
  "vsize": 110,
  "weight": 440,
  "locktime": 0,
  "vin": [
  ],
  "vout": [
    {
      "value": 0.50000000,
      "asset": "ceefd76de1b71c2bed3de04481826287a80babb6e1f6c9feca14e57597742d74",
      "commitmentnonce": "036c0c488e3bfb29090d0bda8be116088c61dcd3252a949f801972e8dc3f223c70",
      "commitmentnonce_fully_valid": true,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 eee6174735a3d1bca9532e663ec266acd59a6a1c OP_EQUAL",
        "hex": "a914eee6174735a3d1bca9532e663ec266acd59a6a1c87",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "XZ8RJoGpd5GDRBGYuLrRq24bQBNtqCxgXG"
        ]
      }
    }
  ]
}

Then I try to fund the transaction (I want to subtract fee from the change output for some reasons):
e2-cli fundrawtransaction $RTX "{\"changeAddress\":\"$CHANGE\",\"changePosition\":0,\"subtractFeeFromOutputs\":[0],\"includeWatching\":true}"
And I have this error:
Wallet does not support more than one type of fee at a time, therefore can not subtract fee from address amount, which is of a different asset id. fee asset: b2e15d0d7a0c94e4e2ce0fe6e8691b9e451377f6e46e8045a86f7c4b5d4f0f23 recipient asset: ceefd76de1b71c2bed3de04481826287a80babb6e1f6c9feca14e57597742d74

And indeed if I convert it to psbt I see this:
{
  "inputs": [
  ],
  "next": "extractor",
  "estimated_vsize": 78,
  "estimated_feerate": 0.00000000,
  "fee": {
    "bitcoin": 0.00000000,
    "ceefd76de1b71c2bed3de04481826287a80babb6e1f6c9feca14e57597742d74": -0.50000000
  }
}

What am I missing here? I didn't put the "fee" key when I did createrawtransaction, as far as I can tell, so why did my asset X output became a fee output?

Ok it turned out I was a bit confused about the way fees and change is handled here. Here are the commands that worked for me:

createrawtransaction "[]" "[{\"$UADDR\":1.2},{\"$UCHANGE\":1.8}]" 0 false "{\"$UADDR\":\"$ASSET\",\"$UCHANGE\":\"$ASSET\"}"
fundrawtransaction $RTX "{\"changeAddress\":\"$UFEECHANGE\",\"includeWatching\":true}"
blindrawtransaction $RTX
and then on the signing side signrawtransactionwithwallet $RTX

Some comments:

the change address given in the fundrawtransaction command is actually used for the change of the fees paid in L-BTC, since here fees are explicit, not like in Bitcoin. That's why I added an explicit change address and amount for the asset I was sending.
I used unconfidential addresses to create the raw transaction
includeWatching is not implicitly true like in a bitcoin watch-only wallet
the tx worked, it was broadcasted and accepted by the network, but there's still something wrong with the blinding, the destination output has not been blinded, and on the other hand I messed up the change of the fee, it seems I can't unblind it myself


Does Bytecoin use SHA-256? Also, doesn't this mean that I can use hardware such as a bitcoin usb block erupter to mine it?

Bytecoin (BCN) bytecoin.org uses the CryptoNight algorithm and cannot be mined with bitcoin mining hardware.

Bytecoin (BTE) bytecoin.biz uses SHA-256 and it can be mined with a block erupter (and any other bitcoin mining hardware).


What happens if I fork an older block chain and rejoin the network later? Let's call it a "time machine attack".

Suppose I have an isolated network of n clients with a significant hash rate, install my client software on that and start mining on an older blockchain.

Since the difficulty was lower back then, I get lots of blocks in very little time, but my timestamps could be forged, and the difficulty increases, but not so much as the real network difficulty (however I am fully in control of my network and can do anything on my blockchain, increasing and decreasing difficulty if I need to, faking timestamps, and so on).

As soon as my chain is longer than the official one, I rejoin the network.
What happens then? Does my longer chain overwrite the other one, effectively giving me all of the bitcoins ever generated after my split?

Update - explanation

The attacker doesn't need 51% of the computing power of the network. A single pool could start hashing from some point back in time when the difficulty was low, then increase or decrease it in order to grow the blockchain faster. The last "few" blocks could even be harder than the official network difficulty (and take days instead of minutes).
The attacker can do what he wants on his network, changing network difficulty and forging timestamps, and the length of the blockchain does not depend only on the current network difficulty. I think it's possible to generate a longer blockchain with "relatively low" hash rates (2% - 20% of the network), it could take months (instead of years) but it could be possible in theory.

How can it be longer if you don't have more computing power than the entire network? Remember that the network converges on the chain that was hardest to generate, not the one with more blocks.


How to connect the Blockchain to the Network without IP Address? I would like to know how do we connect the blockchain to the network when there is no IP?
Indeed we all use bitcoin core (for bitcoin) to connect and retrieve information and update.
However the source code of bitcoin core (I have never read it) does not redirect us to an IP address, but people still manage to find themselves, without ever saving the IP.
How can people know or find the information, when the source code of the software does not have IP, they do not know address (IP) which has the information?
Knowing that the IP is the basis of the connection ...

The bitcoin client has many means to discover other ip in the bitcoin network, in the case of DNS request, which will return many ip address each times, here are the diferent DNS used as in 2017:

  seed.bitcoin.sipa.be dnsseed.bluematt.me dnsseed.bitcoin.dashjr.org
  seed.bitcoinstats.com seed.bitcoin.jonasschnelli.ch
  seed.btc.petertodd.org

You can see all the methods used by the bitcoin client to discover nodes here: https://en.bitcoin.it/wiki/Satoshi_Client_Node_Discovery


How does my hardware wallet know what my "account" balance is? There must be a request to wallet provider's server with full node where they will check it. But what is sent?

The hardware wallet itself does not know your balance nor does it need to. It does not query anything or anyone to get that information. It is the software that knows your balances. The wallet software will ask your hardware wallet for a master public key, and from there it derives the addresses in your wallet, but not the private keys (private keys cannot be derived from the master public key). It can then use the derived addresses and look up their respective balances. So the wallet software that you are using on your computer does this lookup and tells you, not the hardware wallet itself.

When you send, your hardware wallet might say "sending X Bitcoin" on its screen. That is not because it knows the balances but rather because the wallet software on your computer communicated that information to the hardware wallet. In many cases, the hardware wallet does not care about the balances and the information will be thrown out. The amounts are only there in order to be displayed to the user for confirmation that the transaction should be made before it is signed by the hardware wallet.


multiple input and output addresses in bitcoin transactions I was checking transactions in blockchain.info. I have some questions about transaction information about input and output addresses.

block address:
https://blockchain.info/address/1NHv6qBxu6haWj8rqeLqw9eyJqm4JT26R6

why some of transactions have one input and one output? They don't have any change transaction?
If any transaction has two output, the second one is change transaction?
can we see fee transactions in output address?
Are multiple addresses in input part related to each address in wallet that has bitcoin?

and one more question about transaction scripts:

what is input and output script? do wallets produce them? how we can use them?

I'm new in bitcoin and I appreciate your clear explanations...

why some of transactions have one input and one output?

A bitcoin transaction can have many inputs and many outputs. Bitcoin has a transaction oriented logic, where amounts are transferred from previous transactions. As an example (neglecting the fees): to be able to spend 1 bitcoin, when the  wallet has 2 previous tx with amounts of 0.5 BTC, then a new tx is created with two inputs. Same logic would apply, if 4 previous tx existed, each @0.25 BTC. Then a tx with 4 inputs would be created.
For the outputs: you can create tx with one or more outputs. E.g. faucets pay to many outputs, instead of creating single transactions - this saves on the fees.

  They don't have any change transaction?

If you are not the owner of a wallet, you cannot know, which is the "change". Normally you have an output address, and a return address (for the change, like in the second example of the screen shot). The transactions move from one pubkey to another pubkey address, and there we cannot see, which addresses belongs to the user's wallet, and which might be the change address. With this said, there are some activities to try to link addresses to real users. They create diagrams, and try to see the flow of tx, and derive the information. But when using addresses only once, you wouldn't loose your privacy...

  If any transaction has two output, the second one is change
  transaction?

not necessarily. I can send a transaction with 0.5 BTC to my brother, and 0.5 BTC to my sister. So there would be no change address.

  can we see fee transactions in output address?

hmm, no... Transaction fee is the difference between summary of input values and summary of output values. A usual case: you have one BTC, you send 0.5 to your brother, you send to your change address 0.4995, and the diff is the fees, which go to the miners.

  Are multiple addresses in input part related to each address in wallet
  that has bitcoin?

Not necessarily. The bitcoin network doesn't know about wallets, and its belonging addresses - this is a layer to make it more comfortable for the endusers. The bitcoin network works with transactions, moving funds from address(es) to address(es). No wallet information is included. So multiple input parts can belong to different wallets.

A good overview of transactions is here, and of course in Andreas' book "Mastering Bitcoin", which is also online available.


How can I find my Bitcoin address on Airbitz? I'm new to Bitcoin. I'm using Airbitz on my phone and I need to find my wallet address.

If you click in the top left that brings up the menu, select "Request". You will then be shown a screen with a QR code, your bitcoin address is below that QR.


How do I handle the risk that my hard disk crash? I have good back up system. Can my wallet be backed up?

Can I access it anywhere?

If so how do bit coin system know that I am the one accessing it?

Your wallet file contains the keys needed to sign transactions that transfer Bitcoins from your accounts. The system doesn't care who accesses what, it just cares that transactions are signed with the appropriate keys.

Back up your wallet file so you don't lose the keys you need to spend your Bitcoins. But remember, if someone gets their hands on any unencrypted copy of your wallet, they can spend your coins.


Bitcoin gone with "this transaction is not yet confirmed" I sent my bitcoins from my multibit wallet, first I did a a test spend which came across and then I sent all my coins. The transaction got a triangle icon and the text "this transaction is not yet confirmed" on it. I waited 30 minutes, nothing happened. I have the default fee set so it should be okay.
So I read on the multibit page here: https://multibit.org/en/help/v0.5/help_support_sentBitcoinFromMultibitButTheyAreStuck.html
and at the bottom it says that I can go to tools and reset blockchain. I did and it syncronized again for a while.
But when it was completed the transaction with the triangle is gone in my transaction list but my bitcoin are not in my wallet either.
How do I revert/reset and get my bitcoins back?

If nothing else in the help works, you can move your wallet to blockchain.info:

https://multibit.org/en/help/v0.5/help_movingAWallet.html


The difference between mempool "bytes" and "usage" getmempoolinfo returns bytes and usage. Currently, the value I have for bytes is 1316363 and the value I have for usage is 4826112.

I'm assuming that bytes is how much space these transactions would require if they were to be included in a block while usage is the size they are currently taking on my computer. That would imply that the transactions get compressed somehow (or some nonessential info gets stripped away) before they're included in a block. Is that correct or am I way off?

From the documentation:

  "bytes": xxxxx,              (numeric) Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted
  "usage": xxxxx,              (numeric) Total memory usage for the mempool

bytes is the size as calculated as vBytes as would be considered for inclusion in a block, usage is the logical size in actual bytes that are consuming memory.


Can you send bitcoins together from the same wallet if they have been received via various different addresses? What has been sent to your individual bitcoin addresses is supposedly recorded in the blockchain, but can you then send all of the combined bitcoins (that you received via various different addresses) at once with your public key? For example, if I received 1 bitcoin via address 1, 2 via address 2 and 5 via address 3, all of these addresses being derived from the same public key, and I wanted to send 6 btc to a friend, could I send all of them at once with my public key? Or would I have to send a combination of bitcoins from different addresses, i.e. by separate transactions? And if I could send them all together using the public key, how is it determined that I am in possession of all of these bitcoins if they were sent not directly to my public key, but to various irreversibly hashed addresses derived from my public key?

A bitcoin transaction can have one or more inputs, and one or more outputs. For example, here is a transaction with 1 input 3 outputs, and here is one with 3 inputs 1 output.

I think you are confusing the terms public key, and private key. A wallet is a collection of keypairs (private keys and public keys), and each one can be used to create a unique bitcoin address. So if you have three different input transactions to three different bitcoin addresses, each of these will be spendable using it's own private key.

Your wallet will sign the transaction with each of these three keys, and the rest of the network can validate the signature by comparing it to the public key associated with each input (despite never knowing the private key!). To learn more about how this works, look up some info on how public key cryptography works, it is a useful cryptographic tool employed in many systems, not just bitcoin.


Technical problems in deployment of segwit parallely on bit 4 Recently(as of May 24, 2017) segwit2mb HF has been proposed. A core developer has reported that another deployment of segwit via bip 109  on bit 4 would require code duplication.
Although the above link comes with some justification, I fail to understand the reasoning.

What will be consequences if we simply change the block threshold(95% of 2016) to 80% of 2016 and give it out as a new binary? Is there a network split risk?

If the miners activate segwit by signaling readiness for segwit on bit 4 (further called segwit4) immediately, all nodes that follow the current activation procedure (signaling on bit 1) would ignore this activation. Regular segwit enabled nodes would interpret transactions and blocks created with segwit according to the old rules. After segwit4 activated they would still consider segwit transactions to be not allowed yet, and thus with the first segwit4 transaction appearing on the network, ban the relaying nodes for forwarding invalid transactions. At this point, this would split the network between miners and all nodes that are segwit1-enabled.

Activating two different versions of segwit on the network would trigger untested interactions between nodes, as several parts of the relay code logic is dependend on the signaling bit. Only interactions between segwit-enabled and segwit-unaware nodes were tested extensively, so one should expect new code and new test cases to be necessary to avoid a netsplit with segwit1-enabled nodes.

This would perhaps not matter terribly much, since according to Garzik on Twitter the blocksize increase would be activated at the same time as SegWit4, so any old type nodes would be hard forked off the network anyway as blocks created by the new chain would appear invalid to them.

Update: Apparently, there are at least three opinions out there about the activation order of segwit, and the hardfork since Consensus, so I'm waiting what it'll be.


I want to change 0.25 dollar cents in bitcoin for my digital content, is it too little? I am a developer and very new in bitcoin world. I have plans of having website where I sell digital content for 0.25(or less) cents of dollars in bitcoin form.

What I understand is I have to pay for transaction fee for each purchase, I confess I don't know much about it.

If I want no fee can I develop my own "bitcoin transaction mechanism"?

Please, I need help thanks

currently that's not feasible with bitcoin due to its price. The alternative is to use another coin with a lower price to make it truly a "micro-transaction" with sub-penny fees. But the problem with scenario is your users will now have to buy that coin just to buy your product. Check coinmarketcap.com for a list of coins to use.


What is the api function call to access NXT's Data Cloud feature? If I hosted a few files on the NXT's Decentralized Data Straoge Cloud, how can I access those files via an API?

You can download your file using this API

localhost:7876/nxt?requestType=downloadTaggedData&transaction=nnnn&retrieve=true

where nnnn = Txid of your uploaded file

You can search txid for all your uploads using requestType=getAccountTaggedData&account=NXT-XXXX-XXXX-XXXX-XXXXX

where NXT-XXXX-XXXX-XXXX-XXXXX is your account number

If your localhost is not hosting prunable data, retrieve from a public node which is a Service Provider (with PE & AI listed under Services) in your peer's list.

Examples:

Retrieve all Txids of all uploads for account NXT-TBAJ-LVLX-YCWY-5FRLD
23.94.134.161:7876/nxt?requestType=getAccountTaggedData&account=NXT-TBAJ-LVLX-YCWY-5FRLD

Download PGP key of Core Dev
http://23.94.134.161:7876/nxt?requestType=downloadTaggedData&transaction=633908232195174623&retrieve=true

Full set of API for Nxt Data Cloud can be found at
localhost:7876/test?requestTag=DATA


ANXBTC.com / MTGOX v2 API "Authentication" I've signed up with ANXBTC.com and I'm trying to learn the API (based off MTGOX v2 API):

http://docs.anxv2.apiary.io/

In order to issue commands, there needs to be authentication.

I have a "Rest-Key", but I have no idea how to generate/find a "Rest-Sign".

On the link above, it says that "Rest-Sign is an HMAC hash constructed from your API secret, your API method path, your post data, and uses the SHA-512 algorithm."

Also on the above link, there is sample code (PHP, python etc) which can be tested - however it needs both the Rest-Key and Rest-Sign.

Part 2: Are these APIs meant to be run solely off a personal computer, or can it be used online? Eventually I want to try and create a website form where I can show the current exchange rate, as well as place orders. Is that possible?

If anyone has insight, help is greatly appreciated.

Thanks, Michael

Michael,

To generate the Rest-Sign header, use the following code (example in PHP):

Rest-Sign function

 function hmac_512($msg, $secret)
        {
        $secret = base64_decode($secret);
        $result = hash_hmac('sha512', $msg, $secret, true);
        return base64_encode($result);
        }

Rest-Sign inputs
$post_data should be an array with a nonce and any relevant API post data, and $api_path should be the portion of the API after https://anxbtc.com/api/2/ that you are calling.

       $post_data_encoded = http_build_query($post_data);
       $msg = $api_path . "\0" . $post_data_encoded;
       $rest_sign = $this->hmac_512($msg, $api_secret);

Regarding your second question, you can run this API from your personal computer or a server.

Hope this helps,

Evan


What is a good way to concisely explain Bitcoin? Often I'm asked to explain Bitcoin to someone and occasionally I come up with something stellar that really nails it, but most times it's a rambling incoherent mess.

What I would like to see is a short and simple explanation of what Bitcoin is that is suitable for someone non-technical to understand.

Bitcoin is a new kind of money. It's the first decentralized electronic currency not controlled by a single organization or government. It's an open source project, and it is used by more than 100,000 people. All over the world people are trading hundreds of thousands of dollars worth of bitcoin every day with no middle man and no credit card companies. It's a startup currency which has never happened before.

Bitcoin is the first digital currency that is completely distributed. The network is made up of users like yourself so no bank or payment processor is required between you and whoever you're trading with. This decentralization is the basis for Bitcoin's security and freedom.

Email let us send letters for free, anywhere in the world. Skype lets us make phone and video calls for free, anywhere in the world. Now there's bitcoin. Bitcoin lets you send money to anyone online, anywhere in the world for less than a cent per transaction!
Bitcoin is a community run system not controlled by any bank or government. There's no wallstreet banker getting rich by standing between you and the people you want to send and receive money from.

Bitcoin is more efficient than all competing currencies. This will drive its adoption in the same way computers were adopted, in that computers made people more efficient in competing in the marketplace. A currency has value by it being widely used. Bitcoin is a startup currency with a deflationary bootstrapping economy. Its use spreads by providing the speculator incentive.

Bitcoin is going to be the biggest opportunity for innovation that the world has seen since the industrial revolution. An idea whose time has come.


what is the Volume and BaseVolume reported from bittrex API? For example in https://bittrex.com/api/v1.1/public/getmarketsummaries or if you subscribe to the ws feed you get sent the following type thing.

{
  "MarketName": "BTC-ANS",
  "High": 0.0031,
  "Low": 0.00248777,
  "Volume": 1141826.57957173,
  "Last": 0.00295907,
  "BaseVolume": 3316.06464979,
  "TimeStamp": "2017-08-02T10:54:39.273",
  "Bid": 0.00295907,
  "Ask": 0.00296061,
  "OpenBuyOrders": 2439,
  "OpenSellOrders": 6856,
  "PrevDay": 0.00259698,
  "Created": "2016-10-26T01:28:31.96"
}

What does volume and BaseVolume equal though.. volume traded over last 24h ? The value goes up and down so bit confused. Anyone know ?

If you look at a coin here https://bittrex.com/Market/Index?MarketName=BTC-DGB the v which i assume is volume always seems to be really low.

Volume is the amount traded in that altcoin over the past 24 hours.

In the case of BTC-DGB, this is the amount of DGB that has been traded in 24 hours.

  BaseVolume is the total value traded in the base currency, for example Bitcoin.

Volume increases regardless if it is a buy or sell order.

To find the overall volume you can go to https://coinmarketcap.com.


How does AsicMiner pay the dividend? Can all stock holder get a login information or does dividend paid to private address? What?

The exchanges that ASICMiner trades their shares on require you to register with a Bitcoin address on which you want to receive your dividends.

See this answer on where ASICMiner shares can be traded.

When they pay out dividends, the total amount will be shared equally among all shares and payed of all shareholders by the address they gave the exchange to receive dividends on.


"tx" array inside blocks contains transactions hashes? When I use the "getblock " command on my bitcoin core client, it returns, beside other things, an array called "tx" with hundreds of hashes. Are these the individual transactions hashes or something else? If they are really transactions hashes, does the client keep the unhashed transactions in other structure and do I access it through other command?

Read the fine manual!

  $ ./src/bitcoin-cli help getblock
  getblock "blockhash" ( verbosity )

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

  If verbosity is 1, returns an Object with information about block .

  If verbosity is 2, returns an Object with information about block  and information about each transaction.

So if you add a 2 to the end of the RPC request, you'll get the full transaction contents rather than just the hash.


How can I find out what happened to my transaction? I have not received a 0.1777776 BTC transaction to my Coinbase wallet that was sent from Gladiacoin on 6/3/2017. Is there anyway I can find out where this payment went?
According to Bitcoin info part of the money was transferred from my coin base address to address another bit coin address and then immediately transferred to a third account.  I did not authorize any of this so do I have any recourse to get my money back

I'm assuming by asking where the payment went, you're asking how to find the transaction output address. If you have the transaction ID, you can search for it on a site like https://blockchain.info/. Then look for the output address.

If you don't have the transaction ID, but you have your original Gladiacoin wallet address, you can look up the Gladiacoin wallet address on https://blockchain.info/ and see what transactions were made that way.


does bitcoind download bad blocks? i haven't read the source code for bitcoind, but i want to know if it downloads bad blocks which will later be rejected by the network (and presumably later removed from bitcoind's block files)?

i have a script which parses block files into a database and if a block is in the files at one point in time, then gets removed later then my script (as it currently stands) will end up importing the incorrect block.

if bitcoind does download bad blocks, how should i avoid importing these into my database? should i just wait and never import the latest, say, 5 blocks?

Bitcoin will store a block on disk as soon as it has verified its proof-of-work.

Blocks are stored append-only in the block files, and never deleted or overwritten. You cannot judge from the block files which are considered valid, or which are considered the currently best chain - that information is kept in the block index database.


Can I mine from CPU using 30 PC constantly on I have internet cafe that has 30 PC constantly on 24 hours a day, they are basic PCs, can I use them to CPU mining botching?

Yes you can, but it isn't profitable. Mining bitcoin on a normal computer is a waste of energy, because the ASICS have much higher hash/s/kW (hash per second per kilowatt). Mining LTC or any other scrypt based coin is doable on regular desktop PCs, but only those who have a good GPU are worth it.

But then there is another part, tweaking your settings. As mining is continuously stressing your card, it becomes very hot and consumes energy. Therefor its more profitable to run at a slightly less voltage (underclocking) or at only (say something like) 80% of the maximum capacity. It requires a lot of time to get the perfect values for your system. It is an important thing to do, because the margin of profit is quite low, and you really need to push the KHs/kW to the limit to get a good financial result. You have to do that for 30 computers (mining results differ from system to system, even if they are identical, I think I read somewhere) which requires even more time.

Furthermore there are two options: there are good GPU's in the computers for people who want to game in your café or there are just normal GPU's in it, and people just browse the internet and do their thingies there. In the first case, you cannot mine while someone is playing a game because it affects the gaming experience of the customer. In the second case, the GPU is probably not good enough to mine.

So I would say no, it is not profitable to mine in your café. Certainly not CPU mining because that is useless for bitcoin (and will always be due to ASICS). GPU is possible, but because it requires a lot of time  and sweat I wouldn't advise it.