verifying my modifications to bitcoind w/o broadcasting anything I want to verify that my updates to the bitcoind source code don't break anything. One way that I thought of doing that was through loading the mainnet data into a regtest instance. To do that I first copied the good data folder and then ran my newly-compiled server in regtest mode pointing to my copy. I.e:

./bitcoind -server -regtest -datadir=.../my_data_copy

When I query the server it does not return any data. The debug.log file shows a number of block rollbacks. Why doesn't that work?

Is it possible to run the daemon in a way that it verifies the current code against the data on disk, such that the the current code would generate the same data? Is it possible to copy data from main or test networks and load that in the regtest mode?

I was thinking I needed to use regtest to avoid connecting to the live network. I don't need to connect to the network at all to verify the data, and I certainly don't want to broadcast anything in my test scenario.

Mainnet and regtest have different rules for the difficulty.

As their consensus rules are different, the mainnet chain will not be valid according to regtest rules or vice versa.


Searching for old bitcoin “accounts “ I recall accepting bitcoin payment several years ago when the concept was fairly new. My trouble is, I don’t know what happened to the bitcoin after the receipt. What methods are available to search for “lost or abandoned “ bitcoin?
Thanks in advance
Becky

What methods are available to search for “lost or abandoned “ bitcoin?

There are no methods available to other people (third parties). People could search for dormant amounts that were outputs of old transactions and not yet used as inputs to subsequent transactions - but those amounts may not actually be lost or abandoned. There is no way to recover control or gain control of these amounts without additional information known only to the person who received those amounts of bitcoin.

If you previously received some amount of bitcoin into a bitcoin wallet, you can search for evidence - perhaps a note of an online website who stored that amount on your behalf and who you could now contact for assistance. Perhaps some old "wallet.dat" files on a PC that indicate you had a desktop wallet with control of your own private keys. Maybe an app on an old phone in a drawer. Perhaps a written down recovery seed or private key in a locked box you use for important documents.


Funds not received in wallet I have requested funds sent to my Electrum Wallet receiving address, but have not received over a week now. According to the Blockchain ledger the funds are shown as "Unspent", help needed

If you used the receive tab and created a payment request but did not give that request to anybody, you won't magically receive funds. You cannot just "request funds" and expect Bitcoin to be magically sent to your wallet; that is not how Bitcoin works, it is not something that is magically given out for free.

If you gave someone an address to send to or sent them the payment request but that person still has not sent you money, then you should contact them and ask them why they did not send you funds yet.

If the sender has sent you the funds but you do not see the transaction in your wallet nor do you see it on a blockchain explorer, then the transaction has not confirmed and has likely been dropped from the network due to low transaction fees. If you do see it on a block explorer and it is unconfirmed, then wait for it to confirm or to drop from the network (i.e. you don't see it on block explorers). If the transaction cannot be found on block explorers, ask the person who sent you the Bitcoin to send the Bitcoin again but include a higher transaction fee. Or have them rebroadcast their transaction.


Stealth address in technical level Lets say user A wants to send bitcoin to user B stealth address.

What is exactly user B's stealth address? Is it his public key? Since User A needs to multiply his private key with user B's public key based on Elliptic Curve Diffie-Hellman so I assume user A is receiving the complete point which is user B's public key.
User A shoud calculate PrivA * PublicB which results in a coordinate. As far as I know this point will be used by multiplying it to the publicB and a nonce and that will be sent to the network. If what I am saying is correct, how can I multiply this coordinate with PublicB since both of them are points. Do we only get one axis of this point from the diffie hellman's calculation?

What is exactly user B's stealth address? Is it his public key?

In the simplest stealth address scheme, yes. The exact encoding depends on the implementation; DarkWallet's is described in their wiki.

  how can I multiply this coordinate with PublicB since both of them are points?

Correct, S = PrivA * PublicB = PrivB * PublicA is a point. We want an integral shared secret. ECDH tells you to use the x coordinate of S as the shared secret, but in Bitcoin it's done differently. Instead int(sha256(compress(S))) is used:

serialize S in compressed form as per SEC 1's Elliptic-Curve-Point-to-Octet-String Conversion
take its SHA-256 digest
interpret the result as a 256-bit big-endian integer

This integer, c, is then used by A to calculate a public key PublicB + c*G to which A spends, and by B to calculate its private key (PrivB + c) * G from which B can redeem (where G is the base point generator).

Note that there's a problem with this "simplest" scheme. The only way that B's wallet software can see if a UTXO is redeemable by B (to keep track of the wallet's balance) is by doing the math above, which requires PrivB. In other words, it makes watching-only wallets impossible (and cold wallets impractical).

One solution to this is to use one PublicB/PrivB pair for ECDH, but a different PublicB2/PrivB2 pair for deriving the spend/redeem keys. Now you can keep PrivB in your watching-only wallet, and PrivB2 in your cold wallet. On the down side, B's stealth address is now twice as long, containing both PublicB and PublicB2.


p2pool: Is it setup correctly? "???" in efficiency I have configured p2pool, bitcoind and bfgminer for mining, and everything appears to be working normally (i.e., no errors are reported).

However, I've been mining for over three days already at 2GH/s without obtaining a single share. This is what p2pool output says:

> Shares: 0 (0 orphan, 0 dead) Stale rate: ??? Efficiency: ??? Current
> payout: 0.0000 BTC

I am worried about the question marks for efficiency. Is this normal? Should it be relevant, I am in a managed network, so I can't have any incoming peers (which as I understand, are not strictly required).

You won't see a value there until you mine a share, so seeing a ??? is normal for the moment. The efficiency is a measure of how many shares have been counted in the share chain verses the ones you have found.

At 2GH/s you should be expecting to see a share soon, given an average of 2 days 8 hours to find a share at 2GH/s at difficulty 88800 (the current for p2pool).


Which is better back-end mining pool? So far I've seen Pushpool, PoolServerJ and P2Pool. Which one of this would be easiest to set-up, maintain, effectiveness, and overall security?

PoolserverJ seems the best so far and easiest to set up.

Pushpool was the original but has some issues. The documentation is also a little hazy if you're a newbie to linux.

P2Pool is a decentralised pool, meaning that if you want to set up your own private pool, you can't use P2Pool.


How can I open channels with Eclair? I have set up a Bitcoin Core wallet with 0.3 bitcoins in it and an Eclair lightning node. The rpc userid and password is set plus all the other settings I am supposed to have, hopefully.

No problems with the Bitcoin wallet, and the Eclair software runs without showing errors. I managed to send a channel request and it filled up with 3100 channels and 889 nodes, so it's ok. Hopefully, I have sorted out my firewall to open port 9735 in both directions. I am using noip to fix my ip address.

But every time I attempt to open a channel, it sits for a couple of minutes then dies. No channels ever last. They show WAIT_FOR_ACCEPT_CHANNEL for a while, "Your balance" shows as N/A. The funding transaction's id shows N/A.
Then they die. Sometimes with "Insufficient funds", sometimes "Failed to open channel".

I would really be very very happy if I could get a channel going, but I don't know how to debug it. Is there a trick? How do I select a node to connect to?

It seems you're having technical issues with the app. I would recommend to bring this issue to the devs on their forum: https://gitter.im/ACINQ/eclair. Also, please prepare to have all info such as the version of the app, your OS, mainnet or testnet.


Bitcoin core stopped sync'ing (without downloading all the data). How can I make it resume the synchronization? I am extremely new to this concept but just decided to try. Unfortunately I did not do my homework before playing with my money.
I bought some coins and I sent them to my Bitcoin core wallet (that I had just installed, knowing nothing about the fact that it needed to sync first). I realized that since it wasn't synchronized I would need to wait until it finished downloading all of the data for me to have access to that money.

the problem is that my bitcoin core just stopped downloading data with the loading bar still in the middle and it is no longer synchronizing.

How can I make my bitcoin core complete to download all the data?

There are pretty much two stages. The first stage is to download (catch up) the whole blockchain that has 64.4 GB.

Once you have that the verification stage checks all payments ever made.

Both these things are pretty painful but once both are done you can backup your blockchain for example to external disk and you won't ever have to do it again.

Don't delete your wallet file.  Backup your wallet.dat file.

So delete everything, restart bitcoin, let it run for a few days and hope it doesn't get stuck.

Good luck.

Edit: do you have enough free disk space?

Edit2: don't delete the wallet


How a stakeholder is chosen randomly in proof-of-stake? In PoS a group of stakeholders is selected randomly. Now, the question is if stakeholder_1 owns more coins than stakeholder_2, then he has more chance to be selected as a validator in comparison to stakeholder_2 ? or both of them have an equal chance in selecting process ?

There are various variables to consider.

Min Stake Age, Max Stake Age, Input Age, Input Size.
And then there is the version of PoS being use.

Min Stake Age determines an inputs eligibility, they must be older than this figure to stake.
Max Stake Age is the upper limit of input age used to determine Input Age.
Input Age is used a factor in PoSv1 to determine the input weight (note the code variable nCoinAge is the factor of Input Age * Input Size).
Input Size is the amount of coins in an input.

V1, which is PPC and descendants, uses Coin Age as a factor.
basically age * size,
whereas
V2 and V3 only uses size.

Under V1, if stakeholder_2 has less but older coins then they might have more chance.
Under V2 and V3 Input Age is removed form the equation, so the more eligible coins you have the greater your chances.


Checking if full node is running I just followed the instruction to run full node in Ubuntu using the below bitcoin.org link.
https://bitcoin.org/en/full-node#ubuntu-1610
How do I verify if the full node in PC is active and running? Thanks!

One easy way to check if your node is active and running and reachable by nodes is to head over to bitnodes and use the IP address of the machine running bitcoin core (or if you are on a home network, you'll need to find out your public IP address, which can be found by visiting What is My IP) and enter it into the "Join the Network" tool. Remember that your node will only accept incoming connections once it is fully verified, which can take a bit of time.

If you struggle with getting incoming connections to work, give the Networking Configuration section of the Running a Full Node docs a read.


Coinbase price discrepancy? At the moment the price of a bitcoin on the Coinbase dashboard is $8247 EUR, however in the buy section it's $8840 EUR.  I know they have some commissions and spreads, but that's 7%... Is this a bug or a feature?

Moreover, the sell price is $8755 EUR! Much higher than the market price! I even bought some for 10 dollars to make sure. In GDAX, which is Coinbase's exchange the price is $8244.  Why does Coinbase sell/buy for so high?

When you buy from Coinbase, you are buying from a service provider, not from a person who is selling....so, yes, you will be paying more.

Don't ever actually buy from Coinbase (or sell); they mark up the price that is set on THEIR OWN exchange, GDAX. It literally only takes you seconds and zero cost to transfer your funds from Coinbase over to GDAX to trade yourself at a better rate, so there's no reason to take the Coinbase markup.


How to detect reorganization from bitcoind via ZMQ? I have my own bitcoind server (bitcoin core) and receive transaction data from the bitcoind via ZMQ. Then the transactions are stored into my database for data analytics or statics.

[bitcoind] --> (bitcoin transactions via ZMQ) --> [store into my DB]

Normally, it works well but sometimes blockchain will be re-organized when multiple chains are detected. At that time, I have to update my database as well. My question is how to detect the reorganization event from bitcoind server. Or do you have any good ideas for this.

FYI,

I'm listening new block generation notification via ZMQ.
The main reason why I have my own database is seeing Colored coin transactions and Counterparty transaction.

Update 1

It seems that I can subscribe only four channels; hashblock, hashtx, rawblock and rawtx. It may be impossible to know the reorganization via ZMQ. I may have to confirm when I receive newblock notification wether fork exists or not..

Update 2

I may have to call getchaintips RPC when every time I receive a new transaction notification.

How to detect a fork with bitcoin-cli?

Update 3

My understanding is that I need the following process to reorganize MY OWN Database.

getchaintips RPC's response

{
    "height": 420561,
    "hash": "000000000000000001cb02590846299c91794e9b9f422513cff4b9c1dd5c62a",
    "branchlen": 0,
    "status": "active"
},
{
    "height": 419698,
    "hash": "000000000000000004a3a78750438d0491b6335cbbe9c15099a6e55b6943e51a",
    "branchlen": 1,
    "status": "valid-headers"
},
{
    "height": 418868,
    "hash": "000000000000000000ba1d7d93ad1c7f04fb4a430fdee67c44fbdd3236f2b805",
    "branchlen": 1,
    "status": "valid-fork"
},

Call getchaintips when I receive a new tx notification.
Compare the two hashes. One is status is at "valid-fork" and another is stored hash at the same height in my own database. (As above response, height=418868, hash=000000000000000000ba1d7d93ad1c7f04fb4a430fdee67c44fbdd3236f2b805)
If the two hashes are different, delete all records from valid-fork's height and fetch transactions from the hight to the height of active status(As above response, height=420561), then insert them into to my own database.

Update 4

It seems that Counterparty detects reorganizations in the following source code. I think I can see it as reference.

https://github.com/CounterpartyXCP/counterparty-lib/blob/5498d891ffec270c64a5804a4273962d2c759fa5/counterpartylib/lib/blocks.py#L1074

You can use the rawblock interface in order to determine whether there was a reorg.

Every time you receive a new block, you decode the block, in particular the block header. Then you store in your database each block and its previous block.

When you receive a block which shares the same previous block as another block that you have already received, then you know that a reorg has/is occurring.


Install chrom on Asic I want to use antminer-s9 to mining from cryptotab site
This site is much more than any pool give bitcoin

Bot it doesn't have any pool . And just must use Chrome to mine
Any one know how can I install chorom on Asic or a way to connect my antminer to this site?

You might be able to run chrome on an ASIC. But if you did, whatever it mines in a tab would not make use of the ASIC hardware.

Firstly, an ASIC is not a general purpose computer, it cannot just run whatever software you want on it. It does have a small general purpose computer for managing the ASIC hardware, but that is a low powered computer. This low powered computer has a CPU which you could compile a version of Chrome for and copy the binaries to it. Then you could start an X server to get a GUI over the network and view it on another computer.

However, this would not be useful to you at all. Chrome would not be able to use the ASIC hardware. It can only use the general purpose CPU, which, in this case, is super low powered. It would not mine any more coins than a regular computer, in fact, it will most definitely mine much much less, if any at all.


How to return change (utxo - inputs) to output address? I've been learning to create bitcoin transactions for 3 weeks now, but keep paying the entire unspent_outputs - inputs as fees, even if the transacted amount was like 1/100 th of the outputs. How do I put the unspent output back into the output address ?

      var utxo = {
                   "txId" : "",
                   "outputIndex" : "",
                   "address" : "",
                   "script" : "",
                   "satoshis" : ""
                 }

       var transaction = new bitcore.Transaction()
       .from(utxo)
       .to(address, satoshis)
       .sign(privateKeyWIF);

      var tx = transaction.toString()

When you create a transaction, all inputs are used up completely.

You then have to specify the destination addresses of the input money. Any amount without destination becomes available as transaction fee. Hence, you have to define the recipient, and send back the change to yourself.

In other words, add one of your own addresses as a second destination and assign the remainder of your inputs there.

If you haven't been doing so, you should experiment with transaction creation on the testnet. There you can learn without cost, because it behaves like Bitcoin, but its tokens are worthless.


Is the secret seed number also the private number? I purchased a bitcoin in 2014 from Coinbase. I received a long alphanumeric number. No private code or seed phrase. I received a 16-digit secret seed at a later date. Is the secret seed I received a replacement for the seed phrase or private number that I can use to access my bitcoins on Coinbase?

I would start with looking at the alfanumeric number.
Is it in hexadecimal? If yes , is it 32 bytes long --> random number
Is it a code that begins with a 5 or L or K --> Private key
Never share any of these.
But you can calculate the Public key and the Bitcoin address from those.


How to find out as soon as possible about a transaction to my payment address? I'm running an online store. I added the option to pay using bitcoin, using Mycelium Gear.

Gear can be configured to wait for 0-6 confirmations and up to 48*60*60 seconds from the moment the payment address was generated for a transaction to be paid/confirmed.

There are three potentially interesting moments in the life of a transaction when someone might like to be notified:

A transaction with an output that is being watched has been transmitted on the p2p network.
The transaction has been included in a block.
The transaction is fully confirmed (is 6 blocks deep).

With regular bitcoins, I see that when I configure gear to wait for 6 confirmations and 24h, Gear sends two notifications. One for event #2 (transaction included in block) and one for event #3 (transaction confirmed).

With testnet, when configured the same way it behaves the same way, only the testnet blocks are tiny and sometimes happen frequently. But when configured to not wait for confirmation (and only wait for 15 minutes), Gear sends a single notification, after event #1 (transaction transmitted).

What I actually want is to be notified as soon as possible after the customer has transmitted a transaction (event #1), and be notified within minutes of the transaction being fully confirmed (event #3).

If no transaction was transmitted within the first 15 minutes, consider the order abandoned (and the payment address eligible for reuse).

I think what I want is reasonable. But I don't see how to get it from Gear.

Is there a way to get this from Mycelium Gear? If not, is there an alternative service that does the same thing Gear does, but can send the two notifications I need (event #1 and event #3)?

Alternatively, how do other people do it, without using coinbase/braintree/bitpay and without running a full node client on the server?

My best idea currently is to configure Gear to not wait for confirmation to get the first notification, and then follow up the transaction manually using some blockchain explorer API to find out whether it got included in a block and how many blocks deep, until it's fully confirmed and then I can generate the second notification. But if I have to use a second service (some kind of blockchain exploration API), Gear will be a disappointment.

Most people look up the receiving address in blockchain.info , but the site is having some trouble lately. They show the transaction about a second after broadcast, and show how many confirmations a transaction has in the address page.

If it doesen't work, try another block explorer, some are listed below:

blockexplorer.com

blockr.io

blockcypher.com


What are the hashes in Unspent outputs? I am a newbie to Bitcoin.
Looking at

curl https://blockchain.info/unspent?active=1Cdid9KFAaatwczBwBttQcwXYCpvK8h7FK

I guess that the script is the owner's address.I am not sure about this.

"unspent_outputs":[

        {
            "tx_hash":"f2c245c38672a5d8fba5a5caa44dcef277a52e916a0603272f91286f2b052706",
            "tx_hash_big_endian":"0627052b6f28912f2703066a912ea577f2ce4da4caa5a5fbd8a57286c345c2f2",
            "tx_index":47854970,
            "tx_output_n": 1,
            "script":"76a9147f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a888ac",
            "value": 8450000,
            "value_hex": "0080efd0",
            "confirmations":258278
        },

What do tx_hash,tx_hash_big_endian,tx_index,tx_output_n and value stand for?

tx_hash and tx_hash_big_endian are the transaction id of the transaction that this output originated from in little endian and big endian (reversed).

tx_output_n is the number of the output in the referenced transaction, i.e if a transaction has 5 outputs and you need to refer to the 5th you use a tx_output_n = 5.

tx_index I believe is an internal unique key that blockchain.info uses to identify transactions

script is the ScriptPubKey of the output, that is the conditions you need to fullfill to be able to redeem the coins.


Butterfly Labs ASIC for rendering in 3dsmax Sorry if my question could be silly, but is there any option to perform 3d rendering on my Butterfly Labs ASICS?

As for now, I don't see any reason to farm bitcons on my 5Ghash ASICs, so I came up to an idea of making a rendering farm.

Thanks!

Unfortunately, this is one of the problems with Bitcoin mining hardware, it cannot be repurposed to do anything else. It's not like a GPU where you can just use it to render graphics in a game.

ASICs are Application Specific Integrated Circuits. The "Application Specific" part is the key word here, they are specific to being used for mining only.


Using Bitcore API for Escrow Has anyone experience using the Bitcore API for Escrow purposes with node.js?
I assume, you'd need to create a new a address, then somehow create a new transaction using the newly created address, the probe that address for it's balance until its fulfilled.  I've had a look over the docs, but couldn't find anything.  Currently you can run bitcoind on a server and connect to this using RPC, but I'd like to try using Bitcore instead but achieve the same result.
Thanks.

Great question!

I'd take a look at multi-sig construction in Bitcore, and pair this with bitcore-wallet-service.  Some combination of these two items, with an agent to act as a signatory for a third key, would build a powerful escrow service in very short order.


How can I get my LND node to make connections over Tor, IPv4, and IPv6? I followed this guide (https://github.com/lightningnetwork/lnd/blob/master/docs/configuring_tor.md) to setup Tor on my LND node, but this forced all my traffic through Tor, and I was no longer reachable over Clearnet. I've looked through some issues on the LND github page, and it seems there is a way to have my node listen over Tor, IPv4, and IPv6, but I'm not sure how to set it up that way. Also, they mentioned there are risks to doing this, what are those risks? I don't mind if people can correlate my IP address to my onion address (I'm just running servers in the cloud anyway). I just want to be able to connect and route payments with Tor nodes and clearnet nodes. How can I get my LND node to make connections over Tor, IPv4, and IPv6? What configuration options must I set?

The guide you linked is a good start.

The next step is to broadcast these IPs using the externalip flag in the lnd.conf file. A sample lnd.conf file that enables connections (using default port 9735) via Tor, IPv4, and IPv6 should include the following:

(replace the 3 fake addresses with your own):

tor.active=1
tor.v3=1
tor.privatekeypath=~/.lnd/v3_onion_private_key
externalip=32.260.201.72
externalip=2001:0db8:85a3:0000:0000:8a2e:0370:7334
externalip=rvaslfkj2blahblahbalhdfsfjdflxcmnvxcvxvkfdsxcvxcvxcv.onion


Relationship of R/S signature in between signed message and DER signature this time is difficult for me to explain problem i was facing. i realize that R/S signature in DER signature is not match to the 1 in bitcoin signed message? Ok below is my say signed message.

-----BEGIN BITCOIN SIGNED MESSAGE-----
c4ca4238a0b923820dcc509a6f75849b
-----BEGIN SIGNATURE-----
1BxqqjVC29fvCWin4qBuqZhBy4V7Ncdxby
        IPnTEOU713+XclrBrUEfTLeP0A7QIR4lObzQjBjyxGQExPwkalrQK1JOggIWk4xrfWIjHEC0RKGv3vtguDfto0o=
-----END BITCOIN SIGNED MESSAGE-----

my working way is $decoded_content = bin2hex(base64_decode(IPnTEOU713+XclrBrUEfTLeP0A7QIR4lObzQjBjyxGQExPwkalrQK1JOggIWk4xrfWIjHEC0RKGv3vtguDfto0o=))

then i manage to get R/S signature from $decoded_content. after that, i use R/S signature to generate DER signature. I realized that this DER signature is fail in signature verification.

shortly to say,

my program check valid signature using function in https://github.com/tuaris/CryptoCurrencyPHP/blob/master/Wallet.class.php#L225

if another party send me DER signature, how do i convert it into base64_encoded string? so end up i am able to use function i mention just now.

I try alot of methods but no luck, are R/S signature in both signed message and DER signature means to same?

please help

Bitcoin transactions use DER format for the signature (plus sighash byte), but bitcoin messages use 'plain' format (aka P1363, CVC, PKCS11, Microsoft, JWS and more) (plus recovery byte). The computation of the r,s values in an  ECDSA (which as Oscar correctly commented are not a point) is the same either way, but the data being signed for a message can never be the same as for a transaction so the signatures can never actually be the same value.

Your signature should not be and is not in DER format. The code you link to appears correct:

    $signature = base64_decode($encodedSignature);

    $flag = hexdec(bin2hex(substr($signature, 0, 1)));

    $R = bin2hex(substr($signature, 1, 32));
    $S = bin2hex(substr($signature, 33));

That correctly parses a plain-format signature (not DER), from base64.

    $derPubKey = Signature::getPubKeyWithRS($flag, $R, $S, $hash);

Without tracking down the code this calls, that looks like it should recover and encode the pubkey; whether it also verifies the signature is not obvious.


How do I move my dogecoins from my DOGE wallet into my VERGE wallet? I have been reading online about people who just backed up their DOGE wallet and then copied the wallet.dat file into their VERGE wallet installation and voilà! When the VERGE wallet was opened the coins showed up. But I can't figure out where this wallet.dat file needs to be copied to for the VERGE wallet installation? If anyone knows how I should be going about this I would be most appreciative.

Your verge wallet will have made itself a wallet.dat file in its default data directory if you did not specificy a different directory yourself. You can overwrite that wallet.dat file with your one from dogecoindark if you haven't used the new one at all (obviously if you have, you should back it up). I have never used verge wallet before, but if it uses the same default location as bitcoin, you should be able to find the data directory in %APPDATA%\Verge on windows, ~/.verge/ on linux, or ~/Library/Application Support/Verge/ on Mac OSX.


Mining wallets - how to? all I want to know is what do I do when using a mining software and it asks me for a wallet address... I've tried to use bitcoin address etc but it doesn't work! says invalid wallet! where to get a valid wallet to mine!.
a simple answer will suffice thank you

I'm sorry but a "mining wallet" doesn't exist. There's only cloud mining that is questionable. The rest don't won't hurt you so feel free to explore. Just avoid 1) malware 2) Paying (even if they say you have $3k, pay to withdraw)


How untraceable is Bitcoin? Are Bitcoins truly untraceable or only pseudonymous to certain extents?

For example:

If somebody wants to buy Bitcoins with a Credit Card (e.g. through a third-party service) then they transfer them to a Bitcoin address.
After that they send them to a second third-party service, which allows them to International Bank Transfer them to a fiat currency.

Can the Credit Card company or any of the third-party services trace the transactions?
Which precautions could somebody take to make the transactions more untraceable and what are the pitfalls? (e.g. coin joins, coin mixing, etc.)

Well, all transaction between Bitcoin addresses are stored forever, and so are fully traceable. What this means in your case is indeed that the credit card company can trace the coins you bought from them.

However, there are a few things to note.

Bitcoin addresses don't have a name assigned. F.e. Bitstamp will not know that the Bitcoins are coming from the credit card company because the credit card company does not have a list with all the addresses they use. An exception would be when you used a green address. This also holds in the opposite way that the credit card company does not know you funded Bitstamp with the coins since they don't know that the address you sent the coins to is owned by Bitstamp.
Bitcoins can move around very fast. When your coins end up somewhere the credit card company can link some person to, it is very likely that they are not spend by you anymore. With as few as 2 hops, the coins could have gone through an exchange and ended up by a totally different person.
The Bitcoin change system gives you better privacy as well. When you only spend a part of the Bitcoins in an address, by default, the change - which is the part that is not spent - is send to a new address. So, when you are spending some coins at different places, the coins you still have yourself also made several hops, so it is hard to tell if they are still in your possession.

Then, when you really want to make sure people cannot trace transactions back to you, you could use Bitcoin laundry systems. These are services that take your coins, shuffle them around among many different addresses they own, and let you receive the coins - minus the commission they take - back at another address for you. When you use a sophisticated Bitcoin laundry service, it is practically impossible to trace your coins. But beware, when dealing with very large amounts of bitcoins, this will be harder to achieve. Consider laundring your coins in smaller chunks.


How to access Bitcoin's transaction database? I want to process the Bitcoin network's transactions. As I understand it, the Bitcoin-Qt client downloads and stores all that information locally.

Since version 0.8 LevelDB has been used to access this data. I found two databases, in blocks/index and in chainstate. However, I cannot make sense of the content. The first entry looks like this:

B = ??????{?:???????`?5g??

Am I on the right track and where can I find a specification of the data?

The best way to write a parser of your own for the blockchain is to find the source code of one that already exists and from that deduce the precise underlying data structure and how to parse and interpret it.  e.g. here in C++ and here in C# - and there are many others.

The data in the blockchain is stored in a custom binary format that is a little tricky to untangle without some help; this link seems as good as any to get started on the overall structure.

There are many"gotcha's" to watch out for.  For example:

'endianess' i.e. having to reverse binary digits before interpretation and
some of the interesting values associated with a transaction have to be calculated e.g. for addresses
'big numbers' where the numbers used internally are so huge you may need custom code/libraries to deal with them

Comparing your results to those that are freely available via the blockchain and blockexplorer as well as the bitcoind.exe API would be a must.  Otherwise it is easy to pull out seemingly valid transactions that are just nonsense.  I speak from experience.

While writing your own parser for the blockchain is a worthwhile learning exercise you would be much better off IMHO using the bitcoin API and ignoring the underlying blockchain database for any 'real' code.


How to delete an element of an array in an Ethereum contract? I am wondering - is it possible to delete a single element of an array in Ethereum without having to create a new array and copying the entire array? Reading some of the documentation, I can't seem to find any good way of doing this.

Refer to the documentation:

delete myArray[arrayIndex];


SignatureHash description SignatureHash takes in as input a scriptCode:

uint256 SignatureHash(
    const CScript& scriptCode,
    const CTransaction& txTo,
    unsigned int nIn,
    int nHashType,
    const CAmount& amount,
    SigVersion sigversion,
    const PrecomputedTransactionData* cache)

What is the scriptCode exactly?

In this particular case, the parameter script code refers to a public key script.

Usually, the function SignatureHash is invoked to either sign a transaction or to verify a signature. Thus it refers to a transaction input (this is either the transaction input for which we want to generate the signature that will then be placed in the signature script or the transaction input from which we have extracted the signature that we want to verify). This transaction input refers to an unspent (at the time of creating the transaction) transaction output, and this transaction output contains a script that should match the script in the input. It is this script that is passed as a parameter.

On my blog, I have a detailed post on the process of signing a bitcoin transaction which you might find helpful.


API documentation for Electrum plugin developers? I'm browsing through some of Electrum's default plugins in the /plugins directory. It looks like plugins hook into Electrum using @hook annotation, as in this method from audio_mode:

@hook
def transaction_dialog(self, dialog):
    b = QPushButton()
    b.setIcon(QIcon(":icons/speaker.png"))

https://github.com/spesmilo/electrum/blob/master/plugins/audio_modem/qt.py

Where can I find Electrum 3 API documentation for writing plugins such as a list of all hook function names and the arguments they take?

Not official by any means, but here's something I cooked up:

https://bitzuma.com/posts/an-introduction-to-plugin-development-for-the-electrum-bitcoin-wallet/

I found these hooks by iterating over Electrum's hook_names object.


Can one mix bitcoins by oneself? Do mixers rely on other users, or can one mix his or her own bitcoins alone, such as by sending them to one's own addresses?

No, you do need a mixer. Even if you were to generate a million random transactions with your wallet, 100% of the value in the unspent output from the mixing could be linked to the original wallet through simple breadth-first search.

Transactions are value-preserving (except for the coinbase), have one or more inputs, and have one or more outputs. So you can trivially construct a transaction graph, which is a directed graph with transactions as nodes, inputs as head ends of edges, and outputs as tail ends. You also know the graph is acyclic, like a family tree: a transaction A can't both be the ancestor and descendant of B. With that in mind, if you start at transaction B, which pays your bank and is traceable to you, and go backwards one level at a time (follow edges in the opposite direction of the arrow), all paths from B to their respective coinbases go through A.

This is strong evidence that A and B belong to the same person, just like ending up with a briefcase full of marked bills is strong evidence that you got those bills all at once and just shuffled them within the briefcase, as opposed to getting one marked bill as change from every cash purchase you made for three years, out of pure bad luck.

This is the same as saying you have a bottle of vodka that you want to dilute. Pouring it into 100 glasses, then pouring it back into another bottle, doesn't hide the fact that it's vodka.

Mixers work because the inputs they receive are from different sources. If you're the only one pouring vodka into the punch bowl, and everyone else is pouring fruit juice, then when you take back the same volume of liquid you put in, it has less vodka, maybe not enough to even be detectable.

Of course, if an adversary wants to know you used a mixer, it's fairly trivial: they deliberately send coins they control directly to the mixer, and see if any of your addresses has ever been tainted by these coins. The analogy is someone pouring blue ink into the punch bowl, then the cops arresting anyone under 21 exiting the party with blue lips. They still can't know whether you put vodka or fruit juice into the bowl, but using a mixer may itself be considered money laundering in your jurisdiction.

Another issue is the other users of the mixer. Those who use a mixer at all likely have something to hide, and some proportion of the coins you get may come from shady sources. Of course no one would get rid of perfectly good fruit juice, but they want to get rid of their extra cough syrup, rat poison, lead paint, and drain cleaning acid. Sure, you got rid of your bootleg vodka, but what you got back isn't exactly safe for kids.


About confidential transactions blinding key I have a small question about confidential transactions. In it, a secret random blinding key is used to generate a Pedersen commitment. Is that mean that the recipient's blinding key is determined by the sender, and sender deliver the blinding key to the recipient in private channel?

My question may be stupid. It would be great if anyone could shed some light on this.

The blinding key is a shared secret among the receiver and the sender.

Typically the Diffie-Hellman key exchange is intiated by the sender ECDH, given that he already has knowledge of the receivers public key in a secure manner. The blinding key itself is not public knowledge, but the sender includes a one-time/temporary/ephemeral public key along with the transaction. The temporary public key is used in the ECDH key exchange scheme (receiver public key + temporary public key -> shared secret) to create the blind key.

There is no need for a private channel, the temporary public key can be public knowledge. The receiver however has to generate the shared secret themselves.


Fail to sign the Segwit Transaction's input in bitcoinj I want to spend from a segwit address and it has a P2WPH script, I created this transaction just like creating a normal P2PKH transaction, but just changed the address of the input to the segwit address, I don't know if this is correct, and signing this transaction in the following method, but it says script was NOT verified successfully...

Transaction signedtx = signInput(rawtx.getHashAsString(),privkey,rawtx);

    public static Transaction signInput(String hash, String prvKey,Transaction spendTx) {
        ECKey ecKey = ECKey.fromPrivate(Utils.HEX.decode(prvKey));
        ECKey.ECDSASignature signature = ecKey.sign(Sha256Hash.wrap(hash));
        TransactionSignature transactionSignature = new TransactionSignature(signature,Transaction.SigHash.ALL,true);
        TransactionWitness witness = TransactionWitness.redeemP2WPKH(transactionSignature,ecKey);
        TransactionInput input = spendTx.getInput(0);
        input.setWitness(witness);
        return spendTx;
    }

I am not very familiar with bitcoinj, and currently there is very little technical guidance related to segwit, I hope someone can help me！

In general is should be like:
// input index to sign
int index = 0;
// amount to sign (must equal to actual input value)
Coin value = Coin.valueOf(123456);

TransactionSignature signature = tx.calculateWitnessSignature(
   index,
   prvKey,
   ScriptBuilder()
      .data(ScriptBuilder.createP2PKHOutputScript(prvKey).program)
      .build(),
   coin,
   Transaction.SigHash.ALL,
   false
);

tx.getInput(index).setScriptSig(ScriptBuilder.createEmpty());
tx.getInput(index).setWitness(
  TransactionWitness.redeemP2WPKH(signature, prvKey)
);


How is Network Deficit Calculated? I've seen this graph pop up around the interwebs, but never with an explicit explanation:

http://blockchain.info/charts/network-deficit

My question is how is this metric generated? Is it a comparison of the power and hardware costs versus returns?

This was described as showing the difference between transaction fees and the bitcoin miners income from block rewards.

So if a Block has 25 BTC generated and 1 BTC of fees, the network deficit would be 24 BTC.  The amount in USDs is calculated at the spot rate at the time.


As a small hotel accepting bitcoins, do I show only one payment address? I am currently accepting bitcoins as payment at my hotel, but I am uncertain about the payment address(es).

I prefer to avoid payment service such as BitPay and Coinbase to mention a few.

At this moment, the idea is that when a client books a room online he receives an invoice in US$ amounts by email with the payment options. In order to confirm his booking, he can then decide to pay in cash, credit/debit cards or bitcoins and replies by email or in person. In case of bitcoins, I, as the merchant, will send him an email (or inform at the reception) with the conversion rate US$/BTC and ask the client to transfer x BTC to my address.

My preference is just to show my payment address or QR code on my website, but I would like to know the following:

Can I use the same payment address (how long?) or is it really important to create a new address for each client?
What best practises would you recommend for a legal and transparent merchant?

Creating a new address for every transaction (not just every single client) will allow you to maximize your payment tracking capabilities.

In case you have a single address for all of your payments it's really hard to track who sent you what. This will start changing from 0.9 on, but for now we have to stick to what is already implemented.

Having one address per customer will allow you to track payments although it's a bit of a challenge to get a customer's equity for a given period of time, as you will have to take into account your outgoing transactions as well, if any. In this case, of course, a customer must have a user account in your online booking system and you must then persist the user account model in a way that its unique identifier (be it the user's email address or account id) will have a 1-to-1 relationship in your DB.


Can one receiving address from my Wallet be linked to another from the same Wallet? I have created a wallet using Electrum. Electrum creates 20 receiving addresses. My question is can these be linked or traced back to each other?

I want to understand if I have create another wallet if I want more receiving addresses apart from 20.

I'm not 100% sure, but as far as I know this is not (easily?) possible. The addresses used for sending/receiving payments are created using your initial private key (THe 20 word long seed) in a deterministic way. When creating a new wallet with this pivate key, the same addresses are generated.

It is not possible to guess your private key having one or more of your addresses. I think it's also not possible to guess which private key has generated the addresses.

You should use an address only for one transaction.


Several millions of Dogecoins have been stolen. Is a similar hack possible with Bitcoin? This Christmas several millions of Dogecoins have been stolen from Dogewallet. On Reddit it is explained that the hacker gained access to the filesystem and modified the send/receive page to send to a static address.

Is a similar theft/hack theoretically possible with the (far more valuable) Bitcoins? Or has this happened already in the past?

The attack was made possible by an error of the coin owners (trusting the online wallet) and another error by the online wallet admins (they didn't make public the exact details, but the attacker certainly exploited a vulnerability that should not have been there).
The same is possible for cash/gold etc: if you trust a safe-deposit box to hold an ounce of gold and a door is accidentally left unlocked, you're pretty much in the same situation as the dogecoin hack.

You can find a list of bitcoin incidents at bitcointalk.


What is a deterministic wallet? It sounds as if it's a process that enables a wallet to be rebuilt from a passphrase, or from several fragments scattered about. Could someone provide a detailed technical explanation?

You've hit the nail on the head. A deterministic wallet is any system which uses a passphrase or other snippet of data to build a keypair in a repeatable manner. So long as you remember the passphrase, the keypair can be re-generated from it, so storage is no longer a security concern. There are several methods for generating deterministic wallets, but my favorite is Casascius' Bitcoin-Address generator (C#, Windows, binaries here)


Are there algorithms that could have been chosen for mining that balance CPU/GPU? The mining algorithm for Bitcoins (and most alternative but similar currencies as well) is purely computation hard, but not decision hard or memory hard. This caused the unexpected effect that GPUs are insanely good at mining and CPUs are so bad at mining that there's almost no point in using them to mine.

This has had many effects, including the concentration of mining into specialized hardware. Suppose that I think that's bad and would prefer that commodity CPUs be optimal for mining and that mining on them be practical. Given the requirements of mining, particularly that it work like a lottery and that valid results be quickly verifiable, are there algorithms that could have been chosen that would have resulted in commodity CPUs being the optimal miners?

Are there algorithms that require lots of decisions and/or lots of memory that could serve as the mining algorithm on future crypto-currencies that would make CPU mining practical again and give everyone with a high-end CPU a reasonable chance at mining?

The scrypt key derivation function was explicitly designed to be resistant to hardware optimization, with an explicit trade-off allowed between memory and cpu usage:

  The scrypt key derivation function ... is designed to be far more secure against hardware brute-force attacks than alternative functions such as PBKDF2 or bcrypt.

This makes it better than SHA-256 or bcrypt if the intent is to give more of an advantage to CPUs.

Another option would be to include the same sort of variety of primitives that are provided for general purpose CPUs, e.g. a combination of floating point operations, access to large memories (perhaps including something that would use a large random access memory like a disk), etc.

But as Thilo point out, including some sort of anti-botnet feature might also be needed.  A CAPTCHA might also make it rather unpopular, but some sort of work load that would indeed be noticed by a regular computer user might make it hard to hide botnet activity.


Want to buy bitcoin from Bangladesh I'm from Bangladesh. I would like to buy bitcoins. So I went to Buybitcoin.com  and filled an order. Later I googled that site and read a lot about if being a scam site. So I'm a bit scared now. do not want to be scammed.

I've already tried ecurrencyzone.com but they do not take bank deposits from Bangladesh. this is terrible. Anyway can any of you fellow Indians guide me to proper genuine links where I can buy Bitcoins. My options are Western Union, Moneygram and best option is Bank deposit.

The easyest way for you would be somthing like localbitcoins. But you can use any exchange where you can transfer money to from your bank (Bitstamp, Justcoin, Bitcurex, ...)


PBFT algorithm - how do we know how many nodes are faulty? I am reading this article about PBFT and I have trouble understanding how it can be used in practice. If we don't how many nodes are faulty (which I believe is a valid assumption), then how can we calculate the number of rounds during which processes send messages to each other?

The linked article shows an example with n = 7 and m = 2 and in that example two rounds of messaging are executed and then the output values are calculated. But how can we know that m = 2 in the first place? Can the algorithm itself figure it out during execution?

The n and m parameters are chosen by the implementer when they choose to use the algorithm. For example, I may decide to use this algorithm on 50 nodes and choose to be able to tolerate up to 4 faulty nodes. Thus, my n is 50 and my m is 4.

If I need to design a system to tolerate a variety of different n values, I'll have some piece of code somewhere that, given the actual number of nodes being used (the n value), picks the number of faulty nodes I want the algorithm to be able to tolerate (the m value).

In all cases, n must be known. You have to know how many nodes are in your system or you don't have a system. Then m can be chosen by code, subject to the limitations of the algorithm. Then both n and m are known.

For example, you might have some code that reads a configuration file that specifies the identity of the other nodes in the system as well as the number of faulty nodes that the system is going to tolerate. Then people using that code create that configuration file and load it into all of the nodes. Now you have a usable system.


Cant start bitcoind - "Block files have previously been pruned" I installed bitcoin, following this instructions.

I mostly used it with bitcoin-qt -testnet options, even made a few transactions in testnet. I am using the pruned mode.

Now I want to run the bitcoind and then connect bitcoin-cli to it.

But when I run the following command: bitcoind -testnet, I get the following output:

punnysher@punnysher ~ $ bitcoind -testnet

2018-11-16T09:16:40Z Bitcoin Core version v0.17.0.1 (release build)

2018-11-16T09:16:40Z InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1

2018-11-16T09:16:40Z Assuming ancestors of block 0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75 have valid signatures.

2018-11-16T09:16:40Z Setting nMinimumChainWork=00000000000000000000000000000000000000000000007dbe94253893cbd463

2018-11-16T09:16:40Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation

2018-11-16T09:16:40Z Using RdRand as an additional entropy source

2018-11-16T09:16:40Z Default data directory /home/punnysher/.bitcoin

2018-11-16T09:16:40Z Using data directory /home/punnysher/.bitcoin/testnet3

2018-11-16T09:16:40Z Using config file /home/punnysher/.bitcoin/bitcoin.conf

2018-11-16T09:16:40Z Using at most 125 automatic connections (1024 file descriptors available)

2018-11-16T09:16:40Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements

2018-11-16T09:16:40Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements

2018-11-16T09:16:40Z Using 4 threads for script verification

2018-11-16T09:16:40Z scheduler thread start

2018-11-16T09:16:40Z HTTP: creating work queue of depth 16

2018-11-16T09:16:40Z No rpcpassword set - using random cookie authentication.

2018-11-16T09:16:40Z Generated RPC authentication cookie /home/punnysher/.bitcoin/testnet3/.cookie

2018-11-16T09:16:40Z HTTP: starting 4 worker threads

2018-11-16T09:16:40Z Using wallet directory /home/punnysher/.bitcoin/testnet3/wallets

2018-11-16T09:16:40Z init message: Verifying wallet(s)...

2018-11-16T09:16:40Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)

2018-11-16T09:16:40Z Using wallet wallet.dat

2018-11-16T09:16:40Z BerkeleyEnvironment::Open: LogDir=/home/punnysher/.bitcoin/testnet3/wallets/database ErrorFile=/home/punnysher/.bitcoin/testnet3/wallets/db.log

2018-11-16T09:16:40Z Cache configuration:

2018-11-16T09:16:40Z * Using 2.0MiB for block index database

2018-11-16T09:16:40Z * Using 8.0MiB for chain state database

2018-11-16T09:16:40Z * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)

2018-11-16T09:16:40Z init message: Loading block index...

2018-11-16T09:16:40Z Opening LevelDB in /home/punnysher/.bitcoin/testnet3/blocks/index

2018-11-16T09:16:40Z Opened LevelDB successfully

2018-11-16T09:16:40Z Using obfuscation key for /home/punnysher/.bitcoin/testnet3/blocks/index: 0000000000000000

2018-11-16T09:16:48Z LoadBlockIndexDB: last block file = 154

2018-11-16T09:16:48Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=2233, size=44632870, heights=1441380...1443684, time=2018-10-31...2018-11-16)

2018-11-16T09:16:48Z Checking all blk files are present...

2018-11-16T09:16:48Z LoadBlockIndexDB(): Block files have previously been pruned

2018-11-16T09:16:48Z : You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain.

Please restart with -reindex or -reindex-chainstate to recover.

: You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain.

Please restart with -reindex or -reindex-chainstate to recover.

2018-11-16T09:16:48Z Aborted block database rebuild. Exiting.

2018-11-16T09:16:48Z Shutdown: In progress...

2018-11-16T09:16:48Z scheduler thread interrupt

2018-11-16T09:16:48Z Shutdown: done

punnysher@punnysher ~ $

The message says

2018-11-16T09:16:48Z LoadBlockIndexDB(): Block files have previously been pruned
2018-11-16T09:16:48Z : You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain.
Please restart with -reindex or -reindex-chainstate to recover.

If you have been running in pruned mode, bitcoind has been pruning the blockchain. This means it has discarded data to save disk space.
To run in non-pruned mode you must recover the missing data. The method provided is to download the entire blockchain again.
The only obvious alternative is, presumably, to run in pruned mode.

Related questions:

How can I run bitcoind in pruning mode?

Related links:

https://bitcointalk.org/index.php?topic=1599458.0 (August 2016)

OK, I have a question. Say: I enabled prune mode and Bitcoin Core effectively started working in this mode. But it is one way ticket if I ever want to go back to 'full' mode I need to download and verify whole blockchain once again there is no shortcuts?

Yes, you will have to redownload the entire blockchain, there are no shortcuts


How many Bitcoin addresses are/have been carrying a balance? Bitcoin addresses can be generated at will, and the theoretical limit to their number is high.  Addresses are constantly being generated to receive funds or balance transactions, but they are also being emptied.

How many addresses are carrying a balance at the moment, and how has this number developed historically? Would this number be a good proxy for the Bitcoin adoption rate?

I'd also be interested in the number of addresses that have been part of transactions during the last x days (i.e. active addresses).

The blockchain contains all necessary data to derive the numbers, so maybe there's even a site that lists/graphs them?


How to enable website users to transact with each other using bitcoins? I have a website which enables users to trade information for a price.
The price is calculated based on an algorithm within the website.
The website charges a percentage per transaction for the service.

I would like to know how to go about enabling the users to perform the transaction using bitcoins as an alternative to credit card transactions.

The website is coded in Ruby on Rails, I am currently investigating bitcoind, and the bitcoin-ruby library but I'm feeling a little overwhelmed with new technology.

Could someone please explain how I might go this? I'm looking for an overview of the process.

For example: The website connects to a bitcoind server, and creates a unique wallet per user, then to provide transactions the users will need to transfer coins from somewhere to their personal website wallet. When the user wishes to purchase information from another user, the website then connects to the bitcoind and creates a transaction between the two wallets, and creates a second transaction to cover the website commision.

I've made up this example from my basic understanding of the system - but what security issues are involved in this. Will this approach work, or is there a better way?

You need to set up bitcoind and look into accounts. If you want users to be able to pay each other in the system for anything, it is quite easy to move Bitcoins around without creating transactions simply by calling the move API. After that you just need to add the options for users to put money into their accounts and withdraw them, and you are set.

Can't really help you with Ruby-specific things though, as I don't know the language.


Routing for Lightning network: was Flare implemented? There is a 2016 paper from Bitfury on a proposed routing algorithm for LN:

Flare: An Approach to Routing
in Lightning Network

What is the relation between it and was was actually implemented (the primary reference being the BOLT specs)?

As far as I know flare was never implemented for lightning nodes and is not being used. I think current implementations use sind pathfinding algorithms like BfS or  Dijkstra. The pathfinding itself is not part of the BOLTs anyway. A node could do whatever it wants with the information provided from the gossip store / gossip protocol. (BOLT 07). People could in particular decide to go for the approach given by flare.


How to schedule a bitcoin transaction? I just wanted to know if you could schedule a bitcoin transaction. For example I want to send some BTC to someone exactly at 4:00 pm but it is 1:00 pm at my current place. Is that possible so that my wallet somehow automatically sends the BTC after a certain time?

Option 1

I'm not sure on which platform you are, but if you use a Linux or Mac, you can combine the following two commands (sources here and here. Check also the at manual):

echo "ls -l" | at 07:00

and

 bitcoind sendtoaddress <bitcoinaddress> <amount>

to make something like:

echo "bitcoind sendtoaddress    1MAtHias8yvaLcDgckkG5QnVLY7ucBZrGv 0.01" | at 07:00

to send me 0.01 BTC at 07:00 o'clock in the morning. I think you're computer should stay on for this, as it cannot send a transaction with it turned off.

Option 2

You can also work with sleep (Mac and Linux only):

sleep 120 && bitcoind sendtoaddress 1MAtHias8yvaLcDgckkG5QnVLY7ucBZrGv 0.01

The number behind sleep is the amount of seconds that there is nothing executed. So now it will send 0.01 BTC to me, after 2 (=120/60) minutes. The && will first execute the left side. If that executed succesful, the right side is executed. It is more insightful, but you'll have to calculate the amount of seconds and is as precise as your calculations.

Option 3

For windows:

timeout 120 && bitcoind sendtoaddress   1MAtHias8yvaLcDgckkG5QnVLY7ucBZrGv 0.01

timeout is the sleep variant of windows. Probably doesn't work on Windows XP, but works here on W8 and should work on W7. The && does the same as in Option 2.


Encypted Private Key -> QR Code I have a paper wallet with a public address and an encrypted private key ( with a passphrase ), but no QR code. So I need a way to generate a QR image, or manually input the key.

Sadly QR generators wont accept my encrypted private key. So I need to decrypt it first.

Is there any way I can decrypt my private key using my passphrase and then covert it into a QR code?

Best.

use bitaddress.org for creating your paper wallet,it gives you the option of encrypting your private key (BIP38) and then print the whole wallet (address,pub key,encrypted private key) plus a QR code.


P2Pool still worth mining? Folks, I've been mining with a locally setup p2pool setup using bitcoind v0.9.0rc1-beta, p2pool version 13.4-14-g7aa75ce-dirty and bfgminer on another host. Been mining for about 7 months with 6GH which paid about 80m overall.

In the past few months, the global pool has grown to an insane 3.2 Peta and the payout dropped to nothing at all. I did upgrade to about 65GH a couple weeks ago which obviously is still a drop in the water. There has been zero payout over the past 2 months even though the local DOA is low (mostly less than 5%, typically 4). The point is that in 7 months, there's been 28 total shares found with 3 orphaned and 5 dead.

There are plenty other articles here talking about p2pool not being best for "low" hash rates. Can anyone recommend fair alternatives? There's another post here that explores a patched version of p2pool with adaptive difficulty and there are other pools which claim to remain decentralized (eligius and bitpenny).

Would anyone care to share their luck (or lack thereof) with p2pool and or other alternatives?

Look at it this way:

Everyone trying to solve a Bitcoin block is actually competing
against everyone else (I win you lose.)
Pools in general are essentially a pack of miners who collectively
agree not to compete with each other, but agree to collectively
compete against everyone else who is not in the pool.  Pools grew in
popularity as the difficulty grew and theoretically it has some advantages.
p2pool, of course, follows this same model, except now that the difficulty of obtaining a p2pool share is so difficult, small hash rates have become obsolete in the p2pool model
The p2pool model is a great idea and is still viable for anyone with at least 1 ths, but the model needs an update:
The share chains needs to be larger, the share rate needs to increase making the difficulty go down.  This will allow even the small miner to chip in.  Every hash counts.


Improving transaction handling in shops: Is sending "prepared/approved/signed" transactions to a shop owner possible? I am quite new to the idea of bitcoin but I have understood one of the main problems:

Sending money with Bitcoin takes approximately 10 minutes, by design. For use at the counter in a shop this is very much too slow, also the amount of transactions in 10 minutes (about 2000) is not suitable for planet-wide in-shop use.

My idea. Would this be feasible?

1. Create a signed, pre-approved transaction

So, as the customer at the counter, what if I could prepare a transaction of the required amount, from my wallet-app on the phone, somehow approve it/sign it/authenticate it, but not send it to the bitcoin network yet.

2. Hand out the transaction

Instead, I send the transaction to the shop owner, via bluetooth, QR-Code, NFC whatever. The shop owner takes this transaction, validates it against the current amount on the contained address/es. The idea is that this should guarantee to the shop owner that he or she will actually be able to retrieve the amount on a later time.

3. Collection of the transaction's value

At the end of the day, the shop owner takes all collected transactions, blends them into an new single one (to save bytes) and now sends this transaction to the bitcoin network. This single transaction should be cheap and more efficient compared to single transactions from all day's clients.

Is such transaction bundeling feasible? Or already in place somehow?

This is not currently possible nor is it secure at all whatsoever.

  So, as the customer at the counter, what if I could prepare a transaction of the required amount, from my wallet-app on the phone, somehow approve it/sign it/authenticate it, but not send it to the bitcoin network yet.

This is possible, but only if the customer knows what address to send the Bitcoin to. If he does not, then this won't work.

  Instead, I send the transaction to the shop owner, via bluetooth, QR-Code, NFC whatever. The shop owner takes this transaction, validates it against the current amount on the contained address/es. The idea is that this should guarantee to the shop owner that he or she will actually be able to retrieve the amount on a later time.

Doing that does not guarantee that the shop owner will receive any money. All that guarantees is that the shop owner has seen the transaction and can broadcast it himself. However the customer could perform a double spend attempt and have it occur successfully if the shop owner does not immediately broadcast the transaction. This is because the customer still has the information necessary to create a conflicting transaction (i.e. the private keys) and just broadcast that to the network. Simply handing over a transaction does not mean that it is suddenly impossible for that person to create a new transaction that sends the money elsewhere.

  At the end of the day, the shop owner takes all collected transactions, blends them into an new single one (to save bytes) and now sends this transaction to the bitcoin network. This single transaction should be cheap and more efficient compared to single transactions from all day's clients.

That is not possible. No one can modify those transactions except the people who own the private keys. They cannot be "blended" with each other unless the person doing that "blending" controls all of the private keys associated with those transactions. "blending" would require creating a new transaction that spends the same outputs and creates a different output. It is an entirely new transaction which requires the customers' private keys in order to create.


Bitcoin public keys from uncompressed to compressed version with code sample Hi there I was looking for some code sample on compressing a bitcoin public keys  from the curve secp256k1. Just for me to get a good grasp, I have seen code going from compressed to uncompressed, I'd like to see also code from uncompressed to compressed.
Any language is fine, preferably Java/Js.

Check out these two Python methods taken from here

class PublicKey

@classmethod
def decode(cls, key: bytes) -> 'PublicKey':
    if key.startswith(b'\x04'):        # uncompressed key
        assert len(key) == 65, 'An uncompressed public key must be 65 bytes long'
        x, y = bytes_to_int(key[1:33]), bytes_to_int(key[33:])
    else:                              # compressed key
        assert len(key) == 33, 'A compressed public key must be 33 bytes long'
        x = bytes_to_int(key[1:])
        root = modsqrt(CURVE.f(x), P)
        if key.startswith(b'\x03'):    # odd root
            y = root if root % 2 == 1 else -root % P
        elif key.startswith(b'\x02'):  # even root
            y = root if root % 2 == 0 else -root % P
        else:
            assert False, 'Wrong key format'

    return cls(Point(x, y))

def encode(self, compressed=False) -> bytes:
    if compressed:
        if self.y & 1:  # odd root
            return b'\x03' + int_to_bytes(self.x).rjust(32, b'\x00')
        else:           # even root
            return b'\x02' + int_to_bytes(self.x).rjust(32, b'\x00')
    return b'\x04' + int_to_bytes(self.x).rjust(32, b'\x00') + int_to_bytes(self.y).rjust(32, b'\x00')


Are the addresses in my Wallet client considered to be all as only 1 account or wallet? I'm using the Bitcoin Wallet Client and I've noticed that you could create as many addresses as you want. But I also noticed that there's only 1 Total Amount for the wallet. So does that mean that you could have multiple addresses, but all of that points to same single wallet?

More:
And so, if my wallet contains several addresses, when I would like to send coins to another address of another person, do I need to create another address to send the coins? Or do I need to send coins one by one from each address? Or could I just send from one address since all of the addresses are in the same wallet?

In the Bitcoin protocol and network there is no concept of "wallet" or "account". It only recognizes addresses. Whoever has the key corresponding to an address can spend the coins in it.

A wallet is merely a collection of addresses with their corresponding keys. The Bitcoin-qt client manages for you a wallet file on your computer. Every address in this wallet is spendable by you, so the software displays the total amount in all addresses as your balance. You don't really need to know how many coins are in each address, you just want to know how much you have in total.

I wouldn't say that the addresses "point" to a wallet as that would imply the wallet is a thing on its own. Note that you can have the same address in several wallets, but that's not recommended.

Some other software, such as Multibit, allow you to easily manage several wallet files, and see the total balance for each.


How transaction happen in blockchain? Suppose there is a cryptocurrency with a chain of 5 blocks. When users trading with this cryptocurrency, then:-
how the buy and sell will be going to happen i.e. Which block will make the transaction happen and is there an automated process for it?
How many transactions each block can do? Is there some rule for it?
I'm very new to blockchain, please help me out on this. If you need more clarification on the question then please comment it out. Thanks

how the buy and sell will be going to happen

The canonical process for buying Bitcoin with a different currency is

The buyer uses their Bitcoin wallet to create a receiving address.
The buyer communicates this address to the seller.
For example the buyer's wallet creates a QR-code (2d barcode) from the
address and the seller scans the barcode.
The seller uses their wallet to create a draft Bitcoin transaction that
sends an
amount of Bitcoin using unspent coins from their wallet to the Bitcoin-address
provided by the buyer. This involves a cryptographic signature made by the
seller that proves they have the right to spend those coins. It also locks the
output amount with a Bitcoin script that similarly requires
the use of recipient's private-key to spend.
The seller's wallet transmits the draft transaction to a few nearby
Bitcoin nodes
(e.g. other wallets, etc)
Other nodes pass the draft transaction to other nodes.
Eventually the draft transaction reaches miners who each add it to their
pool of draft transactions.
Eventually one of the miners, adds that draft transaction to a block template,
usually along with a lot of other unrelated draft transactions
from their pool. The miner starts mining the block.
eventually a miner succeeds in mining a block that includes the
draft transaction.
The miner transmits the new block to nearby nodes
Other nodes see the block is valid (matches Bitcoin's rules) and pass it on
Eventually the buyer's wallet sees the new block,
adds it to their copy of the blockchain and
adds the value to the wallet's "balance".
Over time, other unrelated blocks are added to the blockchain.
each of these subsequent blocks counts as one confirmation of the
transaction. Six confirmations is generally taken as certain.
Some people choose to accept fewer confirmations as certain.

i.e. Which block will make the transaction happen

Any subsequent valid block which contains the transaction.

and is there an automated process for it?

The first three steps described above normally involve some human interaction (but can be automated using software APIs). The remaining steps are fully automatic.


How to send bitcoin programatically using API? Bitcoin Transaction. (Without Setting Node) Want to send BTC from one address to another address without using
  JSON-RPC.

Followed and used:

https://bitcore.io/api/
https://www.npmjs.com/package/bitcoin-transaction/v/1.1.1

2nd:bitcoin-transaction Working good for testnet but giving each time new errors for Mainnet.

If anyone knows better way to send BTC, kindly let me know.

From C#, I would use NBitcoin to generate raw transaction and push it to some API provider. This eliminates the need of setting up full node.


Which is more anonymous? About bitcoin,
Which is more anonymous?

1.using mixing service(I heard there are many fraud)

2.buying with amazon gift card in Paxful

In some cases. Mixing services have actually been shown to be able to trace the inputs all the way through the many outputs until its final destinations.
Its hard work for a person, but there is software available that can do it with good success rate on several mixers

Buying some giftcard is closer to the more obscured route of transfers, where you simply change your currency into another, and use this until you need to change it back some other place. A gift card would probably give to big a loss. A far better improvement to this technique, would be to use one of the few cryptocurrencies that offer anonymity, like Monero or Dash. Then you could use the route:

BTC (1) -> Monero (1) ---anon-send---> Monero (2) --> BTC (2)

Of course if you are able to use Monero or Dash instead of Bitcoin, you can simply just keep these and skip the last conversion back to BTC. This will make it cheaper when using it as payment, since you don't get stuck with the extreme-fees situation that Bitcoin is facing right now.


How does one checks which customer made a payment? One question I'm not able to properly answer when asked is

How exactly can  the blockchain verify the identity of the user without a centralized trusted party such as VeriSign?

I know this is done in a decentralized way and the ECDSA algorithm should do the trick, but other applications still need a centralized trusted party in order to verify if the user is really who he says he is even when they're using ECDSA as well.
But how exactly can I guarantee that nobody can pretend to be someone else and spend their bitcoin instead?
Yes, I know the basic of how public-key cryptography works, but Information Security is not strong with me.

Edit: let me explore the question further.
Suppose I own a coffee house with intense flow of customers. How can I be sure about costumers that had already paid and others how didn't pay?
Let's say that Bob and Anna are my customers. Bob orders a Macchiato, Anna orders a Capuccino. Both coffees have the same price. How can I know which payment came from each one of them?

Do you really care which customer paid, or do you care which bill was paid?

Say you have customers Anna and Bob, who both order something. Bob notices he's out of money, so Anna says she'll pay for both. If you really want the sender to reveal their identity, your system would already fail, as Bob never pays anything.

In almost all cases, all you care about is which bill is paid, and you have no need for the payer's identities (which could be a privacy violation in some cases).

The normal way to do this in practice is by creating a new payment address for each payment you want to receive. You track which bill was paid by tracking at which addresses you received money. Creating new addresses is very cheap, and they are sufficiently long that it is exceedingly unlikely that the same one will ever be produced twice.


Can't use bitcoin-cli commands, error message says "could not connect" from localhost I am simply trying to run bitcoin-cli getinfo on the same machine that my bitcoin node is running on (with bitcoind -daemon)

my bitcoin.conf file is as follows:

server='1'
rpcuser='username'
rpcpassword='password'
rpcport='8332'

The error message I receive is:

error: Could not connect to the server 127.0.0.1:0

This error is confusing me in two ways. First, my home network uses an Xfinity gateway (combined router/modem), and the local ip addresses look like 10.0.0.xx, not 127.x.x.x. Second, why is the error suggesting that it tried to connect on port 0? I have specified in bitcoin.conf that the rpc port is 8332. In this current state I can run a node, but I cannot make any rpc calls, rendering it useless for my purposes. Any advice on how to fix this issue?

Bitcoin.conf does not use quotes in its definition of options. Your lines need to resemble server=1 rather than server='1'. Your port number being zero is an artifact of this, which will not work as you need root permissions to bind to ports below 1024, which bitcoind does not and should not have.
127.0.0.1 is the loopback address used when you're connecting to yourself, rather than a normal routable IP address. For safety's sake the RPC port is not by default enabled to bind to routable IP addresses, such as your 10.0.0.0/24 range. By default, it will only bind to 127.0.0.1 and subsequently only be accessible on the host it is running on.


Do these new ASIC miners really pay for themselves in 5 days? The Bitforce 50GH/s miner costs $2,500 today, and according to the following calculation it would mine enough coins in about 5 days to pay for itself.

I am sure I am missing something here. Why would they even sell this hardware at all? Surely it makes more sense to keep the hardware and just set it loose on calculating coins and cash them in.

There's a factor called Difficulty, the more hashing power exists on the network the more difficulty exists, therefore it's harder to mine coins. Right now The difficulty factor would let you recover your money fast  because almost no one has ASIC chips, when they ship in bulk the difficulty factor will rise to 30-120 million during the year. To know by how much the difficulty will rise it's impossible, so it's your call.


where can I get resource such as Blockchain technology in C++ I have found a lot of pdf files about Ethereum smart contract and JavaScript cryptocurrency. I still want to know about resources such as C++ cryptocurrency. Let me know about some good resources.

The best pdf about bitcoins would be the original white paper by Satoshi Nakamoto https://bitcoin.org/bitcoin.pdf

For programming free ressources I invite you there: https://www.lopp.net/bitcoin-information/developer-tools.html

Then you have some great book like "mastering bitcoin" or "programming bitcoin"


How big is the Dogecoin blockchain as of 2018 Feb? What is the size of the Dogecoin blockchain as of 2018 Feb? And where would I find this data in cyberspace?

You can follow that and other data on https://bitinfocharts.com/dogecoin/


How to do atomic swap with bitcoin? I have read about the ATOMIC SWAP, I could find only the concept level and could not find technically.  Is there any doc about atomic swap to achieve that technically and code sources to achieve this.

Currently atmoic swaps aren't really done except in really special occasions and with specially crafted transactions. There aren't really services that offer atomic swaps and existing software cannot perform atomic swaps without special modifications.

There is currently ongoing work on creating actually usable and easy to use atomic swap software. Most of this is working through the Lightning Network and HTLCs.


Mining two block at the same time Reading the question and the answer What happens if two miners mine the next block at the same time?, I completely agree with the answer, but there are still 3 very interesting open question:

How does one know which of the two blocks is accepted by 51%?
What prevents two blocks to be accepted by 50/50?
At which point is it obvious that a block is orphaned?

How does one know which of the two blocks is accepted by 51%?

Every node keeps track of all valid blocks they receive from the network. This let's them track the height of all chains, and decide which is the longest that they have (the main chain). You don't need to know which was accepted by 51%, you just know which of the 2 was referenced by the next block mined, because its likely they the majority would find the next block first and therefore have mined on top of the one they accepted.

  What prevents two blocks to be accepted by 50/50?

There's nothing really guaranteed about the number 51% anyway, its just more likely for 51% of mining power to find the next block than the 49% (probability). If it was 50/50, it would just be a race, one would still find a new block first, that chain would be extended, and the rest of the miners would come and join the chain, leaving the old chain behind. Its highly unlikely for both to find a new block within a short time of each other, and therefore potentially extend the fork to a two block fork. Eventually the network always resolves itself though, just by probability, one will always eventually find s block quicker than the other.

  At which point is it obvious that a block is orphaned?

An orphan block also refers to a block which is received before its parent, and this can be instantly decided by a node based on whether it recognises the parent hash or not. But assuming you mean orphaned = not in the main chain, this is also instantly decided by each node, the first block received is part of the chain and the other forms a secondary chain/fork. The main chain may change to the other fork though if it gets extended faster, so you can say you know for sure after a certain number of confirmations (e.g. 6), by which time it would be highly unlikely for the other chain to be extended and overtake the current main chain.


API with reliable address callbacks? I want my app to be able to create addresses and be notified when an address receives a deposit. What I've tried so far doesn't work reliably enough.

I've tried the Coinbase API (address callbacks didn't seem to work at all) and Blockchain.info (sometimes it works fine, but usually it takes several minutes to several hours for the callback to fire).

Are there other APIs that offer address creation with callbacks that don't involve running my own Bitcoin client, or is running your own client pretty much a necessity for reliable notification (within seconds)? Is anyone actually using Coinbase or Blockchain successfully? My service would need rather immediate notification of transfer (number of confirmations isn't important).

The Mt. Gox API allows you to do these things. It allows you to create new deposit adresses and withdraw/deposit money into existing ones.

While the API dosent actually have something to tell you when your specific order has been executed, you can get a list of your open orders and compare those against a local listing of placed orders to determine which have been executed. However their websockets API will tell you when any trade has been made on the network which you could then check yours against as well.

Another good API solution would be bitstamps though theirs donsent have a websocket component.


Why different coins have different number of confirmations? Does it have to do with the block difficulty? What factors impact the number of confirmations that is considered to be safe in a bloc

It's not actually confirmations that are important, but the amount of work that has been done on top of a block.  With this in mind, coins that have a target time that is different than Bitcoin's (10 minutes) will have a different amount of work going into a single block.  For example, if the target time for a coin is 1/4 of what Bitcoin uses, than you'd need 4 times as many blocks to consider it just as safe.

There are also other factors that go into how safe a block is from being orphaned after it is initially accepted, but they mostly have to do with mining centralization and the availability of mining power that is not currently on the network.  The main factor is the target time.


Are wallet address generators considered a dapp? like bitaddress or warp wallet? Is bitaddress or warpwallet generator considered a dapp? They aren't tied to centralized server when you use the application to generate your own addresses and it can run by itself.

I think this comes down more to semantics than anything else (and thus might make the question off-topic as opinion based), but I'll give it a shot.

I would classify BitAddress or WarpWallet as standalone programs (or even scripts, although I would lean towards program since they are interactive), much in the same class as a calculator app. Yes, they don't rely on a centralized server (barring distribution, which could also be done over torrents or something). They don't work in the same way as you would expect a dApp to. There is no data replication/distribution to peers. There is no interaction with a larger network at play here. They work fine in isolation and have no need to access any external resources.


PHP functions not working in bitcoin JSON-RPC version 16 (bitcoin-cli is working properly) Trying to implement Bitcoin JSON-RPC using Digital Ocean Ubuntu using bitcoin version 16.

Here is my php code

<?php

require_once('easybitcoin.php');

$bitcoin = new Bitcoin('someusername', 'somepassword');

print_r($bitcoin);

//print_r($bitcoin->getwalletinfo()());

$getinfo = $bitcoin->getblockchaininfo();

print_r($getinfo);

?>

  Output

  Bitcoin Object ( [username:Bitcoin:private] => someusername
  [password:Bitcoin:private] => somepassword [proto:Bitcoin:private] =>
  http [host:Bitcoin:private] => localhost [port:Bitcoin:private] =>
  8332 [url:Bitcoin:private] => [CACertificate:Bitcoin:private] =>
  [status] => [error] => [raw_response] => [response] =>
  [id:Bitcoin:private] => 0 )

  Giving error HTTP ERROR 500

I'm not much php aware, I tried enabling error reporting in php.ini but not getting errorlog.

Here is my bitcoin.conf

rpcuser=someusername
rpcpassword=somepassword
prune=600
maxconnections=12
maxuploadtarget=20
daemon=1
server=1
keypool=10000

Bitcoin server is fully synced in prune mode, up & running.bitcoin-cli properly working. If anyone have new working php-bitcoind examples, please share on vd30992@gmail.com

  Thanks for any help.

getinfo was removed from Bitcoin Core 0.16. Use getblockchaininfo, getnetworkinfo, getmininginfo, or getwalletinfo depending on what you actually need. A mapping of each getinfo field to its replacement can be found here: https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.14.0.md#getinfo-deprecated


Is there a help file for the bitcoin client? Is there a help file / man page that explains all the possible commands and arguments for the bitcoin daemon?

I'm looking for an in-depth coverage of the commands seen when I do bitcoind help.

Bitcoin Config Arguments
Bitcoin CLI Commands


How to list all the HD address in Electrum? I tried to restore all my HD address by importing my xprv in new wallet file but it only shows 20 addresses.
How can I make it show all the child addresses of my xprv?

Is not feasible to show all possible addresses, there are just too many.
However you can change the gap limit.

By default, Electrum shows the first 20 private keys.

You can change that by going to console tab (view menu > show console) and typing in this:

wallet.change_gap_limit(200)
wallet.synchronize()

The above will increase the number of unused addresses past the index of the last used address to 200 i.e. this becomes the new Electrum lookahead window.

If you want to generate change addresses instead you can do the following:

for thing in range(1,200): wallet.create_new_address(True)


How to discover startup flags or command-line options for bitcoind? I'd like to query the Bitcoin daemon (bitcoind) to find out what startup flags (command-line options) were sent to it on startup (or the current state if it has changed, e.g. -server=0/1 changing).

For example, I may want to know if -addresstype, -disablewallet, -rescan, or -uacomment=<cmt> or some other flag has been set.

Or for Namecoin, it would be very useful to know if -namehistory has been set.

Is there an RPC or any other method to find out?

Or, to ask the question a different way...

src/bitcoind.cpp's bool AppInit(int argc, char* argv[]) method calls ParseParameters(argc, argv);, which is in src/util.cpp.

In src/util.cpp we have:

map<string, string> mapArgs;
static map<string, vector<string> > _mapMultiArgs;
const map<string, vector<string> >& mapMultiArgs = _mapMultiArgs;

To store flags/options/args.

I'd basically just like to get whatever is in those variables through bitcoind.

On Linux, get the process id of bitcoind and read  /proc/<pid>/cmdline.

On Windows, use wmic path win32_process where "name = 'bitcoind.exe'" get commandline


What happens if hash rate decreases rapidly? Since difficulty is only adjusted every 2016 blocks, what would happen if hash rate was to decrease rapidly? Wouldn't this cause blocks to be created less frequently and also making the time until difficulty is adjusted even longer?

Here's a scenario I had in mind, please point out any errors in it:

Some event causes people to lose faith in Bitcoin.
Those people sell off a lot of Bitcoins, causing the value of a Bitcoin (compared to e.g. a dollar) to drop a lot
Miners (who pay their electricity bill in dollars) find that mining is no longer profitable and a lot of them quit (until it is once again profitable)
The time between blocks has now increased (let's say to 15-20 minutes) since difficulty has not yet been adjusted.
People experience that the Bitcoin network is slow, it takes a lot of time to get transactions confirmed, and starts to lose faith in Bitcoin. Go to (1).

So, could this cause a downward spiral of the faith in Bitcoin?

Yes, it could. It's not very likely, but it could happen.

However, one thing to keep in mind is that Bitcoin is incredibly resistant to these kinds of problems. Everyone who participates in the Bitcoin network has an incentive to keep that network useful. So a new client with a different difficulty algorithm could be released in a few days and the network transitioned in less than a week if needed. The difficulty adjustment could be changed if it needed to be.

For one thing, the "6 confirmations" rule is way overkill. People could compensate just by accepting 4 confirmations for transactions under $10,000 or the equivalent.

Ideally, people would see this risk coming several months away and could deploy a fix before it was needed. If circumstances in any way suggested that this was a realistic possibility, even in the absence of an actual attack a community consensus and transition plan could be developed and implemented. Alternative difficulty algorithms have already been proposed and even implemented (in other block chains) that don't have this issue.

Right now, I think such a change would be a bad idea. The problem is very unlikely, and any mass change in the logic of Bitcoin could undermine confidence in the long-term stability of the system. People might think "if they change the difficulty algorithm today, maybe they'll change the Bitcoin generation rate tomorrow".


Re-generate a past private key I know that every public key has a private key... I am wondering how to regenerate a private key that was generated by my Blockchain app (using a plain text passkey, which I am assuming was converted into the proper format by the app)

I have the wallet address where the bitcoins were sent, but cannot use the plain text private key I used in the application to spend the bitcoins...

The bitcoins have been sitting at this address since 2015, And I guess I was hoping if there is a way to convert the passphrase I used in the app into the proper private key to access the bitcoins at the address they were sent to...

I hope that this makes sense.... I can see them there, and not being able to access them is so frustrating! I lost the data in the application, I think due to a glitch. I was hoping since it is a mathematics thing to generate the private key that there must be a way to go backwards, using the public address and the plain text passkey I had used to find the proper format private key.

There's no way to go backwards from the public key to the private key, that would mean that anyone could steal your Bitcoin.

You might be able to do something with that passkey you have saved though. Is it a list of words? Do you remember what app you were using?

Edit: Looks like you actually have a passkey that was used to generate a private key and not a Mnemonic backup. Have you tried putting the private key into the 'wallet details' section of this website: https://www.bitaddress.org/ ?

Note that you can use the site offline and I recommend it.


Withdraw from bitcoin ATM bitcoin noob but here goes. I have a bitcoin address (obviously) and someone has sent me bitcoins. Now I don't have a wallet just the address (public and private) in order to withdraw from an ATM or maybe even purchase stuff? Do
I have to create a bitcoin wallet as well? Sorry if that is a REALLY dumb question but I don't know too much about this stuff. Thanks guys

By having the private key you can sweep the wallet using a desktop or mobile wallet, I recommend electrum.

If you are new to the bitcoin world, visit https://bitcoin.org that has a lot of information so you can get up to date and get out of duduas


Warning about possible double spend at blockchain.info What does this blockchain.info alert mean?

  Warning! this bitcoin address contains transactions which may be double spends. You should be extremely careful when trusting any transactions to or from this address.

I got my first payout today from Slush pool, and one of the the inputs of the transaction showed this message. Is that something I should worry about? As of this writing, the transaction has already 54 confirmations.

As long as you wait for 6 or more confirmations, your coins are safe. Waiting for 6 confirmations would make it quite difficult for Slush to pull ahead of the rest of the network with their own chain, and make it quite apparent if they did.

Even if Slush is really attempting double-spends, it really wouldn't make much sense to do so on a miner payout. It would make sense for many sorts of transactions (instant-payout gambling sites, digital or physical goods, etc.) but not to compensate you on work you already did for them (if they wanted to play that game, it'd be far easier to simply never pay you). All that would give them is miners that want to leave because they're being cheated.

A more likely double-spend scenario would be as described at the GHash.IO & double spending post on Reddit. In short, it is believed that GHash.IO executed double spends against a Bitcoin-based betting site.

It's also important to note that blockchain.info's information on double spends being attempted could very well be misinterpreted (e.g. maybe an orphaned block, with a later payout, would result in the warning you see). That address has a very long history.


Can I connect to a node as read-only? In my Electrum wallet I can open the Network Window and view Nodes I'm connected to. Here's an example: electrum4101870.fullhealth.net. I can also find public nodes at https://bitnodes.earn.com/nodes/leaderboard.

Is my wallet streaming data from these peers? If so, how?

My understanding is that in order to stay connected to a node you need to exchange messages about the chain...

Or, is there a way I can connect to a node and just read outgoing information, such as new blocks + transactions.

Thanks

It is important to note that your Electrum wallets connect to Electrum servers which speak a different protocol than the Bitcoin P2P network. Electrum servers are full nodes with additional software running which provide the data and protocol that Electrum uses.

If you want to be strictly read only, as in you never send the node any data, then no, it is not possible with either the Electrum protocol or Bitcoin P2P protocol. Both protocols have a handshake at the beginning of the protocol where both nodes (or client and server for Electrum) exchange messages before the rest of the connection can continue.

Furthermore, both protocols have ping messages which have to be responded to. If a node (or client) doesn't respond to the ping, the other side will disconnect you. So if you have no send capabilities, you will not be able to maintain the connection for very long.

However if you just mean you aren't sending any blocks or transactions, then yes. You can most definitely connect to a node and never send it any blocks or transactions.