What makes Bitcoin transaction secure against attackers/hackers? Wanted to know what is it that makes bitcoin transaction secure and make it less vulnerable to attackers and hackers

Bitcoin transaction works on low-level primitive constructs of scripting languages and cryptography. In simple terms, you lock your funds to an equation and anyone who can provide a solution to that equation can spend the money. So there are no account level data, just unspent transaction outputs (UTXOs). Every time you need to spend your bitcoins, you just include these UTXOs as inputs to your transaction, provide a solution to the locking equation and send your funds to another locking equation (which can then be spent by providing solution to that equation). Most of this unlocking equations involve asymmetric cryptography of providing signature from your private key.

The most important aspect of Bitcoin transactions is that every information related to a transaction is entirely public. From the moment, you sign your transaction with your private key and broadcast it, the entire data of that transaction becomes a part of the public record (be it in the mempool before confirmation or in the blocks after confirmation). Since the signing process of Bitcoin transactions involve signing the entire transaction data as the message, any person in between cannot change an iota of information as it will render the transaction as invalid (let's leave signature malleability alone for now). This makes transactions secure against attackers who might want to modify the data.

The only thing that needs to be kept secure are your private keys. As the old adage goes, "Not your keys not your funds". Thus, care has to be taken to ensure that you keep your keys safe. Most of the attacks that you read about involving lost bitcoins is because of careless management of keys. You can use cold storage like hardware wallets, wherein your private keys will never enter a network connected device and as such will remain immune to network attacks.

The private key associated with signing the transaction is a random number in the 2256 bit key space. From the private key, you generate a public key using elliptic curve multiplication. This process is one-way - that is you cannot get private key if you know the public key - unless you solve the discrete log math problem or you brute force (try every combination of private key to get the resulting public key). No one has found a solution to the first case, and the second case is impossible due to the energy requirements. Moreover, the public key is hashed using RIPEMD160 and SHA256 hashing functions to generate a bitcoin address to which you send the bitcoins. These hashing functions are also one way. Now, the solution to the equation (in many cases) I was talking to is to provide the public key that hashes to the address and a private key whose signature would be verified using that public key. So if you do not re-use your address, you have a 2-layer security from private key to the address.


What is the difference between bitcoinj and BitsOfProof? bitcoinj is a bitcoin library, bitsofproof is a full server (standalone 'exe').

Beyond the above - can anyone elaborate on the difference between them? What problems they were designed to solve, their documentation, maturity level?

Is there an overlap between them (in intended usage)?

There are lots of differences in features supported, but the crucial difference is the architecture: Embedded vs. Client-Server Bitcoin Protocol Node and Wallet.

BitcoinJ is a Java library to embed a Simplified or Full Verifying Bitcoin Node and a Wallet into your application.

The Bits of Proof Enterprise Bitcoin Server is a configurable Full Verifying Bitcoin Node written in Java. The server process is accessible through a message bus for client applications and extensions. Several layers and flavors of client libraries are available, such as: STOMP, Java, REST. The Wallet is implemented in the client library, therefore a server process can serve several unrelated applications and distinct Wallets. Several server instances might run in a load balanced configuration serving clients through a common bus. The company Bits of Proof offers commercial support and hosts server instances.


Bitcoind need blockchain to sign transaction I'm trying to sign a transaction using bitcoind via rpc.
Here is the request I send.

signrawtransaction "01000000017267f196964c70d529ba2c16c84f1fd8b52d983eb472bd005423c51ba15e6fbb0000000000ffffffff020065cd1d000000001976a9147c9b6f1bc7173d2751d49f072c6d29a10d40e24188acf03dcd1d000000001976a9144d814b8163d4cf7ad896cc5ecaba8a2c3790950c88ac00000000" '[]' '["cVAKPN7Rioo1ZLVjALa6n38iqSCd6g9zdyG5UUNcNphikstmwWHW"]'

When I send that to the bitcoind daemon with all the blockchain downloaded it's working perfectly:

{"hex":"01000000017267f196964c70d529ba2c16c84f1fd8b52d983eb472bd005423c51ba15e6fbb000000006b48304502201d8199f2639579435e9d3c3d5f2245195d2c8f370bd738996120570146048f4e022100ad33352531fdc8805903d745a460249b5487555b72596a089dec724dc8df0700012103129f14097719e665939e778ef876d0022528b954b95d69b39194b9c764b4ae83ffffffff020065cd1d000000001976a9147c9b6f1bc7173d2751d49f072c6d29a10d40e24188acf03dcd1d000000001976a9144d814b8163d4cf7ad896cc5ecaba8a2c3790950c88ac00000000","complete":true}

But when I remove the blockchain file, it's not working anymore

{"hex":"01000000017267f196964c70d529ba2c16c84f1fd8b52d983eb472bd005423c51ba15e6fbb0000000000ffffffff020065cd1d000000001976a9147c9b6f1bc7173d2751d49f072c6d29a10d40e24188acf03dcd1d000000001976a9144d814b8163d4cf7ad896cc5ecaba8a2c3790950c88ac00000000","complete":false}

Does bitcoind need the blockchain to sign the transaction (it would be highly surprising to me), or is there something I am missing?

PS: I tried to sign the transaction on a freshly installed bitcoind and it wasn't working. All the "delete the blockchain files" part was only to make sure that it was really the blockchain missing that was causing the problem and not a strangely installed/configured bitcoind.

You surely need the unspent tx outputs (tx hashes, and indices) to sign a transaction. Furthermore you need the age and value for each utxo to calculate required fees.


How to prove wallet ownership? Context
I would like to verify being A has access to a wallet and hence would like to ask them to pay a minimum amount to a particular wallet address owned by someone other than me, e.g. 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa, with a signature ThisIsUnexpected that I gave to the being A.
The basic concept I believe is quite simple, if being A agrees, they share with me their bitcoin wallet address:being_A_bitcoin_wallet_address. Next, I would share the expected signature, and selected recipient address (e.g. 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa) with being A. Being A then pays a minimal amount of bitcoin to 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa. After the transaction is completed, I look at the transaction history of the received donations to 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa and find the transaction made by being_A_bitcoin_wallet_address. Next, I look at the signature of that particular transaction and verify it reads: ThisIsUnexpected. If the transaction indeed has that signature I have a high certainty being A has access to being_A_bitcoin_wallet_address and I can verify their amount of funds.
Challenge
Though the idea may be relatively simple, I am experiencing some challenges in the execution.
To test the verification procedure, I thought I would look up the signatures of past transactions to that address. Hence I went to: https://www.blockchain.com/btc/address/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa and looked at the list of transactions. At the moment of writing, this is the most recent transaction, so I thought I could perhaps take the Sigscript of the transaction (with index 1) and put it into this signature verification tool to get a human-readable signature. However that tool does not seem to provide a human-readable signature, nor do I know whether the arbitrary transaction I selected contains a "Thank you Satoshi"-like signature.
Question
How could I practically verify the signature of a bitcoin transaction (if it has one)?
Subquestions
I think this question could be segmented in the following sub-questions:

How can I verify that an arbitrary transaction contains a human-readable signature?
Which information of the transaction data should I use to obtain a human readable form of the transaction signature?
Which online resources could be used to verify a signature?
Is there a python script that provides a function: being_has_access_to_wallet(claimed_wallet_access_address, recipient_wallet_address,human_readable_signature, amount=0.0001) that returns True or False using something like a block explorer?

How can I verify that an arbitrary transaction contains a
human-readable signature?

There is no such thing as "human-readable signature". The signature is just a very big number. Or we can treat it as a pair of very big numbers. Usually we encode it in hex, so it looks like 3044022007ae5e36b79303f992e153798061458b435d34285c5fddc20655451ac71b49f6022079421d162cad51db0daa0a934cbf5261d4b53f185604e9790094a49145f3812f01

Which information of the transaction data should I use to obtain a
human readable form of the transaction signature?

Input scripts

Which online resources could be used to verify a signature?

Google for "ecdsa verify signature online". But I am not sure that these resources are suitable to verify bitcoin signatures.


What is the Bitcoin Foundation? The Bitcoin Foundation launched recently. What is it all about and what are its goals?

The Bitcoin Foundation is a non-profit corporation started by some of the most respected members of the Bitcoin community created to accelerate the global growth of Bitcoin. They follow the model of open source bodies like the Linux Foundation, or the Tor Project.

The foundation at the moment consists of five board members. During the first term the board consisted of:

Gavin Andresen
Jon Matonis
Charles Shrem
Mark Karpeles
Peter Vessenes

The goals of the Foundation from their About page:

To standardize Bitcoin - "As a non-political online money, Bitcoin is backed exclusively by code. This means that—ultimately—it is only as good as its software design. By funding the Bitcoin infrastructure, including a core development team, we can make Bitcoin more respected, trusted and useful to people worldwide."
To protect Bitcoin - "Cryptography is the key to Bitcoin’s success so far. It’s the reason that no one can double spend, counterfeit or steal Bitcoins. If Bitcoin is to be a viable money for both current users and future adopters, we need to maintain, improve and legally protect the integrity of the protocol."
To promote Bitcoin - "In the context of public misunderstandings, misinterpretations and misrepresentations, Bitcoin needs to be clearer about its purpose and technology. Allowing the community to speak through a single source will enable Bitcoin to improve its reputation."

Any person or corporation can join the Bitcoin foundation. Asides providing their name and address, one needs to pay their fees. For individual level, those are (effective as of 2012 07 23):

25 BTC for a lifetime membership
2.5 BTC for an annual membership

Companies can also apply by paying the following fees:

500 BTC for annual Silver Membership
2500 BTC for annual Gold Membership
10000 BTC for annual Premier Membership

Each level of membership allows an individual or corporation one vote in each of their respective voting class.


Why the shell return the balance normal but php not? I am using the easybitcoin.php library and in my application. I use the getreceivedbyaddress method in php. It returns 0, but in my shell when I use bitcoin-cli it returns 0.000000000.
My question is, how can I return in php the same as the shell?
Tried this, $ data2 = shell_exec ('bitcoin-cli getreceivedbyaddress address'); and it returns 0.00000000, but is there another way?

I think this is more of a PHP question versus bitcoin, but that's how PHP handles a zero float. https://www.php.net/manual/en/language.types.type-juggling.php
$var = 0.00000000;
echo $var;

Returns:
0

If you want to force a zero value to eight decimals you can use number_format() https://www.php.net/manual/en/function.number-format
$var = 0.00000000;
$formatted = number_format($var, 8);
echo $formatted;

Returns:
0.00000000


Any Stock Trading using Bitcoin? I would imagine Bitcoin is the perfect tool for students to learn about economic and learn about investing. Any out there available yet?

There are a few currently operating Bitcoin security exchanges with non-negligible volumes:

Cryptostocks
https://cryptostocks.com/

Opened at the end of June 2012. Run by the owners of Vircurex, a fairly popular alt-currency exchange.

Bitfunder
https://bitfunder.com/

Launched mid-December 2012. Run by the owners of Hashpower, a mining intermediary of sorts.

BTC Trading Corporation (BTC-TC)
https://btct.co/

Currently in beta. Launched in November 2012 by the owners of Litecoin Global (a Litecoin-based security exchange; not affiliated with or related to Bitcoin Global, the GLBSE parent company).

MPEx
http://mpex.co/

Opened in August 2011. By far the largest of these in terms of (claimed) combined asset market cap and trading volume, but not at all newbie-friendly. Run by Mircea Popescu.

The Bitcoin stock exchange scene collapsed into utter chaos after GLBSE shutdown unceremoniously. You'll find many assets listed on multiple exchanges, some assets still being transferred from GLBSE, and some former GLBSE assets currently not actively traded on any exchange.

Try, learn, and have fun, but caveat emptor (buyer beware). Read the contracts carefully; make sure you know exactly what you're buying. Research the asset issuer in detail, particularly their past history, before you purchase. Don't equate legal identification with trustworthiness. If you're unsure about anything, ask someone more experienced for their advice - most are glad to help. Last but not least, never under any circumstances invest more than you can afford to lose.


Force a fork - is that possible? I am having a question regarding forks. We had a discussion about attacks on bitcoin in class recently. One of the attacks was about how an attacker gains some advantage if he is able to mine a block and hold it back. He would release the block only if another miner finds a block in order to create a fork.

After that we had been discussing if it would be possible to create a fork somewhere in the past. Let's say an attacker decides now I would like to fork the blockchain 2 days ago. He starts to mine blocks from the time in the past and tries to create a longer chain. As soon he has a longer chain, he releases it and hope that the chain forks.

My question is now: Is that actually possible? Is it possible to fork the blockchain somewhere in the past if we are able to create a longer chain and release it later?

I tried to find some information but all I get is hard fork information.
Thanks in advance

It is absolutely possible - but not necessarily feasible - for an attack to branch off in the past, and create a new majority chain from that.

However, it effectively means that you or the miners who are participating in this attack need to mine faster than the rest of the network combined. Otherwise, you'll never be able to 'outrun' them, and the further back you start, the less likely it is you'll ever catch up.

For this reason, this is also called a 51% attack. For anything further back than a few blocks, you almost certainly need a majority of the hashrate to succeed.


Bitcoin Transaction Signing I wrote a couple of algorithms that perform the ECDSA and also the verification. So I used my algorithm and the RPC call for signing and I got a couple of questions.

Since we have the ephemeral private key which has to be random how can I sign two times the same transaction and get the same signature as Bitcoin RPC does.
What is the hash that should be signed, the whole transaction without the signature, do I have to exclude any fields?

Since we have the ephemeral private key which has to be random how can I sign two times the same transaction and get the same signature as Bitcoin RPC does.

This "ephemeral private key" is known as a nonce. Bitcoin Core, and most other wallet software, use a technique called Deterministic Nonces. Specifically, they use the algorithm defined in RFC 6979 to produce the nonce deterministically. It essentially hashes together the message and the private key being used and uses that hash as the nonce. If you sign the same message with the same private key multiple times, the same nonce will be used and thus you always get the same signature.

  What is the hash that should be signed, the whole transaction without the signature, do I have to exclude any fields?

For non-segwit inputs, the message that is signed is the entire transaction with all other input scripts empty. For the particular input being signed, the scriptPubKey or the redeemScript if there is one, is put in the input script. Then the sighash type is appended to the end. This is hashed twice and that hash is then signed.

For segwit, the message is a bit more complicated and described in BIP 143.


How do I cancel my BTC transaction (Unconfirmed for 5 hours)? am using blockchain.info.

You can see the transaction at https://blockchain.info/tx-index/7122f25e4d2e79d5a93cf3797de44b00625cb8407d49c9fce0434f9d3cf32a82?show_adv=true

HERE IS MY OTHER TRANSACTION THAT IS UNCONFIRMED:
https://l.facebook.com/l.php?u=https%3A%2F%2Fblockchain.info%2Ftx-index%2F8290eebdbd663b27b428979b9d2b55f4171d62fbb6e81e09100f6f7788e02a14&h=8AQHbDyU2

I added a small fee, but my transactions are usually sent alot quicker than this.
What could be the error? Also, more importantly, how do I cancel the unconfirmed transaction and get back my coins?

There's not really anything you can do, other than wait. If the transaction isn't confirmed within ~72 hours of sending, it should be dropped from the mempool ie. returned to sender.

The reason your transactions isn't getting confirmed as fast as you're used to, is because the network is a little congested at the moment. It can only handle around 6mb per hour, and currently there's a backlog of around 35mb.


What happens when a transaction is included in more than one block? What happens when two miners include same or set of transaction in their block, mine it and then broadcast it at same time? Can the transaction be included in two separate block like this OR a fork happens?

If both blocks are broadcast at the same time, and we assume both miners are equally connected to the network, a fork may occur.

Since the default mining policy is mining on the top of the longest chain, or the first one heard in case of a fork, the network should mine in two different blocks until a new one is found, moment when all should go back to "normal".


I lost bitcoin in core bitcoin account, pls help I installed bitcoin core to drive d, then I cut all the files into a new file. bitcoin core gets synced from scratch and then i no longer coin in wallet. Please show me how to recover the bitcoin number, I would like to thank you very much

If you moved the Bitcoin Core data directory without telling Bitcoin Core that you had done so, then Bitcoin Core will not use the files that you moved and instead just make new ones. This means that it synced the blockchain entirely from scratch and generated a new wallet file. In order to access your Bitcoin, you need to move your wallet.dat file back to the data directory or tell Bitcoin Core that the data directory has changed by setting the -datadir=<path> option in its startup command.


My coin - Proof-of-Action I am writing a project on cryptocurrencies. As a part of this project, I thought of a new token for web services exchange. I tried to combine PoW and PoS and here is what I have. I called it Proof-of-Action - it works like Proof of Stake only it depends on a node's activity coefficient rather than how much money you have.

A server/ full node, just like a bitcoin: receives transaction messages, validates them, broadcasts them to the other full nodes to validate, and calculates its own and other full node's it knows activity record.

Then full node selects the best candidate it knows and shares with other full nodes. Once all the nodes agree on the candidate, that node will be able to create a block from transactions it received and mine it. The miner will get a reward. Once the block has been broadcast and added to the chain, the candidate's activity record resets and it gets the reward.

I wanted to make sure that new users have as much chance as the old ones and it should not matter how much money they have. Thus, the activity record should depend on: how many light-weight wallets the node is connected to, how many transactions the full node received from these wallets, how many hr it participates...

I thought in this case, it ensures more or less fair distribution of money and does not waste a lot of energy - no hardware for miners, plus, there is no need for transaction fees (until all the money has been released).

Thank you for reading this long text and please tell me what you think. Do you think it could work at least for a small network? Do you see any big flaws associated with it right away?

Once all the nodes agree on the candidate

If you already have a way to achieve that, you don't need a blockchain at all. Just run the same algorithm to get all nodes to agree on which of two conflicting but otherwise valid transactions to accept.

If you don't, then perhaps you haven't solved anything.


Bitcoin: can transaction and its parent be in the same block I'm trying to understand bitcoin transactions verification specified here. Item 10 states, that parent transaction (mentioned as input for current) should be searched not only in already confirmed transactions (in main chain), but also in transaction pool (which contains unconfirmed transactions). This means, that transaction can become a candidate to be added to block even if it's parent is not in the blockchain. If this is true, than consider following situation:

Transactions A and B are created in the same moment, A is parent of B.
Miner receives both of them, both are considered valid.
Miner adds only transaction B to block.

If such block is mined, it will be invalid, because other nodes will fail to validate transaction B. But if we also insert transaction A in it, will validation succeed on other nodes? I.e., is it possible to add transaction and its parent to the same block?

I.e., is it possible to add transaction and its parent to the same block?

Yes. The "parent" transaction must be earlier in block.


Does Ripple support subadditive trust? Ripple allows us to encode how much we trust each person. For example, I can trust A with $10K and B with $10K, and will then accept IOUs of up to $10K from each as valid dollars.

In the real world, this does not mean I would trust them both with $10K at the same time. Perhaps the risk associated with A and B is highly correlated, or perhaps I just don't want to risk $20K of my money with others. For example, I could trust A and B together with $15K. So if I already have a $10K IOU from A, I will only accept up to $5K IOU from B.

In general, I can see myself trusting 10 different people with $10K, but certainly not trusting them all together with $100K.

Does Ripple allow encoding correlated trust relationships, or at least a specification of "total" trust? For example, I could define some trust relationships, including $10K to A; and I will further define that my total trust is $50K. If I hold $20K IOUs from others, I will automatically only accept up to $6K from A. ($10K * (1 - $20K / $50K))

Ripple doesn't support anything like this directly. You could get the effect if you really needed it though. Simply create a new account and extend the amount of total trust you want to that new account. Then have the new account extend the individual trust to each of the other accounts.

This will mean that people paying you with IOUs from any of the accounts in the group will have to ripple their payments through the new account you created because you won't accept those IOUs directly. You will wind up with IOUs from the new account regardless of which IOUs from the group they try to pay you with and your new account will hold the real IOUs. So the credit you extend to the new account will limit the total amount of IOUs from that group you can hold.

When you make an outbound payment, you'll go through the new account and reverse the process, trading in the IOUs from the new account for the "real" IOUs.


Will nodes configured with a larger-than-default mempool automatically retransmit transactions that have been dropped from the default mempool? If a transaction is sent and dropped from the default mempool before it is included in a block, but nodes with a larger-than-default mempool size exist that still have the transaction, will those nodes retransmit that transaction eventually?
This is a matter of policy, so different Bitcoin implementations may have different behaviors. I'm most curious about Bitcoin Core, since it's very common, but if other node implementations differ, I'm curious about them too.
If such transactions aren't retransmitted, I'm also curious why not, since it seems like such behavior might be useful.

So far, Bitcoin Core rebroadcasting is a wallet-level responsibility. Transactions that aren't relevant to any of the Bitcoin Core's internal wallet are not rebroadcast at all.
There is work to change that: https://github.com/bitcoin/bitcoin/pull/21061. This makes sense, as right now, observing a rebroadcast is a very clear sign that the transaction belongs to the wallet, which is a privacy leak.
So I think in short the answer is: yes, it makes sense, but so far it hasn't been done.


how to develop trading platform for bitcoin I would like to know how to start developing trading platform for BTC,LTC where the user can create his wallet, send and receive coins, Buy and sell coins.

i have checked the trading platforms and i know what needs to be done. But BTC has open source code. if anyone has used it and know whether it would be better to go with BTC open source or an api.

can anyone guide me in starting this.

Thanks

Start by looking at existing trading platforms. Decide what features you want to have. Then think about what data you'll need to store and design a database schema. Then begin writing the code to perform your business logic using the database schema. Last, put a front end on it and invite people to test it.


Decrypting Vanitygen Protected Key I've used Vanitygen to generate a vanity Bitcoin address. I used the "-e" option to encrypt the private key. What I can't figure out is how to decrypt the protected key that was provided after generating the vanity address, nor can I find the encryption method used.

Is there a utility, library or program that I can use to decrypt the protected key in order to access the private key?

Buried in the bitcointalk.org forums I found this answer.

Use the keyconv binary file that is included, with the protected/encrypted key as the only  argument:

keyconv [Protected Key Here]

This will spit out the unencrypted private key. It isn't documented anywhere other than this forum post:

https://bitcointalk.org/index.php?topic=25804.msg2107686;topicseen#msg2107686


Get Historical Bitcoin Prices on GDAX in CSV Format I'm looking for minute by minute historical Bitcoin price data for the past year in format: time, open, high, low etc.

I code in Java and I'm not familiar with other programming languages (such as python and PHP).

I've read this (and this) thread with the following suggestions:

https://min-api.cryptocompare.com - I do not see GDAX listed as one of the supported exchanges (based on this link https://www.cryptocompare.com/api/) (unless the data from Coinbase is exactly the same as the data from GDAX? I know GDAX is the parent company of Coinbase but not sure if trading data is exactly the same..) Also, I tried using this API and it seems to limit the history to several days. I was not able to get a year's worth of minute by minute data for Bitcoin USD pair.
https://github.com/ccxt/ccxt - this seems to be trading library written in python and PHP (but no Java support). Also I'm not sure if this allows you to retrieve historical prices or only place trades via various exchanges.
https://bitcoincharts.com/t/trades.csv?symbol=gdaxUSD&start=1312174800 returns 404 not found error.
http://api.bitcoincharts.com/v1/csv/ - I do see Coinbase listed but not GDAX (unless they are one in the same?). Also this is tick by tick data, not minute by minute correct?

Some of the other threads I read are about mtGox not gdax or only provide daily reports so I'm not including them.

If I missed any other resources I would much appreciate if you could point me in the right direction.

This is my first ever response on any forum so I hope you find this helpful.

I think your question is "is it possible to get one year worth minute by minute data from gdax?". I only recently started trading with gdax via it's API but i have been trading with kraken's API for a while now and my experience with all crypto currencies so far is that you can only get a few days worth of historical data or ticks. However, if you want minute by minute data from the API, then you will have to query the data at some interval (maybe every minute). Note that the frequency of such queries are usually limited by a rate limit often determined by the exchange.

Also, I do not think Coinbase is an exchange in the sense conventional sense. I see coinbase and gdax as different business units of the same enity. Hence, I suspect that whatever trade or tick information you get from either of the two will be the same. However, they function differently and have two different category of people they cater to. Coinbase API is primarily for building phone applications with only basic features e.g. buy, sell, send, historical data.

However, gdax caters to the more sophisticated trader with more advanced features like limit order, margin trading, OHLC data etc.

You should check the links below to see if there are features that may attend to your needs

https://developers.coinbase.com/
https://docs.gdax.com/?javascript#introduction


Running bitcoin-cli commands without hosting a node I want to run bitcoin-cli commands (or JSON API requests) to see example response output in the format as given on https://bitcoin.org/en/developer-reference#bitcoin-core-apis without running bitcoind locally. I do not want to have to download the entire blockchain.

For example, I want to see the output of commands like gettransaction or getblock for transactions and blocks on the main Bitcoin blockchain. Aren't there any publicly available servers that would return responses in the format as specified in Bitcoin Core API? The other blockchain explorers like blockchain.info or blockexplorer.com appear to be returning a response in their own JSON format (i.e. document structure) with different field names and object hierarchy.

I spent quite some time looking for some such service but could not find any helpful information online.

This isn't exactly what you asked, but it's close.
Take a look at https://chainquery.com/bitcoin-api you can try different JSON-RPC commands through your browser.


I've been reading about "loop in" and it seems to be like a one-way offline channel, is that correct? Am I oversimplifying? I feel like I must be missing some details.

Can I use my Trezor to sign loop in transactions in theory?

I would not recommend the notion of a one way offline channel. Historically one way channels could have been build for a long time by offering new signatures for spending an output of a 2-2 wallet to the 2nd party in which more and more btc of the consumed input are given to the 2nd party. The second party naturally has an incentive to publish the latest of such tx.

Loop is more like a submarine swap. With loop in you request to get some balance on a payment channel to your side.

Let us assume you have a payment channel with 0.1 btc capacity but all the money is on your partners side. However you would like to add some funds to your side without rebalancing your channels or opening a new channel.

In order to achieve that you could create an invoice with a payment hash. A person might be willing to pay that invoice on lightning if you reimburse that person on chain. The question that loop solves is to make this process trustless.

You make an onchain btc tx to that person but encumber a second output which goes back to you with a timelock. The output that can be claimed by that person can only be claimed if the preimage of your payment hash is presented. This works directly before the timelock expires.

Now there are two cases. Either the person pays your invoice and receives a preimage and can be sure to get reimbursed. Or if the person does not pay the invoice you can reclaim your btc after the timelock. Noone needs to trust the other side.

What I don't know is if trezor allows to sign such a timelocked / special transaction and how the trezor api works. However I don't see any reason why it would not support signing such a transaction.


Can a trade offer be the last leg of a Ripple transaction path? If so, do transit fees apply? I think I understand, for the most part, how rippled finds transaction paths, and how gateways can charge transit fees; but some of the edge cases have me wondering...

Let's say my wallet has XYZ from xyzGateway, and I've offered to sell 1000 XYZ for 100 USD from usdGateway.  For simplicity, let's say that's the only offer on the books trading XYZ for USD.

Next, my friend Alice has over 100 USD:usdGateway in her wallet.  And to settle a debt between us, she sends me 1000 XYZ.

There's a path that might work.  The first leg of the path is 100 USD:usdGateway from Alice to me.  The next leg is my own offer to trade 1000 XYZ:xyzGateway for 100 USD:usdGateway.  I would make that trade with myself, so that afterwards my wallet contains 1000 XYZ and 100 USD.

Will ripple find the path described above?  Let's call it path #1.

There's another path that might work.  The first leg is Alice takes my offer, I get her USD and she gets my XYZ.  The next leg of the path sends the XYZ back to my wallet.

Will ripple find this path #2?  Specifically, will it be found even if Alice does not trust XYZ:xyzGateway?  Does Alice's action of sending XYZ to me imply her trust of that currency?

I believe the two paths are equal in their net effect: 100 USD subtracted from Alice's wallet, and 100 USD added to my wallet.  And I still have 1000 XYZ in my wallet. And my offer to sell XYZ for USD is removed from the ledger.

However, transit fees could make those two paths not equivalent.  Let's say that usdGateway charges 1% in transit fees.  And likewise xyzGatway charges 1%.  Path #1 described above would incure 1% fee when Alice sends USD to me (she'd have to send 101 instead of 100).  It's unclear to me, would the trade leg (trade with myself) would incur still more transit fees from either gateway?

And regarding path #2, there would be a 1% fee to usdGateway when Alice trades for XYZ, and a 1% fee from me to xyzGateway, and finally one more 1% fee for the leg sending XYZ from Alice to me?  Am I correct that this path pays single transit fees to usdGatway and double fees to xyzGateway.

Thanks in advance for help with this. Apologies for cramming multiple questions into one post.  I several questions just to understand what Ripple would do when Alice attempts to send the XYZ.

You have a slight misunderstanding about payment paths that is confusing your reasoning. When a payment path ripples through an account, that account receives an asset from the previous link in the path and issues an asset to the next link in the path, not the sender.

So the answer to your first question is that no trust is needed since Alice never holds the currency. An asset, other than XRP, can only be delivered to a person who created a trust line or an offer that agreed to accept that asset. But she never holds it.

And the answer to your second question is that there is no second transit. Alice never holds the asset because she never agreed to. The asset is delivered to the next link in the payment path.

To use a more realistic payment path, consider a case where Alice holds USD issued by Snapswap and wants to pay Bob a Bitcoin. Bob must have a trust line or this is not possible, so let's say he has a trust line to Bitstamp with a limit above his balance. The full payment path could be:

Alice/USD -> Snapswap/USD -> Order book -> Bitstamp/BTC -> Bob/BTC

Notice that only an order book can change the currency. Alice returns USD to Snapswap, and in exchange Snapswap issues USD to whoever placed offers in the order book. The offer owner in turn sends BTC back to Bitstamp who in turn issues them to Bob. Nobody ever holds an asset they didn't agree to hold.

This makes it easier to understand how transfer fees apply. If Bitstamp charges .2%, then the market maker must send 1.002 BTC back to Bitstamp in order to deliver 1 BTC to Bob.


Import of BTC BIP38 Paper Walet into Electrum 3.3.4 not working Trying to finalize importing BTC from a BIP38 Paper Wallet into Electrum wallet

About an hour ago I opened Electum 3.3.4, created a new wallet, set a password, saved a copy of the new wallet to a USB stick.

Then I clicked Electum's menu options for WALLET, PRIVATE KEYS, IMPORT, and pasted the decrypted private key for the BIP38 Paper Wallet into the box that opened, and clicked NEXT.

Nothing has happened: The blockexplorer shows the BTC balance is still in the Paper Wallet and not in the Electrum wallet. I closed and restarted Electrum, but same.

When I decrypted the BIP38 Paper Wallet to obtain its private key I used bitaddress.org offline, which provided me with a table containing a number of options re the decryted private key.

The specific key I chose, copied and pasted into Electrum was the one under the heading "WIF compressed format 52 character base 58 starting with 'K' or 'L' "

Would that be what needs to be corrected?

A second thing is that I see, when I click the Electrum server big green button (no idea what its called ha) that the Overview shows "Status" as connected to 10 nodes. Server is noveltybobble.coinjoined.com and Blockchain is 565750. When I initially checked this on importing the BIP38 Paper Wallet it was set to automatic not a specific server

I have read that Electrum servers can be an issue to processing transactions, and am thinking maybe that could be a problem here?

Any suggestions or help would be appreciated

ty

The blockexplorer shows the BTC balance is still in the Paper Wallet and not in the Electrum wallet.

Here's my understanding of the relationship between wallets, keys, addresses, balances and explorers:

A blockchain-explorer generally shows total unspent amounts ("balance") associated with a bitcoin-address. Blockchain-explorers do not normally have any reliable notion of wallets.

Two or more wallets can contain the same bitcoin-address and therefore both wallets can be said to "contain" the same money (BTC).

Therefore if both wallets contain the same bitcoin-address, a blockchain-explorer won't be able to tell you that an amount is in one wallet but not in another.

A wallet can contain many bitcoin-addresses. A wallet that shows a "balance" is likely to be showing you the total of the spendable amounts or unspent amounts associated with all the bitcoin-addresses it knows of.

If your new Eelectrum wallet is not showing the same balance as a blockchain-explorer shows for a bitcoin-address, it suggests the wallet does not contain that bitcoin-address (or contains more than one bitcoin-address with unspent amounts, or is not fully synchronised)

A beginners guide to the Electrum wallet says

  the Addresses tab ... will be hidden by default. To reveal it, select Show Addresses item from the View menu.

Perhaps this can be used to verify that your wallet contains the same bitcoin-address that you are examining using a blockchain-explorer.

You can also check the synchronisation status:

  When the block count under “Blockchain” equals the height indicated for the servers you’re connecting to, Electrum will be fully synchronized


How does the computing power of the Namecoin network compare to the Bitcoin network? Namecoin sounds neat, but I know that the strength of the network depends on the amount of computing power in use. Namecoin isn't as popular as Bitcoin, so it would be easier for an attacker to control the network. I'm curious how big the difference actually is.

How does the amount of computing power in use compare between the Namecoin and Bitcoin networks?

Since Namecoin started using merged mining with Bitcoin, its effective processing power increased substantially. The current difficulty is 1063443.

This is very high considering the resale value of namecoins (1 namecoin is worth 0.002 of a bitcoin) and given that the difficulty is 49% of the Bitcoin difficulty.

The Bitcoin network currently is around 16TH/s, so you'd need around 8TH/s to successfully attack the Namecoin network. That would be pretty expensive!


Is there an on the fly service to exchange physical currency for BTC for payment processing? I want, as a merchant, to receive money from my customers in the form of
bitcoins, to avoid the 2~4% fees. But many of my customers don't have
BitCoins. I was wondering if there is a service that would allow for a customer to
spend X amount of USD (or any other currency) to buy the corresponding
amount of BTC "on the fly", without requiring customers to have BitCoins or
even a BTC wallet.

Is there such a service?

I don't know of any third parties that provide this service. I do know of a few (Example) that provide the opposite, where a customer has bitcoin, but the merchant will not accept it, however.

The problem here is that these customers (in your scenario) would be giving a credit card for payment. They have up to 30 days to claim the charges are fraudulent and unless you have some good proof that they are not, you will not get your money from them. In your example, they would be buying bitcoin with it, which would then be transferred to you, leaving this third party carrying all the risk. The only way I, personally, would run a business like this is with high fees to offset the high risk. You might at well just raise prices 2~4%. It's easier and is becoming more common for brick and mortar shops to do this for card purchases and not cash.

The difference with the reverse situation, where the customer has bitcoin and the merchant will not accept it, is that there is very little risk. The customer is buying money with the bitcoin and once the bitcoin transaction is verified it is permanent.


Are there any blockchain explorers that provide raw Tx data and block headers? I've looked at some of the more popular blockchain explorers, but none of them seem to provide the feature I'm looking for. I'd like to find a blockchain explorer that allows you to see raw Tx data and raw block headers. The explorer's I've seen parse the raw data and present it in a more human readable format. Are there any that provide the raw data?

Thank you!

You can get this info from blockchain.info, by simply adding ?format=hexto the end of the relevant URL.

For example, here is a recent block (height 509,244):

https://blockchain.info/block/0000000000000000000635bda771916ca727db53fea5441508f7161386e066be

And here is the raw data for that block, in hex:

https://blockchain.info/block/0000000000000000000635bda771916ca727db53fea5441508f7161386e066be?format=hex

(Note that you will need to parse the block header out of this data, as that URL will dump the raw data for the entire block)

Similarly, here is a transaction from that block:

https://blockchain.info/tx/74d350ca44c324f4643274b98801f9a023b2b8b72e8e895879fd9070a68f7f1f

And here is the raw data from that transaction, in hex

https://blockchain.info/tx/74d350ca44c324f4643274b98801f9a023b2b8b72e8e895879fd9070a68f7f1f?format=hex


Is it required to broadcast the addresses generated locally to the bitcoin network? Like the transactions  are broadcasted to the bitcoin network , is it required that locally generated addresses also need to be boradcasted to the bitcoin network ?

No, you can generate trillions of addresses (private keys) and the rest of the network don't need to know about them until you make transactions to each of them.


bitcoin payment processing, using bitcoin uri I am interested in processing bitcoin payments in my application.
I read about bitcoin uri, but its unclear to me how to match the payment transaction to a specific 'user id' in my application?
Is it possible to include the 'user id' on the tx? is it recommended?

You should manage this in your app by generating a new bitcoin address for each payment from each customer, so that if BTC is received on a specific address, you know what it is for. This keeps specific transaction data private internally in your application rather than public on the blockchain too.


Does mining require downloading the transaction history I am a newbie in the Bitcoin field and when I heard that we can mine Bitcoin in pools to generate bitcoins, It got me curious and I thought to know more about it.

I checked many site, it says you first need a bitcoin wallet that by downloading a Bitcoin software which automatically generates your wallet and starts downloading the transaction history which I get is around 6GB of files!!

Here my man aim is to mine bitcoins.

So I would like to know if there is a way to mine them without downloading the transaction history and if yes then please tell me about the required softwares or websites.

Thank you!

You can mine them, as long as you're in a pool, where your earnings (awarded as shares of the blocks you help solve) will go to your pool wallet online until you pull them out into your local wallet.

Generally speaking you want your coins in your local wallet so that if a pool goes down or is compromised in some way, you don't lose your hard-earned coin.

So start downloading the blockchain with your wallet, but while you do so you may also begin mining.


What happens if everyone disconnected from the blockchain What would happen if for some reason, every computer connected to the blockchain was disconnected, and no peer-to-peer connection was established with the blockchain protocol between 2 users.
Would all the transactions recorded on the blockchain be lost ?
Also what if theoretically only 1 or 2 connections remained connected to the blockchain, wouldn't it be easy for them to just add more transactions to the chain and everyone would need to trust their blockchain state since there is no other copy of it elsewhere*(or are they stored locally on devices even if they disconnect??)* ?

Computers are not connected to the blockchain.
Computers running Bitcoin software connect to a few other computers that are running Bitcoin software.
Each of these computers keeps its own copy of the blockchain if they are what is known as a full-node. For example any computer running the "Bitcoin core" wallet software is a full node. So even if they don't communicate, this blockchain data is not lost. The old transaction data is still stored on many thousands of computers.

No node ever needs to trust any other. Each node that has a copy of the blockchain can use it to check that new blocks are correct.


Are P2PKH or P2SH transactions malleable? BIP66 fixed one source of transaction malleability and segwit, to my understanding, fixed the rest of the sources. Yet, there are still many common types of non-segwit transactions in use, like P2PKH P2SH(PWPKH) P2SH-multisig, are these subject to malleability attacks by a stranger?
I understand that even if someone knows how to do a malleability attack on these transactions, he might choose to answer "no" (or don't answer) to prevent these attacks. But, on the other hand, if a malleability attack on these common transactions was possible, I believe someone that wants to push for segwit adoption would have already build an app to systematically attack.

Yes. Many of the malleability sources listed in BIP 62 still exist today. Most (if not all) are not standard, i.e. most nodes will not relay transactions that exploit them, but they are not consensus rules. So a miner can still perform malleability attacks.


Who has this many BTC? http://blockchain.info/address/1VayNert3x1KzbpzMGt2qdqrAThiRovi8

I don't understand who could possibly have this many BTC.

That is DeepBit's payout address. Whenever DeepBit pays its miners, it sends one transaction per miner, and each transaction comes from 1VayNert and sends change back to 1VayNert. The change from these thousands of small transactions adds up to create huge "total BTC received" amounts. 1VayNert has never actually contained anywhere near 10 million BTC -- that's just how much BTC it has sent to itself in change from transactions.


Checking my balance of my btc public adress outside of my Xapo account I have a doubt regarding my balance account in my Xapo wallet. I have checked in blockchain.info and other pages with my btc public address and all of them gave me zero founds.. According to Xapo i have 0.00649539 btc (just as an example).

I havent made any transactions yet but shouldnt be at least one with my original founds transferred by this company to my bitcoin address ????

I havent made any transactions yet but shouldnt be at least one with my original founds transferred by this company to my bitcoin address ????

No. Xapo is a service that holds your Bitcoin for you, kind of like how a bank holds your cash for you. When you deposit money in your Xapo wallet, what you are really doing is giving Xapo your money and getting a promise from them that when you want to send your money elsewhere. So the addresses that you deposited to are not actually yours; they are Xapo's and they are free to do whatever they want with that money.

When you decide to send your Bitcoin elsewhere, your Bitcoin will likely come from addresses which are not the ones that you deposited money into but rather addresses which someone else deposited money into. Those addresses are still Xapo's and they are fulfilling their promise to send the Bitcoin to wherever you specified.


Question about Merkle path verification I think I understand Merkle verification, but I just want to make sure. Consider this following picture where all the blue nodes were sent to me

My question : if the document that I want to verify is the one that hashes to HL, I still need to have HK in my storage right ? Because otherwise I can't compute the Root, to compare it with the real root.

Merkle trees in general are useful in the context of a prover-verifier model.
A prover Peggy wants to prove to verifier Victor that a merkle root R, which Victor knows ahead of time, commits to a tree which includes a specific leaf L.
To do so, Peggy would send the element L well as the Merkle proof (or branch) containing all hashing partners L is combined with to produce R. In your example diagram, that proof consists of Hk, Hij, Hmnop, and Habcdefgh. Victor uses these elements to recompute R from it, and compare it with his pre-existing knowledge of R.
So to answer your question: certainly something has to keep Hk (or the elements that has to it, so it can be recomputed), but it doesn't need to the same party as the one that does the verification. If there is only one party involved, there is nothing to prove.


What is the bitcoind command to see how much btc a specific address has? I was wondering if I can make a query via the console on how much btc a specific address has without having to go into blockchain.info. What is this command?

There is no such command. Addresses are like a superstructure over a bitcoin transaction processing. Client does not maintain index with addresses and balances on them.


Can't run Bitcoin Core 0.13.1 I have been running Bitcoin Core 0.12.1 for many months - using Ubuntu (Linux).  Decided to upgrade to SegWit version - 0.13.1 - today.  Downloaded and extracted the files (on my Ubuntu / Linux system) but can't get it to run - there is no executable file.  Can anyone help?  Many thanks, D

the ppa for ubuntu is https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin it shows the support of ubuntu 0.13.1

so you need to run

sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update

otherwise you can compile from source


What's the difference between MtGox streaming API hosts? I'm trying to find out what the difference is between websocket.mtgox.com and socketio.mtgox.com for the MtGox streaming API. Looking at the Connecting section it looks like there are several combinations to be used:

websocket.mtgox.com/mtgox
socketio.mtgox.com/mtgox

both with http or https.

As far as I can see, there is no mention that they are different, however, I know from trying out things myself that they do behave differently. I've also seen in forums that other people have similar questions/problems as I have related to this.

Does anyone know what the differences are? Also are these differences expected and documented somewhere?

Further, the code snippet uses https as the protocol. Excuse my ignorance, but shouldn't we use ws or wss instead of http and https? Can someone explain that difference?

Thanks in advance for any information related to my questions!

UPDATE:
Actually, it looks like the URI scheme for websockets should be ws: or wss: and not like in the example http: or https:. Maybe this is a typo in the example or what's the deal for MtGox?

UPDATE:
So testing things in the browser, {ws,wss,http,https}://socketio.mtgox.com/mtgox all work and I don't see any difference. On the other hand, {ws,wss,http,https}://websocket.mtgox.com/mtgox all result in HTTP 400 Bad Request. Looking in the browser console I got the following error:

XMLHttpRequest cannot load http://websocket.mtgox.com/socket.io/1/?t=1367857246057. Origin null is not allowed by Access-Control-Allow-Origin.

Any ideas what might be going on?

Origin null is now allowed.

Your Origin header is not being set.

Try running your code in the browser from an actual domain name other than something like about:blank.

In chrome running:

var ws = new WebSocket('ws://websocket.mtgox.com/mtgox');
ws.onmessage = function(e){ console.log(e); };

results in failure from about:blank. However from an actual domain name results in success.


What’s the difference between a validation by nodes and a verification by miners? In Mastering Bitcoin, it says:

  The transaction is then broadcasted on the bitcoin network, where each
  network node (participant) validates and propagates the transaction
  until it reaches (almost) every node in the network. Finally, the
  transaction is verified by a mining node and included in a block of
  transactions that is recorded on the blockchain.

I assume that nodes are using public keys to validate a digital signature, but what do miners do? I know that they are solving a hash puzzle to find the nonce that generates a certain pattern of a hash value but are they verifying something here?

The rules by which a full node verifies a transaction are defined here in the Wiki, and here.

Full node or mining node both validate against the same set of rules. If they don't follow the rules, they have to carry the consequences and might get blocked/banned, if forwarding wrong information to the network.

Independent from Bitcoin, there is a difference between the two words, be it in software development or project management. verification is like a check list, were each parameter is checked against some specs ("the system complies with specification"). And validation is more process oriented ("the system meets the intended needs for a user").

In the  case of full nodes/mining node, both follow the verification in the same way, just after verifying against the specs, the miner follows  additional steps, and is eventually lucky to get the tx in the block and find the reward.


Exactly Who or What Assembles Transactions into Blocks? Users broadcast transactions into the network.  Miners find and compete to validate blocks created every ten minutes by combining transactions.  Who or what assembles the transactions into blocks every ten minutes?

Related: Setting the required number of leading 0s for the winning hash throttles the speed at which blocks, and therefore transactions, are validated.  Who adjusts that number?

Who or what assembles the transactions into blocks every ten minutes?

Miners do. They do this before they attempt to find a block solution. It's the reason that miners exist.

  Setting the required number of leading 0s for the winning hash throttles the speed at which blocks, and therefore transactions, are validated. Who adjusts that number?

The protocol defines how it should change. Each node works out the current difficulty independently, and each of them comes up with the same answer.


Chaos Signals to Decide Blockchains? Bitcoins require many gigawatts of electricity for mining, and so does the blockchain.

Aren't there much cheaper alternatives to solving mathematical equations, which use chaos?

For example, Sunspot patterns are a fingerprint of chaos and globally verifiable. If everyone on the chain uploads a 50kb cellphone photo twice a day... The total of that data would have the unpredictability of physical chaos. Isn't there a convenient chaos signal which is globally verifiable and which is better for allocating money and tasks than mining?

Apologies for being vague. I will try to clarify:

peer money and accounts nodes can be given a lottery ticket number as a pseudo random function based on a previous chaos result, ranging from 0 to 10^256.

Every hour the miners of the world return their collective measurement of a globally generated chaos signals, which returns a random number from 0 to 10^256, and the closest miner's ticket is recognized by all as the winner.

The winner gives his version of unverified transactions including transaction times and the time corresponding to the block challenge in a hash which includes sha-256 of all the previous blocks that have been tallied.

It would help me to understand hash contests, to know why the digital encryption wouldn't benefit from simply choosing a miner at random using tallied measurements of chaos from the cosmos or from global weather and so forth.

The main issue with choosing a miner "at random" is finding a verifiable public source for randomness. Most public randomness sources run through a centralized party, which is no good for Bitcoin, where everything needs to be cryptographically verifiable.

There have been some attempts at a public, verifiable randomness source in Bitcoin, but given that the system is eventually consistent and subject to collusion, it's been shown to be difficult. See "On Bitcoin as a public randomness source" and "Proofs-of-delay and randomness beacons in Ethereum".

Another possible way to avoid the issue of excessive energy consumption is Proof-of-Stake-based blockchains. Instead of creating a computational marketplace (which in Bitcoin is very competitive) to verify blocks, proof-of-stake uses staking of coins to decide what the next block is. You earn a block reward by committing money to a certain block. There are chain-based approaches (Peercoin and Blackcoin) and BFT-based approaches (Casper and Tendermint). Here's a good intro guide to PoS and Ethereum's Casper.


How to Create Bitcoin Cash HD Walllet in Javascript I am trying to create a Bitcoin Cash HD wallet through mnemonic phrase, but I don't know any npm package that is compatible with HD wallets and Bitcoin Cash. Could someone help me build the BCH HD Wallet?

Use Bitbox
From http://www.bitbox.earth/docs/gettingstarted:

Visual Mnemonic & HD Path
Generate any number of BIP 44 accounts. Toggle their addresses between cashaddr/base58 as well as mainnet/testnet. Easily view the private key in wallet import format (WIF) and extended public (xpub) and private (xpriv) keys. Vary the amount of entropy from 16 bytes up to 32 bytes creating shorter/longer mnemonics. Set a custom mnemonic and/or HD Derivation Path. Optionally use a password.


Can you mine Monero using sgminer? I've been mining Monero using my sgminer. I pointed it at https://moneropool.com/, but i when i visit the site to see my stats i see that my address is not found. Is my miner not working?

No you cannot. Monero uses a different PoW that is incompatible with sgminer, but also uses a different pool communication protocol that is Stratum-like but not actually Stratum.


What is the network mempools unconfirmed transaction expiration time? I sent a bare $1000 multisig transaction using sendrawtransaction with a too low fee.
When I create a new transaction with a higher fee, I m getting txn-mempool-conflict error, and when I use the bumpfee command, I m getting Transaction is not BIP 125 replaceable.
So given I sent it yesterday, in how much time I would be to access the money again?

Assuming most of the nodes on the network run with the default configuration of maxmempoolexpiry, most of the network mempools will drop your transaction after 336 hours (2 weeks).
You should have crafted your transaction such that it signals BIP125 replaceability (by having at least one of the input nSequence <= 0xfffffffd).
At this point, you could use CPFP (spend the output you just created with a high fee-paying transaction paying for the whole package) or use a pool "transaction accelerator" to send a new version of your transaction paying higher fees.
See also Why is my transaction not getting confirmed and what can I do about it? .


Generate address with RSA private key Can I generate a bitcoin address with my RSA private key?

Explain also how and why.

Not directly.  You'd first have to convert your RSA private key into an secp256k1 ECDSA private key (a 256 bit value between 0x1 and 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140).  You could do this by using a SHA256 hash of your RSA private key as your ECDSA private key.  Then you could import that hash (as a number) into a Bitcoin program that allows importing private keys.

However, I strongly recommend against this.  Use your RSA key for the things it was designed for.  Use a Bitcoin program for generating new Bitcoin private keys.  Haphazardly mixing different crypto together almost always reduces your security.


What is the best language to use for making API orders? I have heard that python is at a disadvantage when it comes to making API requests. It’s built on C which makes it slower. Are there any languages that are low level enough to make fast requests and still API accessible?

Go - easy concurrency, productive and effcient


have 12 word phrase need to find wallet I have my 12 word passphrase and would like to see the contents of my wallet how do I see this wallet on a new app or site?

If you don't care about your privacy, you can always find the associated extended public key (xpub*) and enter it in a blockchain explorer site such as https://www.blockchain.com/explorer.

Here is how a Bitcoin account's (M/44'/0'/0'/) extended public key for a given set of 12 seed words can be computed on a trusted air gapped offline computer that could be operating in a Faraday cage:

% echo "radar blur cabbage chef fix engine embark joy scheme fiction master release" | bx mnemonic-to-seed | bx hd-new | bx hd-private -d -i 44 | bx hd-private -d -i 0 | bx hd-public -d -i 0
xpub6DHi64TFkDPx2AH4q2ku3vX9LJYNpTis5tLrET8Sb9irp174eCkgtAnvBpyzQXgrtmF31Lrq4gTMGFUGcjJicMu9LdueVdqt6FZ2Wzcg8Fj

Ledger and Trezor devices can be queried to gain access to your xpub key.

Otherwise, just apply the KISS principle and use your wallet application that will naturally provide you with an account balance.


Recovering a Bitcoin Key Made From Rolling Dice So a few years ago I created a private key by rolling dice.  Following the instructions from bitaddress.org, I rolled a dice 99 times and entered the string into the bitaddress.org.  Rather than storing the private key in WIF or HEX, I wrote the 99 digit string of dices rolls.  However, I changed some of the dice rolls to obfuscate the true private key if someone else stumbled upon the 99 digit numbers.  Now I can't remember which digit(s) I changed.

Using Python libraries, I've been trying different combinations/permutations of the 99 digit number.  Stuff like what if I swapped two positions or straight replacement of one or two digits.  No luck.

Any ideas?  How fast can I create keys and check if my key matches my bitcoin address?  Python libraries that I have found let me check about 10 permutations a second.  How much faster can I do with C?

A 6 sided die rolled 99 times gives 6^99 = 1.088864372500119e77 possible combinations. This is almost exactly the same key space of a 256 bit private key (roughly 2^256), in other words, without knowing how many digits you changed, it is impossible.

Let's see, if my math is correct, I believe if you changed 1 digit, then you have to try each number 6 times, or 99 x 6 = 594 tries. If you changed 2 digits, then you have to try 594^2 = 352836. If you changed 3, 594^3 = 209584584. That is much more doable and will have less to do with what language you use, and more to do with how you implement it. You can generate the private key, and then the public key and encode it to see if the address matches (assuming you still have the address).


Re-use change address as a receive address Technically speaking, is it possible to reuse a change address from a previous transaction and make it a receive address?
What are the pros and cons of doing so? This does look like a bad privacy practice, but I wonder whether there would be any rationale for doing this.
Are there any wallets that currently support this functionality?

Technically speaking, is it possible to reuse a change address from a previous transaction and make it a receive address?

Technically that would be possible. The network rules have no concept of change or receive addresses - it's just a scriptPubKey that coins are sent to.

What are the pros and cons of doing so?

I see no reason why you'd want to do that. It's bad for privacy as it's gratuitously exposing linkage between transactions.

Are there any wallets that currently support this functionality?

I hope not.


Do you 'own' Bitcoins purchased via an exchange? I have been told by some that bitcoin exchanges do NOT record BTC transactions by a buyer/seller on the blockchain, but rather hold them in their own name and ledger -
eg, if I buy one BTC via an exchange, I do not own a UTXO on the blockchain, but simply have been 'assigned' a BTC that the exchange owns.

This of course, would give rise to counterparty risk, even ignoring fraud risk.

Truth or fiction?

Most exchanges are centralized services, operating in the way you've mentioned. So yes, the exchange owns the bitcoins, so there is significant counterparty risk involved with storing your coins on an exchange.


Special min difficulty rule for testnet I heard about this "special difficulty rule" for testnet, which allows blocks with timestamp 20 min later than the last block to have the min difficulty target.

So does it mean that the miners can simply declare that their block has such timestamp without actually waiting for 20 minutes?

It seems like that's the case... I mined a min-difficulty block only 13 min after the previous block(only for testnet).


How can I create a node on Liquid Sidechain? I want to create a node on Liquid Sidechain so that I can integrate Liquid Network with my decentralized exchange.

The Liquid sidechain is a private sidechain. To get access to it, you must contact Blockstream. See https://blockstream.com/liquid/


Can transaction id be used to verify a transaction? I have seen alot of questions here on "Transaction Malleability issue". Editing of transaction id can be done by miners or nodes which relay the transaction.
What I want to know is

whether the tx_id can be used to verify whether a transfer occurred successfully or not?
Is the issue restricted to bitcoin only? What are other coins in which transaction malleability can occur ?
Will it be solved in future upgrades of bitcoin core ?
Can tx_id be used to retrieve raw transaction info (as it is public) ?

Indeed malleability means that the tx_id can change as long as the transaction is not in the blockchain yet. That means you can NOT rely on the tx_id. But:

Once the transaction is in a block that is part of the blockchain, the tx_id does uniquely identify it and can be reliably used forever in the future to refer to it.
Basically all other coins ever forked from Bitcoin have the same (and many more) problems.
In Bitcoin it's already fixed by SegWit. The tx_id for SegWit transactions can not be malleated anymore (except by the person who has the private keys).


Changed HDD, New Windows Installation, Can't recover old wallet I recently installed Windows 8 on a separate HDD, copied over the BitCoin-qt directory, and the data directory. Including the wallet.dat.

But after running the -resync, my wallet shows up empty, and I have a new address.

Can someone please help me through transferring my wallet, I had 2 BTC in there.

*Note, I ran -resync in CMD and by appending it to the shortcut. I also have a relocated DataDIR

There is no command line argument -resync, you might want -rescan instead.

However, if you're faced with a brand new wallet I don't think that's the problem. More likely the data directory that Bitcoin-qt looks for is in a different location than where you placed your old copy.

Does the shortcut you use include the -datadir argument to redirect to your desired location, and was wallet.dat copied to that location?

You should try searching your filesystem for wallet.dat, if you find the new created wallet you'll know where Bitcoin-qt looks for the data directory.


Mining Pool code changes for supporting Bitcoin Cash Since its a bit difficult to to find developer related information for Bitcoin Cash I'm asking here. What changes would be required from a mining-pool developer's point of view to also support Bitcoin-Cash?

This could potentially work out of the box I believe.

You don't need to worry about replay prevention, or any of that when dealing with outputs generated by mining a block. These are new outputs and they aren't (under normal circumstances) available in the Bitcoin blockchain.
The BCC client might even provide this protection by default, I don't know. But once you do a payout to a miner, they will certainly add replay prevention if they spend their BCC by default.

https://github.com/coinfoundry/mining-core/blob/master/src/MiningCore/config.json#L218

I suggest you modify the existing BTC tag (instead of adding a new coin BCC),
https://github.com/coinfoundry/mining-core/blob/master/src/MiningCore/config.json#L218

Change those lines to work with the Bitcoin Cash daemon, instead of connecting to the Bitcoin Core client. Also make sure to modify the pool address to yours.

But I want to run both bitcoin and bitcoin cash - how do I do that?
I'm not going to do the work for you, there are multiple changes required and nobody here will be able to answer you to the full extent. I suggest you edit the BTC tag just because it great simplifies the amount of explanation I have to do and allows you to test if that works before even thinking about an engineered approach. People here generally don't answer software engineering questions, let alone those that involve BCC.


Sendmany bitcoin core I am trying to use the sendmany parameter of bitcoin-cli. My problem is as follows: is there any way that I could tell sendmany, to calculate the input accounts based on the balances, instead of using a specified account as the first parameter?

I've read, that the accounts parameter is deprecated, and shouldn't be used anymore, if this is the case, what is the proper usage of the sendmany function?

Others have written, that in this case, the first parameter should be simply ommited by adding a "" the empty string to it, but I somehow managed to create an address which has as it's account name, the empty string "". Whenever I try to use sendmany with the empty string it always says that I have insufficient funds (which is true, if we look at the address with the empty string as account name, but it would be false, looking at all the other addresses that I have).

I've tried to find a way, to delete the address which has the empty string as it's account name, but I couldn't find a way to do this.

Anyone facing/faced a simmilar situation that knows a solution to this?

Tthe empty string "" is for the default account, not for all accounts in your wallet. Whenever you add a label to an address, what you are really doing is adding it to an account. If you want to be able to spend from all of your addresses, you will need to move all of your addresses into the same account, i.e. remove their labels and make them the same label.


Unable to use `blocks` and `chainstate` from external drive I want to use data directory from a different location (external SSD) on a Windows machine. When I save the path for it in bitcoin.conf it still uses old data directory. How can I use datadir in bitcoin.conf?
bitcoin.conf file:

datadir=F:\bitcoin-mainnet

debug.log logs:

2021-03-05T01:34:22Z Config file arg: datadir="F:\\bitcoin-mainnet"

It still uses old data directory which doesn't have data for a synced full node (mainnet):

This got resolved but not sure why specifying path in bitcoin.conf for datadir doesn't work.
Workaround:
Open "%UserProfile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Bitcoin Core"
Right click on "Bitcoin Core (64-bit)" and go to properties.
The target for this shortcut should be "C:\Program Files\Bitcoin\bitcoin-qt.exe" -datadir=F:\bitcoin-mainnet
OR
Open command prompt/powershell and run "bitcoin-qt.exe" with datadir path
C:\Program Files\Bitcoin>bitcoin-qt.exe -datadir="F:\bitcoin-mainnet"


Installing bitcoin and bitcoincash on same server I have installed bitcoin core by using its source code in my amazon server by using the instructions given in the below youtube link

https://www.youtube.com/watch?v=tG_24G7bj_w

  Some portion of the commands that i used to install the bitcoin from
  the source code were given below,

  sudo mv ./include/bitcoinconsensus.h
  /usr/local/include/bitcoinconsensus.h mkdir -p /usr/local/lib sudo mv
  ./lib/libbitcoinconsensus.so /usr/local/lib/libbitcoinconsensus.so
  sudo mv ./lib/libbitcoinconsensus.so.0
  /usr/local/lib/libbitcoinconsensus.so.0 sudo mv
  ./lib/libbitcoinconsensus.so.0.0.0
  /usr/local/lib/libbitcoinconsensus.so.0.0.0 chmod 644
  /usr/local/lib/libbitcoinconsensus.so
  /usr/local/lib/libbitcoinconsensus.so.0
  /usr/local/lib/libbitcoinconsensus.so.0.0.0

Its running fine in my server. Now I need to install bitcoincash also in the same server using the source file.
I got the source file of bitcoincash from the below link

https://www.bitcoinunlimited.info/download

But i have a doubt that is there any conflict will occure when we install two coins in the same server,

  also from the given commands we can see that we have to move some
  common folders(eg libbitcoinconsensus.so , libbitcoinconsensus.so.0 )
  to the /usr/local/lib/ fiolder and /usr/local/include/ folder for
  installing both coin.

Then how can i install both coins from the source? Can alyone please give me to solve this problem?

install Bitcoin ABC on Ubuntu 14.04.5 LTS, alongside Bitcoin Core, using these instructions:

Note: You have to create a new username because bitcoin and bitcoin cash use the same directory, so it won't work.

Download the appropriate binary from here: https://download.bitcoinabc.org/

For me, the command would be:

wget https://download.bitcoinabc.org/0.16.2/linux/bitcoin-abc-0.16.2-x86_64-linux-gnu.tar.gz
Extract the archive:

tar xzvf bitcoin-abc-0.16.2-x86_64-linux-gnu.tar.gz
Rename the binary files:

cd bitcoin-abc-0.16.2/bin/; rename 's/bitcoin/bitcoinCash/' *
Install the files into /usr/local/bin:

sudo install -m 0755 -o root -g root -t /usr/local/bin *

Finally!

bitcoinCashd -version outputs:

  Bitcoin ABC Daemon version v0.16.2.0-6af5e93

  [...]

bitcoind -version outputs:

  Bitcoin Core Daemon version v0.15.1

  [..]

ls /usr/local/bin outputs:

bitcoinCash-cli  bitcoinCash-seeder  bitcoind    test_bitcoin
bitcoinCashd     bitcoinCash-tx      bitcoin-qt  test_bitcoinCash
bitcoinCash-qt   bitcoin-cli         bitcoin-tx

Note: You have to edit the default port on bitcoin.conf file, Since Bitcoin-core and Bitcoin-cash will use the same RPC port. rpcport=4523


How to generate a private key to create wallet through api in Block chain I need to pass private key while creating a wallet in blockchain.info through api call which is defined here https://blockchain.info/api/create_wallet

I'm using php for creating wallets.

Please suggest me any custom php function to create a private key (Wallet import format preferred) and pass in the create wallet api call.

Thanks in advance!

First create an account
https://blockchain.info/api/api_create_code
you will receive api code in email.
with which u can create ur wallet

https://blockchain.info/api/v2/create_wallet?password=wallet-password&email=email-for-wallet&api_code=this-will-be-in-your-email


Calculating total outgoing transaction fees associated with a single address? I'm building an app to display information pertaining to individual Bitcoin addresses.

I've been using the blockchain.info API to get data regarding the final_balance, total_received, and total_sent.

But I'm having a little trouble figuring out how to retrieve data on transaction fees.

Looking at the json when querying an address (for example 1CK6KHY6MHgYvmRQ4PAafKYDrg1ejbH1cE) I'm assuming I would need to iterate through the hash of transactions it returns, and use the hash of the transaction with the value "result" > 0?

I'm just not certain how to differentiate between spending and receiving when looking at the json.

The API blockchain.info provides for the address details does a ton of processing at it's backend (by accessing the blockchain for which they must have maintained a separate db for quick fetches). As far as the transaction fee is concerned, it can be calculated by finding the difference in the inputs and outputs of a transaction. This is somewhat tricky because the vin (input) for any transaction points to the output of another transaction. But the point being you can find the difference and the transaction fee.

I suggest you query the blockchain using the core Bitcoin API and maintain your own database as per your convenience. The blockchain.info API is kind of a dependency for the app and if their server goes down, so does your app. So maintaining a custom formatted data on your side is a good way to go and also ensures responsiveness.


How does the node system understand which ledger is the latest before updating their own ledger? I have two specific questions:

How does a new user realizes which is the correct copy of the ledger to be used when initially updating(downloading) the ledger, and why is it that a user cannot deceive it by broadcasting its ledgers manytimes. (there by giving the system a pseudo idea that that is indeed the majority ledger)

How does one understand if the two ledgers are the same? Does the hash function change with the last transaction? My specific doubt would be that considering that the hash will change with the guesses too even if the last block info is the same then how does the system realize that these are from the same block even if their final values are diff.

How does a new user realizes which is the correct copy of the ledger to be used when initially updating(downloading) the ledger

They find the highest-work valid blockchain. This is not the same thing as the most popular blockchain - if 999 nodes tell your node they're on a chain, but one node tells you about a longer chain, you will prefer the longer chain.

If you do not see the longer chain at least once, you will not switch to it. However, even if you start mining on the shorter chain, you will switch to a longer chain after it appears.

  How does one understand if the two ledgers are the same?

You compare the block hash of the chain tip. If they are equal, both nodes have identical blockchains. If they are not equal, the nodes have different blockchains.


Comparison BTC and ETH uncomfirmed transactions queue When I compare BTC mempool count and ETH transaction queues, ETH queues are much larger. I would appreciate explanations why it is so.

*BTC mempool count

https://blockchain.info/ja/charts/mempool-count

*ETH transaction queue

https://etherscan.io/chart/pendingtx

The ethereum chain has a far higher number of transactions than the BTC chain. This is mostly due to ethereum's faster block time, and the presence of many thousand smart contracts on ethereum, which all contribute to more transactions.

In the comments, it seems like you are comparing the transaction volume charts to the trade volume charts.

Trading of BTC and ETH happens largely on exchanges. These exchanges have trading engines that execute all trades within the exchange itself, and not on the blockchains. That is to say, if User A sells to User B, there is no corresponding blockchain transaction transferring those coins. Instead, both users have accounts on the exchange which are debited and credited. A blockchain transfer only takes place during deposits and withdrawals.

Through this process, many thousands of trades can take place without ever reflecting on the blockchain. However, interactions with smart contracts must happen on the blockchain, and contribute towards the total transaction volume.


When, if ever, will "peak bitcoin" occur? My (limited) understanding of bitcoin and other cryptocurrencies is that the costs of "mining" bitcoins was quite low in the early days, and the limiting factor in how fast they were mined was the small number of people who had the infrastructure to do so.  As time went on, however, the algorithms for mining bitcoins made it harder and and harder to get a new bitcoin in this way, and it is now rather difficult for anyone but the most serious miners to successfully mine a new coin.
This description of bitcoin's history makes it sound like an awful like a normal commodity such as crude oil:  it's easy to get the first barrels out of the ground, when there's not much capacity to do so;  but it gets harder as time goes on.  The net result (according to Hubbert, at least) is that there is a peak in the extraction rate of the commodity.  This is often referred to as "peak oil" in the case of crude oil.
Has anyone done a similar analysis to find out when "peak Bitcoin" or "peak Etherium" or what-have-you will occur?  In other words, in what year will the rate at which new bitcoins are being mined reach its peak?  Has this happened already?  Or is there something about cryptocurrencies that make them immune to these sorts of effects?

At the beginning of Bitcoin, every newly mined block (about every 10 minutes) creates 50 bitcoins. This is called the block subsidy. About every 4 years, this number cuts in half. Therefore, the peak extraction rate was about the first 4 years of Bitcoin's existence.
In fact, it was from 3 January 2009 to 28 November 2012.
The block reward includes both the block subsidy, and the transaction fees of transactions included in the block, so miners still get bitcoins, but they are not newly "extracted" bitcoins, they are bitcoins that someone else has paid.
Note that one block is mined about every 10 minutes. The number of miners is irrelevant. The speed of the miners is irrelevant. The system automatically adjusts itself so that one block is mined about every 10 minutes. That is the only reason why mining requires a lot more computational power than it used to - you are competing with a lot more people.


How is PSZ Timestamp encoded in Bitcoin core code? In Chainparams.cpp of the Bitcoin Core source, the encoded PSZTimestamp is as follows

04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73

The original string is

The Times 03/Jan/2009 Chancellor on brink of second bailout for banks

If you convert that into HEX using any String to Hex converter online, you get

5468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73

And this is a substring of the encoded PSZTimestamp from the 16th character. My question:

What are the first 16 character derived from?
04ffff001d010445

04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73

The above is actually Bitcoin Script, not just byte data.

This breaks down to:

04         # PUSH the next 4 bytes
ffff001d   # This is the same as the nbits for the block, which was the target for the genesis block difficulty
01         # PUSH 1 byte
04         # PUSHed 1 byte - I'm not entirely sure what this 4 represents
45         # PUSH the next 69 bytes (0x45 == 69)
# The text
5468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73


Multibit - error (or at least confusion) in 'How to check digital signatures" info for noobs This may seem trivial, but for someone who knows little about this lebvel of security and wanting to really get it right first time, I found it quite offputting ... whereas the suggested process should be confidence-building, no?

============================================

URL:  https://multibit.org/blog/2013/07/24/how-to-check-signatures.html

============================================

quoting:

Step 1 - SHA1 in action

The first step on the road to security is access to strong cryptography. We'll start by creating a simple one line text file:

$ echo "Hello world" > example.txt

The above has an expected SHA1 hash of 33ab5639bfd8e7b95eb1d8d0b87781d4ffea4d5d which we will now attempt to verify. Depending on your operating system you'll need to install a few applications in a particular order to establish a solid trust foundation.
Windows - install FCIV

Microsoft's File Checksum Integrity Verifier (FCIV) is a command line tool that provides access to SHA1 checksums.

Once installed, you can test it out on your example file as follows

  fciv.exe -sha1 example.txt

==================================

It was not clear to me precisely what the 'example.txt' file should contain.  If I entered the supplied line into a DOS box it didn't seem to work (in terms of creating a text file).  So I decided to create the text file myself..  Reading the line literally the text to include should be:

$ echo "Hello world" > example.txt

or maybe just:
$ echo "Hello world"

or maybe just
Hello world

??  Anyway, I tried loads of options and at no time could I get fciv.exe to generate the given key!!  >8-(

Giving up after 30 mins I tried the quick brown fox test easily found in Wikipedia and it worked first time, so the software is working and it is something to do with the suggested text file.

Sorry if this seems pedantic but if even very simple things don't check out, then it does not help confidence.

Cheers.

I also am having trouble getting the hashes to match on a Windows system (MultiBit, Bitcoin-Qt .zip and .exe).  I am using Microsoft's "unsupported" tool that the "hash document" references.  I suspect that I will have better results using Linux.

In response to your specific issue, the "$"  at the beginning of the command is the actual prompt.  This implies the command is being entered in a linux\UNIX "shell" (i.e. bash shell).  If it were a windows system you would see something like "C:\User\Sam> echo "Hello world" > example.txt"  The command still works in windows, but as you pointed out the output file is different.  In Linux/UNIX the same command would yield a file with only: Hello world     No punctuation, extra spaces or lines.  Therefore, the hash would be different under linux vs windows following the same command-line input.


Does createrawtransction accept scriptPubKey and redeemScript as inputs? According to the built-in RPC documentation the signature for createrawtransaction is:
createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,...}.

Gavin in his example on 2-of-3 multisigs is also passing scriptPubKey and redeemScript as input for createrawtransaction.

The code of createrawtransaction in bitcoin core for parsing inputs is:

 BOOST_FOREACH(const Value& input, inputs) {
   const Object& o = input.get_obj();
   uint256 txid = ParseHashO(o, "txid");
   const Value& vout_v = find_value(o, "vout");
   if (vout_v.type() != int_type)
   throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, missing vout key");
   int nOutput = vout_v.get_int();
   if (nOutput < 0)
   throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, vout must be positive");
   CTxIn in(COutPoint(txid, nOutput));
   rawTx.vin.push_back(in);
 }

so how exactly does createrawtransaction use scriptPubKey and redeemScript?

Yes, it accepts them (and any other parameters you care to specify in the JSON).  No, it doesn't use them---and I don't know why Gavin used them in his example.

There's a more detailed and more up-to-date example of spending a P2SH multisig output on the Bitcoin.org developer examples page.


Where can I download the Antminer S9i Software I would like to try putting some s9i software on my s9's but where can you download the s9i software or is that just the newest version of software that they have for the s9's. Where can I get the s9i software?

As MCCCS commented:

  Firmwares can be downloaded from Bitmain but Bitmain is smart enough not to upload S9i's firmware. You'll need to dump a friend's S9i's firmware by yourself.

Comment converted to Community Wiki answer in attempt to remove this Q from list of unanswered questions


Why does wallet.dat differ after running? What information is exactly saved inside the wallet.dat file? When I run the bitcoin daemon, then stop, then compare the new wallet.dat file with the old one, the binary files differ, although I didn't make any new transactions. Can you explain the reason of this behavior?

The wallet contains a lot of metadata, and is actually a database rather than a flat file. At a minimum it contains a record of where you were last synced to in the chain, allowing any node that loads this wallet to pick up where it left off.


what file/method is block reward processed? I have managed to build an altcoin (from litecoin source) but my coin requires that I make changes to the way rewards are made. I have been looking at the source code to try to find where block reward is handled and what method does all the work. I did find this (In what line of what file does the block reward depend on?) however this looks to be old as i don't see a main.cpp file in the litecoin source.

does anyone know the modern files/methods that handle this. I already managed to follow the steps for creating my genesis block and everything looks to be working. I'm now in the phase of making changes. I would like to find the method that handles creating a block with a block reward. I will be changing how the block reward is done.

while I see chainparams.cpp has an ability to change the reward amount. I'm looking for a way to build a new type of reward system so i will need to look at how a coin is made from nothing. My coin will not be minting coins on block creation so i need to change how that method works.

The function is called GetBlockSubsidy now and it can be found in validation.cpp.


how to recover a wallet from crashed bitcoin core I was synchronising for the first time bitcoin core on Mac OSX.
During this never ending process I had the brilliant idea to send some BTC to my wallet from my Kraken account. At some point the app crashed and I never managed to make it continue and finish synchronising. I restarted a new bitcoin core (saved the old, partial one). Now after a week I'm at about 40% (syncing takes another 3 weeks according the app). Where are my transferred bitcoins at this point? how can i get access to them? assuming the bitcoin core synchronising will never end (!) is there another way to retrieve my bitcoins?
As you can tell I'm a newbie. So bear with me....

Cheers

If you still have the wallet.dat file in the backup from your old bitcoin core, you can still access your funds. Let the new installation finish syncing, then import the wallet.dat using the "importwallet filename" command in the debug window console of bitcoin core, or "bitcoin-cli importwallet filename" from your computer's console.


how can I insert an arbitrary sha256 hash into the blockchain? If I want to prove that I wrote a particular document before a certain point in time, it would be sufficient to generate the sha256 hash of the document and somehow arrange for that hash to appear in the blockchain.

Is there an easy way to do that simply by sending a transaction and leaving it to the miners to arrange for it to get into the blockchain for me?

One way that occurs to me is that I can treat the hash as a private key (bitaddress.org will tell me the address and private key that corresponds to any given input), and send a Bitcoin to the corresponding address.  Then when I publish the document anyone can go through the same process and see the date of the transaction in the blockchain.

That seems a little convoluted.  Is there a simpler way?  Ideally free, not computationally intensive, and not requiring any special software to make the timestamp or to verify it.

You can encode any arbitrary data using the Bitcoin script's OP_PUSH and OP_DROP commands. For this, however, you would need some custom Bitcoin client, as the standard one does not allow you to send messages like this.

Alternatively, you could just use the hash as a part of the generation of a Bitcoin address and store it in the Block chain by destroying one satoshi on it.

There should be a topic covering encoding of any data into the Blockchain somewhere on this StackExchange, so you can also have a look at that.


Fraudulent transaction I have been in contact with a blockchain group and they are supposed to have a large amount of money sitting in my wallet waiting for withdrawal. I have had to send a large amount of money to try to get and each time am met with some excuse of why they cannot complete it. What can I do? Is there a way to even get my initial money back?

They don't have any money sitting in your wallet waiting for your withdrawal. They're just scamming you. Stop sending them money immediately.


Why are imported private keys stored to addressbook instead to recieving wallet? I followed this guide to import private keys which I generated with vanitygen into litecoin-qt.

walletpassphrase yourLongPassphrase 300
importprivkey yourPrivateKeyInWalletImportFormat

But now - why are imported private keys stored to addressbook instead of local recieving addresses in litecoin-qt?

That's a bit confusing. Can I recieve payments to that generated addresses now as the addresses where default wallet addresses?

Yes, you can send coins to this new address.  If you restart your client you'll see the address will have moved to your receive list of addresses.

The new address initially posts in your address book because of the need to scan the blockchain for all transactions associated with that private key.  But you have to actually restart your client to move the address to your receive list of addresses.


Where can I find the Bitcoin white paper in plain text markdown format? Is there a place where I can find the Bitcoin whitepaper by satoshi in plain text markdown format?


How does vanitygen calculate difficulty? It seems really random. 1d is 1353, 1L is 22, 11 is 256, 11L is 78508, 11x is 78508, 111 is 65536, 112 is is 1335, 113 is 1330, 114 is 1330, 1L1 is 1330.
I thought it was 58 to the power of the number of digits. Why isn't it?

There are two parts to this.

First is leading 1s.  A leading 1 represents a 0 byte i.e. 8 bits.  This means that for every additional 1 you prefix your search string with the difficulty increases by 256 (2^8).  You can see this easily by checking the difficulty of prefixes 1, 11, 111 etc.

Second is other characters.  Here the difficulty changes depending on how many bits you are specifying, because as your value is converted from base58 to an integer value and from there to a power of 2.  Depending on your second number in your 2-digit prefix the difficulty will move around a bit (plus there will be rounding errors).  Again, easy to see with prefixes of 12 and 1z (which are 1 and 57 in base58 encoding, respectively).

Once you get past all of that you should find that your 58 to the power of the number of digits comes in to play.  For example the difficulty of 1234 should be 58 times the difficulty of 123.


Why would a Tx's inputs not be assumed to be owned by a single service? From question 3 in a project titled Blockchain: CSI (in what looks like a very cool class, run by University of Virginia!):

  Problem 3. The Heuristic 1 (Section 4.3) used to detemine sets of public addresses owned by the same entity is based on the assumption that all inputs to a bitcoin transaction are controlled by the same entity. According to the paper, “the sender in the transaction must know the private signing key belonging to each public key used as an input, so it is unlikely that the collection of public keys are controlled by multiple entities (as these entities would need to reveal their private keys to each other).” Explain why this is not actually true. (A good answer will consider in more detail what is needed in the unlocking script to spend each input.)

How is this a flawed assumption?

Because it's possible to only partially sign a transaction (for example only one input) and then give that unfinished transaction to another party, who can then finish the transaction with their signature (for another input). Parties do not need to reveal their private keys to each other at all.

Only after all parties signed can the transaction be sent to the bitcoin network. A partially signed transaction would always be refused.