Search content
Sort by

Showing 20 of 45 results by columbo
Post
Topic
Board Discutii Servicii
Re: Care sunt cele mai bune exchange-uri in timp real valabile in Romania?
by
columbo
on 29/03/2019, 12:36:51 UTC
Cel mai bun curs atat la vanzare cat si la cumparare gasesti acum la www.coinvertit.com. EUR si RON in si din BTC, LTC, BCH si DASH.
Post
Topic
Board Bitcoin Technical Support
Re: bitcoin-cli - RBF transaction
by
columbo
on 20/12/2017, 00:27:24 UTC
Thanks. Do I need to use createrawtransaction or using bitcoin-cli's sendmany command will also be RBF enabled if I set "walletrbf=1" to my bitcoin.conf?
Also, if a transaction was started with RBF option, how do I effectively rebroadcast the same transactionid with a higher fee?
Post
Topic
Board Bitcoin Technical Support
bitcoin-cli abandontransaction
by
columbo
on 20/12/2017, 00:23:35 UTC
What happens if I use bitcoin-cli's abandontransaction command (https://chainquery.com/bitcoin-api/abandontransaction) on an unconfirmed transaction that is still on the mempool? Is there any risk of doing this? Will all my spent amounts return back to my original input?
Post
Topic
Board Announcements (Altcoins)
Re: [ANN] COBINHOOD - ZERO Trading Fee Cryptocurrency Exchange
by
columbo
on 18/12/2017, 21:46:16 UTC
Where did the whitepaper disappear? No longer on the website.
Post
Topic
Board Bitcoin Technical Support
CPFP
by
columbo
on 08/12/2017, 07:54:30 UTC
Hello,

I have made 2 payments via bitcoin-cli about 24 hours ago. One had a 120 sat per byte fee, the other one had a 160 sat per byte fee. The problem is that these transactions are not yet confirmed on the blockchain (probably because the 200k+ unconfirmed transactions).
Now, I have 2 addresses with funds (0.1 and 0.2 both with 0 confirmations). bitcoin-cli shows a balance of 0.3 even if both the addresses has 0 confirmations.
Now, what happens if I try to spend these amounts? Can I spend them?
Also, if I set a higher fee (for example 6-800 sat per byte) for a new transaction, will this mean my earlier 2 transactions will also be confirmed faster?

Thanks in advance for your comments!
Post
Topic
Board Bitcoin Technical Support
bitcoin-cli - RBF transaction
by
columbo
on 03/12/2017, 15:52:59 UTC
Is there any tutorial on how to use bitcoin-cli to send an RBF transaction?
Can someone give me some hints on how to do this. Thank you.
Post
Topic
Board Bitcoin Technical Support
Re: wallet.dat backup
by
columbo
on 01/12/2017, 15:21:15 UTC
Also, will my wallet.dat hold the private keys of all my regular addresses? Even if I used the wallet.dat to generate let's say 5, 10 or 25 thousand regular addresses?

And I suppose that if I have the public and private key of a regular address, I can always regenerate the segwit address and spend all funds that are on that specific segwit address, right? Will the "bitcoin-cli addwitnessaddress 1myregularaddress..." command always generate the same segwit address?
Post
Topic
Board Bitcoin Technical Support
Re: wallet.dat backup
by
columbo
on 01/12/2017, 08:03:59 UTC
Thank you. If I generated a witnessaddress and do not know the public key used to generate it, how do I spend funds that are on witnessaddress if I move wallet.dat to another core?
Post
Topic
Board Bitcoin Technical Support
Re: wallet.dat backup
by
columbo
on 30/11/2017, 07:40:30 UTC
If I have an encrypted wallet.dat file under bitcoin core, and I frequently use the getnewaddress and addwitnessaddress commands, how often should I backup the wallet.dat file?
If you are using the latest Bitcoin Core, then you should make a new backup every 1000 addresses. That is the default keypool size and you should make a new backup whenever the keypool runs out. This should be done regardless of HD or non-HD wallet, and even more so because you are using addwitnessaddress.

Also, you will need to unlock your wallet every 1000 addresses so that the keypool can be refreshed.

This was the case with the old format, as far as I know, since bip32 was introduced (I think this is the bip for the current HD format) then you no longer need to be making backups each time, but I don't know how this would be the case to be honest.

Even if HD mode is enabled, and you make receive a transaction with a newly generated key, how can a former HD enabled wallet.dat know that this transaction was received, if the key was never generated? same goes for sent coins. This confuses me a great deal. I think it has something to do with pre-generated addresses that you don't see but already are there or something along the lines... it's weird to think for a non coder. I would like achow101 to explain this in laymans.

My advice is that even if you are using HD mode, you keep making backups and don't delete previous backups, just rename them.
You should keep making backups regularly. What HD wallets do is that you can still use old backups and still generate the private keys that are not in the keypool at the time of backup.

The wallet contains a field which has the latest block height that the wallet is synced up to (as in it has the transactions for the wallet up to that block height). So when restoring, Bitcoin Core will know where it should begin rescanning the blockchain to get any new transactions.

Because OP is also using addwitnessaddress, older backups will not know about those witness addresses (the scripts themselves must be added to the wallet) and addwitnessaddress will need to be called again on every single address generated.

One question: How to enable HD mode?
And another one: what do you mean by this: "older backups will not know about those witness addresses (the scripts themselves must be added to the wallet) and addwitnessaddress will need to be called again on every single address generated." So, if my wallet.dat has funds on a single witnessaddress and I move the wallet.dat to another node, I won't see there the witness address? If so, do I have to remember the non witness address I used to generate a specific witness address?
Post
Topic
Board Bitcoin Technical Support
wallet.dat backup
by
columbo
on 29/11/2017, 17:26:25 UTC
If I have an encrypted wallet.dat file under bitcoin core, and I frequently use the getnewaddress and addwitnessaddress commands, how often should I backup the wallet.dat file?

Thank you!
Post
Topic
Board Exchanges
Re: HitBTC.com - The most advanced cryptocurrency exchange
by
columbo
on 21/11/2017, 14:53:36 UTC
How long does it take for a bitcoin deposit to show up in my account? The blockchain already confirmed my deposit, but still nothing showing up in my account. What can be wrong?
Post
Topic
Board Bitcoin Technical Support
Re: SegWit change address becomes legacy???
by
columbo
on 15/11/2017, 17:53:18 UTC
What do you think about this solution?
In my case, after a transaction from segwit addresses I ended up with my entire balance on one legacy address.
So, what if before each spending, I check the balance of the wallet (in my case only one address) and calculate the change amount before payment is made.
So, for example: if my balance is 0.55 and I need to send 0.25 to somebody, the change will be 0.30 (minus fee).
Now, I can easily include in sendmany a new (or existing) segwit address I generate and make sure the fee is deducted only from the new segwit address. This way, I will end up with 0.30 minus the sending fee in a new segwit address. And next time, when I send out funds, I always do this, so I will always end up with my balance on one segwit address.

Is there anything wrong with my assumption?

How do you specify what address in sendmany will be used as a miner's fee?

Code:
sendmany {address:amount,...} [minconf=1] [comment]

The point of sendmany was to allow several recipients (to send to different addresses at once from a single input) but I dont see where it lets you specify what address is going to be used as a fee.

I would be sure to know what im doing before doing anything of this nature.

sendmany has the option to select which receiving address will pay the fee. So, if I treat my change / segwit address as one of the recipients and specify that the fee is deducted only from this new change / segwit address than this address will receive everything back (my starting balance on original segwit account minus all payments need to be made) minus the fee.

https://chainquery.com/bitcoin-api/sendmany

Parameter #1—from account
Parameter #2—the addresses and amounts to pay
Parameter #3—minimum confirmations
Parameter #4—a comment
Parameter #5-subtractfeefromamount is missing from the bitcoin RPC GitHub Issue #6500
Result—a TXID of the sent transaction

But where are you choosing what address you want to use to recieve the change of the address? You may be able to choose paramater 5 (which is not substractfeefromamount but subtractfeefrom  followed with the address):


Code:
5. subtractfeefrom         (array, optional) A json array with addresses.
                           The fee will be equally deducted from the amount of each selected address.
                           Those recipients will receive less bitcoins than you enter in their corresponding amount field.
                           If no addresses are specified here, the sender pays the fee.
    [
      "address"          (string) Subtract fee from this address
      ,...
    ]

But I still don't see any command that lets you specify what address you want to receive the change at?

To a new segwit address I create. So, it needs more steps:
1. Check your balance ($balance).
2. Calculate the real amount you need to send to different receivers ($amounttosend).
3. Calculate how much is the rest ($rest = $balance - $amounttosend).
4. Create a new segwit address (bitcoin-cli addwitnessaddress 1....) $segwitchangeaddress
5. Create the sendmany command with all the addresses and amounts where you need to send + add another recipient ($segwitchangeaddress) with the $rest as amount and select to pay the fees only by this address.

This way, you always spend ALL your output but you can make sure that the change / rest is coming back to a segwit address, not a legacy address. Does that make sense?

Im not sure if your method would work. You should ask achow first in my opinion. Here's a guy that was trying to do something similar:

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

And here gmaxwell said that you shouldn't mix BTC addresses and segwit addresses within the same wallet:

I think the idea so far is to add a segwit account to segwit enabled wallets.  The segwit account then has segwit addresses (p2sh at first).  The user is free to choose between his segwit account and non-segwit account and whether he wants to transfer his funds to the segwit account.  When he uses the segwit account, he uses segwit change addresses.  So every user can decide for himself if/when he wants to update to segwit (of course, only after it gets activated).

That sounds like foolish wallet construction, IMO.  Don't do that.  A wallet should use segwit (in which case all newly generated addresses should be segwit) or it shouldn't (in which case none of it is).

As far as bare P2WPKH outputs, indeed-- those could be used for change, but they're more identifiable which is pretty ugly.

Honestly I would wait until 0.16 to deal with segwit. I think they will allow you to manage several different wallets at once, so you can have a legacy wallet and a segwit wallet and change address will automatically be segwit in the segwit wallet or something along the lines.

Im too paranoid to use segwit until I have it isolated in another wallet and there's proper GUI support.


Hopefully achow is checking this thread and he will give his opinion.
Regarding the risks, are there any risks mixing legacy and segwit addresses on the same wallet using bitcoin core?
Post
Topic
Board Bitcoin Technical Support
Re: SegWit change address becomes legacy???
by
columbo
on 15/11/2017, 17:21:44 UTC
What do you think about this solution?
In my case, after a transaction from segwit addresses I ended up with my entire balance on one legacy address.
So, what if before each spending, I check the balance of the wallet (in my case only one address) and calculate the change amount before payment is made.
So, for example: if my balance is 0.55 and I need to send 0.25 to somebody, the change will be 0.30 (minus fee).
Now, I can easily include in sendmany a new (or existing) segwit address I generate and make sure the fee is deducted only from the new segwit address. This way, I will end up with 0.30 minus the sending fee in a new segwit address. And next time, when I send out funds, I always do this, so I will always end up with my balance on one segwit address.

Is there anything wrong with my assumption?

How do you specify what address in sendmany will be used as a miner's fee?

Code:
sendmany {address:amount,...} [minconf=1] [comment]

The point of sendmany was to allow several recipients (to send to different addresses at once from a single input) but I dont see where it lets you specify what address is going to be used as a fee.

I would be sure to know what im doing before doing anything of this nature.

sendmany has the option to select which receiving address will pay the fee. So, if I treat my change / segwit address as one of the recipients and specify that the fee is deducted only from this new change / segwit address than this address will receive everything back (my starting balance on original segwit account minus all payments need to be made) minus the fee.

https://chainquery.com/bitcoin-api/sendmany

Parameter #1—from account
Parameter #2—the addresses and amounts to pay
Parameter #3—minimum confirmations
Parameter #4—a comment
Parameter #5-subtractfeefromamount is missing from the bitcoin RPC GitHub Issue #6500
Result—a TXID of the sent transaction

But where are you choosing what address you want to use to recieve the change of the address? You may be able to choose paramater 5 (which is not substractfeefromamount but subtractfeefrom  followed with the address):


Code:
5. subtractfeefrom         (array, optional) A json array with addresses.
                           The fee will be equally deducted from the amount of each selected address.
                           Those recipients will receive less bitcoins than you enter in their corresponding amount field.
                           If no addresses are specified here, the sender pays the fee.
    [
      "address"          (string) Subtract fee from this address
      ,...
    ]

But I still don't see any command that lets you specify what address you want to receive the change at?

To a new segwit address I create. So, it needs more steps:
1. Check your balance ($balance).
2. Calculate the real amount you need to send to different receivers ($amounttosend).
3. Calculate how much is the rest ($rest = $balance - $amounttosend).
4. Create a new segwit address (bitcoin-cli addwitnessaddress 1....) $segwitchangeaddress
5. Create the sendmany command with all the addresses and amounts where you need to send + add another recipient ($segwitchangeaddress) with the $rest as amount and select to pay the fees only by this address.

This way, you always spend ALL your output but you can make sure that the change / rest is coming back to a segwit address, not a legacy address. Does that make sense?
Post
Topic
Board Bitcoin Technical Support
Re: SegWit change address becomes legacy???
by
columbo
on 15/11/2017, 16:39:26 UTC
What do you think about this solution?
In my case, after a transaction from segwit addresses I ended up with my entire balance on one legacy address.
So, what if before each spending, I check the balance of the wallet (in my case only one address) and calculate the change amount before payment is made.
So, for example: if my balance is 0.55 and I need to send 0.25 to somebody, the change will be 0.30 (minus fee).
Now, I can easily include in sendmany a new (or existing) segwit address I generate and make sure the fee is deducted only from the new segwit address. This way, I will end up with 0.30 minus the sending fee in a new segwit address. And next time, when I send out funds, I always do this, so I will always end up with my balance on one segwit address.

Is there anything wrong with my assumption?

How do you specify what address in sendmany will be used as a miner's fee?

Code:
sendmany {address:amount,...} [minconf=1] [comment]

The point of sendmany was to allow several recipients (to send to different addresses at once from a single input) but I dont see where it lets you specify what address is going to be used as a fee.

I would be sure to know what im doing before doing anything of this nature.

sendmany has the option to select which receiving address will pay the fee. So, if I treat my change / segwit address as one of the recipients and specify that the fee is deducted only from this new change / segwit address than this address will receive everything back (my starting balance on original segwit account minus all payments need to be made) minus the fee.

https://chainquery.com/bitcoin-api/sendmany

Parameter #1—from account
Parameter #2—the addresses and amounts to pay
Parameter #3—minimum confirmations
Parameter #4—a comment
Parameter #5-subtractfeefromamount is missing from the bitcoin RPC GitHub Issue #6500
Result—a TXID of the sent transaction
Post
Topic
Board Bitcoin Technical Support
Re: SegWit change address becomes legacy???
by
columbo
on 15/11/2017, 06:35:50 UTC
Because segwit wallet support is not fully implemented in Bitcoin Core, all addresses generated (including change), will be non-segwit addresses. Although it is capable of converting a non-segwit address into a segwit address for you to receive it, the wallet will not do that automatically for change addresses.

Thanks. But what about the above scenario? Are there any risks using it and are my assumptions correct?
Post
Topic
Board Bitcoin Technical Support
Re: SegWit change address becomes legacy???
by
columbo
on 14/11/2017, 18:44:34 UTC
What do you think about this solution?
In my case, after a transaction from segwit addresses I ended up with my entire balance on one legacy address.
So, what if before each spending, I check the balance of the wallet (in my case only one address) and calculate the change amount before payment is made.
So, for example: if my balance is 0.55 and I need to send 0.25 to somebody, the change will be 0.30 (minus fee).
Now, I can easily include in sendmany a new (or existing) segwit address I generate and make sure the fee is deducted only from the new segwit address. This way, I will end up with 0.30 minus the sending fee in a new segwit address. And next time, when I send out funds, I always do this, so I will always end up with my balance on one segwit address.

Is there anything wrong with my assumption?
Post
Topic
Board Development & Technical Discussion
Re: P2SH-P2WPKH (Segwit) change addresses in Bitcoin Core - how?
by
columbo
on 14/11/2017, 15:51:40 UTC
Hi,

I am running a service that accepts user deposits and sends withdrawals. I am using Bitcoin Core for the wallet.

I'd like to go full-Segwit with my service, but here's the problem: bitcoind wallet does not generate P2SH-P2WPKH (Segwit) change addresses by default. So even if I generate P2SH-P2WPKH addresses to accept deposits from my users via addwitnessaddress, whenever I send coins, the change is going to a P2PKH address.

I could manually create a P2SH-P2WPKH change address by (in pseudocode):

Code:
tx = createrawtransaction([], amounts)
chaddr = getrawchangeaddress()
chaddr = addwitnessaddress(chaddr) # this creates a P2SH-P2WPKH address from the P2PKH change address
# now fund the transaction
tx = fundrawtransaction(tx, changeAddress: chaddr)['hex']
tx = signrawtransaction(tx)['hex']
sendrawtransaction(tx)

No the thing is that addwitnessaddress(chaddr) breaks things a little since the resulting address is added to account addresses, and is NOT marked as a change address. Therefore it is used as a regular account address and generates send/receive transactions. It looks like it does not break anything except creating additional transactions returned by listtransactions and inaccurate "amount" fields.

So, a solution I'd really love to see is:

1. make the wallet generate segwit change addresses by itself so that we can just use sendtoaddress and other RPC calls without workarounds (maybe an option in config?),
2. somehow make the address resulting from addwitnessaddress(chaddr) as a change address,
3. or allow getrawchangeaddress to generate P2SH-P2WPH address in the first place.

Obviously (1) would be much better, but at this point I am looking for any solution that would "just work" and not break my workflow.

Cheers and thanks,
Ethan

Thanks for this code Ethan. Have you managed to do this with sendmany as well?

And something else. When you pay, the change is coming back to a Legacy Address (1...). What if you add with addwitnessaddress a SegWit address to this new Legacy change address? Will the balance on the newly created segwit address be the same as the Legacy change address? If yes, when paying again from wallet, will the wallet use the Legacy change address or the segwit address as input? Are there any risks with creating a segwit address for a legacy address that has a balance on it?
Post
Topic
Board Bitcoin Technical Support
Re: SegWit change address becomes legacy???
by
columbo
on 14/11/2017, 15:25:33 UTC
Not sure about the fee, and not sure what the current behavior for change should be may you use a segwit address without specifying a change address.. so to guarantee that you get your bitcoin's change back in a segwit address, simply create a receiving segwit address and enter that address in the options (see "custom change address"), after enabling "Coin Control" feature:

https://bitcoinspakistan.com/files/2014/03/coin_control_enabled.png

This way you will do exactly what you want to do.

Unfortunately I only use the command line interface. I am not sure I can set a specific segwit change address via cli.
Post
Topic
Board Bitcoin Technical Support
SegWit change address becomes legacy???
by
columbo
on 14/11/2017, 12:38:35 UTC
I made a transaction where I used bitcoin core's segwit addresses. There were 2 inputs, both segwit addresses (with a total balance of 2.5).
I used sendmany and sent to 3 outputs (1 segwit and 2 legacy addresses) a total of about 1.95. The strange thing is that the change of about 0.55 came back to a non segwit address to my wallet (address starting with 1).

My question is: is this normal? I assume that if I send from a segwit address, the change should also come back to a segwit address. Wrong?

The 2nd question is about fees. Before transaction, I set a fee of 0.0045. bitcoin-cli settxfee 0.0045
Yet, when I check the transaction on blockchain.info it states that I only have: Fee per byte 301.537 sat/B.
So, basically I set 450 sat/B but when I sent out, the fee used was only 301 sat/B. Why is that?

Does this have anything to do with the weight?

I see this:
Size    488 (bytes)
Weight    1304

Why did it set a lower sat/B fee than what I set?

Your comments are appreciated.
Post
Topic
Board Bitcoin Technical Support
Re: Legacy vs Segwit wallets. Whats the difference ?
by
columbo
on 13/11/2017, 15:03:34 UTC
I have read that fees when sending from segwit addresses are lower than fees when sending from legacy addresses. Is it true? If so, what kind of differences are we talking about?

Also, using bitcoin core's "bitcoin-cli addwitnessaddress 15......" command, do we have to do anything when spending funds received to a segwit address? Will all other sendtoaddress and sendmany commands work like before?

What about the estimatesmartfee and settxfee commands? Right now, when the network is quite busy we had fees of 20-25 EUR to send out from legacy addresses (to be confirmed in time). Do we have to set the same transaction fees (by settxfee) as before?

Is this a correct assumption that the same transaction initiated from a segwit address is ALWAYS lower in size than the same transaction initiated from a legacy address?