where can I find a chart or data showing total Multibit dowloads? I'm looking to see the total downloads for Multibit like what was in the Coindesk article earlier this year. Ideally I'd see them by month. Any sources out there?


Bitcoin Price Fluctuations Does anyone have any hard data on bitcoin price fluctuations in relation to time of day and/or week?

Possibly the hardest data you can get is the details about every individual trade on MtGox. Using the API you can get the trades and then build any derived information you'd need. The data is complete except for the depth information which would be of little use compared to the sheer size.

Mt.Gox currently dictates the price, being the biggest market, but you could certainly splice in additional information from other markets as well.


Can I CPU mine other coins to win Bitcoins? I have a useless Nvidia, until now, unconfigurable to mine (7300)

So, if I mine just with CPU, can I get more coins mining others coins like NMC,LQC,LTC,SC, or whatever, and trading after for BTCs?

This is largely what the sCrypt() based forks are intended for - both utilizing un-tapped CPU power on dedicated rigs or allowing casual miners to use their CPUs. At present, the difficulty on the Bitcoin network is so high that it's not even a question of profitability but capability - even with pooled mining, CPU mining is so slow that you may not actually submit even a single share for each round. That said, let's do the math. I'll use Tenebrix (TBX) as an example since I have numbers handy for it.

Keep in mind that the numbers presented are based on difficulties and exchange rates right now and as such will change. I will provide sources for all values and calculations so that you can re-calculate at any time.

A decent dual-core CPU will net you about 3 kH/s on Tenebrix (0.003 MH/s) and our friend the Bitcoin Mining Calculator says that at the current difficulty of 0.288 you should mine 10.48 TBX per day. BTC-E has the current TBX/BTC exchange rate at 0.000195, so that's worth 0.0020436 BTC per day. The same math could be done for FairBrix, LTC or any other sCrypt() derived forks.

Now for the BTC side of the fence: At the current difficulty of 1379647.43921 (auto-populated in the calculator, but available from the same blockexplorer clone I linked earlier) the same CPU will run about 3 MH/s on the Bitcoin network worth approximately 0.00219 BTC, roughly the same result.

So there's your (hopefully future-proof) answer: let the math guide you. As of this exact moment, mining TBX about the same efficiency though you'll probably see smoother returns with an sCrypt() fork (i.e. more shares per hour)


What is the probability of forking in blockchain? Is there any general formula that allows someone to calculate what is the current probability of having a chain fork?

I know that the probability of finding a new block is proportional to the difficulty target. Given that it's possible to have 2^256 different hashes (for simplification), finding a nonce that will yield a hash lower than target has probability of approximately P(m) = (2^256 - target)/2^256.

Given that a block will be mined within 10 minutes and considering that a delay of 2 seconds would be small enough for the newtwork propagation not being complete, that is, if two nodes find a block 2 seconds appart, there would be no time to notify the full network.

Here is when it gets complicated to me (statistics is not strong with me). What is the probability of the situation described above occur?

I think this is something related with a normal distribution, but I'm not sure.

My rational to find the probability of forking would be:

P(fork) = P(m1) * P(m2) * P(tdse)

Where P(m1) is the probability of node 1 to find a new block, P(m2) the same for node 2 and P(tdse) is the probability of both mining occur with a time difference small enough to not be propagated to the entire network.

Actually, it is not related to the difficulty at all, rather just related to the expected time until the next block is found.

Block finding is a Poisson process.

The probability of x blocks occuring in the amount of time we'd expect λ blocks occuring therefore is:

In ideal conditions, we expect one block per ten minutes, i.e. 600 seconds. Therefore in 2 seconds we'd expect 1/300 blocks occuring.

p(2|1/300) evaluates to approximately 5.54*10-6 which is about 0.000554%, i.e. we'd expect two blocks to occur within two seconds once every 180k blocks or every ~3.4 years.

More exciting are ten seconds which has a probability of about 0.00014, i.e. we'd expect two blocks within ten seconds to happen once every 7000 blocks, i.e. roughly every seven weeks.


Bitcoin fake transactions Suppose, A and B are malicious attackers. Both want to send unlimited fake transactions to each other. I know that the transactions won't be accepted in the blockchain. In fact, they don't want their transactions to be mined. But, is there any way to take a countermeasure against A and B? And, what will be the cost?

The countermeasure is built in the system. All non malicious nodes would instantly discard the fake transactions.
I don't understand the problem statement though, like why would any one want to broadcast fake transactions without any motive that it gets mined.


Why are Lighthouse campaigns limited to 684 pledges? I'm curious to why is there a 684 transaction limit for each campaign when using the lighthouse crowd funding app. If I was wanting to raise 25 BTC for a project, the minimum that someone that would have to fund me is .036 (about $10 today). This leaves out the ability for people wanting to fund $1-$5. Just curious to why is there that limit and why wont it enable smaller amounts? I was contemplating on using lighthouse or nxt's monetary system.

Lighthouse's Frequently Asked Questions (FAQ) says:

  Currently you cannot accept more than 684 pledges for your project. This is due to limitations in the Bitcoin protocol - the final contract that claims the pledges is a single Bitcoin transaction, and thus is limited to 500 kilobytes by the Bitcoin block size and protocol relay rules.

Note: "500 kilobytes" is a typo---I just confirmed this via email with Lighthouse author Mike Hearn.  The correct size for standard transactions is 100 KB.  Mike is also thinking about bumping up the standard size in his Bitcoin XT project to allow miners to opt-in to the larger size.  (That hard limit, for now, is slightly less than 1 megabyte---a whole block.)

Of that 100 KB, a small part is the output (TxOut) that pays the receiver of the funds (you, in your case).  If you use a standard P2PKH or P2SH pubkey script, the output will be 34 bytes or less.  There's also a small part dedicated to the transaction metadata (such as the transaction version number); the size of the metadata varies a bit by how many pledges you get, so lets round it up to 20 bytes.  That leaves 99,946 bytes left for pledges.

99946 / 684 = 146 bytes per plegde (rounded down).  A pledge is a single input (TxIn) that pays the output described above.  The input is (if necessary) pre-spent to ensure it has exactly the pledge amount---that means there's no change output to worry about.  The Lighthouse design document doesn't explicitly say what type of input it spends, but I'll assume it only spends P2PKH inputs using compressed public keys, which are:

36-byte outpoint
up to 72-byte signature
1-byte signature hash
33-byte compressed public key
2 bytes of data pushes

... for a total of 144 bytes.

The Lighthouse FAQ also says in that same section:

  A future version of Lighthouse could optimise its usage of transaction space to bump up the maximum number of pledges by another few hundred.

I suspect the optimization Mike is implying would be using P2PK inputs, which would be:

36-byte outpoint
up to 72-byte signature
1-byte signature hash
1 byte of data pushes

... for a total of 110 bytes.  If implemented, this would allow 99946 / 110 = 908 pledges per transaction, or about a 30% increase.  There are a few other ways to optimize, such as requiring smaller signatures, but these provide rapidly diminishing marginal gains.


What happens if Bitcoin itself is obsoleted by another digital currency? Unless Bitcoin is replaced with a Bitcoin-compatible currency, I believe that all holders of Bitcoin will be out of luck when the day comes that it is obsoleted by a superior system, as inevitably happens in almost everything electronic.

Normally if a new commodity type is introduced into the market (such as the discovery of petroleum), the market will naturally find a new equilibrium, and this is not a problem. Normally when a new fiat currency is created, there is usually an exchange policy in which holders of the old currency are issued units of the new currency, but I don't see how this is possible in systems like Bitcoin. Nobody is going to want to trade units of the superior new system for units of the inferior system if they know that everyone in the world is going to stop accepting the old system soon, so everyone holding Bitcoin at that time will find that their savings are suddenly worthless if they cannot somehow be "brought in" to the new system.

As we know, the entire Bitcoin infrastructure is limited in currency units, which is normally an advantage because it prevents "money printing". Because of this, the only ways I can think of to solve this potential problem is if the new currency system has more units than the old, and when the old system is to be replaced, the developers of both systems coordinate to release a new version of their systems in which the new system is made to be downward compatible with the Bitcoin network, and somehow one unit in the new system is marked as unmineable and is instead replaced with the already mined units from the old currency system, which will probably result in forking both currency systems.

The consequence of NOT replacing one digital currency system with another is that either every new system or fork which gets popular will "print money" due to their creation increasing supply without proportionally increasing, or that innovation in digital currencies must be limited to things which are reasonably compatible with the existing systems. So if this problem cannot be resolved, it either means a slowing of the progress of humanity, or an occasional massive loss of purchasing power punishing whoever is unlucky enough to be a large holder of the old currency at the time that it becomes discontinued.

Is someone working on this problem, or are all the developers of digital currencies like Ripple, Bitcoin, Litecoin, and others simply betting that their system will be the victor for all time?

I certainly disagree that a newer digital currency could be compatible enough that the units would replace bitcoins in some ordered fashion. – In that case bitcoin would be close enough to evolve by update into that system. If one thinks about it that way, this has happened before: The Bitcoin protocol has already gone through some update induced hard forks. – Had at that point a significant portion of the community decided not to upgrade they would essentially have had their own separate version of bitcoin.

So, should a sufficiently superior contender arrive, it would have to compete for the same market and the losing system's units would lose value until an equilibrium were reached or one ceased to exist. However, due to the opensource nature of these projects discoveries made for one system are quickly adopted to others as well, or in other cases the rivalry is not as close as one might think. One must also consider that substantial investments made into existing systems would drive effort for preservation.

For example Bitcoin and it's offsprings such as Litecoin are close enough that they compete for the same market, but also close enough that their innovations transfer quickly, on the other hand Ripple and Bitcoin are somewhat dissimilar in their endeavours: One wishes to enable fluid exchange and to facilitate payments beyond currency barriers, while the other supersedes in privacy and wealth storage.


How do I detect a double-spend? As a vendor, how do you detect a double-spend? I'm happy to tell end-users that I'm proceeding with a transaction on 0 confirms, simply assuming everything is fine. I'm selling physical goods and so I don't ship them until I actually have 6 confirmations. I only alert the customer if I actually discover a problem. But I still need to have a way to detect if a transaction is stuck vs a malicious double-spend.

At what point does a transaction become suspicious? Besides manually looking up transactions on blockchain.org, how do you know a transaction is a double-spend? Monitoring all transactions happening on the network in order to match transaction inputs (as does blockchain.org) seems excessive. I'm looking for a solution I can implement using the bitcoind API.

Essentially, there is no such thing as a "suspicous transaction" and bitcoin is already set up to work in the way that you want.

Double spending is handled like this -- if two transactions spending the same input(s) happen in the same block, both will be rejected. If one transaction makes it into a block before the other, the first one will be accepted and the second will be rejected.

Now, if two transactions entered the network simultaneously, but at different endpoint, by the time the next block is mined it's likely that they would have made it into the same block and thus be simultaneously rejected. It's also possible that a block is mined containing one transaction, and all subsequent blocks containing the other transaction will simply be rejected. The third and least likely scenario is that two blocks are mined simultaneously -- each containing one of the competing transactions -- and this would cause a fork in the blockchain. However, this is the purpose of having confirmations, and by the time you reach 6, it's extremely likely that the forks have been reconciled and that one of these transactions will be rejected along with the rejected fork.

So, if double spending occurs exactly one of three things will have happened :

1. You will have the bitcoins (even though they were promised to someone else)
2. Someone else will have the bitcoins (even though they were promised to you)
3. The original owner keeps the bitcoins.

Since you're not dealing with transactions that occur in real time, you only need to worry about whether or not you receive your bitcoins. After a number of confirmation, you can be confident that there was no double spend detected.

You noted that you wanted to identify suspicious transactions using the bitcoind API, but as mentioned before, there no way to identify a transaction as being inherently suspicious. If money shows up at your bitcoin address from a sender and you want to be confident that the transactions won't somehow disappear from the blockchain later, you could check the for forks in the block chain that might contain transactions with the same inputs, but simply waiting 6 confirmations, as you're already doing, is more than enough. If you don't get your coins, just let the customer know, and if the customer didn't double spend, he or she can just resend the payment. Essentially @Nate-Eldredge is right.


Is there a step by step tutorial on does Ardor's transaction vouchers work? When creating a transaction voucher on Ardor. Say alice wants to pay bob.

Alice logs into her own account and and puts in Bob's address and 9 ignis to send.

Alice also puts in her secret pass phrase and checks off the voucher checkbox.

Now click submit and you're given a QR code and json data.

So does bob just broadcast this transaction when I give him this voucher?

Vouchers are useful when Alice wants Bob to pay her in a secure tamper proof way.

First she asks Bob what is his account address, she then logs into the wallet using Bob's address and using the normal send money dialog performs a payment from Bob to her account.
But of course she cannot submit this payment since she doesn't have Bob passphrase.
Instead she enters her passphrase and checks the voucher checkbox. As a result the wallet generates a digitally signed voucher she can send to Bob as a json file or QR code. Nothing is submitted to the blockchain at this stage.

Bob now uses the "Load Voucher" function from the wallet gear menu to load Alice's voucher. He double checks all the details then signs and submits voucher to the blockchain.

The result is that Alice received her payment while Bob now has the voucher which represents an invoice for his financial records. Alice got her tokens and Bob is sure that he really paid Alice and that Alice indeed has a passphrase to her account.


Blockchain validation process is linear? I've read at a few places that the nodes validate transactions in a linear fashion, i.e. after node A validates, then node B, etc. (which is also the reason, as claimed by many, why blockchain suffers from a scalability issue)
But if blockchain is decentralized, how would the nodes know in what global order to validate? It must be the case that several nodes validate on the same block in parallel.

Block validation is linear, transaction validation is not (for unconfirmed transactions).

Block N can only be validated if N-1 has been validated, since each block links back to the previous block, and the updates made to the UTXO set by it.

Transaction validation, for unconfirmed transactions, can be done in any order. However, nodes can only validate transactions if they receive them. Before any given node forwards a transaction to other nodes, it will validate it itself to ensure it is a valid transaction. If it is, it is sent further to its peers, who then repeat the same process before broadcasting it again.

That said, if you perform an out-of-band broadcast to multiple peers, they will all validate the transaction independently of what any other node says.


What are the different kinds of Lightning routing nodes? I understand that there are end users at the edge of the network (typically with private channels) and routing nodes (with public channels) doing the routing of payments. What are the different kinds of Lightning routing nodes?

Alex Bosworth discusses different kinds of routing nodes he has observed on the network in this presentation at a Lightning Hack Day in March 2021. He classifies them as follows:

Ping Pong Routing Node (Bi-Directional Payments)
Liquidity Battery Routing Node (Slow Ping Pong Payments)
Inbound Sourcing Routing Node (Provide Liquidity to Drains)
Liquidity Trader Routing Node (Predict the Future, Provide Reliability)
Last Mile Routing Node (Connect Users to the Network)

A ping pong routing node stays balanced due to routing regular bidirectional payments and only requires operational costs. It avoids the fees required to rebalance channels. In reality, these are rare as there are at least delays between the bidirectional payments and hence periods where channels aren't balanced.
A liquidity battery routing node is more common as it routes bidirectional payments but encounters time delays and periods where channels aren't balanced. It needs sufficient capital to withstand these periods and avoid being drained. Due to the higher capital requirements they potentially have the opportunity to charge higher fees than ping pong routing nodes. These routing nodes also require monitoring of onchain fees to determine when it is affordable to use the chain to rebalance their channels.
An inbound sourcing routing node seeks opportunities to consistently provide liquidity to drains (ie exhausting their inbound capacity with regularity). Capital is only flowing in one direction and this routing node has to manage that and actively rebalance. However, this routing node does get to identify stable routing opportunities with medium fees where there is demand to route to the drains (e.g. merchants) and potentially buy channel capacity to serve periods of increased demand.
A liquidity trader routing node is the most opportunistic of routing nodes as it moves around the network opening channels or buying channel capacity in the short term to take advantage of information that isn't publicly available. It chases high routing fees and hence is information intensive as well as channel management intensive. If its information isn't accurate it risks making higher losses as the costs of channel opening and purchasing liquidity mount up.
A last mile routing node actively tries to connect end users to the Lightning Network rather than being one of the central nodes in the route. These routing nodes need to understand and monitor what the end users' needs are because otherwise they risk their capital being stuck in a channel that isn't being regularly utilized (i.e. no routing fees). It is also critical (even more so than for other routing nodes) that these routing nodes are online 24/7 as they may be the end users' only connection to the rest of the network.
(Being an effective routing node and generating profits from being a routing node is challenging and especially when starting out one should see it as experimentation rather than an investment with reliable returns. Do not experiment with more funds than you can afford to lose.)


How to get instant notification of any Bitcoin transaction involving a specific public address as recipient without knowing the wallet or private key Everything is in the title... For instance, Blockchain can do this if you import a public address and you set up their notification mechanism.

Is there a way to do this in an intelligent (=efficient) way with bitcoind even with some patches? Or is the only solution is to get all transactions and filter for the public address?

If you want to do it via bitcoind, since the transaction in question isn't an in-wallet transaction, this is as close as you can get with bitcoind: GetPublicTransaction()

If your daemon has its transactions indexed (is -txindex enabled), you can iterate through all blocks using getblockash and getblock, then iterate through all the transactions for each block using getrawtransaction and look for outputs and inputs referring the address(es) you want, when it's an input reference then balance decreases, when it's an output reference the addresses balance goes up.

Obviously this approach will take ages in you need to scan the whole blockchain that is getting bigger every day so you need to limit your iterations to the new blocks only, and for newly added addresses to watch you should allow a few minutes for the blockchain to be rescanned if you wish to provide historical data for them.

Apart from that, there is some talk going on about adding support for watch-only wallets (which is what you're actually asking here) in the core client itself, however this enhancement is not yet available today.

You can also sign-up for http://www.blocknotify.com/ and get a notification every time something changes in that address.

Finally, you can parse the local blockchain files manually but that's a little bit more hard-core, this is a nice post giving some guidance on that: http://codesuppository.blogspot.gr/2014/01/how-to-parse-bitcoin-blockchain.html and an open source project that could also help: https://github.com/jeffchan/blockchain-parser


Which is best for mining bitcoin? I am wanting to buy a hardware for mining bitcoin and namecoin using Bitminter. But then Genesis Mining offer online cloud mining. I want to know if it's better to buy a hardware for mining bitcoin or use cloud mining?

If you don't already agree with the above answers and understand why they are true, I recommend strongly rethinking the idea of mining. Before investing a single cent into mining, please invest in yourself, and your comprehension of btc first.

If you're mining simply for the enjoyment of learning about this fascinating technology than I recommend mining yourself, and taking it very slowly. By this I mean to acquire an insignificant amount of hashing power (such as an ASIC thumb drive or similar) to get your feet wet, one that will not burn your house down or set your finances on fire.

Bitcoin mining is a deeply complex field and for the uninitiated its a surefire way to burn up.


How does OpenBazaar differ from NXT decentralized marketplace? I'm contemplating if I should use openbazaar or the nxt marketplace. both a decentralized, but I have a few questions regarding openbazaar:

What incentive does hosting a openbazaar node give? I understand that the nxt marketplace is built into the coin's blockchain so there's the incentive of mining coins while it also hosts the marketplace.
How does openbazaar / nxt marketplace handle fees? Or is there any fees at all? There has to be some sort of fee I'd imagine or else there would be alot of spam.
Can you upload images/pics to openbazaar/nxt ? How do they handle the bloat?
How does user ratings work?

The NXT Marketplace is for digital goods. If you want to sell physical goods, you should look at the NXT FreeMarket, which also lives on the NXT blockchain. You can read about it here:

http://www.nxtfreemarket.com/


Why should I mine Bitcoin? Please teach me why I should mine bitcoins, aswell as how please so I can learn.

Please, I really want to mine!

Buy an ASIC. In this age, it's not profitable to mine using usual computers. These specialized computers are used for mining.


How large is the current utxouts set There was a website which shows statistics about the size of the set of all unspent transaction outputs. I can't find it any more.

This information can be retrieved from a running node with the getutxosetinfo command.

 $ bitcoin-cli gettxoutsetinfo
{
  "height": 365344,
  "bestblock": "0000000000000000007c35a02dcbc73a0d10ef4cbaee9a597fe16208a828f451",
  "transactions": 6784625,
  "txouts": 25716140,
  "bytes_serialized": 877658065,
  "hash_serialized": "14bfa4c4aca29b11099b70deb76ee2e174524e70e8bb57addfa0ba17c3254804",
  "total_amount": 14383464.76669119
}

Note that "bytes serialized" is a measure of the compressed UTXO.


Is "bitcoin" a countable noun? Should "bitcoin" be used as a countable noun admitting a singular and a plural (so that one says "600 bitcoins are in this wallet") or as a mass noun, (like "water" or "money") (so that one says "How much bitcoin is used every day throughout the world" or "600 bitcoin is enough for this transaction")?

Everyone is using it as a countable noun. There's actually a grammatical rule that says this is what should happen. If a new term ends with an existing term and is semantically related to that term, it gets the old term's rules. If not, it does not.

So, a "pop fly" is not a type of fly (the bug). So we don't say "pop flies" but "pop flys".

A "bag lady" is a type of lady. So we don't say "bag ladys" but "bag ladies".

We don't say "two firemans" because while a fireman is not necessarily a man, the origin is directly related.

So, a "bitcoin" is a type of coin, the terms are semantically related. So it should inherit the rules of the word 'coin'. Since we'd say "one coin", "two coins", we would expect the rule to be "one bitcoin", "two bitcoins". This feels natural to people, so it's what they do.


Manually generating seed for Trezor T Is it possible to manually create a seed from the BIP 39 English word list, and enter them in the Trezor Model T recovery to create a wallet from those words. I know that choosing the 12 words doesn't work, because the last word is a checksum of the previous 11. Is there a way to determine the 12th word from the first 11?


Recover old ufasoft coin wallet from a wallet.db file I found a wallet.db on my computer which was used with the Ufasoft Coin application. Of course I want to see if there is anything left in this wallet so I downloaded the Ufasoft software from some shady download page but I can't find any way to open the old .db file, anyone tips?

For starters, if you don't trust a piece of software, don't give that software access to a wallet file.  That's just asking to be ripped off.

I am unfamiliar with "Ufasoft", but a quick web search makes it appear to be a small software company that at one point in time created a CPU/GPU bitcoin miner and wallet.  If that's the case, then you may need to reach out to that company for support.  The wallet file may not conform to the Bitcoin standard.  In fact, it looks like the wallet supported many coins, so it might be some hybrid multi-coin wallet format.

Best of luck.  When you use non-standard wallets, you'll end up not being able to ask the larger community for support.


How to make a Bitcoin address your main one in Blockchain.info? On the Your Wallet starting page of Blockchain.info, there is a frame with the text

This is your Bitcoin address
*bitcoin address here*
Share it with anyone and they can sent you money.

(or something like that, I don't exactly know what it is in English, I am using it in Dutch)

I have 2 addresses specified, one with 0.01306288 BTC and one with zero BTC. The one with 0.01306288 BTC is shown in the frame on the start page, but I would rather have the other one.
Is there a way to make the other address show up there?

I've played around with the blockchain.info wallet, and here's what it looks like is happening:

Blockchain.info shows the "This Is Your Bitcoin Address" by date the address was added to your wallet (not the date of the oldest transaction on the blockchain)

To determine blockchain.info's "sort order" for your addresses, export a paper wallet (from the button on the "Wallet Home" tab)

The order of addresses on that pdf is the order Blockchain.info will use when choosing your Default Address. You need to archive/remove all of the addresses above your DESIRED address for it to be your default.

So if you want to change the default address you have two options:

If you don't need the 'old' address anymore

Simply transfer the BTC out of the previous address into a new one (either one you already have, or click on the 'create new address' button).

Archive the 'old' address. It's still available in your wallet under the Receive Money / Archived tab.

Archived addresses won't be shown as your main address.

If you want to keep the 'old' address in your wallet

A little bit trickier, you'll be DELETING the address & private key, then re-adding it.

Generate your paper wallet backup, and have it open. Make SURE you have the private key of the address(es) in front of you.
Archive the address(es) above your desired address
Go to the 'Archive' tab and find those archived addresses. Check the box next to them and select DELETE. (blockchain.info will ask you if you're sure. Then they triple check. It's a good idea to make sure that yes - you still have the private keys saved from step 1 above)
Re-import the private keys taken from your paper wallet) for your addresses. It's under the "Import / Export" tab. When importing, select IMPORT KEYS DIRECTLY (instead of SWEEP KEYS) if you want to keep the same address in your wallet.


Does blockchain.info show all transactions? My client is still syncing, so I've been checking my transactions on blockchain.info.  It only shows two transactions although I know I should have more than that when I search my address.  I'm new to bitcoin, so I'm not 100% sure how it works.

Blockchain.info should have all the transaction information for any and all transaction that were included in blocks. It usually also has a lot of information about transactions that are not a part of the block yet, but due to the nature of message propagation in the Bitcoin network, it is possible that they might not see some of them before they are a part of the blockchain.

So, if your transactions are really fresh, blockchain.info should see them, but it's not a guarantee. If they are older, it should display them correctly. And as is always the case, some errors can occur on the software side of things.


How do I search for a hidden and disguised (extension changed) wallet file on damaged hard drive? Back in 2012 we had a bitcoin or two on a computer that crashed. It was a dual boot system and the wallet was in the Linux partitions. The user, a family member, changed the file extension to a extension document, probably open office or abiword. I am trying to reconstruct the hard drive, and have recovered the files from the Linux partitions. I need to know how to search for and find the file now. I have been researching my butt off trying to find a reliable way to find it. The only computer I have right now is an old XP laptop with 512 megs of RAM, won’t have a newer computer for another 10-15 days (got an excellent dell direct deal but shipping and delivery is absurdly slow). I have done plenty of desktop support and home computer repair for a living, but have been retired since 2014 and my Data recovery experience is limited.

What I need most right now is a method to identify which among the hundred plus gigs of files is the wallet. First question is what is the minimum size of a wallet.dat file, so I can limit the time searches take by ignoring the zillions of files too small to be a wallet. I have seen one suggestion that new wallet files are about 96k.

Second question is how do I search for it? I need a search term, a unique string of text or characters that is present inside of every bitcoin wallet. And will Windows file manager find the text inside of the wallet, or will I need yet another tool? I have been using a string of numbers (62 31 05 00) that was suggested on a post here but have no idea how effective that might be.

Please note I have no Linux system or live cd for using Linux, and zero experience with Linux   I don’t think this is the time for me to master the Linux command line, the potential for screwing up and destroying data is too high.  I have imaged the Linux partitions from the old drive onto a 2 terabyte usb drive, and have recovered the files to that drive. Took me over a week. So the files are on a NTFS usb drive and should be safe to explore using Windows tools.

Any help will be greatly appreciated.

Try searching words fromaccount or timesmart. Wallet.dat is binary, so there should'nt be too many words accessible, but these should.


I have some BTC from grid mining I did 6 yrs ago...all I have now is the bitcoin address. How can I spend it? I've changed computers at least 4 or 5 times since then, and didn't keep much SW around when I changed.

I've confirmed that it's NOT SPENT (at least at blockchain.info), but I don't even remember what program I was running to mine it, let alone if I needed some wallet to keep it in (or if I HAD a wallet, it's long gone...)...at the time, all I thought I needed was the bitcoin address (starts with 13Ug6j...).

How can I get it into a wallet (or someplace else) so I can spend it or convert to USD?

You can't. An address is not enough to spend coins. You need the private key that corresponds to that address; if you don't have that, then you can't spend the coins. You cannot get the private key that corresponds to an address by only knowing the address; rather you must have had that private key since it was generated and never lost it since then. If you do not have the private key, your coins are lost and unrecoverable.


How can I transfer bitcoins from a MultiBit wallet to another computer? I had bitcoins on MultiBit 0.12 on my old computer. I have moved the old computer's hard drive to an external hard drive. How can I transfer my bitcoins from the old hard drive to my new computer's MultiBit 0.15?

MultiBit developer here. The version numbers you're supplying are not related to MultiBit. We currently have version 0.2.0 for MultiBit HD and 0.5.19 for MultiBit Classic. There has never been a 0.12 or 0.15 version. Are you sure that you have the correct wallet application?

That aside, if you need to empty your wallet in MultiBit Classic, you simply need to use File | Open to locate your wallet file, and then use the Send tab to transfer those bitcoins to another address. That address is provided by whichever wallet you'd like to use instead.

Do not delete your old private keys in case someone sends you bitcoin to an old address

Here's a help article that gives more details: https://multibit.org/en/help/v0.5/help_sendingBitcoin.html


If I have only the private key from a multibit private key export, how can I use the bitcoin later elsewhere? In multibit, you can export the private keys from a wallet into a basic text document (*.key).

It will look something like this:

# KEEP YOUR PRIVATE KEYS SAFE !
# Anyone who can read this file can spend your bitcoin.
#
# Format:
#   <Base58 encoded private key>[<whitespace>[<key createdAt>]]
#
#   The Base58 encoded private keys are the same format as
#   produced by the Satoshi client/ sipa dumpprivkey utility.
#
#   Key createdAt is in UTC format as specified by ISO 8601
#   e.g: 2011-12-31T16:42:00Z . The century, 'T' and 'Z' are mandatory
#

KyBn........................................... 2014-06-06T04:26:48Z

# End of private keys

[The series of dots is the key, but I censored out the majority of it.]

I have read this post on a similar question, but I am confused about one particular thing: If I have some transactions after the export, more or new private keys will be created, which will mean that I can no longer depend on this set of private keys to regain access to the funds. Is this correct?

My main question is, how exactly can I recover the funds for a particular address with only this private key (or set of private keys) (not specifically in multibit, but generally)? Do all clients and online wallets have an import private key option? What is done behind the scenes with this private key to find the public key and the address?

If I have some transactions after the export, more or new private keys will be created, which will mean that I can no longer depend on this set of private keys to regain access to the funds. Is this correct?

If you create a new address, you create a new private key, and (with MultiBit's model) you need to backup your private keys again, because there's a new private key added to the list. If you reuse the same address in new transactions (which is possible, but usually not recommended for privacy reasons), you don't need to rebackup your keys.

  My main question is, how exactly can I recover the funds for a particular address with only this private key (or set of private keys) (not specifically in multibit, but generally)? Do all clients and online wallets have an import private key option?

Most, if not all, clients/wallets have an ability to import private keys. However, there are a few different formats out there, so if the question is, "can Wallet X read this private key directly?", the answer's not as clear. But I think it is safe to say that you'll always be able to find something to read your MultiBit backup and send the money to a new address.

  What is done behind the scenes with this private key to find the public key and the address?

The private key (which is a 256-bit number) is multiplied by the base point, which is a point on Bitcoin's elliptic curve. This is done with some fairly complicated mathematical calculations. The result is the public key, which is another point on the elliptic curve. To calculate the address from the public key, you follow an algorithm with various hashings and a checksum. This is detailed at the Bitcoin wiki, which can be represented by this pseudocode:

160_hash = RIPEMD-160(SHA256(public key))
double_hash = SHA-256(SHA-256(0x00 + 160_hash))
address = base58(160_hash + double_hash[0:4])

To sum up, private key -> public key, and public key -> address are easy, while the reverse of each of this is (believed to be) practically impossible.

The most important part to take away from all this, is that one private key corresponds to one address. If you generate a new address, you have a new private key, and need to make sure it's backed up!


Why is mempool deleted when restart bitcoind and how to keep it? I'm using bitcoin core version 0.12.1 (To say precisely, I'm using addrindex patched bitcoin core by btcdrak)

I expected that mempool was maintained after restart bitcoind but that was deleted.

As far as I know that mempool is stored in chainstate/* directory as LevelDB data.
I read this article. What is the database for?

Can you describe this is why and how can I avoid it. Sometimes, I have to restart my bitcoind for some reasons (like system maintanance). In that time I want to maintain the mempool data.
Getting mempool data from peers..? takes a long time.

getmempoolinfo before bitcoind restart

$ curl --user 'xxx:yyy' --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getmempoolinfo","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:8332
{"result":{"size":15350,"bytes":120107104,"usage":258574880,"maxmempool":300000000,"mempoolminfee":0.00000000},"error":null,"id":"curltext"}

getmempoolinfo after bitcoind restart

$ curl --user 'xxx:yyy' --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getmempoolinfo","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:8332
{"result":{"size":0,"bytes":0,"usage":0,"maxmempool":300000000,"mempoolminfee":0.00000000},"error":null,"id":"curltext"}

So far, no released versions of Bitcoin Core exist that store the mempool on disk. That's why it's called the mempool; it's a pool of unconfirmed transactions kept in memory.

Version 0.14 is expected to introduce automatic dumping of the mempool to disk at shutdown.


All-in-one Service for Cryptocurrency I'm a noob in cryptocurrency and may ask really a stupid question.

Why no site covering everything(Wallet+Exchange+In-house Pool+Mining Cloud Marketplace+ICO) at once, so I can just join and get wallet and start investing my money either,

To buy cryptocurrency or
To buy miner to mine on in-house pool (option to use outside) or
To ICO

in a single site even an app by touching some actions?

Regarding wallet+mining cloud, I know Nicehash, which seems the closest but still I need to set up a pool and understand how their reverse bidding works.

I'm looking for a site where a user doesn't need to know about detail of crypto algorithm or concept of pool or anything but UI for invest X amount then you can earn Y per day/month by selecting currency and mining cloud sorted by ROI.

The answer to this is probably much larger and more general than just being applied to your question.  From a generalised point of view, businesses that specialise in certain activities are able to master them, which in an even more general sense, is the same reason usain bolt never competed in javelin and high jump.

More specifically, exchanges and wallets ARE combined.  All user accounts in exchanges have wallets in order for their users to be able to hold their coins there.  Admittedly the wallet systems in exchanges are different, in that they are only representations of the value you’ve transferred to the exchange, and not actually a wallet in which you have key-control over, but still the same purpose is served.

With regards to combining mining and trading, there is very little benefit from combining these two, in that there are no reductions in complexity or increased efficiencies for users to be had here.  Transferring coins from a mining pool to an exchange, or visa versa, is easy anyway, and if you were trying to establish either of these businesses focusing on one of these would reduce the amount of resource-splitting needed to successfully set up the conjoined version.

ICOs are not really location dependant and can be run from platforms like waves, or from the website of the ico.  ICOs and mining are quite incongruent, in that there is very little benefit from crossover.  A platform to handle trading and ico offering in the same place is however more of an interesting concept.


Is there a testnet version of data.ripple.com -- the Ripple Data API v2? I am looking for a testnet version of data.ripple.com -- the Ripple Data API v2. Does anyone know if there is such a thing?

Thank you!

At https://medium.com/interledger-blog/sending-out-of-the-interledger-network-9f42c1217c72 there was a link to https://testnet.data.api.ripple.com/v2/ which seems to be what I was looking for.


Bitcoin's Cryptographic Integrity A few people I know compare bitcoin and gold regarding currencies with integrity; Martin Armstrong on Zero Hedge compared both in a recent post.  One advantage I currently see that bitcoin has over gold is the cost to verify is much lower; it costs more to make sure that I've received legitimate gold than it does to verify that I've received a legitimate bitcoin.  But this depends on the cryptography always being legitimate - what if in the future someone cracks it?

What would happen if someone in the future is able to crack bitcoin's cryptography?  Does the system adapt at this point (and can it?)?

There are several layers to bitcoin's cryptography:

ECDSA. Elliptical curves, specifically the problem of solving discrete logs is well-known to be a difficult problem. The particular curve that bitcoin uses is secp256k1. If that particular curve is cracked, there would probably be some sort of patch to change the curve in bitcoin, which if the other two things aren't cracked, should have a reasonable chance of success as people can migrate coins encrypted with the new curve. If Elliptical Curves in general are cracked, then the other two things securing bitcoins are still there. Also, many websites would be compromised right away, including banking sites and credit card verifications as they rely on this encryption as well.
SHA256. If SHA256 were cracked, that is, if you were able to generate a source for any particular SHA256 hash, this would probably not mean much by itself. There are other algorithms that can replace this.
RIPEMD160. Again, if this were cracked, it's useless without the ECDSA cracking. There are other algorithms that can replace this.

If any one of these things is cracked, there would most likely be a hard fork to move everything over to a different hash. It wouldn't be pretty, but it would be possible.


How to generate new address wallet ? I want to use it per customer I want to create an exchange site using API.
How can I check that my customer had a deposit without using a transaction number?

I want to create a new address wallet per customer how can I do it?

I'm looking for a wallet that can generate new addresses

First of all, there are two ways to accomplish that.

Create an account at http://www.block.io, generate an API there and they will give you some endpoints to query the blockchain, generate new addresses for your wallet, broadcast transactions and so on.
You can create your own endpoint if you run a full node of bitcoin, there you can create your own transaction, query the mempool for unconfirmed transactions, query blocks to find out if your address is in any of them.

The second way is kinda tricky since you will need to understand how the transactions are stored in the blocks, maybe some parsing, but if you are starting I really recommend you to stick to the first way.

Developing an exchange is complicated, there are a lots of factors to account for. When I was developing mine, I got several issues with transaction checks and confirmation.


wallet.dat file compromise If the private key(s) are/is in the wallet.dat file, then isn't it overly exposed to hackers?  Can't a hacker just read my C:[dir]\wallet.dat file and take all the bitcion?

Yes, if you have an unencrypted wallet.dat then this is a very real possibility. Even an encrypted wallet.dat is vulnerable without a strong password and good security practices. It's simply a list of private keys encrypted with AES. AES can't be hacked, but a weak password can. FWIW, people who've lost their password for the wallet.dat have not been able to retrieve their funds, so an encrypted wallet.dat stands the test of encryption.


Mining-your-tx as a Service? When I'm sending my transaction, it's "competing" with other transactions for being mined. Are there any mining pools with the following service:

I'm giving them my address
I'm topping up my balance on their service
I'm sending some transaction from my address
The pool checks transaction pool and sees the transaction with my address in inputs
The pool mines my transaction in the next block (without sorting by priority, comparing fees, etc) and takes some "reward" for it from my balance

I don't see how this would work. If they charge less fees than the current fee they are essentially throwing away money. If they charge more there is no incentive for you to use them. Also you cant expect a mining pool to always include your tx in the next block. If the pool has 30% of the network hashpower you would expect them to mine 1 out of every 3 blocks.


Bitcoin sent from unsyncronised (2013) Bitcoin-Qt wallet to Multibit wallet have not arrived The situation: I recently turned on my rather old Fujitsu notebook where I had/have a Bitcoin Qt wallet intended for storage of Bitcoin only. I realised that the RAM memory/storage space was insufficient to syncronise the wallet, so I sent the 'unsynced' content of that wallet to a multibit wallet on another computer where I have other bitcoins. The bitcoin sent from my Bitcoin Qt wallet have not arrived,and unless I add some more memory to my old Fujitsu (difficult I am told), I am not able to reactivate my Bitcoin Qt wallet. Nonetheless, I have backed up the Bitcoin Qt wallet.dat file on an external hard-drive.

My questions: 1) Do I just have to be patient and wait for the transaction to be processed, and/or, 2) is there something I can do with my wallet.dat file such as opening up a Bitcoin Core wallet?

Thank you so much

If you don't want Bitcoin Core GUI (Bitcoin-Qt) to download new blocks, you can start it with the -maxconnections=0 option; this should allow you to use it on any machine upon which it previously worked.

Once you have it open, go to the transactions screen and find your transaction.  Right-click on it and choose the option "Copy transaction ID":

Then open the built-in console.  Starting from the menu at the top: Help → Debug menu → Console tab

Type in the following:

gettransaction <paste>

Replace <paste> with a paste of the transaction ID (txid) you previously copied.  You can leave the weird -000 on the end of the txid in Bitcoin Core 0.11.1, but you might have to delete it from earlier versions.  Press return to get the output.

Near the end of the output should be a field label "hex".  Copy the long alphanumeric (hex) string that belongs to it.  This is the raw transaction you created encoded in hex.

Go to a transaction broadcast form, paste in that string, and submit.  For redundancy, you may want to try doing it again on a different site.  This will ensure your transaction gets broadcast to the network.

Multibit should show that it is receiving an unconfirmed transaction within less than a minute; then you just need to wait for confirmations.

P.S. if you don't understand any of these instructions, you may want to ask in the Bitcoin.StackExchange chatroom to make sure the people there agree that these are safe.  You should always be careful taking advice from strangers on the Internet when it comes to your bitcoins. :-)


Is there a paper wallet generator for the new bech32 bc1xxx segwit address? Is there a paper wallet generator like bitaddress.org for the new bech32 bc1xxx segwit addresses?

https://kimbatt.github.io/btc-address-generator/
You can generate bech32 segwit, p2sh-segwit, and legacy addresses here.
I made this site because I couldn't find any paper wallet generators that support bech32 format. Source code is available on GitHub.


Is there an RPC command that checks for hardforks There are some useful RPC commands that you can use in your bitcoin.conf file to trigger code when blocks have been confirmed, such as the blocknotify command.

Is there are similar command that will execute code when your node is on an old fork, or no longer synced to the tip of the blockchain?

There is no way to explicitly know that your node is on a minority-hashrate fork because to do so would mean awareness of all the new rules that makes the majority-hashrate fork valid, and then determining that more proof-of-work is accumulated on that chain. For that to be possible, you must be running an upgraded node already.

There are a few warning signs though: If your node hasn't received a new block in over two hours for example, you might want to manually check it - does it still have a good number of peers? Does log activity look OK?

High-volume Bitcoin merchants and exchanges usually simultaneously run several Bitcoin nodes, even a few different versions (0.19, 0.18, 0.17) and maybe even an alternative implementation (bcoin, btcd). This is how BitMex' https://forkmonitor.info operates.

There is rpc getchaintips: https://chainquery.com/bitcoin-cli/getchaintips

...but this is doing the opposite of what you asked: it will reveal to the user known chain forks (stale blocks, etc) but of course they are all lesser-work than the node's current tip which is always on the most-work valid chain.


Is the SHA256 value in the bitcoin address wiki accurate? From the wiki page https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses the example of "How to Create Bitcoin Address" shows the SHA256 of:

0450863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B23522CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6

to be

600FFE422B4E00731A59557A5CCA46CC183944191006324A447BDB2D98D4B408

If I use this online tool http://www.xorbin.com/tools/sha256-hash-calculator

I get: 32511e82d56dcea68eb774094e25bab0f8bdd9bc1eca1ceeda38c7a43aceddce

Am I missing something?

The problem is that you're treating the pubkey as string data. What you need to do is treat it as raw binary hexadecimal. If you use fileformat.info and calculate it using Binary Hash hex bytes you do indeed get 600FFE422B4E00731A59557A5CCA46CC183944191006324A447BDB2D98D4B408.


How is it legal to award miners with coins made out of nothing? I understand that block rewards are made out of nothing but say a miner wants to cash out on all of their bitcoins... this will lead them to obtain, let us say, the USD equivalent of all the bitcoins the miner has from transactions + whatever the miner earns as block rewards.

So what this is doing is giving the miner all the USD they legally own and also some extra money that they generated from their block rewards. How is this legal because no entity is paying the miner and the miner is technically making money out of thin air?

I know this is kind of a complicated query but I do not understand how it is okay to make money out of thin air like that.

Miners spend energy to create blocks/getting rewarded bitcoin, it's not out of thin air. As new miners try to create new blocks and get the block rewards, the energy needed to create a new block increases and it gets harder and harder to create a new valid block. This difficulty is adjusted every two weeks. For example, at the start of the year the difficulty was 5,618,595,848,853 and now is 12,876,842,089,682, which means it costs more than double to create a bitcoin now than at the start of the year. If you try to mine bitcoin with your laptop/desktop/smartphone you will get less bitcoin for the electricity that you spent than you would get if you bought it at an exchange.

The cost of creating one bitcoin with an electricity cost of $0.05/Kwh, for this era, is apr. given by:

Cost($/BTC) = difficulty[trillion] * energy_efficiency[J/Gh] * 4772

So, for an antminer S9, the current cost would be about $6144 per bitcoin.

Also keep in mind that the cost of mining bitcoin doubles every four years (halvening event).

Some resources you might want to check:

Bitcoin difficulty - https://btc.com/stats/diff
Energy efficiency of mining equipment (ASICs) - https://www.cbeci.org/methodology/


Help verifying bitcoind "full node" installation on Debian box I've tried my best to follow the installation instructions for a headless Debian server found on github.com/bitcoin and bitcoin.org/en/full-node. However, I can not figure out if everything installed correctly. I don't know the right sanity checks.

To install bitcoind I used wget to download the 0.11.2 tar/zip file from bitcoin.org. I installed all the dependencies through apt-get listed on github. I used wget to download Berkeley DB4.8 and used "make install" to presumably install db4.8. Finally, I used "sudo install" to add the bitcoind binary to "/usr/local/bin".

I can run bitcoind and interact with it using bitcoin-cli. However, how can I determine if the installation is truly a success? How can I verify that bitcoind is using Berkeley DB4.8? I have a suspicion something is off, because I could not find the bitcoin root. This instruction from github baffles me:

cd $BITCOIN_ROOT
./autogen.sh
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" # (other args...)

I cannot use autogen.sh, because I cannot find it. Where is the $BITCOIN_ROOT? Where is the configure file? I cannot find this either. I am afraid to use the wallet and lose BTC.

autogen.sh located in bitcoin source root. To use it you should have  pkg-config libtool installed.


General Bitcoin questions At the moment I'm trying to get a look inside Bitcoin and the Blockchain, but I'm having some general unanswered questions.

How does a wallet know how much Bitcoins belongs to a specific address?

I guess there are many possible ways to do that like parsing the complete blockchain and look for some transaction the address made and just sum up the transaction amounts. But that seems to be like the worst possible method. Is there another way to access the blockchain, for example like SQL for relational databases?

In which block will the transaction for creating a block hash listed?

When you find a correct hash of a block you'll receive Bitcoins. But the transaction will be listed in the following block, correct? If the transaction would be listed in the block for which the miner found the hash, the hash would be instantly incorrect after adding this transaction to the block?!

Who hashes the merkle root?

I already know that the merkle tree is "final" hash from all pairwise hashed transactions. But who hashes all the transactions? Is that also part of the miners themselves?
If so, the miners have to hash all transactions and afterwards find the correct nonce?

How do miners know that there is a new block?

I know that news blocks are generated every 10 minutes. Is this regulated by time? Let's say the last blocks hash was found at 9:30 and it's now 9:40, would the miner just look in the blockchain and get all transactions from 9:30 to 9:40 and that's the block that needs to be hashed?

Is the difficulty only regulated by the leading zeroes in a hash?

When finding the correct hash it seems like getting the correct amount of leading zeroes is elementary. But is this the only way to regulate the difficulty?

What if no nounce is found for a block?

Is it possible that the network can't find a nonce to generate the needed hash?

Thank you very much

How does a wallet know how much Bitcoins belongs to a specific address?

A wallet is a private key which generates public keys. You can look those up in the blockchain to see if any of them have an open balance.

  In which block will the transaction for creating a block hash listed?

The first transaction in a block is generated by miners themselves, crediting themselves with the coinbase reward. then, the miner adds further transactions and starts looking for a hash that has the right difficulty target. If the miner finds one, the miner publishes the block. Miners thus credits themselves within their own block.

  Who hashes the merkle root?

The act of mining is finding a suitable hash for the merkle root and the block header.

  How do miners know that there is a new block?

The difficulty is updated every 2016 blocks. Because each block is timestamped, the difficulty adjustment knows how much time has passed, and can raise the difficulty in such a way that the next 2016 blocks will all take approximately 10min to find. Note that this assumes a steady hash rate.

  Is the difficulty only regulated by the leading zeroes in a hash?

Yup.

  What if no nounce is found for a block?

If so, you swap two transactions in the merkle tree that are unrelated. You can look for a new nonce for the corresponding tree.


Blockchain removing invalid transactions Currently, I have the following architecture:

Multiple honeypots for VoIP which detects voice attackers.
These honeypots collect IP and SIP information.
Using a Publisher/Subscribe model (Observer pattern), Publisher notifies clients or subscribers, about attackers in order to update their infrastructure firewalls or by adding VoIP rules blocking attackers dialed number. Example:

I detect an IP from France is scanning my network trying to place calls to a number in Dubai. I notify agent which in turn will update firewall access list and my VoIP software to create a block rule to that destination.

As I want to partner with other companies, my goal is to have a shared database where we can access the information we are collecting, the risk is that as it grows, attacker can insert valid IP addresses or valid numbers, (Example block IPs from our major ITSP, or block the number to our most important customer)
While a whitelist can easily solve this issue.

What I would like to know is if Blockchain will be a valid use case where information containing only suspicious IPs and dialed Telephone numbers/SIP URIs are validated by all parties and shared. I started a prototype based on this Blockchain.

The idea is that each Honeypot submits a transaction with IP/SIP attacker data. The transaction is mined and added to blockchain. But how can I remove an IP which is no longer valid? Any suggestions?

Flow:

1) Honeypot detects attacker

2) Honeypot submit new transaction to Blockchain:

curl "localhost:5002/transactions/new" -H "Content-Type: application/json" -d '{"sender": "honeypot-2", "recipient":"twilio", "amount": 111, "hosts": ["192.99.38.121"]}'

3) Transaction is mined.

curl "localhost:5002/mine"

4) It is detected that 192.99.38.121 is no longer a threat, how to remove it from blockchain securely?

A transaction cannot be removed from a blockchain without recomputing the block that contains that transaction and all blocks that came after it. The best you could do is to have a transaction that nullifies the transaction that inserted the data.


ModuleNotFoundError: No module named 'bitcoin' Here's my code:

from bitcoin.rpc import RawProxy
# Create a connection to local Bitcoin Core node
p = RawProxy()
# Run the getinfo command, store the resulting data in info
info = p.getinfo()
# Retrieve the 'blocks' element from the info
print(info['blocks'])

I could execute the RPC using curl:

➜  bitcoin git:(master) curl --user glaksmono --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:18332
Enter host password for user 'glaksmono':
{"result":{"walletname":"wallet.dat","walletversion":159900,"balance":0.00000000,"unconfirmed_balance":0.00000000,"immature_balance":0.00000000,"txcount":0,"keypoololdest":1523932637,"keypoolsize":999,"keypoolsize_hd_internal":1000,"paytxfee":0.00000000,"hdmasterkeyid":"6e64f10c7c94532b597feaec70369df40ae84023"},"error":null,"id":"curltest"}

I've also installed python-bitcoinlib successfully:

➜  Sandbox pip install python-bitcoinlib
Collecting python-bitcoinlib
  Downloading https://files.pythonhosted.org/packages/30/03/fb7df95fe89baede202cf3fe65e65bea4bf863061b5e8f59b12dab538240/python_bitcoinlib-0.10.1-py2.py3-none-any.whl (88kB)
    100% |████████████████████████████████| 92kB 1.5MB/s
Installing collected packages: python-bitcoinlib

Ideas how should I execute the RPC through the Python code?

The result of my script and the python and pip versions are below:

➜  Sandbox pip --version
pip 10.0.0 from /Library/Python/2.7/site-packages/pip (python 2.7)
➜  Sandbox python --version
Python 3.6.4

➜  Sandbox python rpc_example.py
Traceback (most recent call last):
  File "rpc_example.py", line 1, in <module>
    from bitcoin.rpc import RawProxy
ModuleNotFoundError: No module named 'bitcoin'

You are using a version of pip with a different version of Python. You are using Python 3 but your pip is for Python 2. Thus anything that pip installs will not be available to your Python which is why it cannot find the correct library. You will need to do pip3 install python-bitcoinlib in order to install the library for your python version.


Once a wallet file is initially created, does the reference client generate additional private keys? I'm just assuming that the wallet.dat file created by the reference client contains just one private key. (Correct me if I'm wrong here)

I want to know if the client generates additional private keys and if so, under what circumstances? Does a keypoolrefill affect the quantity of private keys? Does generating a given number of addresses cause an additional private key to be generated? etc...

When a wallet is created, it contains 100 keys in its "key pool". Only one of them is made visible, but when you create a new address, it actually just takes one key from the pool. The reason for this is so you don't need to backup your wallet.dat file after every transaction or new address,

New keys are generated every time one is pulled from the key pool, if possible, to keep the key pool at size 100. In an encrypted wallet, the passphrase is required to store new keys, so the key pool is only filled when the wallet gets unlocked.


How does salvagewallet work? What can I expect using the salvagewallet command?
What is it actually doing?

I am asking specifically about the zcoin fork, if that matters.
How can this help with corrupted wallet?
How can Wallets become corrupted in the first place?

zcoin seems to be a fork of Bitcoin Core.

Bitcoin Core's -salvagewallet does carefully try to recover a broken wallet database (wallet.dat file).

What it does is:

Copy the wallet.dat file (wallet.<date>.bak)
Tries to recover only the private keys

Make sure you check your debug.log after -salvagewallet wallet operation.
Look for lines starting with "Salvage" to get more information.


Why are Bitcoin addresses starting with 1s or 1S so rare? I've generated 10000-50000 key pairs using Chrome Bit Kit app or www.bitaddress.org and have noticed the scarcity of public keys which begin with 1S and/or 1s.

Why is this the case?

When I read pyramids' answer, I was very skeptical. It didn't really seem right to me that addresses generated from a hash (in this case from a public key) would have anything but a random distribution. To test out the distribution of addresses, I downloaded the dataset linked to in this forum thread and counted up how many times addresses appeared. There are something like 2.4 million real addresses in this dataset, so I figured it would give me a pretty decent sample size. Sure enough, pyramids was right, I ended up with a count something like this:

As it turns out, you are much more likely to see an address where the second character is 2-Q than anything else. After some research, it turns out that the reason why this is the case is fairly subtle, and requires some background on how addresses are generated. The technical details of how an address is generated are here and here, but the tl;dr is this:

Hash your public key first with SHA-256, and then with RIPEMD-160.
Add a version number and checksum to the above.
Convert the bytes of this value from step 2 to an integer.
Convert the number from step 3 to a base 58 encoded string.

NOTE: The stuff below this statement is very heavily edited from what my original answer was. The original answer was based on some personal research I had done and it turns out that I got it wrong. Thanks to @MeniRosenfeld for correcting me in a comment.

Step number 3 above is where the bias towards addresses starting with characters between 2 and Q is introduced. The data that you have after step 2 is 25 bytes long, but because of the version number that is pre-pended is fixed (0x00 for the Main Network), there are only 24 bytes that add to the integer you produce. With 24 bytes of data, you will never get a number big enough to generate an address where the second character is anything greater than Q. If however, those 24 bytes produce an integer that is less than ~2.6896e56 you can actually base58 encode it in 33 characters instead of 34 during step 4. When you have numbers this size, there is room available to have a number that will generate an address where the second character is any of the characters between 2 and z. Therefore, the reason that it is much more rare to get one of these numbers is that there are simply fewer of them. The addresses that have a second character between R and z can only be addresses that are 33 characters long while the others can be any address that is 34 characters long or any of the addresses that are 33 characters that have a second character between 2 and Q. This is skewed even further by the fact that there are 58 times more addresses with 34 characters than 33 due to the additional length.

It should also be noted that because of the way base58 encoding works, every extra empty byte present at the beginning of the data in step 3 ends up as a 1 added to the beginning of the final address. Therefore, the first bin on the graph doesn't fit in with the others because it is where all addresses of length between 32 and 27 ended up.


How to apply blockchaining to data? I would like to apply blockchaining on unstructured data (any kind of data). I have seen BlockSign use similar concept to sign a document by storing a hash of the document in OP_RETURN block of Bitcoin. I was wondering how to do something similar but for a non-structured data type to ensure privacy and verification of the data in question.

Any links, articles or papers to programmatically do this would be ideal. I searched myself and found something called as ethereum but I don't think that satisfies my requirements.

Chainpoint is a standard for maximizing the scalability of recording data in the blockchain and generating blockchain receipts. Each receipt contains all the information needed to verify the data without relying on a trusted third party.

You can read our white paper and download a Python implementation of a Chainpoint server at http://github.com/chainpoint.

Tierion and Storj are the first to implement this new standard.


How do I test that blockchain p2p replication is properly, securely exposed to the internet? I have bandwidth and CPU to spare and I'd like to participate in the P2P nature of sharing the blockchain to other peers.  How can I properly, and securely participate?

Also, how can I test or verify my client that its working correctly?

Can I participate in the same (port 8333) blockchain replication if I run in server mode?

If you already have bitcoin up and running for some time, just open terminal/commandline window and run:

netstat -b (Windows)

netstat -tnp (Linux)

In the Local address column output, note whether there is port 8333 used with any bitcoind connection. If yes, you know that your node is reachable from internet and thus you are fully participating. Otherwise you need to allow connections to port 8333 from outside in your firewall, so that you don't have to depend on other nodes accepting connections. Also, healthy and up to date node is sending/receiving transactions quickly.

Other concerns, like security, are handled by bitcoind automatically, as it verifies all received data. The bitcoin-qt GUI is working in exactly the same way, I just presume you'd prefer running bitcoind as a background service.


What is the Witness and what data does it contain? I've learned about the Segregated Witness but couldn't find info on breaking it down.

I know usually when legacy addresses are used the public keys for example will be under Scriptig.  With P2SH, I can see that the ScriptSig contains the hash of the redeemScript which must match the hash of the address in the Output ( I think). But I am not sure about the witness data.

Let's take this TX:
80975cddebaa93aa21a6477c0d050685d6820fa1068a2731db0f39b535cbd369

What info is in the witness, can someone break it down please?

This structure contains data required to check transaction validity
but not required to determine transaction effects. In particular,
scripts and signatures are moved into this new structure.
The witness is a serialization of all witness data of the transaction.
Each txin is associated with a witness field. A witness field starts
with a var_int to indicate the number of stack items for the txin. It
is followed by stack items, with each item starts with a var_int to
indicate the length. Witness data is NOT script. See BIP 141.

Witness data depends on the type of transaction.
Input 3
Looking at transaction input #3 in the raw json:
script = a914771962306e72e479245d48e879dd2a1862225b4c87
This has the structure of a Pay to Script Hash (P2SH) transaction. Because of the witness data, this is probably a multisig P2WSH nested in BIP16 P2SH:
witness:      0 <signature1> <1 <pubkey1> <pubkey2> 2 CHECKMULTISIG>
scriptSig:    <0 <32-byte-hash>>
              (0x220020{32-byte-hash})
scriptPubKey: HASH160 <20-byte-hash> EQUAL
              (0xA914{20-byte-hash}87)

witness:
04 (4 stack elements)
00 (1st stack element, 0 Bytes)
47 (2nd stack element, first signature, hex: 0x47 decimal: 71 Bytes)
304402202c3f94e5daf4057377d9f16d45b57e962de42fb42cb7e95a0382b7c66624980a02204098f6acd43b0391ea1b4a8102797e78895848fb7e883f98d207d14d45945a6901
47 (3rd stack element, second signature, hex: 0x47 decimal: 71 Bytes)
30440220448460edd5291a548c571ccf3a72caf47b02364035dc84f420d311e3a0c5494802205bb1cc89f20dc1e2c1f6eadb74898f8eecc46fbf488b676636b45fafaeb96e0f01
69 (4th stack element, 2-of-3 multisig script, hex: 0x69 decimal: 105 Bytes)
<52 OP_2>
21  (33 bytes)
<021e6617e06bb90f621c3800e8c37ab081a445ae5527f6c5f68a022e7133f9b5fe pubkey1>
21  (33 bytes)
<03bea1a8ce6369435bb74ff1584a136a7efeebfe4bc320b4d59113c92acd869f38 pubkey2>
21 (33 bytes)
<0280631b27700baf7d472483fadfe1c4a7340a458f28bf6bae5d3234312d684c65 pubkey3>
<53 OP_3><ae OP_CHECKMULTISIG>
Note that the OP_2 and OP_3 indicate this is a 2-of-3 multisig transaction script.  See Pay-to-Script-Hash | Transaction


validation of a block with false transactions When a miner can find a number to create a hash with enough zeros, the other miners can verify his work by testing that number and seeing if everything is correct. But how do they verify that the transactions in the block are not false? How do they see that the amounts are properly authorized? An attacker could create a transaction in which Alice sends him 5 BTC, without Alice knowing about it. Is it possible?

The block validation process involves checking that all the individual transactions in it are all valid according to the consensus rules which are set in the Bitcoin Core C++ implementation.

Block validation is done by Bitcoin full nodes and one would assume by all miners. If a block is not valid then it will be rejected and any miner who attempted to insert an invalid transaction would have wasted all the time and effort to generate the block hash.


Backing up Bitcoin using only private keys? So I'm really new to Bitcoin and cryptocurrencies, and I don't truly understand realtion between Bitcoin private and public key, and address!

I understand that for every private key, there is a public key, and that public key can be made and is made from a private key. So for every transaction you would have one private key and corresponding public key.

What I can't understand is how to backup Bitcoin wallet using private key!
Everyone says you just need to backup your private keys, but do I need to backup every private key, or just the first one, or i just need one private key to access my wallet?

Lets say i would like to backup my Bitcoin wallet by writing private keys on a piece of paper and storing that somewhere safe:

Do I need to save only first ever created private key to have access to all bitcoins I own, even i added them through multiple transactions?
Do I need to save every single private key generated, from every transaction to have access to all Bitcoins on blockcain?
If I save only half of private keys, from half of my transactions, does it mean i can only access Bitcoins from those transactions i own private keys?

I'm really confused about this one, and cant find answer anywhere! I'm not interested in backing up wallet, i need to store my private keys on a paper!

Sorry if question seems silly, I'm an old guy trying to learn all this new wonders! Thank you!

It depends on what kind of wallet you have.

Traditionally each private key was generated randomly by your wallet software. In this case every private key needs to be backed up.

Recently deterministic wallets have become popular. Deterministic wallets randomly generate a seed, and then use that seed to deterministically derive the private keys in a cryptographically secure way.

To answer your questions specifically:

It depends on whether you use a deterministic wallet. Traditional method: If you make multiple transactions, new keys are periodically generated and these need to be backed up too. Deterministic wallet: backing up only the seed is sufficient.
Also depends on wallet. Traditional: back up every key. Deterministic: just backup the seed.
Yes. Private key ownership = ownership of the bitcoin held at the addresses derived from those keys. If you don't have the key, you can't spend the bitcoin.

In Bitcoin Core, both kinds of wallet can be sufficiently backed up by backing up your wallet.dat file. There is an HD (Hierarchical Deterministic) symbol in the bottom right that is greyed out and crossed out if you do not have a deterministic wallet.

Since you want to backup on paper, maybe Bitcoin Core is not the best solution for you. You could try using a wallet that implements BIP 39 (there is a list of them on the deterministic wallet article), which derives the seed from a human-readable list of words. In this case, writing down the seed words is a sufficient backup.


How to apply RBF (Replace-by-Fee) I got a stuck transaction and would like to clear this. I found many information about RBF (Replace-by-Fee) how it works etc. So i think this might be the best option to get my transaction going.

Unfortunately i couldnt find any information about how to apply this command to the existing unconfirmed and zero-fee transaction. Please advise.

THank you so much

RBF Tools by Peter Todd

This page contains

  ..tools to test out replace-by-fee functionality. You'll need a local
  node with the replace-by-fee patch.

E.g.
To double spend ./double-spend.py <address> <amount>

To just increase fee ./bump-fee.py <txid> etc.


Unconfirmed transaction for 2 days despite network fees, rescans and redownload I made a transaction 2 days ago, (using BitcoinQT 0.8.1-beta on MacOS X) that didn't propagate. I can't find the transaction on blockexplorer or blockchain.info (or anywhere else for that matter) yet. The transaction just sits there in the client, unconfirmed and gobbled up my Bitcoins. The transfer required me to pay a tx fee that I gladly paid.

Status: 0/unconfirmed
Date: 06.04.13 22:01
To: Satoshi Dice 78% 1dicec9k7KpmQaA8Uc8aCCxfWnwEWzpXE
Debit: -0.40 BTC
Transaction fee: -0.0005 BTC
Net amount: -0.4005 BTC
Transaction ID: 10cfa399f5c0a3c6a36e9678ae7c87af95f38899cfe21c7bd76caebd11a2919b

What I did thus far

I let the client sit on the network for a couple of hours, hoping for it to re-send the transaction.
I found this debug thread that suggested to use -rescan, which I did to no avail.
Then I backed up and deleted all data except the wallet to redownload the blockchain - which also failed to change anything.
I used the gui console to do a lookup and resend of the transaction using getrawtransaction / sendrawtransaction that resulted in the error below

Error:

getrawtransaction 10cfa399f5c0a3c6a36e9678ae7c87af95f38899cfe21c7bd76caebd11a2919b 1
No information available about transaction (code -5)

sendrawtransaction 10cfa399f5c0a3c6a36e9678ae7c87af95f38899cfe21c7bd76caebd11a2919b
TX decode failed (code -22)

Now I am wondering what went wrong and what steps to take next.

I am aware that similar questions have been posted before, but I think this instance is different because I feel I already exhausted the debug instructions provided in the debug thread. I apologize if I missed anything.

There's a sort of hatred against satoshi dice lately.  The feeling is that satoshi dice clogs up the transaction record with lots of small transactions.  Some of the bigger mining pools have started to refuse the transactions.

Rescan and your other steps should have fixed everything, though.

Without including the sending address in your question, it's difficult to track the bitcoins.  My only thought is that you can try to re-spend the coins on yourself and maybe they'll return.  The easiest way to do this might be to extract the public and private key of the address that sent the coins and put those in a wallet in blockchain.info .

To do this, go to the console of your bitcoin client and type

walletpassphrase <your password> 20
dumpprivkey <the address that sent the coins>
walletlock

Open a new wallet at blockchain.info and use the Import/Export function to import that private key.  blockchain.info will show your new balance.

That private key is your coins.  Don't tell it to anyone.  The address, however, isn't a big secret.


Is CPU mining worthwhile for Litecoin? FPGA? GPU? I'm interested in solo mining on Litecoin.  Where can I learn about (or what math is required) two tell if this is feasible/profitable?
Currently I have 30+ CPUs running as solo miners for 40 hours and so far nothing has turned up.  Are there any optimizations I should do to the miner?

Litecoin CPU ScryptMiner

Download

http://www.mediafire.com/?l8i99fbyn41n97a

I have an i7 getting 40 k/Hash which is not too bad

Considering that with cgminer config correctly you will get an k/Hash result similar to the M/Hash result for your GPU mining activities

Check this out for an complete guide of what your outputs should be using both reaper & cgminer

https://bitcointalk.org/index.php?topic=117221.0

I think that given i5 cpu and lots as in 30 that u have @ your disposal then LTC should be a goer

mrb stated that with correctly configered s/w LTC & BTC mining should be on a par of ~ 0.0041/0.0040 BTC/LTC per hour for (600 m-Hash BTC/600 k-hash LTC) GPU card setup

https://bitcointalk.org/index.php?topic=131809.msg1414530#msg1414530


How do I mine with more GPU's than my motherboard has slots for? I noticed pictures of some mining rigs that appeared to show GPUs hooked up to cables going to a mother board and not using pci slots. What are these cables called and how can I use them to increase the number of cards I have on one board?

They may have been using an adaptor cable which allows use of different slots, such as the one pictured here: https://bitcointalk.org/index.php?topic=66070.0

During mining the data going to and from the graphics card isn't nearly as much as when the card is used for gaming, so there's no substantial deterioration in mining output.

However, I do remember reading about at least one case where circuitry was overloaded doing this (ie it burnt out), possibly due to a faulty cable, but also possibly because graphics cards aren't designed to work that way.


Are transactions verified before miner solves the block? In the PoW mining equation...

Hash = (Nonce x prev_hash x list of transactions)

the miners find the nonce to add the block to the blockchain and receive the block reward. As we can see, the hash is created with the transactions before the miner is even involved.

So are all transactions that will be included in the next block already determined before the block is found?

If so, the miner is including transactions for the next block, not the block he is trying to solve.

Am I understanding correctly?

So are all transactions that will be included in the next block already determined before the block is found?

Yes. Once the block has been mined, the miner cannot change which transactions are in the block without redoing his work.


Bitcoind clear / reset my testnet to retest some things I'm running bitcoind on centos and want to reset my testnet. I tested one way and now I want to test something else a different way.

For example, I want to clear it so when I do:

bitcoin-cli listaccounts

No accounts are returned.

AND

bitcoin-cli listtransactions

No transactions are returned.

What is the easiest way to do this?

Delete the wallet.dat file in your testnet datadir and restart Bitcoin Core. Note that this will destroy all of your coins.


IP Addresses of inbound connections in bitcoin full node (TOR) looking as a localhost (127.0.0.1) I run bitcoin full node (mynode) through TOR and I see that inbound connections appear only as a localhost with varying ports usually in high range (examples 127.0.0.1:35010, 127.0.0.1:58188, 127.0.0.1:38804, 127.0.0.1:56338).
My config setup for TOR in bitcoin node is:
proxy=127.0.0.1:9050
listen=1
bind=127.0.0.1
onlynet=onion
dnsseed=0
dns=0

What are these inbound connections? Are they nodes of other people or some apps running on my mynode? And if they are nodes of others why are they channeled through my home address and how?

Those are incoming connections coming through the proxy, which have no other possible identifier than coming from localhost (where the proxy daemon is running). The "sending" port number is effectively irrelevant for this situation. If you don't want incoming connections through the proxy, don't configure them to be allowed.


Unspendable bitcoins on blockchain Gooday, please i want to know how to transform my non spendable bitcoins to spendable bitcoins on blockchain account for the sake of being able to spend them please someone help me out I'm lost. I dont know how to retrieve the private key?
I got the bitcoins from an account manager that traded for me and supposedly made a blockchain account for me, where all the money was being sent to but a non-spendable account. The broker used to sending the money was IQ options, i do not know what to believe but please, please and please i want those bitcoins to be spendable and usable...Please someone or anyone, give me a SOLUTION!!!... I have my backup phrases if that helps and to be honest I have an average knowledge of bitcoins. SOMEONE PLEASE HELP ME!!!

non spendable bitcoins

That usually means either

a watch-only address in a cryptocurrency wallet
an account with a custodial service with some withdrawal restrictions.

In either case, you are not the owner of those Bitcoins so far as the Bitcoin network is concerned. The watch-only address is a favourite trick of scammers/conmen. They like to set up accounts and wallets that look like they contain money but which, in a non-obvious way, don't give the victim any control over money - that helps them to trick people. The conmen then ask the victim for a series of invented special "release" fees or extra deposits.

  Someone helped me trade

Usually a sign of a scam. Unless its someone you met in person in real life and have known well for years.

  a trading account, IQ options ... an account manager that traded for me

Very often the sign of a scam

I'm pretty certain your money was taken by a scammer and not used in the way they claimed.

  blockchain account

The only recourse in this situation is to report this theft to Blockchain.com, to the police and if the "helper" is identifiable and located in the same country, explore pursuing it through the courts. It is extremely unlikely the money can be recovered and attempts to recover the money through the legal system are likely to cost more money.

  I have my backup phrases

I would use that to recreate a clean wallet on a clean freshly installed PC (not one your helper has ever known about) and see if it actually contains anything. Most likely it is an empty wallet. Probably the watch-only addresses in your wallet were added separately and any money shown there is not under the control of your recovery phrase.


getblocktemplate fails in regtest mode even when it is connected to the other node I have created two nodes and connected the 1st node with the 2nd node in regtest mode . Now when I make the getblocktemplate command using bitcoin-cli . It fails with bitcoin is downloading the block.

Bitcoin core vs v0.16

admin1@root:~/Projects/bitcoin$ ./src/bitcoin-cli -regtest -port=8333 -rpcport=8332 -rpcuser=test -rpcpassword=test getconnectioncount
1
admin1@root:~/Projects/bitcoin$ ./src/bitcoin-cli -regtest -port=8333 -rpcport=8332 -rpcuser=test -rpcpassword=test getblocktemplate
error code: -10
error message:
Bitcoin is downloading blocks.

You need to mine a block so that the software thinks that the blockchain is fully synced. The most recent block in the regtest blockchain is probably old so you just need to mine one more block to make the blockchain "recent".

Just use the generate command. You can do:

./src/bitcoin-cli -regtest -port=8333 -rpcport=8332 -rpcuser=test -rpcpassword=test generate 1

to mine one block.


Is it possible to calculate TX size from its hex? How to calculate transaction size from its hex-encoded representation, so i can include transaction fees per kb ?

If your hex string looks something like "12abcd" then it uses two hex characters per byte.  Just take the length of the hex string, divide it by two to get the number of bytes in the transaction, and then divide by 1024 to get the number of KiB.


Mining pools repayment in a coinbase tx Is it possible to add more outputs than one to the coinbase transaction? And if it is, can miners use them to repay users for renting hash to the pool?
I think in this case they know who to pay and this could prevent blocks from being found almost instantly and empty.

Yes it's possible to add more outputs in coinbase transaction.
https://bitcoin.stackexchange.com/a/103612


Lost my phone with the wallet in it... Any way to recuperate my 5.178 bitcoins? Phone and car got stolen, i had the keychain of my wallet on a pad, so it's all gone, everything!! Please tell me there's a way to get them back?

To spend bitcoins, you need the private keys that control your address(es). There is no other way to spend your coins, without the keys your coins will likely sit unspent forever. So that means you'll need:

a) your phone

b) a backup copy of the private keys, or (more likely) the wallet's mnemonic seed phrase

c) a digital backup of your phone

It sounds like a) and b) are not viable options for you, but perhaps you can recover some of your phone's data from a local backup/cloud storage. Normally I would recommend not storing wallet backup data in the cloud, but in this case it may be your only hope of recovery.

Sorry for your loss, best of luck.


Is it possible to get the network to accept a partially signed multisig transaction? I tried to send a half signed multisig transaction to the testnet but it got rejected.

I think this is by design but has anyone some hard facts on this?

EDIT:
I think https://en.bitcoin.it/wiki/BIP_0010 was the case I was looking for.

The network will only forward transactions that are valid. That is they only claim so far unclaimed outputs and contain all the necessary signature scripts. Your transaction does not contain valid signature scripts, hence it's not valid and will be dropped by the nodes in the network.


Electrum open source mobile wallet I am looking for open source mobile wallet which supports electrum protocol.

Already found 2:

https://github.com/coreyphillips/moonshine
https://github.com/ACINQ/eclair-mobile

But first one looks buggy and unfinished.
Eclair-mobile is too bound to its back-end Eclair core part, which is written in Scala. Sorry but for me its overkill.

Can community recommend any other OSS Electrum mobile wallets?

There is an Electrum branded mobile wallet with source code:

It's OS with a MIT license.


modifying bitcoind to include mysql support I am modifying bitcoind (working with 0.13.1) to include write the log to mysql db versus the log file.
I have all the functions worked out and compiling outside of bitcoind

The trouble I ran into is when trying to compile it all with bitcoind.
i added my new file (.cpp and .h) into the makefile and linked -lmysqlclient, but im getting
undefined reference to 'mysql_init'

any pointers would be appreciated

adding -lmysqlclient under LIBS in configure.ac did the trick
the new line reads as follows:

LIBS="$LIBS_TEMP  -lmysqlclient"


Keeping wallet addresses outside bitcoin core I'm trying to build a good security for my online bitcoin based application. Is something like this possible?

send_bitcoin(address)
create_address()
sweep_balances()
       +
       |
       |
       v         New transactions
+-------------+  <----------------   +--------------+
|             |                      |              |
| Wallet keys +--------------------->+ Bitcoin core |
|             |                      |              |
+-------------+   Submit signed tx   +--------------+

The "Wallet keys" will be my hot wallet. There will be another wallet store which would be used for cold storage. The "bitcoin core" will be some trusted public node that I don't control.

Does using this architecture have any disadvantages over running a full bitcoin core to keep addresses?

I need to get callbacks for new transactions on the list of addresses in my store, that is not managed by bitcoin core. Is it possible using this method?

My reason is that running a full "bitcoin core" takes up too much computing resources & disk which is expensive on cloud and by doing this I can avoid having to run and maintain a bitcoin node. I can submit a signed transaction to any trusted node.

Thanks.

Does using this architecture have any disadvantages over running a full bitcoin core to keep addresses?

Yes.

  The "bitcoin core" will be some trusted public node that I don't control.

That is a huge disadvantage.

As Satoshi Nakamoto wrote:

  What is needed is an electronic payment system based on cryptographic proof instead of trust,
  allowing any two willing parties to transact directly with each other without the need for a trusted
  third party.

(my emphasis)

Every time someone tries to undo this they are kicking the founder of Bitcoin in the teeth!

Other references

Thin Client Security


Problem making multisig PSBT on walletcreatefundedpsbt I'm fighting with PSBT to do a 2: 2 multisig with bitcoin-cli on testnet. Those are the steps I follow:

Create a multisig with bitcoin-cli createmultisig 2 "["pubkey1", "pubkey2"]"

Create the psbt with createpsbt:
bitcoin-cli createpsbt '[{"txid": "578b667a5b2498bce06cf4b31e027a5a045af321f2465d3a7d8f302ac61759e6", "vout": 1 }, { "txid": "237bda433527d32ddce8da640e96efcbf3fddc1fbde8add362abe197cc3c151f", "vout": 0 }]' '{"data": "49879816ffbca992d07559d56c0cb8cbc14aa7eb896bc79f532d272595b5906f", "tb1q369frc2yk5vfly8ya57ed2qr7p3jef6fzaqyz6": 0.00009500 }'

On one signer, call to walletprocesspsbt: bitcoin-cli walletprocesspsbt $psbt

If I call here to analyzepsbt $psbt, this is what I get:

{
  "inputs": [
    {
      "has_utxo": true,
      "is_final": false,
      "next": "updater",
      "missing": {
        "redeemscript": "e6b13137de705c19718f1aaf6f80709a9e6c1a7c"
      }
    },
    {
      "has_utxo": true,
      "is_final": false,
      "next": "updater",
      "missing": {
        "redeemscript": "e6b13137de705c19718f1aaf6f80709a9e6c1a7c"
      }
    }
  ],
  "fee": 0.00000500,
  "next": "updater"
}

To add the redeemscript it says is missing, ¿can I use walletcreatefundedpsbt? I try this:
bitcoin-cli walletcreatefundedpsbt '[{"txid": "578b667a5b2498bce06cf4b31e027a5a045af321f2465d3a7d8f302ac61759e6", "vout": 1, "scriptPubKey": "a914e6b13137de705c19718f1aaf6f80709a9e6c1a7c87", "witnessScript": "5221021efcdb8d9afb724ae7c58a3886656b56e3311e26f80a1d88e5f1f49e04d30d4b210345beb99ed5fd6ecad0e4a26b797b604495ebf85630c34e126a83c110b76dffdd52ae","amount":0.00005000}, {"txid": "237bda433527d32ddce8da640e96efcbf3fddc1fbde8add362abe197cc3c151f", "vout": 0, "scriptPubKey": "a914e6b13137de705c19718f1aaf6f80709a9e6c1a7c87", "witnessScript": "5221021efcdb8d9afb724ae7c58a3886656b56e3311e26f80a1d88e5f1f49e04d30d4b210345beb99ed5fd6ecad0e4a26b797b604495ebf85630c34e126a83c110b76dffdd52ae","amount":0.00005000}]'  '[{"data": "49879816ffbca992d07559d56c0cb8cbc14aa7eb896bc79f532d272595b5906f"}, {"tb1q369frc2yk5vfly8ya57ed2qr7p3jef6fzaqyz6": 0.00009500 }']

but I get "Insufficient funds" (error -4) ¿What I' missing or put it wrong on walletcreatefundedpsbt command?
Thank you very much! :-D

Create a multisig with bitcoin-cli createmultisig 2 "["pubkey1", "pubkey2"]"

Here is your problem. createmultisig is a utility function that only computes the multisig address. It doesn't store or otherwise add that address to your wallet. As a result, when you invoke walletprocesspsbt to update/sign, the wallet has no idea what that address is, or how to sign for it.
You want to use addmultisigaddress instead.

To add the redeemscript it says is missing, can I use walletcreatefundedpsbt?

walletcreatefundedpsbt is an RPC to construct a PSBT from scratch; it's an alternative to the more manual createpsbt call, not a way to update an existing PSBT. You need to use walletprocesspsbt PSBT for that, but as I said, you first need to teach the wallet about the address you're using.


listreceivedbyaddress returns empty list I tried bitcoind getnewaddress, but bitcoind listreceivedbyaddress still returned empty list

How to create a new address for receiving payments?

The default is to only return addresses that have already received coins, so use bitcoind listreceivedbyaddress 0 true.  The true indicates that you want to include "empty" addresses.

Source: https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list