11

The challenge for picking a Coin Selection Algorithm is that there are multiple goals to optimize for: Privacy The Coin Selection should reveal as little as possible about the user's wallet contents. Transaction Fee One wants to minimize the current transaction fee, but also the overall long-term transaction fees. Non-dust change creation It would be ...


9

Merchants that only accept Bitcoin, will not accept Litecoin directly. However you can pay any Bitcoin merchant with a 3rd party that automatically converts your Litecoin to Bitcoin. The most well known service of this type is shapeshift.io Merchants can integrate their "shifty" button to make this easier for consumers to use, but the Shapeshift service ...


6

An output ("coin") is by definition either fully unspent or completely spent. There is nothing in between. A transaction has one or more inputs (which refer to the unspent outputs of earlier transaction) and it fully consumes them. A transaction can also have 1 or more outputs. For each output a value is specified (number of Satoshis), so by being a little ...


5

In practice your invoice fee should be cited in the most stable and liquid of the currencies you support. Typically your national currency since you live with it anyway. The contract would then stipulate that if the client pays in another currency that the amount that the client must pay is the going rate to sell that currency back into the primary ...


5

It is important to understand that the spent flag you are talking about, is not a field of an output that is stored in the blockchain. It is rather created internally by the client interacting with the blockchain. The only fields of information of an output that is permanently stored on the blockchain are: The Amount The Locking-Script Size The Locking-...


5

Your question indicates certain misconceptions about what Bitcoin is. I would advice you to take an afternoon to read the Bitcoin whitepaper, learn from other sources and understand as much as possible. It is possible to know what Bitcoins truly are without great technical knowledge. (Bitcoin transactions can only be made with the owner's private key. A "...


5

You are technically able to do this but it is strongly not recommended. A transaction can spend the output of another transaction so long as the parent transaction is known by the node in question, however this is quite fragile. Bitcoin transactions back reference by TXID, a cryptographic hash of the previous one being spent. Due to a property known as ...


4

I assume you're using Bitcoin-Qt, i.e. the reference implementation. Bitcoin-Qt works with accounts, not addresses. The balance of your wallet is the sum of each account balance. The purpose of accounts is to compartmentalize payments in labels such as "Savings", "Salary", "Friends", etc. for your own convenience. Each account has many Bitcoin addresses ...


4

The flaw in your thinking is that you assume your transactions will be confirmed. That is not the case. There is no guarantee that a transaction will ever be confirmed, and in fact, if the fee is too low, it is almost guaranteed that the transaction will never confirm. You should care because the person you are sending Bitcoin to cares that it confirms. You ...


3

there was nothing to "prohibit" a miner from spending/stealing someone else's funds That was never true, so far as I know, miners have never been able to spend other people's funds seen in normal transactions with the right spending scripts. A more accurate description of the situation you describe is perhaps that there was nothing to prohibit ...


2

You do not need to calculate previous transaction hash, because it is already known. To spend the previous output you just have to know tx hash output index in this tx output value output script plus you should choose fee new address then create some byte data and sign it with appropriate private key Good manual you can find here: How to redeem a ...


2

This seems rather odd to me. I try to time my purchases with Bitcoins for times when the price is high. And I try to time my purchases of Bitcoins for times when the price is low. If I use a service like this, I'll either be buying high or selling low, which is not my personal preference.


2

It appears that the wallet moved my funds to a new address in my wallet. That is normal and desirable behavior. See How does change work in a bitcoin transaction? Should a wallet always move the left over from m/49'/0'/0'/0/x to m/49'/0'/0'/x/0? This wallet is using BIP 49, which extends the hierarchical wallet organization described in BIP 44. ...


2

I beg to differ. If you go to https://blockchain.info/, and look at the 'latest transactions', you'll see numerous transactions taking place continuously. Also, there is a quite a bit of discussion within the bitcoin community about the need to increase the limit of 7 transactions per second, and ways that this limit can be increased.


2

I have fixed the issue by attaching input info while signing the transaction. createrawtransaction: createrawtransaction '[{"txid":"0cb0c97c206bf2229fac8800fe05410d23bbc5afe2b243ff921ef2065b210b34","vout":1,"scriptPubKey":"76a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac"}]' '{"mtRWdkBpAyz8pUoCYobABvnEe1xFPqvkJN":0.36972432}' result: ...


2

The only real "safe" way to invest in mining is to simply start mining yourself. There are many online resources for teaching you how to do this. Depending on the price of Bitcoin, your local electricity, network difficulty, and the price of your equipment your profitability will vary greatly. In most cases it may make sense to just buy and hold the coin and ...


2

Trying to enumerate all private keys using Bitcoin Core's wallet is extremely inefficient. Furthermore, any address that you generate in Bitcoin Core will inherently come from a HD seed because Bitcoin Core is a HD wallet and uses a HD seed. You also aren't going to get any information for a HD address that is not part of your wallet. However, I am not ...


2

A first thing to correct is that UTXOs are not referenced by address, but by the txid that created them. The addresses are purely a human abstraction about locking conditions to help think about ownership. So in your example what happens is that in the initial transaction tx0 created by A, B was credited with 10 BTC. Assume that transaction only had one ...


1

This Python library has a verify() method that will run the script and perform a few trivial checks. from btctools import Transaction >>> tx = Transaction.from_hex('...


1

If you build Bitcoin Core from master, you can use the new testmempoolaccept rpc method to check if your tx would have made it into the mempool. This will include checking the signature, and ensuring that your inputs are actually unspent. It does not add broadcast the tx into the mempool, but simply checks if it would have been accepted.


1

First of all, these are not P2SH-P2WPKH, these are normal P2WPKH outputs. They are not related to P2SH at all. The problem here is probably that the amount is incorrect. If you are providing the previous output data yourself, then the amounts is incorrect. You have it as 0.000560 but the actual amount is 0.00055999. Since Segwit commits to the amount in the ...


1

You should create multisig transactions. Multisignature (multisig) refers to requiring more than one key to authorize a Bitcoin transaction. It is generally used to divide up responsibility for possession of bitcoins. Standard transactions on the Bitcoin network could be called “single-signature transactions,” because transfers require only one signature — ...


1

That's not possible. If your friend has the private key, he has everything he needs to spend all the bitcoins of that address. What you could do: Use the private key (before he uses it) and send the coins to a new wallet and don't give him the new private key, seed...


1

BIP125 RBF (Replace-by-fee) transactions in bitcoin-core 0.15.0.1 appear to require a change address with a balance in order to facilitate a future RBF-based fee increase. By way of an example, consider the following transaction: Input - 1.00000 BTC Output - 0.99998 BTC Fee - 0.00001 BTC Change - 0.00001 BTC Assume the fee is too low. Now, we want ...


1

I have a "watch only address" of my cold storage in Electrum. In this watch only address I can see all tx, and as such also create tx. I just cannot sign it. So I create it, save it to USB stick, bring it to cold storage, sign it, and bring it back to deliver to the network. I would guess the same can also be done with core wallet.


1

You can import the private key, spend part of it, send the change back to the same address, and delete the key. This would leave a lesser amount in the same paper wallet, but is generally not a good practice (address reuse). Also, if the address has multiple inputs, you can just spend X if Y distinct inputs with exact change and that will work too. ...


1

Typically wallets do not support spending coins with any scriptPubKey except the ones they hand out themselves (in the sense that an address is a shorthand for a particulatlr scriptPubKey). This is for good reasons. It's impossible for wallets to scan for all possible combinations and alterations of scripts with keys they know, so it would inherently be a ...


1

Besides the whole blockchain database there is actually another database continuosly updated in each full node: The UTXO pool memory. When a transaction with a determined input sucesfully spend some transaction output, this outpus is removed from the UTXO pool memory. Otherwise the handle of the databases to find if a given UTXO hasn't been called by any ...


1

UTXO can only be spent completely. This happens by claiming them in the Transaction Input Script and requires a valid signature corresponding to the address the UTXO is associated with. The transaction inputs' value is then reassigned by the transaction to create new unspent transaction outputs. Usually, there are at least two outputs, one going to the ...


1

You can't encrypt individual BTC. Only the wallet containing BTC (to say it in a popular way, the real technology behind it is different) can be encrypted.


Only top voted, non community-wiki answers of a minimum length are eligible