Bitcoin Forum
March 30, 2024, 05:22:53 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 3 4 5 6 7 8 9 »
1  Bitcoin / Bitcoin Technical Support / Re: bitcoin-cli decoderawtransaction on: February 25, 2021, 12:42:58 PM
Can I test the transaction will go through without broadcasting it?
You can use the testmempoolaccept command.

Is there a way to use the testmempoolaccept cli command to not return false information if one of the inputs are not yet included in a block?
I tried the testmempoolaccept with 2 inputs, one has several hundreds of confirmations, the other one is not included yet in a block (is a zeroconf input).

"allowed": false,
"reject-reason": "missing-inputs"

I assume it rejects the transaction because I am trying to spend an input that is not yet confirmed. However, what if I want to spend that input on a CPFP transaction to broadcast the original transaction faster?
2  Bitcoin / Bitcoin Technical Support / Re: Small UTXOs on: February 19, 2021, 09:42:07 AM
Is there any way to bypass this error message?
error code: -26
error message:
mempool min fee not met, 15000 < 17463
3  Bitcoin / Wallet software / TrustWallet on: February 17, 2021, 07:12:30 PM
I would like to install and test on a brand new VPS (preferably CentOS 7 or CentOS Cool the TrustWallet core https://github.com/trustwallet, (especially the cli interface). I have tried with various methods, but it looks like I could not manage to do it.
Does anyone have a step by step guide on how to install it? Or, if somebody could help me install it, I would be more than happy to give SSH access to the server. I know, I know, it is not advised to give SSH access to a stranger, but I am not interested in the security of this server, it is an empty VPS and I will definitely wipe everything in a few days. Once installed, I would only play with some commands on the cli interface, would never use it live, it is just for learning purposes.

Any advise, comment is welcome. Thank you.
4  Bitcoin / Bitcoin Technical Support / Re: Small UTXOs on: February 17, 2021, 06:33:17 PM
Used this one, I am just not sure about the type of transaction.
What if it is combined? 30 P2SH and 10 bech32 inputs, how do I enter it?
If it is from a wallet that you have created then the input types should be the same since wallets don't usually generate more then one type of address.

OP is using Bitcoin Core... which will let you generate all three... Legacy, Nested and Native... (and create MultiSig's if you want Tongue)
I am using bitcoin core, bitcoin-cli but I am constructing the raw transaction manually.

So, it's entirely possible they have 30 P2SH and 10 bech32 inputs... Generally, it's caused by using the "default" options (which tries to generate bech32 addresses), but then unchecking the "generate native segwit (bech 32) address" box in the "receive" tab... this will give you a P2SH-P2WPKH (nested) receive address... but when you spend these coins, Bitcoin Core will default to bech32 change addresses if you haven't explicitly set it using the commandline arguments.

Quote from: Bitcoin Core commandline options
-addresstype
What type of addresses to use ("legacy", "p2sh-segwit", or "bech32", default: "bech32")

-changetype
What type of change to use ("legacy", "p2sh-segwit", or "bech32"). Default is same as -addresstype, except when -addresstype=p2sh-segwit a native segwit output is used when sending to a native segwit address)

Exactly. You summarized it very well.
5  Bitcoin / Bitcoin Technical Support / Re: Small UTXOs on: February 16, 2021, 08:59:10 AM
Here: https://jlopp.github.io/bitcoin-transaction-size-calculator/

What wallet are you using? Most wallets should let you define your fee rates and give you the transaction size at the point of signing as well.

Used this one, I am just not sure about the type of transaction.
What if it is combined? 30 P2SH and 10 bech32 inputs, how do I enter it?
6  Bitcoin / Bitcoin Technical Support / Re: Small UTXOs on: February 16, 2021, 08:56:40 AM
I am using bitcoin core, bitcoin-cli but I am constructing the raw transaction manually.
7  Bitcoin / Bitcoin Technical Support / Re: Small UTXOs on: February 16, 2021, 08:28:19 AM
Thanks for all the responses.
OK, all inputs are 3xxx (p2sh-segwit) and bc1xxx (bech32) and the output is a bech32 address.
How do I calculate the exact transaction size to set my fee accordingly?
8  Bitcoin / Bitcoin Technical Support / Re: Small UTXOs on: February 15, 2021, 04:30:41 PM
Thanks for the responses.
I use bitcoin core to select the inputs, basically the bitcoin-cli.
Let's say, I will pay a very small fee of 35,000 sats to a 40 input / 1 output transaction. This will stay unconfirmed for a longer period (maybe 1-2-3 weeks). If it stays unconfirmed, I will try to spend the unconfirmed output into another output, this time with the highest fee of a 1 input / 1 output transaction (at the time of writing this post at a 107 sats / vbyte, a total of about 15,000 sats). Will this increase my chances of being both transactions included into a block?
9  Bitcoin / Bitcoin Technical Support / Re: Small UTXOs on: February 15, 2021, 04:08:16 PM
I'd use Coin Control to select the inputs you want, and send the entire amount with the lowest possible fee. Then make sure your wallet keeps broadcasting the transaction. See my topic on consolidating small inputs.

Just in case, I'd keep the transaction under 10 kB. It might be easier to fit a block that way.

Thanks, will check it out. So, what you suggest is that if I have 40 small inputs that I would like to consolidate, it is better to make 4 transaction each with 10 inputs and 1 output?
10  Bitcoin / Bitcoin Technical Support / Small UTXOs on: February 15, 2021, 03:43:06 PM
What is the best way to group tens / hundreds of smaller inputs into a bigger output if speed of transaction is not important?
Just simply sign a transaction with a lower fee and eventually wait for the network to pick the transaction up?
11  Bitcoin / Bitcoin Technical Support / Re: Signed raw transaction on: January 31, 2021, 09:45:14 PM
Is there any way to import a BIP39 seed to bitcoin core?
12  Bitcoin / Bitcoin Technical Support / Re: Signed raw transaction on: January 30, 2021, 10:20:25 AM
Is there an easy way to get the signed raw transaction on bitcoin core, electrum wallet or any other popular wallets before or without broadcasting the transaction to the network?
Is the original query still up?
In Bitcoin Core, adding walletbroadcast=0 to your bitcoin.conf file will enable you to create wallet transactions without sending it to your own mempool.

If you use the GUI, simply create a transaction using the send tab but when you click "send", it wont be sent to the network or even your mempool (the transaction will have a Status: 0/unconfirmed, not in memory pool).
Then you can use "Right-click->Copy raw transaction" on the particular transaction to get its signed RAW transaction.

In Bitcoin-cli, sendto will simply create a transaction but wont send it to your mempool; but since it's in the wallet, you can use gettransaction to get its signed raw transaction.

This is a very good advise! It will be just hard to explain to newbies.
From my own experience, I would definitely do something similar (sign a raw transaction and save it offline or online) just for an extra safety precaution if for some reason I can't access my wallet any more.
13  Bitcoin / Bitcoin Technical Support / Re: Signed raw transaction on: January 28, 2021, 12:37:19 PM
Not sure I understand this. If someone finds my 12 words but not my passphrase, he can see I have a smaller balance than the reality? I have 10 BTC, and without the password, someone sees I only have 0.1 BTC?
You can use IanColeman.io to try it (of course only do this online to see how it works, not to create private keys you're going to use):
12 words: plunge snow gorilla wool help income mom kitten volcano warm top girl
First address: 15Q9XKiYX4RZhNLdKYt894o1zguyhufoPZ

Now add BIP39 Passphrase: \q?mpN[!\4`LA5w*
First address: 19mYSjt1VaiGpTop31uEMWJFYbW76MCRJ3

Without the password, the same 12 words lead to different addresses.

Thanks, will try it out.
14  Bitcoin / Bitcoin Technical Support / Re: Signed raw transaction on: January 28, 2021, 12:34:19 PM
It works by basically deriving two different seeds:

Mnemonic Code -> Seed1
Mnemonic Code + passphrase -> Seed2

Seed1 is here used for small amounts. Enough funds to let the thief be happy, while only being a small portion of your total wealth.
Seed2 derives other private keys. These are used to store the majority of your wealth.


It basically allows you to have a "hidden wallet".
Without the passphrase, there is no way to know whether there is such a "hidden wallet".
Any passphrase can be used to derive new seeds. But only the correct one will derive the seed which is being used to derive the private keys for holding the majority of funds.

Understood. And basically, from Seed1, the thief will never find out that I also have a Seed2.
As far as I know, the BIP39 mnemonic is not working yet on bitcoin core, right?
15  Bitcoin / Bitcoin Technical Support / Re: Signed raw transaction on: January 28, 2021, 12:31:19 PM
You can set a password (for instance in Electrum) to extend the mnemonic. So with just 12 words, you'll find your daily spending money worth 2 pizzas. But if you add your own password to the 12 words, you'll get your hodlings worth 2 airplanes.
Not sure I understand this. If someone finds my 12 words but not my passphrase, he can see I have a smaller balance than the reality? I have 10 BTC, and without the password, someone sees I only have 0.1 BTC?
16  Bitcoin / Bitcoin Technical Support / Re: Signed raw transaction on: January 28, 2021, 12:21:27 PM
I'm not sure.
If someone wants to rob you, it probably doesn't matter whether you have the private key with you or a signed tx which shows how much money you own.

There are 2 cases:
1) If you have the private keys with you, he steals your money
2) If you don't but the burglar sees how much money you own, he might kidnap you if the amount is high enough. And if the amount is pretty low, well then losing this wouldn't matter at all and the whole setup wouldn't be required.

So in the end it might come down to what is more valuable to you: Your money or your health.

So, i'd say this question is not as easy to answer as you might think.


However, having a menmonic code with you, which is protected by a BIP39 passphrase might be a better option here.
The thief would take your mnemonic code and steal all the low amounts of BTC from the wallet. Without the password however, he will never access the large sum of BTC. You lose a little bit of money but don't get kidnapped.

Of course, your life is more important than your funds. No matter if it is private key or a signed tx, a robber would easily find out how much do you own and if he wants to take this from you... well there is not too much you can do.

Same applies to a BIP39 passphrase protected mnemonic code. He sees there are only a few bucks, takes or leaves them and you are free. He won't know how much you own. And you saved the majority of your funds.

With your approach.. if he sees the signed transaction, he knows how much money there is. Might be worth to kidnap someone.

Not sure how the BIP39 passphrase protected mnemonic code would not reveal your balance. Care to explain this? Thank you.
17  Bitcoin / Bitcoin Technical Support / Re: Signed raw transaction on: January 28, 2021, 11:47:50 AM
Splitting a mnemonic code or seed like that is not a good idea at all.

Using a secret sharing scheme is superior since it does not leak any information about the secret at all.

Right, but the secret sharing scheme has two main issues: 1) amnesia (you forgot where did you store one of the 3-4-5 pieces) and 2) what if one of the pieces is somehow damaged.

Regarding 1), you can't protect against everything.
If you forgot the locations where you stored the mnemonic code, you might as well forget how the service (your service) is called. Or that exchanges exist. Or you might even forgot that bitcoin exists.
That's a bad argument IMO.

For 2), that's what a N-out-of-M scheme is for. You might have a 4-out-of-7 scheme. Or a 2-out-of-5 or whatever.




Exactly! This is why you most probably need to destroy the private keys of wallet A right after you signed the transactions. Smiley

Another problem with your approach is, that the user will depend on your 3rd party service.

Given that a user follows what you describe, after not having any possibility to access his coins, he relies on only your 3rd party service to broadcast that signed transaction.
The whole setup allows you to blackmail the user following your advices.

While the user could save the signed transactions himself, the user you are targeting with such a service probably doesn't even know what a signed transaction is.
Even without blackmailing, he relies on you not losing the signed tx.

Moving from proper risk management to relying on a 3rd party is... not how it is supposed to work.


Let's forget the 3rd party for now. Do we agree on one thing? If you want to protect against being robbed, it is safer to store 3-4 different signed transactions than to store the private key of wallet / address. Right or wrong?
Of course, you still need to somehow have access to all backup addresses (by storing the private keys of all backup addresses). But, if for some reason someone steals from you the private keys of the backup wallets and he doesn't know you are wealthy, he will probably check the balance, see it is 0 and will go away throwing it, thinking that this was just a test wallet and the probability of receiving funds later to this address are close to 0.
18  Bitcoin / Bitcoin Technical Support / Re: Signed raw transaction on: January 28, 2021, 09:32:57 AM
IMHO, the best scenario is to keep the seed phrase in your head / mind, this way, it can't be stolen.
And, if for some reason, you forgot the seed phrase (or a wallet.dat passphrase), you can simply run the already signed transaction that will broadcast your funds to another address you control (and possibly have the keys somewhere else, not in your mind... Smiley), or have it with a third party where you can KYC yourself and get back your funds.
19  Bitcoin / Bitcoin Technical Support / Re: Signed raw transaction on: January 28, 2021, 09:20:15 AM
You should never delete a wallet.
Of course you should not, this was probably an extreme advise that should definitely not be followed by newbies. But if you setup 5 wallets / addresses: wallet A, B, C, D, E and you keep everything on wallet A, (B, C, D, E being all empty wallets) and you sign 4 different transactions to send all balance on wallet A to B, C, D, E (just save, not broadcast it), then you should simply take care of private keys of 4 empty wallets (B, C, D, E). Noone can rob you in this case. And, if you lose (or destroy) private keys of wallet A, you simply broadcast the transaction to any of the other wallets.

So instead of "be your own bank" and "not your keys, not your coins", you want people to completely rely on third party services and give them the power to broadcast away your coins whenever they want.

You do not need to rely on third party services, this is totally optional. You can keep all the signed raw transactions yourself, you can run your own node and verify every hour if the signed raw transaction is not invalidated and take action every time is needed.
Just think about this way:
a) what can I do if I somehow find the private key of your non-empty wallet (wallet A)? I can send all your funds, wherever I want, right? and you find this out only after all your funds are gone, right?
b) what can I do if I somehow find one of your previously signed transactions? the only thing I can do is to move your funds from your wallet A to one of your other wallets (B, C, D, E) and as soon as this is done you get instantly notified by wallet B that you received funds and you can immediately move away funds from there just to be save.

Which one of the above 2 scenarios are safer in your opinion? a or b?
20  Bitcoin / Bitcoin Technical Support / Re: Signed raw transaction on: January 28, 2021, 08:38:28 AM
Splitting a mnemonic code or seed like that is not a good idea at all.

Using a secret sharing scheme is superior since it does not leak any information about the secret at all.

Right, but the secret sharing scheme has two main issues: 1) amnesia (you forgot where did you store one of the 3-4-5 pieces) and 2) what if one of the pieces is somehow damaged.

If you consider your wallet instantly compromised and lost as soon as someone has access to the mnemonic code (which in itself is correct), then you also should instantly consider all coins gone if wallet A is lost.
You shouldn't differentiate here.
Based on this, the coins would be lost before you could even broadcast the raw transaction.

Exactly! This is why you most probably need to destroy the private keys of wallet A right after you signed the transactions. Smiley This way, you only store private keys of wallet B (or simply use wallet B on a custodial exchange / wallet where you can login every time because you previously made the KYC) with 0 balance. With the custodial wallet, there is no risk of the exchange being hacked, because you don't store anything there, you will only use the wallet B if you'll ever need the backup. Best is to sign the same UTXO to more than one address and if you'll ever need the backup transaction just simply broadcast the one that you can surely access.

Further, this only works if you do not make any transaction after signing that "backup transaction".
Once a transaction is done, the transaction will be invalid.
So, in your case, this backup transaction has to be done after each transaction making it quite inconvenient.

I am aware of this, read the entire post please. This is why after every transaction (incoming or outgoing), the wallet itself should sign the remaining (unspent) UTXO-s and send the signed transaction to the external service (via an API). Otherwise, this has to be done manually which is definitely inconvenient as you explained. But for a "saving account" (just to use a banking term, that you do not use quite often to spend from it, this could work quite well.
Pages: [1] 2 3 4 5 6 7 8 9 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!