Recovery on Bitcoin Core I used bitcoin core late in 2016. Since then i haven't used bitcoin and have huge sum in my wallet. Lately when i wanted to get them back then i was told that i need private key.

  If i installed the latest version of Bitcoin core with the same wallet
  phrase will i see that old address back with the balance

Also would like mention i don't have the old computer as i scrapped it and unfortunately no back up to. Is there anyway or am i out of luck.

  Any suggestions would be appreciated. i promise a reward to anyone who
  helps me out?

have a nice week end all of you out there. you van reach me on narenderthind@gmail.com with solution or suggestion

TL;DR: No. Your bitcoin-core pass-phrase cannot be used to recover your bitcoin.

i was told the need of a private key

If you have the private key, you can recover access to your bitcoin.
If you have a recovery phrase and know which bitcoin wallet you used, you can recover the private key and recover access to your bitcoin.
Otherwise those bitcoin are gone forever.

i promise a reward to anyone who helps me out?

Expect to receive lots of email from scammers and very convincing professional conmen.
Don't give anyone your private-key or your recovery-phrase. The only circumstances you should ever do that is in front of a lawyer paid by you with proof of the helper's identity and a signed contract in her hand. Otherwise you will lose even more money.
People can help you without knowing your private-key or recovery-phrase. If they say they can't help you without those things, they are conmen.

If i installed the latest version of Bitcoin core with the same wallet phrase will i see that old address back with the balance.

No.

Any suggestions would be appreciated

Are all of the words in your passphrase in the BIP39 list? If so it is a recovery-phrase not a pass-phrase. If so it would be associated with a different type of wallet than the "bitcoin core" wallet.
If so, download a wallet application that uses BIP39 and try using your recovery phrase in it. Be very careful not to download malware. Start with wallets that don't require an online service to work.

Bitcoin core "passphrase"

Note that in the "bitcoin core" wallet, the Passphrase is used to encrypt your wallet. It is not a recovery phrase. You cannot recover access to your bitcoins using only the pass-phrase of a lost wallet.

Importing private keys into a new "bitcoin core" wallet
See also

How do I import a private key into Bitcoin-Core? where Rick's answer is

Run Bitcoin-Core
Select Help (to the right of Settings)
Select Debug Window
Select Console
If you encrypted your wallet, unlock it by entering walletpassphrase "YourLongPassphrase" 600 next to the > input box
Next to the > input box type importprivkey <bitcoinprivkey> (Note that the private key must not have spaces, remove them if they are included in your backup)

Example: importprivkey 5KJvsngHeMpm884wtkJNzQGaCErckhHJBGFsvd3VyK5qMZXj3hS

Note that the 'bitcoin core' wallet does not use a recovery phrase. You cannot recreate your private key from a recovery phrase using bitcoin core. The only "pass-phrase" used with bitcoin core grants access to the wallet, it is not the private key and cannot be used to recreate the private key.
Without the private key, the bitcoins are gone forever.


How do bitcoin adresses get into the Bitcoin system when they're created offline? I am new to Bitcoin, and I am still trying to understand the working of bitaddress.org but get stuck a long the way.

On bitadress.org I can take the site offline and create a public and private key by moving my mouse.

Once my keys are generated I can send bitcoins to the public key.
But as the site is offline how do my keys get into the bitcoin system?

Addresses are not made known to the Bitcoin network when they are created. An address only gets "into the system" when someone sends bitcoins to said address. If you're not the sender of that transaction, the address can be communicated to the sender by any fashion, e.g. by email, postal letter, or coconut laden African swallow. ;)

Thus, after you've created your keys offline, you may tell the prospective sender of the transaction the address in any fashion and to spend the received coins, you may import the private key into whatever wallet software you prefer.


Why does merely having Windows Media Player open double my GPU hashrate? I'm using poclbm to mine under Windows... processor is an AMD A6-3400M with integrated Radeon HD 6250G GPU. When Windows Media Player is closed, I get a rate of 16 megahashes/second, but when it is open (even if stopped or paused) poclbm reports a rate of around 33 megahashes/second.

I'm wondering if this has something to do with Windows Media Player increasing the system timer resolution, but that doesn't seem like it would affect performance.

Ideally I would like to achieve maximum GPU performance without having Media Player constantly open.

poclbm has not been set to alter the clock rate of your GPU. Windows media player is doing this when open and adjusts the system to what it requires.

If you specify clock speeds for your GPU via parameters or a separate application you can overcome this.

Theres a number of applications which effect clock rates on windows machines, flash player open within a browser reduces a single card of mine down from 400 m/hash to 350 m/hash.

cgminer is very easy to specify clock speeds and mine with, it adjusts them when you start the application (not when closing though).


Deleted/Can' Find Wallet I bought and used bitcoins 5-6 years ago through a machine (paid cash) in a bank here in Australia, I had a wallet/dat.file on my Mac Desktop that I think has been deleted well at last I can't find it, I do remember my password for the wallet but am having trouble finding it, any ways to reinstall it ? The Mac still works fine and has never been wiped I just recently pulled it out of storage and i'm sure that there are coins still in my wallet.

Please Help!

1) Click Finder.

2) Press CMD + SHIFT + G

3) Paste this and press enter:

~/Library/Application Support/Bitcoin

Your wallet.dat should be there.


How do mining contracts work? How do mining contracts work?
I see mining contracts but how does it work?.
What happens when I buy one?  .
I've seen multiple mining contracts I don't know whether the prices are worth it because I have no idea what they are.  Anyone care to explain ?

Well it depends on the contract, usually they promise you a fixed hash rate working for you for a fixed time (as 200Mhs for 2 months) and you will get whatever that miner gets.
This can be done hiring full machines and then you can just tell the operator the pool and client configuration so you get the coins directly on your account.

Or the can sell you just some part of the machine hash power, in that case you will not have the option of changing the pool settings but instead you are given a way to get the hash rate and result of your machine and then the operator gives you the percentage of it's earnings that you paid for.

Currently there is a new kind of mining contracts, that is the cloud mining, it is just the same as the percentage system but instead you get a contol panel where you can increase or decrease the MHs you want and the operator usually runs a whole datacenter of miners.

The contract's price almost always are more expensive than the expected returns of that hashing power by the end of the contract but if they are paid in fiat could be an instrument to invest if you are confidant in the rise of the coin.
Also they are a good way to mine without having to worry about electricity, noise, temperature...


What is Ardor and how is it different from NXT 1.x? Ardor was recently announced as the successor to NXT 1.0 with backwards compatibility to NXT 1.x . How is it different from NXT v1.x?

From what I read Ardor claims to have every capability that NXT 1.x had but also:

Adds new features

"The platform offers a Decentralized Asset Exchange. Ardor will enable the trading and interaction of assets on any child chain for any of the child chain tokens. Other key features include Decentralized Voting and Governance Systems, and, Phased transactions, whereby users will be able to set multiple conditions before a transaction is executed."

Is easier to use

"It creates a blockchain platform that is open to everyone – from single users to fintech start-ups and governments."

"The developers assert that anyone can “create their own child chain” and interact with the entire blockchain ecosystem. The upshot is that anyone, anywhere, will be able to create blockchain services with relative ease."

Improves scalability

"Ardor is touted as “solving scalability problems” by separating transactions and data that do not affect security from those that do. Specifically, Ardor moves all of those that do not affect security onto child chains."

http://www.forbes.com/sites/rogeraitken/2016/06/21/nxt-crypto-blockchain-team-prepares-ardor-scalable-child-chain-platform/#40a091b6349b


Are Confidential Transactions on Liquid Opt-in? Are confidential transactions on the Liquid network opt-in or mandatory? I know peg transactions reveal the amount and asset ID, but wondering if I can construct vanilla p2pkh outputs with no confidentiality if I want to? I know I can prove these already with binding key but my question is about transaction standardization.

Bob:~$ getaddressinfo $ADDR

You should see a long value for the “confidential_key” property within the JSON formatted results. It will look something like this:
"confidential_key": "030788da8d9ca229cbe57e346daaf8d94cba3ed548b41922a8abefaec91ff1abb1"

The confidential_key is the public blinding key, which has been added to the address and is the reason why a confidential address is so long. You will also see that the “getaddressinfo” command shows an associated “unconfidential” address, which can be used to receive assets if you don’t want to make use of the Confidential Transaction feature for some reason.
https://docs.blockstream.com/liquid/developer-guide/developer-guide-index.html#confidential-transactions


Inbound requests after opening Electrum A few days ago, I was exploring Electrum (Android) out of curiosity. A few moments later, I get notified by our firewall that it flagged several suspicious inbound requests. The source IPs came from various countries, all of which use port 50002. The destination was my phone, at seemingly random ports. I disconnected my phone from the internet, and the requests would stop. They'd start again if I connected and used Electrum.

Initially, I thought Electrum was P2P and was doing peer discovery, which would conveniently explain why a machine over the internet would attempt to talk to my machine. But reading ElectrumX's docs and several other online resources, Electrum is a client-server setup - wallets talk to servers. The only P2P component I see is when servers talk to other servers to find other servers or advertise their presence to other servers. But this would not explain the inbound connection to my machine.

So what's going on? Is this normal behavior? Is the wallet also a "peer"? Or is this some malicious attempt to break in? Everyone coming from port 50002 and Electrum servers using port 50002 is probably not coincidence though. Thoughts? Did I miss some detail in the docs?

As @Anonymous said Electrum servers listen on port 50002 so that's what you are seeing here. Your phone is connecting from a random local port to remote 50002 on the servers.

Electrum gets blockchain data from electrum servers run by volunteers. These servers see your addresses + transactions but they don't see your private keys or seed. So you lose privacy compared to using a full node like bitcoin core but you still have exclusive control of the secrets that let you spend your bitcoins. The upside of using electrum over a full node is that you don't have to download the 200GB blockchain. You can get up and running straight away.


My husband died, I have lots of codes and words... help I will not post any of the codes here so please don't ask.

So, my husband has a number of apps in a folder -

Tronwallet
Telegram
Guildchat
Coinbase
Biance
Google authenticator

He kept going on about tron etc, I never paid much attention. He gave me codes etc cause "if anything ever happened and you didn't have these it would be lost"...again..I didn't pay much attention... he was 43 and perfectly healthy.

Now I have his phone, these apps and these codes and no clue what to do.

I can't log into tron wallet... he didn't give me a 6 digit pin.

Don't blow my mind too much but I'm clueless here.

I guess the first step in getting into the wallet?

I am sorry to hear about your loss and situation. I would suggest the following industry-known expert Pamela Morgan (She is the partner of Bitcoin advocate Andreas Antonopoulos) on the matter of estate-related crypto planning and backups, and who could potentially help guide you in the recovery process (here is her official Twitter and Website for reference).

https://twitter.com/pamelawjd?lang=en
https://empoweredlaw.com/

I am not endorsing her and suggest you do your own research, but I am just sharing who I think would be most knowledgable on how to approach this topic the most carefully and whom I would personally trust.

Caution:
I would not share any of the information with anyone, as any private-key or recovery-phrase related information would be the equivalent of giving someone cash that you cannot recover if they turn out to be malicious.

Information gathering:

I would continue to aggregate the information you have to build a map of all the account and wallets and associated login info, whether associated with emails, phone numbers, and be on the lookout for any paper backups where you might see 12 or 24 words written in order that are spelled correctly but the sentence doesn't seem to make sense, as those are mnemonic backups of crypto vault, where there could be multiple cryptocurrencies associated (as per BIP44), and multiple addresses (as per BIP32) per each support asset.

Here are examples of a random 12-word mnemonic:

position solution half fly topic large scene verify moment boost catch push

There could also be keystore files (usually .json files) that have UTC and a date in the filename, which are AES-ciphertext and would require a password to decrypt (and would likely contain a private key or recovery phrase). Those json files have a filename that looks like this:

UTC--2019-08-15T20-56-......

There could be notes that were kept of pin codes or passwords elsewhere, whether in a note pad or word document or password manager.

Note: Take great care to keep any such backups secret and not to share those words with anyone and keep them offline, until you can find the help you need.

Custodial and non-custodial brokers/exchanges/wallets: Knowing what types of applications were installed and what brokerage accounts were used will also help determine whether the accounts were non-custodial, or if the brokerage/wallet provider has access to the funds as well (in which case you could reach them for next steps) whereas, the non-custodial providers do not have access to the funds but at most could provide any information that was associated with the account in some cases. Good luck~


Given only a private key, is it possible to see if it has unspent bitcoin? I understand a "wallet" to be a private key and a collection of associated public keys. But if I was to be given only a private key, would I be able to determine if it had any associated addresses/public keys that had unspent bitcoin in them? If so, how?

A Bitcoin private key always have exactly one corresponding public key from which the Bitcoin address can be derived. The derivation paths looks as this:
Private key -> public key -> Bitcoin address. If you e.g. only have the public key you can determine the bitcoin address, but not the private key. Given only the Bitcoin address you can in fact not even determine the underlying public key.

Therefore all you actually need to save is the private key, from which you can find the public key/address and check if there are any unspent outputs for it.

On top of that deterministic Bitcoin wallets have a clever way to derive determanisticly a nearly infinite amount of private keys, so all you then would need to keep safe is the seed for this derivation.


How do Bitcoin Altcoin Hardware wallets work? From my understanding the hardware wallet contains your private key inside the device.

When using a hardware wallet, the gui wallet on the computer or phone creates the transactions, but does not sign it. The transaction details get sent to the hardware wallet and it signs it and sends it back? Is this correct?
Does the hardware wallet ever pass the private key data back to the computer to sign?
Which hardware wallets works with which software?
Which hardware wallet is the most trusted out of them?
Can you import existing paper wallets or basically just private keys into the hardware wallet? And which ones support this feature?

When using a hardware wallet, the gui wallet on the computer or phone creates the transactions, but does not sign it. The transaction details get sent to the hardware wallet and it signs it and sends it back? Is this correct?

Yes.

  Does the hardware wallet ever pass the private key data back to the computer to sign?

No. The private keys never leave the hardware wallet. If they did, that would ruin the purpose of a hardware wallet.

  Which hardware wallets works with which software?

Electrum supports all of the commonly used hardware wallets (Trezor, Ledger (all products IIRC), Digital BitBox, and KeepKey). Each hardware wallet also has a manufacturer provided wallet. These wallets are usually web wallets or browser extensions. Many other wallet software support some hardware wallets (usually Trezor, Ledger, and KeepKey).

  Which hardware wallet is the most trusted out of them?

Trezor and Ledger are the two go-to hardware wallets that people generally trust.

  Can you import existing paper wallets or basically just private keys into the hardware wallet? And which ones support this feature?

No, hardware wallets generally cannot handle imported private keys. This is because they actually only store one private key and then use BIP 32 to derive the private key that you actually want to use when you sign something. They don't have much onboard memory to hold more keys.


How would you find the Merkle Root with a Block that contains 6 transactions? Let's use block #100205
https://www.blockchain.com/en/btc/block/0000000000033d0de6f4ebe93b3b142424cdbecf4bd98b948e856c4a55f09f76

This block contains 6 transactions. After the second level of hashing you end up with 3 nodes. What is the fix for this? Do you create two 5's and 6's?

You would duplicate the hash of the last two txs. The tree would "look" something like this:

             abcdefef
              /  \
           /        \
        /              \
      abcd             efef
      /  \            /  \
   /        \      /        \
  ab        cd    ef        ef
 / \        / \   / \
a   b      c  d  e   f


What are some ways for virtual currency like Bitcoin to have price stability? What are some ways for virtual currency like bit coin to have price stability?

If there is a method, can it exert its influence only in a country or a large group?

However, when virtual money has price stability, how does it differ from existing currency?

There is no straightforward approach that a currency can take to achieve price stability.

There are things that can contribute to a more stable exchange rate, however.  These things are not specific for virtual currencies, though, but also apply to commodities or stock markets.

Mainly, trading liquidity and market availability are key to achieve price stability.  The more an asset is traded, the more stable it will become over time.  Especially when it is traded in different ways.  F.e. the presence of arbitrage and margin trading have an effect on the stability of the price.

Bitcoin has a long way to go on those fronts.  Even though there a numerous Bitcoin exchange websites of which several already support margin trading, the liquidity is still very low compared to traditional FX and commodity markets.  Many people think that the creation of a Bitcoin ETF will benefit price stability, as it enables a new range of traders to enter the market.


I accidentally used BTC xpub key to generate HD wallet addresses for BCH, can I recover funds? I am using Exodus wallet and an eCommerce plugin to accept cryptocurrency payments. To generate the HD wallet addresses I needed to provide an xpub key. I accidentally used the BTC xpub key instead of the BCH xpub key. They are different. Is it possible to recover my funds somehow or are they lost forever?

The answer, surprisingly, is yes. You need to change the derivation path of your BCH wallet to that of a BTC wallet m/0'/0'/0 and it will generate the necessary private keys.


How hard is it for an exchange to adopt native segwit? Is it not as simple as updating the address regex checker on the front-end? Just wondering, maybe I'm missing something. Are there changes on the backend needed to be implemented as well? Not as simple as changing the regex validation on the front end?

Adopting any deposit change at all is not as simple as "just change regex".
There are a few considerations:

Addresses must be generated, and generated properly. All generated addresses that are passed to the frontend must be valid otherwise you have now black-holed future user deposits.
Can your signing process sign for those new address types? Signing security may use HSMs or other special-purpose signers which may reject the new format for whatever reason.
1+2: you should never credit deposits you can't reasonably spend. It's a one-way ticket to insolvency.
Companies with lots of funds under management will inherently be slower to adopt newer technology because of the associated risks. "Will users think they're hacked? Can the customer wallet support sending to it? What it not?" etc.
Larger firms have many teams, which means coordination at all these layers to get anything done. Effort bandwidth is limited.
At larger trading firms they're often busy putting out other fires, such as scaling their trading engine, hiring, client management, compliance, comms, etc. Being wasteful on block weight usage is embarrassing, but unlikely to bankrupt an exchange seeing 200% YoY growth and puts them at no regulatory risk.


What happened to the nonce distribution between blocks 24480-69120? See: http://pastebin.com/raw.php?i=Sk6vyBRu (each row represents 1440 blocks, each column represents a range of 100M values, covering blocks 0-216000)

I've been doing some simple nonce analysis, as you can see, and it appears that something happened to nonce distribution between roughly blocks 24480-69120. As you can see nonce distribution between the range 0-2^32 is usually very evenly dispersed, so it appears something happened here and was corrected.

Can anybody point me at anything related to this or inform me of what happened?

For ease, this correlates to the start of October 2009 through till mid July 2010.

The only logical explanations to me are thus:

Some technical limitation meant that the miners at the time (there weren't many) weren't searching some nonces as they should. Everybody was using the built in miner then, so it's probably easy to check if there's an old enough SVN around.
The miners at the time intentionally binned certain nonces to avoid hoarding all the coins, keeping the difficulty low. The difficulty was barely 1 at that point, so I don't think this is an unreasonable assumption.


Is it possible to generate(mine) a block with specific transaction via bitcoin-cli on regtest? I want to generate a block with specific transaction via bitcoin-cli on regtest.

The "generate" command does not have the option. It collects transactions in mempool by the default rule.

I guess I can do it with some code change like the following way but I don't want to change it if possible.

TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>& txns, const CScript& scriptPubKey)
{
    const CChainParams& chainparams = Params();
    std::unique_ptr<CBlockTemplate> pblocktemplate = BlockAssembler(chainparams).CreateNewBlock(scriptPubKey);
    CBlock& block = pblocktemplate->block;

    // Replace mempool-selected txns with just coinbase plus passed-in txns:
    block.vtx.resize(1);
    for (const CMutableTransaction& tx : txns)
        block.vtx.push_back(MakeTransactionRef(tx));

https://github.com/bitcoin/bitcoin/blob/v0.17.1/src/miner.cpp#L147
https://github.com/bitcoin/bitcoin/blob/v0.17.1/src/test/test_bitcoin.cpp#L155
https://bitcoincore.org/en/doc/0.17.0/rpc/generating/generate/

When you run generate, it mines a block with the transactions in the mempool:

generate nblocks ( maxtries )

Mine up to nblocks blocks immediately (before the RPC call returns) to an address in the wallet.

If you want those new coins to be mined to a specific address, you can use generatetoaddress

You can create transactions and submit them to the mempool either using the wallet RPC, e.g. sendtoaddress or using the rawtransactions RPC:
e.g.

createrawtransaction
signrawtransaction
sendrawtransaction

sendrawtransaction will put the transaction in the mempool, which can then be included in the next block using generate


I am web developer, can i use my working pc to mine and work at same time? Guyz, i am a web developer, i have single pc but i am thinking to add a good GPU in it, my question is that if i add good GPU, will i be able to mine crypto currencies like BTC/ETH and work on my pc at same time? will it be OK ? Kindly share your opinions experts. Thank you

That would be possible but probably not profitable.

If you use your GPU to mine BTC the costs for electricity are most likely higher than your gains from mining.

I don't know if GPU mining is profitable for ETH. That also depends on where you live and what you have to pay for electricity of course.


Partially filled orders on btc-e I just started with btc-e however I seem to have a load of partially filled orders. What happens with these? Can I cancel them? and if so, how do I do that and what are the consequences? Some have a price tag of $100 so the chances they get filled are minimal.

You can cancel them in the Your current active orders section of the Trade tab by clicking the cancel link under Action. The remainder of the order is taken off the books and you can place new orders using the funds which are returned to your balance.


Value of Product Based on Bitcoins If I chose to accept Bitcoin as a payment for my product, and the price of the bitcoin goes up or down, then technically I am not getting as much for my product in the long run correct?  Because the exchange is based on the dollar as one of the currencies.  So If my product cost's 100.00 and that is a certain percentage of a bitcoin then if the bitcoin say its worth 7100.00 that would be .014 bitcoins.  But if the bitcoin decreased in price say to 5100.00 then that same product would cost .019 bitcoins.  Correct?  How dos the fluctuation in price affect the value of my product in dollars?

It depends how you measure value.

If the price of Bitcoin in USD goes down, then it might be because of a change in the value of USD rather than a change in the value of Bitcoin, so in that case fixing a Bitcoin price for your product may reduce fluctuation.

Realistically, the price of Bitcoin fluctuates more than the value of USD. Also, it usually makes more sense to aim for a particular USD amount for a product rather than a particular Bitcoin amount.

To resolve this, you can setup software to automatically adjust your prices so that the Bitcoin prices for your product are linked to the amount of USD you want. There are existing tools that do this, and they aren't unique to Bitcoin as they are used for fiat currency price conversion too.

When using such a tool, you're still exposed to changes in the value of Bitcoin from the time of a sale until the time you trade your Bitcoin for USD, but again you can setup automated software to manage that; it could be used to sell the Bitcoin for USD as soon as possible after each sale.


Matching pushpool difficulty with stratum's I have a new question for you.

I have setup the stratum mining proxy, and all is working fine. (Actually found our first block recently!)
However, I have pushpool running as well, and some of my users still use it based on preference.

How can I be assured that people that use stratum isn't getting more shares than those who's using pushpool? Is there a way to set the difficulty on stratum?
As of now i set the difficulty manually in pushpool's config file, with rpc.target.bits

Help is appriciated!

This is how you change the difficulty in Stratum:

go to mining/subscription.py

change

self.connection_ref().rpc('mining.set_difficulty', [16,], is_notification=True)

to

self.connection_ref().rpc('mining.set_difficulty', [32,], is_notification=True)

That will set the difficulty to 32 - or change to whatever value you want.


get public key from wallet.dat Is there a way to get the public key of a given wallet.dat to check the balance in the blockchain to avoid having to install the wallet and read all blocks?

First of all, a wallet.dat file does not contain a single public key; it contains multiple keypairs. You can use PyWallet as Meni says, but if it's too technical for you, you can install the wallet but don't have to download all the blocks. Your public keys will show up under "Receive coins" (even if the blockchain is not downloaded), and you can copy each of them into Blockchain.info to check the balance of each address. Adding them all up will give you your total balance.


Will a Schnorr soft-fork introduce a new address format (i.e. not bech32) When we (hopefully) soft-fork to Schnorr signatures will the address be indistinguishable from bech32 addresses?

They will be distinguishable, but they will still be bech32 addresses.

The introduction of Schnorr signatures requires a new type of output. Segwit was designed with such extensibility in mind, and it defines 17 version numbers. Currently, only version 0 is used. Segwit v0 outputs with a 20-byte hash are known as P2WPKH outputs, and v0 outputs with a 32-byte hash are known as P2WSH outputs.

A new version number can be introduced, for example v1, and given semantics through a softfork. Schnorr signatures is one of the changes being considered for a proposal.

However, bech32 addresses literally encode a version number plus a payload, which maps directly to the various versions of segwit outputs.

The version number in Bitcoin bech32 addresses is in the 4th character. For all v0 outputs, that version character is 'q'. For v1 outputs it will be a 'p'.


Worth investing in to a cloud mining companies? Worth investing in to companies like hashflare.io or genesis-mining.com?

Hashflare:

During black friday there's discount - 1TH/s for 100$. Maintenance fee for 1 TH/s is 0.4$ == 0.0005 BTC.

1 TH/s gives 85-90000 satoshi - 50000 satoshi MEF = 35000 satoshi profit (0.257809$) * 30 = 7.71$ per month, 7.71*13 ~ 100$. So, ROI is 13 months...

But profit for 1 TH/s would vary during a year. So 90000 satoshi per 1 TH/s might be even lower, right?

Yes, profit will be even lower. Hash rate has grown from 540 PH/s to 1800 PH/s in the last year. At that rate it will take much longer than 13 months for your ROI.


Bitcoin: what if I was about to sign an offline transaction using the transaction history and I get paid into same address while using an offline client I have to copy and paste transaction history of the address I want to spend coins from. What if there was a new bitcoin transfer into my address before sending the signed transaction to the network?
Does the transaction fail? or work fine because there are more bitcoins than shown in transaction history

It will work fine.

The offline transaction you are signing points back to one or more previous transactions that sent coins to your address; these are the coins that the new transaction will spend.  It's okay if additional transactions come in in the meantime, they just won't be the coins used as the inputs for your offline transactions.


Why is the Bitcoin Core wallet database moving from Berkeley DB to SQLite? Why is the Bitcoin Core wallet moving from Berkeley DB to SQLite for its database backend?

The introduction of descriptor wallets presents an opportunity to introduce a new database backend as descriptor wallets are backwards incompatible. The following is taken from Andrew Chow's blog post on what's coming to the Bitcoin Core wallet in 0.21. (There was also discussion on this GitHub Issue.)
Why move from Berkeley DB?

Not designed to be used as an application data file. The Legacy Wallet has several hacks to get round this as a result and Berkeley DB wallet files can easily be corrupted.
Berkeley DB produces extra files which need to be moved with the database file. This means that Berkeley DB is less portable and requires a directory for each wallet.
Changes were introduced to Berkeley DB database environment files breaking backwards compatibility.

Why choose SQLite?

Can be used as an application data file.

New SQLite versions maintains backwards compatibility with versions as far back as 2013.

Does not require database environment. A completed write guarantees that the data was written to the database file.

Can now move to single wallet files instead of wallet directories.

Here is the proposed timeline for legacy wallet and Berkeley DB removal from Bitcoin Core.


What does the sixth line in the output of the Bitcoin Core GUI RPC command "gettxoutsetinfo" mean? An example of the output of this RPC command is as follows.
 1  "height":n,     (numeric) The current block height (index)
 2  "bestblock": "hex",   (string) The hash of the block at the tip of the chain
 3  "transactions": n,      (numeric) The number of transactions with unspent outputs
 4  "txouts": n,            (numeric) The number of unspent transaction outputs
 5  "bogosize": n,          (numeric) A meaningless metric for UTXO set size
 6  "hash_serialized_2": "hash", (string) The serialized hash
 7  "disk_size": n,         (numeric) The estimated size of the chainstate on disk
 8  "total_amount": x.xxx          (numeric) The total amount
}

What's the meaning of the sixth line "hash_serialized_2"? Whose hash is this referring to?

It is a hash of the entire serialized UTXO set. You can use to verify that a node's UTXO set is uncorrupted (by comparing it with another node that runs the same command, at the same height).
The _2 prefix is to indicate the hashing algorithm that is used. Earlier versions used a different algorithm that became very hard to support efficiently. It's just there so people don't expect the hashes to be comparable between old and new nodes.


How to display USD and Bitcoin price on Classified ads? Hello i'm developing this website https://buysellcarwithbitcoin.com/ how can i display the USD price of classified ads also converted in Bitcoin ? thanks!

If you want that cars could be paid by Bitcoin you need some payment gateway.

Otherwise, if you want just to display prices in Bitcoin you can use some blockchain.info API to get the price for it.
For example, this URL will return you how much is 5000 BTC:  https://blockchain.info/tobtc?currency=USD&value=5000


Why is the source code fee calculated higher than the current bitcoin fee amount? In python bit (https://github.com/ofek/bit/), when sending a message, it is properly 80 bytes or less (https://developer.bitcoin.org/devguide/transactions.html) fee is If it is a 4-byte character string, it is about 0.03 $ / 140 = 21428 satoshi (https://mempool.space/ja/testnet), but it is often 80,000 or more.
Why is the source_code fee calculation result always higher than the actual testnet?
I thought about the cause as follows.
1: There is a possibility that the calculation method of source_code is wrong. (Target + min_change + estimated_fee is the calculation method of fee, but I don't understand why the limit(default 80) is multiplied in the next code part. )
output_size = [len(address_to_scriptpubkey(o[0])) + 9 for o in outputs]
    output_size.append(len(messages) * (MESSAGE_LIMIT + 9))
    output_size.append(len(address_to_scriptpubkey(leftover)) + 9)
    sum_outputs = sum(out[1] for out in outputs)
  (by transaction.py) ```

How can I send a transaction to testnet with the fee properly set below 80000?

OP_RETURN doesn't have any special fee rules. This looks like a result of the specific implementation in this library.
It looks like the library always pads out messages to 80 bytes. So when it does the fee calculation, it always uses the 80 byte maximum because that is how large the output will be when it is serialized.


How to convert Script hash into opcodes, in Ruby? I have a script and it looks like this: 76a914af7a4a30243f2301e6a14a4979ae099d52f560d488ac. How can I create an instance of class Bitcoin::Script from ruby-bitcoin? It has to be parsed, I believe, but how? I posted a GitHub ticket too.

I guess I found an answer:

script = Bitcoin::Script.new([hash].pack('H*'))


Is the SegWit2X success due to concentration of mining power? SegWit2X has been called a short-sighted & severely lacking proposal. There is nearly universal preference for its alternative among those listed on the segwit support overview (SegWit, BIP 141,148,149).

Yet SegWit2X has 90% mining support.

Is this because the vast majority of Bitcoin mining / hashing power is concentrated in a few hands? Does this mean that those who control the mining power can get whatever they want?

I feel that the existing answers here fail to highlight that while (the collection of) miners have the authority to select the order of transactions, and impose additional validity rules, they do not have the authority to determine what the rules are.

Segwit2X (in my understanding, there seem to be multiple ideas out there) seems to be a combination of a soft fork (activating SegWit) and a plan to do a hard fork later (changing some resource limits). The first is something that miners can do, but the second will only be accepted by full nodes that implement the same rules, and be ignored by everyone else.


What is the maximum channel capacity allowed on the Bitcoin testnet? Using Electrum desktop wallet connected to the testnet, when trying to open a channel  with the amount exceeding 0.16777215 BTC I get the following:

Could not open channel. Exception('Requested channel capacity is over protocol allowed maximum')

Is 0.16777215 BTC hardcoded in Electrum or is it determined by the testnet itself?
I noticed that on the mainnet the maximum capacity is siginificatly higher as some exchanges allow LN withdrawals of 0.5 BTC.

I noticed that on the mainnet the maximum capacity is siginificatly higher as some exchanges allow LN withdrawals of 0.5 BTC

I think they are using wumbo channels:
Is the Lightning Network sufficiently secure and well tested for wumbo channels?


How to Create a new Genesis Block with some bitcoins initially asigned to some users? I am trying to use Bitcoin's code for some other application.

Is it possible to create a genesis block so that I can initially assign some coins (bitcoins) to some users. For e.g.  The Genesis Block contains the following information: Address A has 10 Bitcoins  Address B has 5 Bitcoins ?

What changes do I have to make ?

If you do this, you'll be very disappointed even if you succeed. The genesis block is ignored in terms of effects on the state of coins. The actual Bitcoin genesis block's outputs are effectively unspendable, even if Satoshi showed up with the key.


CHECKMULTISIG a worked out example I was wondering if somebody could point me to or give me a worked out example of how OP_CHECKMULTISIG works behind the curtains?

I expect that CHECKMULTISIG will call the CHECKSIG function and manipulate the stack to run CHECKSIG in a loop until it terminates and either has its M-out-of-N valid sigs or not?

But how exactly does it work? E.g. for 2-of-3 multisig. If we have OP_0 (sig1) (sig2) in the scriptSig, then the stack will look like:

(sig2)
(sig1)
0

Now from the general way of writing CHECKMULTISIG in the scriptPubKey: 2 (pubKey1) (pubKey2) (pubKey3) 3 OP_CHECKMULTISIG, when pushing all the data onto the stack, the stack for the scriptPubKey will look like:

3
(pubKey3)
(pubKey2)
(pubKey1)
2

What exactly will the first step be of CHECKMULTISIG?

Will it pop the "3" from the stack and then maybe check if there are three pubKeys on the stack?

Or will it just pop the "3" and then immediately run CHECKSIG on (sig2) and (pubKey3), which will not be valid, hence CHECKSIG will push a "0" on the stack?

Will then CHECKMULTISIG remove the "0" that CHECKSIG introduced on the stack and try again with (sig2) and (pubKey2)? Since this is valid CHECKSIG will push a "1" on the stack, but where does CHECKMULTISIG store this "1"?

And will CHECKMULTISIG at the end count how many "1"'s CHECKSIG made and this number must correspond to the last value on the stack, in this case "2", but in general "M"?

I would really like to find a low-level description of CHECKMULTISIG, similarly to the one I could find for CHECKSIG:
https://en.bitcoin.it/wiki/OP_CHECKSIG

Any help would be very appreciated!

I expect that CHECKMULTISIG will call the CHECKSIG function and manipulate the stack to run CHECKSIG in a loop until it terminates and either has its M-out-of-N valid sigs or not?

That's not really how it's implemented internally, so there are a couple of pitfalls if you imagine it operating like that.

OP_CHECKMULTISIG

Here's the high-level description of how it works:

Pop n off of the stack (number of public keys)
Pop n public keys off of the stack.
Pop m off of the stack (number of required signatures)
Pop m signatures off of the stack.
Pop one more element off of the stack, and ignore it. (This is a bug, but it can't be fixed because this is consensus-critical code.)
Loop through all of the public keys, starting with the keys at the top of the stack.

For each public key, check a single signature.
For the first public key checked, start with the signature closest to the top of the stack.
If it fails to verify, go to the next public key and check the same signature.
If it succeeds, go to the next public key with the next signature.

Note that the signatures need to be in the same order as the key's that they're signing for.

If all of the signatures succeeded with one of the keys, CHECKMULTISIG returns 1, otherwise 0.

Your example

You've got this scriptSig:

    (sig2)
    (sig1)
    0

This scriptPubKey:

    3
    (pubKey3)
    (pubKey2)
    (pubKey1)
    2

When executing, the stack looks like this just before OP_CHECKMULTISIG executes:

    3
    (pubKey3)
    (pubKey2)
    (pubKey1)
    2
    (sig2)
    (sig1)
    0

This is what it looks like after initializing:

n->    3
ikey-> (pubKey3)
       (pubKey2)
       (pubKey1)
m->    2
isig-> (sig2)
       (sig1)
       0

It tries to verify pubKey3 against sig2, but that fails. Advance ikey, but not isig:

n->    3
       (pubKey3)
ikey-> (pubKey2)
       (pubKey1)
m->    2
isig-> (sig2)
       (sig1)
       0

Verifying pubKey2 against sig2 suceeds, so you advance both ikey and isig:

n->    3
       (pubKey3)
       (pubKey2)
ikey-> (pubKey1)
m->    2
       (sig2)
isig-> (sig1)
       0

...and so on.


calling importaddress with same address While experimenting with importing addresses and keys via json rpc I noticed that importing an address twice triggers two rescans. This strikes me as very odd. My question is:

Is this intended behaviour and if so, what is the reasoning behind it?
OR: Is this a bug? If so, is it a known bug?

Calling importaddress will rescan the whole blockchain in default according to bitcoin.org

  Set rescan parameter to false to not rescan the block database
  (rescanning can be performed at any time by restarting Bitcoin Core
  with the -rescan command-line argument). Rescanning may take several
  minutes.

  help importaddress

  importaddress "address" ( "label" rescan p2sh )

  Adds a script (in hex) or address that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.

  Arguments:
  1. "script"           (string, required) The hex-encoded script (or address)
  2. "label"            (string, optional, default="") An optional label
  3. rescan               (boolean, optional, default=true) Rescan the wallet for transactions
  4. p2sh                 (boolean, optional, default=false) Add the P2SH version of the script as well

  Note: This call can take minutes to complete if rescan is true, during that time, other rpc calls may report that the imported address exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.
  If you have the full public key, you should call importpubkey instead of this.

  Note: If you import a non-standard raw script in hex form, outputs sending to it will be treated as change, and not show up in many RPCs.

  Examples:

  Import a script with rescan
  bitcoin-cli importaddress "myscript"

  Import using a label without rescan
  bitcoin-cli importaddress "myscript" "testing" false

UPDATE Since Bitcoin core v0.14 you can use importmulti to import addresses.

bitcoin-cli importmulti '
  [
    {
      "scriptPubKey" : { "address": "1NL9w5fP9kX2D9ToNZPxaiwFJCngNYEYJo" },
      "timestamp" : "0",
      "label" : "Personal",
      "watchonly": true
    },
    {
      "scriptPubKey" : "76a9149e857da0a5b397559c78c98c9d3f7f655d19c68688ac",
      "timestamp" : 1493912405,
      "label" : "TestFailure"
    }
  ]' '{ "rescan": true }'

Response:

 [
{
  "success": true
},
{
  "success": false,
  "error": {
  "code": -8,
  "message": "Internal must be set for hex scriptPubKey"
  }
}
]

Note:

Bech32 addresses are not supported using this method until the moment. (You're free to edit this answer when it's available.)
importmulti will not speed up importing progress since this method locks your wallet and block any further RPC calls.


How do I get bitcoin price without any external source? I have searched the Internet for solution but could not find the one I was looking for.

I want to get bitcoin price (in usd) without using any external website (meaning not getting the price using api or something)

I want to "calculate" it myself, since there are websites who display their bitcoin price and it's slightly different from other websites I guess they found the price from their own.

How can I find the bitcoin price by myself?

The bitcoin price is determined by a free market of buyers and sellers. There is no way to calculate the price on your own without an external source. I suppose the only exception to this would be if you ran your own bitcoin exchange and you had enough users and volume to produce a fair market price.


What is the block / confirmation time for NXT coin? what is the block time to get my transaction confirmation? Do i still have to wait 10+ minutes to make sure a double spend didnt happen?

Transactions are being included into blocks in 1 minute in average. Longer you wait - higher a chance that a double-spending won't happen. There is no such a number that guarantees 100% irreversibility.

1 confirmation is not secure at all. 10 confirmations is recommended for small amounts, 720 confirmations - for big ones.


How are nonces decided in mining? I know that when I create a new block in a Bitcoin network, I change the nonce value to generate a block.

The question is, do you randomly assign the values you assign to nonces? Or do you start with the number one?

Some people say that they are random,

Some people say they start with the number 1 using the hash cache algorithm.

Who is right?

If both of you are right,

In the case of solo mining, randomly assign a value to nonces,

In pooled mining, do you distribute the numbers among the participants and increase them one by one?

Most mining implementations, solo or pooled, will start from 0 and increment the nonce value. In 2018 (and in recent years) ASIC miners are so fast that all possible nonce values are tried in practically no time. To get around this nonce-space exhaustion, the extraNonce value in the coinbase tx is updated once the nonce space has run out.

A pool can be thought of as multiple solo miners working in parallel.

Since ASICs are so fast, it doesn't make sense to have every worked mining on the same block template with only different nonce ranges (worker one on nonce 0-99, worker 2 on 100-199 etc.), since they will all quickly exhaust their own nonce space and start overlapping.

Instead, mining pools will send different block templates to each (or the majority, at least) of workers. The only difference is usually some transactions, which then change the merkle root. Thus, all workers are effectively mining a unique block, but all at the same height. If any worker solves a block, the pool will win that block.

Lastly, in addition to the nonce, the timestamp value is also updated every second, which allows you to retry the nonce space once again, since the header has changed.


Why would a transaction take 90 minutes to get confirmed? I'm just starting out with alt-coins, and have executed a few transactions with both bitcoin and dogecoin and they all seem to "go through" in less than a minute. I've transferred small amounts between wallets (my own) done some gambling and everything seems to transact within 2 minutes tops.

I just made a small deposit to cryptsy and it took 90 minutes to get confirmed. I'm wondering why it took so long this time. (FWIW I do have 3 wallets up right now, Bitcoin-QT, Multibit, and Dogecoin-QT, if that matters.) My network connection seems to be working normally.

My wallet indicated it was confirming (1 of 6, 2 of 6, etc.) and I've never seen that before.

Any clues, anyone?

Bitcoin has longer confirmation times than many altcoins like Litecoin or Dogecoin, and different services make their own choices about how many confirmations to require before a deposit is made available for use.

While you can see a new transaction on the network almost instantly, many services require six confirmations to prevent double-spending.  With Bitcoin, six confirmations will commonly require an hour and perhaps more if no transaction fee was added.

Given the description, it leads me to believe that Cryptsy wanted to see six confirmations before making your deposit available to you on the Cryptsy site. It's not really unusual to see that take the 90 minute wait you experienced.


Whats the minimum recommended output for a faucet-like system? (April 2017) I am building a software to involve friends. I am testing it.
I made several sendmany transactions with 43478 Satoshi.
I wont be using high fee Bitcoin system man.......

There are better things coming... like Nimiq... still waiting to see the real thing come out in the following months... sure creating a faucet like system.... or mining for movies... or anything...

I would say $0.05 cents a day? total of $10usd daily among different ip's... this could be hacked...

Faucets in Bitcoin are outdated and economically infeasible today. Fees have been floating between 100 to 300 satoshi/byte. On some weekends they may drop to 20 satoshi/byte for a few hours.

To create a minimal transaction with one input and one output, you already have to purchase 10+148+34=192 byte. Even at only 100 satoshi/byte fee, half of an output with 43,478 satoshi would be consumed in transaction fee. Considering that you already paid for the output to be created, even with batching that's already ~60% of the value lost to fees. Unless you're about to dish out larger amounts, that's going to create more frustration than awe— and who would pay for that?


Generate public/private key for bitcoin with openssl I want to understand how bitcoin works and I do not trust tools or bitcoin platforms.
I have read this on Internet. Can you confirm me this lines are generating a bitcoin public/private key safely ?
openssl ecparam -genkey -name secp256k1 -rand /dev/urandom -out tmp_private.txt
openssl ec -in tmp_private.txt -outform DER \
    | tail -c +8 | head -c 32 | xxd -p -c 32 > private.txt
openssl ec -in tmp_private.txt -pubout -outform DER \
    | tail -c 65 | xxd -p -c 65 > public.txt
rm tmp_private.txt

I know it is not a good thing to store private key in a basic clear text file, I just want to know if the way generating the key is good.
Is there an openssl command which can generate a bitcoin address from public.txt file?

Yes, it's randomness is trustworthy, so it's safe.

The only problem I see is that "rm" does not remove all of its traces from the hard drive. The private key may be recovered. The pedantic way to erase such secrets is to use the Gutmann method which overwrites files 35 times.

To derive the address you need to use something like https://bitcoin.stackexchange.com/a/67093


Mt. Gox API - getting confirmation of a trade order I want to place a trade order at market price from an existing wallet in some auxiliary currency. After a successfull trade, I need to do some other work (fullfillment).

However, I'm having trouble figuring out whether my order went successfull :(

For instance, when the wallet in the auxiliary currency is empty or too low (and the order should fail), I'm getting the exact same response that I'm getting upon a successfull trade:

$response = {
          'data' => 'XXXXXX-XXXX-XXXX-XXXX-XXXXXXX', ## not actual order id/oid
          'result' => 'success'
        };

What's the way I'm supposed to check for a successfull trade?

The success message is telling you that your request to place an order was successful, not that the order has been fulfilled.  For that, you have to poll money/order/result.

Also, I use the order submission API in V2 and it does respond with an insufficient funds error.  If you're using the older V0/V1 APIs, you may want to upgrade.


Signing transactions can not find private key Please I need help. I have made an transaction online using bitcoin, but the order cancelled and now my bitcoins are stuck. I've been using coinb.in the first time a while ago and was able to do it successfully. Now the private key is not letting me pass the same one I used last time. What can I do to get back my bitcoins?

I've been using Electrum wallet since.
I'm trying to explain my situation better.
So this is where it starts this is my cancelled order. I've redacted parts of them, but you hopefully get the idea.
My order site has refund information as you can see from the picture. So what I did last time was using coinb.in and it worked. I copy this
code of numbers given to coinb.in.
https://postimg.cc/34wht4xM
Coinb.in recognizes the transaction. The address I used with my Electrum wallet is there.
https://postimg.cc/grq5xkz8
The next step is to sign the transaction with my private key. I remembered I have a file saved on my computer with my private key information. I have saved my private key and all PGP key password information on my computer and been using this the last 3-4 years. So I opened it and used the private key to which it wasn't recognized.
This is my saved private key information.
https://postimg.cc/bG9Csm88
Previously on the vendors website I'd save my bitcoin refund address and public key. The public key matches, but the address is different, because the new Electrum I updated in the past changes my Electrum receive address.
https://postimg.cc/62DYPgfr
Anyway, when I enter the private key from my saved note the following occurs:
https://postimg.cc/627MYtn6
So then what I did was I looked up all my addresses on my Electrum wallet and I found the one I did the transaction and it has the private key next to it like in the picture here:
https://postimg.cc/3kK9zgmc
I typed in this private key, but I still can't verify:
https://postimg.cc/627MYtn6
So my bitcoins are stuck now and I don't know what to do how to get them back IF.....
I hope I've explained myself better. What do you think I should do now?


Sending bitcoins to an un-owned, well-formed wallet This is a follow-up question to: What happens if I mistype the address when making a payment?.

Scenario:

You're trying to send bitcoins to an address.
You type in the wrong address, but the address (as unlikely as it may be) is well-formed.

What Happens?

The wallet belongs to someone and you've just sent him money. (Can one contact this person and ask for it to be returned?) The key phrase is "can one contact" not "can you force him to give it back."
The wallet (as seen in the quote below) is unowned and the bitcoins are lost!?!

  Bitcoin addresses contain a built-in check code, so it's generally not possible to send Bitcoins to a mistyped address. However, if the address is well-formed but no one owns it (or the owner lost their wallet.dat), any coins sent to that address will be lost forever.
  https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses

Is it lost? Or, if and when, this wallet is created are the "missing" bitcoins attached to it?

The wallet belongs to someone and you've just sent him money. (Can one
  contact this person and ask for it to be returned?) The key phrase is
  "can one contact" not "can you force him to give it back."

Not unless the owner of that address has publicly stated that she owns that address (perhaps on her blog or on a forum? Try googling).

  The wallet (as seen in the quote below) is unowned and is lost!?!

If the receiving address is valid and has not been used (you can find out from any online blockchain explorer), then it is highly likely that you've sent your coins to an address that nobody can claim (yet). In fact, it is almost certain that nobody will ever be able to generate a private key for that address. Therefore those coins will most likely be stuck in that address forever.

However, if the receiving address has been used, then there's a possibility of you getting in touch with that person and hope for her kindness. The problem is that there's no facility in Bitcoin for getting to know the identity behind a bitcoin address unless they explicitly provide this information.


Does sending the "max amount" with given feerate require crafting the transaction twice? To make a transaction of "max amount" with a given feerate, is there a shorter procedure than the following?

Craft transaction with with one output
Sign it
Consider the signed length - multiply it with the feerate
Subtract the difference
Set the dest amount
Re-sign it

No, you shouldn't need to sign the transaction until it's completely crafted. Bitcoin core can handle this for you!
An easier flow when creating a transaction is

Create raw transaction. Don't add any inputs yet.
Fund raw transaction. This will select inputs for you. Add subtractFeeFromOutputs of the output you want to subtract the final fee from. The docs on subtractFeeFromOutputs is a bit confusing, but it wants you to specify which output(vout) the fee should be deducted from. If you specify multiple outputs, the fee is spread equally across the outputs. Bitcoin core will amend the amount in the output(s) you specified.
Sign your raw transcation. Voila, you're done!


The problem is when you createrawtransaction it never gets transmitted/relayed to the network. If you look at the bitcoin wiki for the rawtransaction you can see:

createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...}
Create a transaction spending given inputs (array of objects containing transaction outputs to spend), sending to given address(es). Returns the hex-encoded transaction in a string. Note that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network.

same with signrawtransaction, it signs the create transacition that is stored in the leveldb or whatever db bitcoin uses but is not transmitted to the network.

Only when you issue the command sendrawtransaction does the signed transaction get transmitted to the peers.

Hope I answered your question!


How are block interval, block size and effective throughput related? I have two questions:

Why does the effective throughput (as defined below) decreases when the block interval is decreased?
How does a reduction in the block size results in maintaining a high effective throughput?

The origin of these questions is as follows.
First, this paper about Scaling Decentralized Blockchains says:

  To improve the system’s latency, we can in principle simply
  reduce the block interval. To do so while retaining high effective throughput,
  however, would also require a reduction in the block size.

which implies that the effective throughput decreases when the block interval is decreased. This results in my first question.

Second, they define effective throughput as follows:

X% effective throughput := (block size)/(X% block propagation delay)

This formula indicates a decrease in effective throughput when the block size is decreased, while their goal is the opposite, i.e. maintaining a high effective throughput (by decreasing the block size). This is what my second question is about.

First off, it is worth noting: this paper is not only talking about throughput in the 'transactions/second' sense, it is also addressing the effects of block size and interval on the network's latency (which is an important factor in scaling blockchain networks). The authors define 'effective throughput' as:

Our  results  hinge  on  the  key  metric  of effective  throughput in  the  overlay network,  which  we  define  here  as  which  blocks  propagate  within  an  average block interval period the percentage of nodes to.

I find this confusingly written, but understand it to mean "within the period of time defined by the average block interval, what percentage of the network's nodes will have received and validated the most recent block".
As a simple example of why this metric is important: if only 50% of nodes can download and validate blockheight X before blockheight X+1 is mined, then the other 50% of nodes will be continuously playing catch-up, and will not be able to meaningfully contribute to the network. This hurts network decentralization, as less users will be able to directly participate in the network.

Why does the effective throughput (as defined below) decreases when the block interval is decreased?

To understand this, consider an extreme example: a blockchain with 1GB blocks every 10 minutes. In order for nodes on the network to stay in sync with the chain, they will need to download and verify the validity of 1GB worth of blockdata every 10 mins. Any nodes which cannot do this, will decrease the 'effective throughput' of the network.
So now, consider what happens if you decrease the block interval to 1 min. Suddenly, a lot of nodes that could download and process that data within 10 mins will no longer be able to keep up with the rest of the network, since they now only have 1 min to do the same. Thus, our 'effective throughput' has decreased, since a much smaller percent of nodes will be able to engage and contribute to the network.

How does a reduction in the block size results in maintaining a high effective throughput?

I think your confusion here comes from thinking about throughput in terms of 'transactions/second'. Decreasing the blocksize would result in less transactions/second, but it would also mean a node would have to download and validate less data per block interval. In relation to the author's definition of 'effective throughput', we see that lowering the resource requirements for a node will allow more nodes to join the network.

Second, they define effective throughput as follows:
X% effective throughput := (block size)/(X% block propagation delay)
This formula indicates a decrease in effective throughput when the block size is decreased, while their goal is the opposite, i.e. maintaining a high effective throughput (by decreasing the block size).

Decreasing the block size variable would also affect the X% block propagation delay variable. So if a lower block size results in a higher throughput, we would expect that the X% block propagation delay would see a larger relative decrease than the decrease in block size.


Do Receive addresses generated by blockchain.info's wallet expire with time? Sender sent me BTC yesterday. I am expecting a deposit to my blockchain.info wallet but that has not happened in the past 20 hours.

I didn't give the sender my public address, but the receive address generated by the "Receive" button on the wallet.

Do those addresses expire? I gave the Receive addresses 6-8 weeks ago. Is it possible that the addresses generated by "Receive" button expire in 6-8 weeks time?

If so, can BTC sent to an expired Receive address be recovered?

Addresses do not expire, regardless of the wallet that generated them.


Bitstamp.net API Realtime I am testing out the BitMap API, and my get function to get the ticker looks something like this

 r = requests.get("https://www.bitstamp.net/api/ticker/", proxies=self.proxydict)
        if r.status_code == 200:
            return r.json()
        else:
            r.raise_for_status()

However, I notice the "last" price it returns is always a little different than the one shown here (https://www.bitstamp.net/) Is the API realtime? Or is it lagging behind the actual price.

Thanks!

I wonder if this is due to the fact that prices can change very rapidly if many orders are executed in a short period of time.

In my tests both prices are the same, and none seem to lag after the other.


How do you resend a transaction without running a full node? The answers to the canonical "my transaction has been pending for too long" question require hundreds of GB of hard drive and bandwidth. I cannot meet such requirements to run a full node.

How can a 15 sat/B, 389 B Segwit unconfirmed transaction to Coinbase be replaced (transaction inputs double-spent?) with a higher transaction fee without downloading the entire blockchain on a full node?

You can use any software which is capable of broadcasting a transaction. This could be another wallet software such as Electrum or a command line tool like bitcoin-submittx.


Transactions with multiple input UTXOs and multiple output UTXOs Suppose a transaction t has 5 input UTXOs each worth 1 BTC, each unlocked by a different sending address Ai.

The outputs of that transaction are 10 UTXOs of 0.5BTC each, each locked by a different receiving address Ao.

Is it correct to posit that each of the Ai sent 0.1 BTC to each Ao? (Lets ignore the existence of transaction fee).

I don't think you can make that assumption with any certainty. You can fairly easily invent other explanations that are equally valid (though probably much less likely)

For example, this transaction might be created by a 23292 member club with an annual subscription of 1 BTC that sends prizes of 0.5 BTC to ten winners of their monthly competition. There would be no real-world transaction that links one specific subscriber with two specific prize-winners.

The blockchain certainly doesn't assign inputs to outputs. The only requirement is that the sum of inputs cannot exceed the sum of outputs (and usually the sum of outputs is less than the sum of inputs - the difference being the mining fee)

This may be clearer if you just think of this as a record of a fiat cash transaction. If I hand out $1 banknotes to ten people, the various five people who each gave me a couple of $1 banknotes in change have no involvement in my later transaction. The sources, sizes or sequence of the inputs are not relevant.


0/unconfirmed and cannot find my bitcoin folder (Mac) I'm running OSX 10.7 and the newest version of Bitcoin-Qt. I put Bitcoin-Qt on my desktop, and found an old wallet.dat that was saved on a USB. I 'opened with' Bitcoin-qt, saw my balance, and tried a transaction before the most recent block was downloaded.

Now, after the entire blockchain has been downloaded, I see that my transaction is 0/unconfirmed. It's been a couple of days now.

In an attempt to get to the bottom of this, I read that it's best to find the bitoin folder in Application Data/Bitcoin, however there is no Bitcoin folder in application data. I've tried deleting the bitcoin client and downloading a new one, but the freshly downloaded bitcoin client is still using the wallet.dat from the USB stick. (the USB is not connected).

My question is, how do I find the bitcoin folder on Lion, so I can start over. I know not to delete the wallet.dat file when I do find it...

Oh, I've enabled my mac to see all hidden folders, just in case.

The standard command-line client keeps it in ~/Library/Application Support/Bitcoin, at least on 10.6.

I don't know about bitcoin-qt, but some very broken applications keep the data inside the .app itself (right click, "show package contents").

Another typical unix configuration spot is ~/.program_name.


Is it possible to mine using Asics on AWS? As title says, I would like to know if mining with asics on aws is possible and how to do it? I don't mean profit because I don't really care and only do it for fun. Thanks!

AWS does not offer any ASICs, so no.

ASICs are special machines, with specialized hardware. You would need to physically buy one to use it. Anyone offering any form of cloud mining is trying to scam you.


Why do web wallets using multi-signature need 1 of N keys? I've been researching multi-signature transactions and am wondering, as the title says, why a web wallet offering multi-signature transactions (2-of-3, for example) like blockchain.info would need any of your private keys at all. From what I understand, it looks like multi-signature 2-of-3 addresses require three public keys to generate, and are spent via raw transactions.

So why do these services not allow you to keep all three keys?

Is there some reason that one of the keys must be kept by the wallet provider? It doesn't seem like any of the keys are required to be in the provider's wallet so long as they are available to sign the raw transaction before sending -- and in theory the raw transaction could be created by the client in the browser and submitted for transmission via sendrawtransaction without involving the provider in any sense other than raw connectivity to the network.

What am I missing?

From what I understand, it looks like multi-signature 2-of-3 addresses require three public keys to generate

The requirement is for private keys, the public keys are well, public: everybody knows them. A 2 of 3 script requires that any two of the three mentioned keys is needed, and you can use variations of this such as 2 of 2, 3 of 3, 1 of 3, etc.

  are spent via raw transactions

It's also worth nothing that "raw transactions" is just a term used in Bitcoin Core when taking about anything which is not Pay to Pubkey Hash, it's pretty meaningless unless you're talking about the client itself.

  So why do these services not allow you to keep all three keys?

The intention in multi signature wallets is that you can have a requirement for multiple parties to authorize a transaction. In the case of this model, you would have a 2-of-2 system, where there are two parties and both are required to sign in order to spend the related funds. This has the following properties:

The service can not outright steal the money from the user, as the user needs to sign the transaction as well.
The user can have restrictions placed on them by the third party, say, they won't sign transactions which spend more than $10 a day, or without the requirement of additional authorization.
Transactions can be authored in such a way that if the service refuses to sign any transactions (randoms the user, or goes out of business), after a significant passing of time the requirement is reduced to just a single signature from the user.

With these properties you can author very powerful systems with arbitrary spending requirements without risking the loss of money by giving complete of your money to anybody else.

In the case of web wallets however, this system is almost completely snake oil cryptography as the third party is also the one serving the code to the users. At any time they can alter this to different code which just sends the private keys back to them, or blindly signs any transaction they want. There's absolutely no way of making web wallets safe in light of this property.

  So why do these services not allow you to keep all three keys?

Then it would be pointless having multisignature transactions where one party holds all the keys, it would cost a lot less to just use regular transactions. Multisignature scripts tend to have significantly higher costs for use compared with regular transactions.


When you mine bitcoin, where does it come from? When I ask the real concept, that's because I can't understand how those math processing can generate something, I mean, if you think in a way to generate "money". I know it may sound like stupid questions, but I'd like to clarify my ideas.

When you mine bitcoin, where those bitcoins come from? Who put it there?

Thank you!

Short answer, but it really only scratches the surface:

The same process that is called "mining" also creates those Bitcoins. Meaning, you actually create them yourself but it can only done by solving a very difficult mathematical problem. The first one to solve that problem will get the reward. It is also important to mention that by solving of that mathematical problem the integrity of the Bitcon network is created (in terms of secure transactions).
There some exchanges, like Mtgox, BTC-e, Kraken, to name only a few where you can exchange Bitcoin for real money though the process of actually getting the money to your banc account can be very lenghty. There are also also a few Bitcoin ATMs, for instance in Canada of Finland and there are also sites where you can find people in your area who are willing to exchange your Bitcoins for real money.
This is hardcoded in the software used by the computers which creates the Bitcoin network. Roughly every 10 minutes, a new "transaction block" is created and as fixed reward is issued for this task. Currently this reward is 25 BTC but it will get lower continuously until around the year 2140 it will drop to practically zero. At that point 21 million Bitocins will have been created and that is the total sum of all Bitcoins that will ever be created (unless the software used by the Bitcoin nodes is changed in that aspect).

The most important point to realize about Bitcoin and what many people get wrong in the beginning is that there actually is not thing like a "Bitcoin". You do not have some kind of encrypted files in your wallet that represent a Bitcoin. The Bitcoin network essentially is a kind of distributed ledger system that keeps track of all transactions made within that system resulting on certain amounts of "Bitcoin" associated to a certain address (or account number). If you send somebody Bitcoin, you will actually transfer it from one address to another. Do be able to do that, you need to be in the posession of the private key for that address. This private key is what is stored in your wallet.

But you should really check out some of the great resources about that topic. For instance, check these out:

Primer:
http://www.youtube.com/watch?v=Um63OQz3bjo

More In-Depth:
http://www.youtube.com/watch?v=O0oDDIy0P2s


Does addressindex works in satoshi Bitcoin-Core? I'm wondering if addressindex in bitcoin config working in satoshi Bitcoin-core app, or just in BitPay bitcoin app.

addressindex
Records all changes to an address for retrieving txids,
balances and unspent outputs for addresses. Changes are stored and
sorted in block order. Both p2sh and p2pkh address types are
supported. The index records two sets of key/value pairs. The first
records all activity and is useful for viewing transaction history and
all changes. The second is specifically for retrieving unspent outputs
by address, and is smaller as values are removed once they are spent.

No, bitcoin core doesn't have such feature.


How do I find a list of all Electrum public servers? I'm developing software that will connect to "Electrum Servers", the same public servers that Electrum Wallet connects to. The user will be able to specify a custom host if  they want, so it will be possible create a server and use it.
The main question is… How can I find the list of all the Electrum servers? I found this page that lists all the servers. How did this website get this information?
How can I create something to automatically get the all the Electrum servers? If I want to create a Website/API to provide this information, how can I get it?

Electrum has a list of default servers which you can find here: https://github.com/spesmilo/electrum/blob/afa1a4d22a31d23d088c6670e1588eed32f7114d/lib/network.py#L57. However there is no list of all Electrum servers just like there is no list of all Bitcoin nodes. This is because Electrum servers are distributed like Bitcoin nodes and anyone can run one. Electrum has a peer discovery protocol which you can read about here: https://github.com/kyuupichan/electrumx/blob/master/docs/PEER_DISCOVERY.rst. The Electrum servers will connect to each other and ask each other for a list of other Electrum servers each peer knows about. So each Electrum server builds up its own database of other Electrum servers. Then when a client connects, it asks the servers it is connected to for a list of other Electrum servers and the client also builds up its own peer database. The message for getting a list of other Electrum servers is servers.peers.subscribe and you can read about that here: https://github.com/kyuupichan/electrumx/blob/master/docs/protocol-methods.rst#serverpeerssubscribe
So if you want to find available Electrum servers, you can begin with the default Electrum servers. Then ask each server for a list of other Electrum servers, connect to those, and so on and so forth. You do this to build up a local database of Electrum servers.


How many combinations are there from the BIP32 mnemonic list? As I understand for BIP32. There are 2048 words.

12 words would give you 2048^12 combinations. However, not all combinations are valid because of the checksum, so how do i calculate the actual space?

BIP 32 is not a mnemonic specification, so it has 0 possible combinations.

I assume you are talking about BIP 39. In that case there are are 2048^12 combinations for 12 word mnemonics, 2048^18 for 18 word mnemonics, and 2048^24 for 24 word mnemonics. However BIP 39 currently supports 8 languages, so there are (2048^12 + 2048^18 + 2048^24)*8 possible combinations.

The checksum doesn't matter because BIP 39 does not specify that the checksum must be enforced. The checksum can be invalid, and all that BIP 39 compliant software should do is show a warning.


Not getting merged mined coins on p2pool I have been able to mine successfully on my bitcoin p2pool. I set up merge mining according to the guide found here https://bitcointalk.org/index.php?topic=62842.0 and everything seems to be running fine. Looking at the screen running p2pool I get messages as such: 2014-01-29 00:18:32.797966 Got new merged mining work!

However, I have been mining and have found at least 15 shares for bitcoin since I have installed, but nothing for the merge mined coins I added:

root@p2pool:~# namecoind listtransactions
[
]
root@p2pool:~# ixcoind listtransactions
[
]

I have been mining to a different address as the user, e.g. cgminer -o mypool.com -u  -p x

Would this be the reason why I am not getting any merged coins? Thanks in advance for your help!

I also do merged mining with p2pool. Keep in mind that you are essentially solo mining for namecoin and iXcoin--when another member of p2pool (not you) finds a winning share that exceeds the target difficulty for bitcoin it isn't usable by you as a winning share for the other coins. So you can't leverage the efforts of the rest of the pool to help you find the other coins.

However if you (or other clients connected to your p2pool node) generate a winning share then you will see the altcoin blocks get generated. Given that you are solo mining for those coins it can take quite awhile before you get a share with high enough difficulty. But I assure you that it works.


Transaction Malleability, if i want to change signature, what part should I change, so that it would remain valid? I know what transaction malleability is, but I don't understand how someone can change my signature so that it would remain valid. For example, If I want to change signature what part should I change, can someone explain this to me? or is there some example of this, I tried to find it but failed.

A signature consists of two numbers r and s. You can change s with N - s (N is the elliptic curve order) and it would still be valid.

Sources of malleability are documented here https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki#motivation


Setting up a multi-signature Bitcoin address with Mycelium I currently have a shared account with my dad with just a cloned copy of the private key and I would like to setup a multi-signature account with him. I'm trying to do this with Mycelium, but I can't seem to figure out how to do it.

My main goal is to be alerted if he spends from the account and I would have to approve of it first and vice versa. When he spends from the account does my wallet get alerted? How does it work on a mobile app?

Mycelium does not yet offer that feature:

https://www.reddit.com/r/Bitcoin/comments/41hzan/is_there_a_way_to_sign_a_multisig_transaction/

There are some mobile wallets that offer multisig now:
https://bitcoin.org/en/choose-your-wallet


What's the easiest way to gather/collect statistics on the bitcoin network? Basically, how does a site like bitcoincharts.com gather its statistics? I like coding in python if you want to offer code examples.

BitcoinCharts doesn't show much from the bitcoin network.  The market data comes from the exchanges.

Bitcoin Charts shares freely their markets and trade history data:

http://bitcoincharts.com/about/markets-api/

The original source for the data is accessed from the exchanges themselves.  Most exchanges do share their data but the API methods are not standard nor consistent between exchanges.

As far as statistics on the blockchain data, the method will vary on which statistic you are trying to get at as some are stored (confirmed transactions), and others are not (e.g., memory pool contents, double spend transaction attempts, etc.)

If you like python, then Armory provides access to the blockchain.  See the Sample Armory code in the extras::

https://github.com/etotheipi/BitcoinArmory/tree/master/extras


How does Open Transactions solve the double spend problem? OT is based on digital cash. From the article:

  To tackle the double spending problem, the payee has to verify the
  coin with the bank at the point of sale in each of the transactions.
  This verification of the legitimacy of the coin requires extra
  bandwidth and is a potential bottleneck of the system especially when
  the traffic is high. The real time verification also means there is a
  need for the synchronization between bank servers.

This is not clear to me. Does the bank know who owns each coin? What exactly does the bank verify? If I try to send the same coin to both Alice and Bob, where exactly would this fail? What knowledge do any of the parties (Alice, Bob, the Bank) gain during this transaction?

When I withdraw 10 clams, my client software generates a random ID:  lkjsdfoiu

It then chooses a random blinding factor, which it keeps secret.

It then blinds the random ID using the blinding factor along with the server's 10-clam public minting key, producing (say): 897345jh

This random, and now blinded, ID is then sent to the OT server along with my withdrawal request.

Once the server verifies that it has successfully withdrawn 10 clams from my account, it uses its 10-clam private minting key to sign the blinded ID:  897345jh SIGNED: Server.

The server returns this to me. My client unblinds it using its secret blinding factor along with the server's 10-clam public minting key:  lkjsdfoiu SIGNED: Server.

When you ask, "Ah-ha-ha, but how can the server's signature still verify, when the ID has changed from 897345jh back to lkjsdfoiu again?" (since it was unblinded) ==> The answer is, that is the whole point of blind signatures. They still work, even after they are unblinded. That is the whole magic of digital cash. (I encourage you to Google "homomorphic encryption" to learn more about the applications for this concept.)

At this point:
1. My client now has a random ID with a valid server signature on it.
2. The server has no idea what that ID is, since the ID was blinded when it was signed.
3. Therefore I and I alone am the only person who knows that ID.
4. When I give the token to Bob who redeems it at the server, the server can see that the token is good (since it has a valid signature.) The server also knows that it's worth 10 clams, since only the 10-clam public key can verify that signature. But the server has no idea where it came from.

Once the server redeems the token for Bob, it records the token's ID (lkjsdfoiu) in a spent token database. This way, if the token is ever redeemed twice, the server can see that it is no good, because it has already been used.

OT expires and rotates cash tokens and mints, in order to allow the server operator to erase its spent token database every few months. Otherwise, the server operator would be forced to store a growing database forever, which is not feasible for a server operator.


Is it possible to reverse a confirmed transaction? I have been scammed by a so-called "trading account manager", he kept stalling until he told me my account had a problem and needed to be "rectified". Then, he told me I had to pay $300 for that, so I'm seek help to regain my funds.

No, a confirmed transaction can not be reversed.


Is there a one-stop shop to introduce businesses to accepting Bitcoin? I'd like to promote Bitcoin in my neighborhood, but I'd also like to do it efficiently... So I'm trying to figure out where and how to direct business owners into a simple A-B-C set of steps that explains everything from the hardware / software to the tax implications / software needed.

I know there exist lists of tools businesses could use, but those lists often seem overwhelming. Any ideas would be appreciated!

I just set up a very website that shows people how they can earn Bitcoins, it's simply called Earn Bitcoins.

Under the downloads section there is a free, easy to use PDF guide that shows brick and mortar shops the advantages of accepting Bitcoins and how they can easily integrate it. Please feel free to use it. I will also publish a print version. The one that's included there right now is better suitable for on-screen reading.

I also run Bitbond.net with my co-founder. We want to use the flyer to spread the word in small shops in Berlin. The plan is simply to walk into shops, show them the flyer and explain them why and how it's good for them to accept Bitcoins. Check out the doc and let me know what you think. :)


What was the first transaction which resulted in the very first bitcoin being mined OK, so I understand that bitcoin in introduced into the system when mining is performed. And mining is a process of adding transactions records to the bitcoin chain of blocks. And transaction (mentioned above) is nothing but bitcoin transactions taking place, which needs to be securely computed and added to the chain of blocks.

Now, my question is when the first bitcoin was rewarded to the first miner (may be the second one, after Satoshi added the main block), what transactions were taking place which needed to be computed and added. Theoretically, there was a point when there were no bitcoins in the network, then how did it start.

It startet with the rewards of the first blocks. After the genesis-block, there were 50 bitcoins in total, after the second block, there were 100 bitcoins in total, 150 after the thrid block...

This is the first block and the only transaction is a coinbase transaction (reward to an address). https://blockchain.info/block/00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048

And the following blocks do all look like that (only the coinbase transaction in all those blocks) until Satoshi made the first transaction from one address to another address (in block #170)


I have free energy; good idea to mine BTC/LTC? I don't need to pay for power to my computer. Is it a good idea to mine LTC or BTC on Intel Core Duo processor?

My CPU is 2 x 2.6GHz  (computer woks 24/7)

Mining on both Bitcoin and Litecoin is now dominated by ASICs. Even with Litecoin, you'd only mine at best about US$0.45 worth in a year.

You should have better luck if you can find a cryptocoin based on something besides SHA-256 or scrypt, for which there is no GPU or ASIC mining, such as Riecoin or Darkcoin. http://cpucoinlist.com/ lists some more CPU-friendly coins.


What prevents a majority attack from undoing transactions of others? From the Wiki:

If the attacker has the majority of computer power, "the attacker can't reverse other people's transactions without their cooperation."

I don't quite understand why this must be the case. Let's say attacker wants to undo a transaction k that happens at block i. Why can't an attacker with a majority of hashing power start mining a block j originating with block i-1 that includes everything but k? Then, the attacker will succeed in the long run and the transaction k no longer appears in the longest chain, right? So I'm not quite sure why you cannot reverse other people's transactions in a majority attack.

Diagram for clarity:

     -i(includes k)
-i-1
     -j(does not include k)...(this chain should be longer w/ majority computing power)

I believe what the wiki is implying, is that the other user's transactions won't be double spent.  Because the attacker does not have the other user's private keys, he can't spend his coins to a new transaction during the attack.  He could prevent those transactions from going into blocks, but still has no access to the coins.  That's what I think is meant by "without their cooperation".


What to do about a "stuck" transaction? I started the standard client with --rescan instead of -rescan after switching wallets and before synchronizing with the latest blockchain, and made an going transaction.

This transaction got "stuck", never validating, even after the client caught up with the chain, after multiple restarts (last one with -rescan). I now have a too high balance shown in the client, and the tx never went out (I checked it in Blockchain.info).

After the blockchain was synchronized, I create another similar tx (same amount and target address), and that one went through ... but the bad tx is still shown in my client.

What should I do about it?

I believe your options are to:

Upgrade to Bitcoin-Qt/bitcoind v0.9 or greater, which takes care of this situation.
Live with it as-is (showing an 0/unconfirmed that will never confirm)
Transfer funds elsewhere and abandon your wallet
Export your keys and import them into another wallet, perhaps a new one
Perform wallet surgery (pywallet to remove the private key used in the double spend, rescan, then import it back in.  Instructions).


How exactly does -rescan work? -rescan is a command line argument that is passed to the bitcoin client after restoring wallet.dat from backup.

Which files get recalculated?
Which files does the rescan command read?
Why is it a good practice to first download all the blocks, then rescan, and not the other way around? (as a comment on this answer suggests)

The bitcoin client stores, in the wallet, the transactions that affect coins it manages. If it sees a new transaction, it checks to see if that transaction affects any accounts stored in the wallet. If so, the wallet is updated. Similarly, if the chain is reorganized, the wallet is updated.

However, the client doesn't check to make sure the wallet is synchronized to the current block chain. To fix this, the rescan command can be used. This causes the client, on startup, to go through every single block it has downloaded, search for transactions affecting accounts in the wallet, and update the wallet's transaction store and balances to reflect that transaction.

There are a few cases when you definitely need to rescan. For example:

If you restore a backed up wallet, it will be missing any transactions in blocks you downloaded after you backed up the wallet. Since the client won't receive those blocks (since it already has them) the normal wallet update logic won't fix this. You will need to rescan.

If you modify your wallet, say by adding keys to it or removing transactions from it, the wallet update logic won't see the transactions. So if you use a program other than the client to modify your wallet, you will need to rescan.

Theoretically, it shouldn't matter whether you download all the blocks and then rescan or vice-versa. The client won't download blocks while it's rescanning. And newly-downloaded blocks should update the wallet anyway. The logic is basically that this ensures the rescan process sees the blocks containing any missing transactions, rather than the regular block update logic. (They should both work. But if you need to rescan, we know something's wrong anyway.)


How do you delete an account in Bitcoin Core? I am attempting to allow multiple bitcoin addresses to be created per account, but how can I delete them using the standard API? There doesn't seem to be a function for that.

E.g. the acccount "Test" :

Array (
[0] => 1JQQXBRrG5h7uW8StVtJRcGEdb4YYTqnas
[1] => 1LP8VeKDNKAgErCnYVAFvGMnrGbM3oHe6u
[2] => 1LwTx3a7hy4FZ5EJMxcPnRG9ap8AUwd2cm
[3] => 1AtbnW8dPuzp6jVnAvipiJR4o1BupCcU8D
[4] => 1K7FyNgmJ4ryjKgNz9ybxzQcYrGDEbYEUX
[5] => 1Ng77Nq1SF46MDZnz4pEirCEbbiHZ1Wthp
[6] => 175FKAiJSC9wA12BPcYZD6drTYLxXXChdZ
)

What if the user just wants to delete 1JQQXBRrG5h7uW8StVtJRcGEdb4YYTqnas?

Cheers!

bitcoind does not allow you to delete addresses. (If it did, the next question people would ask is, "How do I undelete addresses?" :))

However, you can use the rpc call setaccount to change the account associated with the address. The first argument to setaccount should the the address you're changing; the second shound be the account you're moving it to. (If you want to move it to the default account, put "" as the second argument.)

Note that this does not change the balance of the account; balances are tracked internally. If you want to keep this consistent, run getreceivedbyaddress, then move that balance to the new account.

You can also use PyWallet to delete addresses permanently. Use the --multidelete option, and pass it a path to a file. That file should contain key as the first line, followed by each address you want to delete, each on a new line.


Does xmr-stak use Stratum? Using Wireshark to analyze packets sent by xmr-stak, I found them to be inconsistent with those of Stratum (https://en.bitcoin.it/wiki/Stratum_mining_protocol).

From Wireshark:

{
  "method": "login",
  "params": {
    "login": "33vberEwdZYECfGsbqNJQC7M1MCHYT9Mjm.alpha0",
    "pass": "x",
    "rigid": "",
    "agent": "xmr-stak/2.4.2/e10e8e6/master/lin/nvidia-cpu/aeon-cryptonight-monero/0"
  },
  "id": 1
}

According to Stratum documentation:

{
  "method": "mining.authorize",
  "params": [
    "33vberEwdZYECfGsbqNJQC7M1MCHYT9Mjm.alpha0",
    "x"
  ]
}

If not, what protocol does xmr-stak use?

Yes Monero mining pools generally use the Stratum protocol for communication between the pool and the miners. However a modified version of the Stratum protocol is used. I've yet find proper documentation like the one you've linked, so your best bet is to look through the source code for the exact definition.

Also there is a separate Stackexchange for the Monero community, so your likely to get even better help there.


Ripple: what’s the difference between “block” and “ledger” I have heard many times that Ripple changed the concept of Blocks for Ledgers.

What would be the difference between a bitcoin block and a ripple ledger?

Bitcoin

In bitcoin, there is no concept of accounts, users, balances and payments. The bitcoin blockchain just stores the history of all the transactions that have happened. Each block contains transactions that were mined in that block. A particular block does not contain any details of the transactions included in the previous blocks (just the previous block header hash which links it to the previous block). When someone says that his wallet has a balance of 1 BTC, it only means that his wallet contains private keys that satisfies the unlocking condition (signature) to spend that 1 BTC. For example, to get your balance related to the private key, you will need to scan across all the blocks that have been mined and find out the transactions that can be unlocked with your private key signature (SPV nodes do this by connecting to a full node and use bloom filters, but that is a matter of discussion for other day).

Ripple

Ripple follows a ledger mechanism. By this we mean that unlike bitcoin blockchain which stores only the transactions, Ripple store account info such as the balances. So the ledger is a point in time snapshot of all the balances held by all the addresses. Each ledger has a version which is progressed by 1 as the ledger gets updated. If you want to get say your account balance, you can just download the latest ledger and need not download the previous versions of it. (You might only want to download the previous versions of the ledger in case you want to audit the ledger)


looking for api for huobi.com for last price data I'm looking for last price data from huobi.com.

Does anyone know where I can get data from an API for them?

Huobi is the largest Bitcoin exchange in China and I'm looking to add them to http://tradeli.st