Bitcoin Forum
May 03, 2024, 09:56:46 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: offline node and my priv keys not working  (Read 340 times)
darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 658


I rather die on my feet than to live on my knees


View Profile
May 24, 2020, 04:57:18 PM
 #21

Each private key can generate those 3 types of addresses.
It is just whether or not you actually derive/use it at index X.

Is there a specific reason for you to derive all 3 types of addresses ?
And why do you want to save the private key together with the address in a database ? Couldn't you just save the derivation path together with the address ?
This would allow you to securely store the seed while still retaining the necessary information to derive the needed private key at any given time (with access to the seed).

I already understood that a single PK can derive 3 addresses.

I'm just not aware, at all, where those indexes comes from and where they come into play, regarding my full node. I mean, someone said I can use different indexes to generate a different address with a different PK. I just want to know how to do that. I don't know how to do that using my full node.

I don't have any specific reason. These 3 addresses were created back when I started learning about the bitcoin protocol. I was experimenting, testing, learning. And I always kept them but never noticed they were sharing the same PK because I've only used one of them to send payments out. The other address starting with 1, never used it and the bech32 is one of the addresses where I old some BTC, so I never used their PKs that many times to notice they were the same.

Why I want to save the PKs with the addresses?? Well, to know which address belongs to which address.
About derivation paths, I think my knowledge about the subject is enough to answer to that. In other words, I don't know what are derivation paths technically or how to get them or how to use them.

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
1714773406
Hero Member
*
Offline Offline

Posts: 1714773406

View Profile Personal Message (Offline)

Ignore
1714773406
Reply with quote  #2

1714773406
Report to moderator
1714773406
Hero Member
*
Offline Offline

Posts: 1714773406

View Profile Personal Message (Offline)

Ignore
1714773406
Reply with quote  #2

1714773406
Report to moderator
1714773406
Hero Member
*
Offline Offline

Posts: 1714773406

View Profile Personal Message (Offline)

Ignore
1714773406
Reply with quote  #2

1714773406
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714773406
Hero Member
*
Offline Offline

Posts: 1714773406

View Profile Personal Message (Offline)

Ignore
1714773406
Reply with quote  #2

1714773406
Report to moderator
1714773406
Hero Member
*
Offline Offline

Posts: 1714773406

View Profile Personal Message (Offline)

Ignore
1714773406
Reply with quote  #2

1714773406
Report to moderator
1714773406
Hero Member
*
Offline Offline

Posts: 1714773406

View Profile Personal Message (Offline)

Ignore
1714773406
Reply with quote  #2

1714773406
Report to moderator
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
May 24, 2020, 05:08:23 PM
Merited by darkv0rt3x (1)
 #22

I'm just not aware at all where those indexes comes from and into the play regarding my full node. I mean, someone said I can use different index to generate a different address with a different PK other than the same PK that generated any of the 2 bc1 addresses I generated before. I just want to know how.

I am not completely sure, but i believe this does not work with getnewaddress in core.
Other wallets definitely offer that option (e.g. electrum), but afaik core doesn't.



I don't have any specific reason. These 3 addresses were created back when I started learning about the bitcoin protocol. I was experimenting, testing, learning. And I always kept them but never noticed they were sharing the same PK because I've only used one of them to send payments out. The other address starting with 1, never used it and the bech32 is one of the addresses where I old some BTC, so I never used their PKs that many times to notice they were the same.

My personal recommendation would be to either 1) decide which type of addresses you want and only use that or 2) create a seperate wallet for each type of addresses.
That probably would be the easiest approach.



Why I want to save the PKs with the addresses?? Well, to know which address belongs to which address.

But is there a reason for that?
What do you need this for? If you want to spend from a specific address, your wallet can take care of it.
Same applies to signing messages from a specific address.
If you want to export the private key of a specific address, you can also do so with a simple command.

If this is for a backup, the seed or the wallet file would be a more convenient way to backing it up.

Is there any specific reason for that ?



About derivation paths, I think my knowledge about the subject is enough to answer to that. In other words, I don't know what are derivation paths technically or how to get them or how to use them.

Since all private keys are derived from a single seed, a path used to do so.
It starts with the index 0 and increases for each derived private key. So, the first time you call getnewaddress you get the address from the private key at index 0, the second one at index 1, and so on..


I thought you are planning on creating a web application or something similar, that's why i mentioned that way of storing relevant information.

IMO you shouldn't worry too much about it.
Storing private keys together with an address doesn't make much sense. If you are planning to do something with those private keys, that obviously would be something completely different.
But for normal usage, what is the problem with only using 1 address type or using different wallets for different types or just using different types of address derived from the same private key ?

darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 658


I rather die on my feet than to live on my knees


View Profile
May 24, 2020, 08:55:52 PM
 #23

I'm just not aware at all where those indexes comes from and into the play regarding my full node. I mean, someone said I can use different index to generate a different address with a different PK other than the same PK that generated any of the 2 bc1 addresses I generated before. I just want to know how.

I am not completely sure, but i believe this does not work with getnewaddress in core.
Other wallets definitely offer that option (e.g. electrum), but afaik core doesn't.

Ok, no problem...


I don't have any specific reason. These 3 addresses were created back when I started learning about the bitcoin protocol. I was experimenting, testing, learning. And I always kept them but never noticed they were sharing the same PK because I've only used one of them to send payments out. The other address starting with 1, never used it and the bech32 is one of the addresses where I old some BTC, so I never used their PKs that many times to notice they were the same.

My personal recommendation would be to either 1) decide which type of addresses you want and only use that or 2) create a seperate wallet for each type of addresses.
That probably would be the easiest approach.

That's what I will probably do. I'll use option 2. A different wallet to each type of address if I need more than one address type. Thanks for the suggestion.

Why I want to save the PKs with the addresses?? Well, to know which address belongs to which address.

But is there a reason for that?
What do you need this for? If you want to spend from a specific address, your wallet can take care of it.
Same applies to signing messages from a specific address.
If you want to export the private key of a specific address, you can also do so with a simple command.

If this is for a backup, the seed or the wallet file would be a more convenient way to backing it up.

Is there any specific reason for that ?

The reason is the one I already said. I like more the ideia of a single PK per address, instead of a PK for 3 addresses. That way I will always know to which address corresponds each PK. Easier to back up, easier to organise if I have several addresses and/or several nodes, etc.
I feel more comfortable that way. That's all.

About derivation paths, I think my knowledge about the subject is enough to answer to that. In other words, I don't know what are derivation paths technically or how to get them or how to use them.

Since all private keys are derived from a single seed, a path used to do so.
It starts with the index 0 and increases for each derived private key. So, the first time you call getnewaddress you get the address from the private key at index 0, the second one at index 1, and so on..

Ok, I think I understand. This derivation path seems to be something more at the level of bitcoin core source code when generating addresses.

One more thing I might not have made clear is that I tend to avoid using too many applications. I have never user Electrum to send payments anywhere. I always try to do it from my nodes (1 online and 1 offline).
This serves, at least, 2 purposes. Some security/privacy and the learning process.
I like to think that in crypto, you should suspect of everything. But this is an whole different subject. I just want to say that I try to use the least applications possible to what I need to do. That reduces risks of malware, trojans, keyloggers, phishing and other types of intrusion and privacy violations.

I thought you are planning on creating a web application or something similar, that's why i mentioned that way of storing relevant information.

IMO you shouldn't worry too much about it.
Storing private keys together with an address doesn't make much sense. If you are planning to do something with those private keys, that obviously would be something completely different.
But for normal usage, what is the problem with only using 1 address type or using different wallets for different types or just using different types of address derived from the same private key ?

The reason I created this thread is not directly related to any web site or application. But I'm doing something on that field. But I still need to learn a lot, mostly about addresses wallets, scriptsigs and all that stuff. At least for the learning purpose. I'm still a noob in this, so one good way to learn is to get involved in some project. It makes me to search, read, ask, experiment, etc.

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5583


Self-proclaimed Genius


View Profile
May 25, 2020, 02:50:13 AM
Merited by darkv0rt3x (1)
 #24

-snip-
And about importprivkey, I don't want to import them. They were created in this node, so they don't need to be imported. Unless you mean to import them into another wallet/node.
Yes, in case you want to import them to another wallet or test if that private key will restore those three addresses.
You can create another wallet in the same offline machine to test that and clear your doubt.

If you can use Bitcoin-Qt, you have the option to display them in "Window->Receiving addresses"
and after you've imported the private key (add a label), it will be included there as all of three address types.

It looks like this (Imported from a single prv key):

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 658


I rather die on my feet than to live on my knees


View Profile
May 25, 2020, 08:00:16 PM
 #25

-snip-
And about importprivkey, I don't want to import them. They were created in this node, so they don't need to be imported. Unless you mean to import them into another wallet/node.
Yes, in case you want to import them to another wallet or test if that private key will restore those three addresses.
You can create another wallet in the same offline machine to test that and clear your doubt.

If you can use Bitcoin-Qt, you have the option to display them in "Window->Receiving addresses"
and after you've imported the private key (add a label), it will be included there as all of three address types.

It looks like this (Imported from a single prv key):


Ohh, ok, I got that. Good point. Didn't remember that.

And I take the opportunity to ask a couple of other questions, if I'm allowed.

How do I remove/lose/let go wallets and addresses I don't need/want anymore?

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
May 25, 2020, 08:53:09 PM
 #26

How do I remove/lose/let go wallets and addresses I don't need/want anymore?

You can remove wallets by simply deleting the wallet file.
But that's not recommended since you might receive more BTC at some point in the future. If you don't need them just move them into a different folder and forget about them.

Regarding addresses, you can't delete them (addresses, private keys) since it is a HD wallet (all derived from the same seed).
Is there a practical reason you want to delete them? 

darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 658


I rather die on my feet than to live on my knees


View Profile
May 25, 2020, 09:38:11 PM
 #27

How do I remove/lose/let go wallets and addresses I don't need/want anymore?

You can remove wallets by simply deleting the wallet file.
But that's not recommended since you might receive more BTC at some point in the future. If you don't need them just move them into a different folder and forget about them.

Regarding addresses, you can't delete them (addresses, private keys) since it is a HD wallet (all derived from the same seed).
Is there a practical reason you want to delete them? 

The reason is just keep organization clean and sane. If I have addresses I don't want to use anymore, I want to remove them from node so that they don't bother me in the future.

So, because this is an HD wallet, I can only remove addresses by removing the wallet file/folder?

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4165


View Profile
May 26, 2020, 03:44:10 AM
 #28

The reason is just keep organization clean and sane. If I have addresses I don't want to use anymore, I want to remove them from node so that they don't bother me in the future.
The address would just sit inside the wallet quietly, doubt it would bother you.  Cheesy

I use Bitcoin Core by using the request tab to generate addresses and I don't have to be confused by the addresses that were used by me. If any transactions somehow gets sent to my addresses (by accident or not), I would still be able to retrieve it.
So, because this is an HD wallet, I can only remove addresses by removing the wallet file/folder?
No, the behaviour has been this way since a long time ago. Bitcoin Core doesn't support removing addresses because its not meant to be done. If you really want to remove addresses from your wallet.dat, consider using pywallet.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5583


Self-proclaimed Genius


View Profile
May 26, 2020, 05:08:07 AM
 #29

How do I remove/lose/let go wallets and addresses I don't need/want anymore?
As an addition: For imported addresses, simply restore the old copy of your wallet.dat prior to the import.
Since it's an HD wallet, newer used addresses that belong to the HD seed should be restored without a problem.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 658


I rather die on my feet than to live on my knees


View Profile
May 26, 2020, 08:04:33 PM
 #30

The reason is just keep organization clean and sane. If I have addresses I don't want to use anymore, I want to remove them from node so that they don't bother me in the future.
The address would just sit inside the wallet quietly, doubt it would bother you.  Cheesy

I use Bitcoin Core by using the request tab to generate addresses and I don't have to be confused by the addresses that were used by me. If any transactions somehow gets sent to my addresses (by accident or not), I would still be able to retrieve it.
So, because this is an HD wallet, I can only remove addresses by removing the wallet file/folder?
No, the behaviour has been this way since a long time ago. Bitcoin Core doesn't support removing addresses because its not meant to be done. If you really want to remove addresses from your wallet.dat, consider using pywallet.

Ok, I'll just le them there. Nevertheless, they bother... It's output I don't need when I use 'listlabels', 'listwallets', etc.
But I get the point about eventually sending BTC by accident into them.

How do I remove/lose/let go wallets and addresses I don't need/want anymore?
As an addition: For imported addresses, simply restore the old copy of your wallet.dat prior to the import.
Since it's an HD wallet, newer used addresses that belong to the HD seed should be restored without a problem.

Ok, thanks for now!

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!