Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: DiaperedDon on April 13, 2021, 02:36:29 PM



Title: Should I Run a Node?
Post by: DiaperedDon on April 13, 2021, 02:36:29 PM
Hi everyone,

So, dumb question, of course I should if I can...

However, this is being considered because I need to make a large transaction as safely as possible.

I have a p2sh SegWit BTC paper wallet and need to move it all in one transaction to a Ledger hardware wallet.  I need to get it off paper and into a proper, secure BIP39 wallet.  This is over 30 inputs and a mix of all 3 formats (Legacy, SegWit and Native SegWit) with a total raw data size of well over 30,000 bytes.  This is also a life-changing amount of BTC.

Unfortunately I'm learning the not-so-positive details of all this later rather than sooner.

Is setting-up a node on a solid computer and importing the private key into a Core wallet be an ideal, dependable and safe way to eventually move these funds in one shot?  Would this be the best possible option for such a transaction?  I don't care about massive transaction fees.  Is this idea unsound for some reason given the details of the existing paper wallet?

People have suggested importing it into Electrum or just sweeping it with Mycelium but I need to get responsible and do the optimum thing for a change.  I can't get my copy of Electrum 4.1.2 to validate in GPG suite on my Macbook Pro running Mojave, when I try my Finder window just flashes once.  No doubt I'm doing something wrong but it immediately concerns me.

So, would setting-up a Core node be the best way to ensure the funds in this wallet get safely transferred to my Ledger?

Thanks to all for reading and any comments!

All the best



Title: Re: Should I Run a Node?
Post by: BitMaxz on April 13, 2021, 03:08:31 PM
I think you don't need to run a full node just to transfer them to your ledger nano.
Electrum is enough to transfer and sweep them in your Ledger nano but your problem is you can't able to verify the signature?

If the gpgsuite doesn't work in Mojave you can try other software to verify the signature.

Try this GnuPG

- https://bitcointalk.org/index.php?topic=5105901.msg49695453#msg49695453


Title: Re: Should I Run a Node?
Post by: seoincorporation on April 13, 2021, 03:12:40 PM
Electrum should be enough and the fast way... Since you are using SegWit address I think this is the best option.

The problem with core is the time that will take you to sync the node. 300Gb of happiness takes more than 1 week to sync, so, if you don't want to wait that long better go with Electrum.

You can download the software from the main site: https://electrum.org/#download

Just import the private keys and make the transaction.


Title: Re: Should I Run a Node?
Post by: bitmover on April 13, 2021, 03:20:17 PM
I think you don't need to run a full node just to transfer them to your ledger nano.


Yes, that is correct.
The only benefit of running a full node is for privacy reasons.

As you are not requesting to other nodes the balance of your addresses, nobody can link those addresses together by your requests only.

your privacy would be safer as you are requesting the balance of all addresses.


The first thing you need to do is to create a new wallet in Ledger Nano  and send your coins to the addresses in your new created  ledger nano wallet.
Can't you just import your BIP 39 Seed with all your 30 inputs into electrum?
As you have a mix of all 3 formats, you will need to create 3 electrm wallets, with different derivation paths, for all 3 formats:

m/44'/0'/0'/0 for P2PKH (Legacy, starting with 1)
m/49'/0'/0'/0 for P2SH (segwit starting with 3)
m/84'/0'/0'/0 for Bech32 (native segwit, bc1)


Title: Re: Should I Run a Node?
Post by: ranochigo on April 13, 2021, 03:27:09 PM
Yes, that is correct.
The only benefit of running a full node is for privacy reasons.

As you are not requesting to other nodes the balance of your addresses, nobody can link those addresses together by your requests only.

your privacy would be safer as you are requesting the balance of all addresses.
You're not requesting everything. You'll be asking for the entire blockchain and thereby validating it yourself and thus not having to trust anyone; SPV clients trusts their peers are feeding them accurate information. It is unlikely that it would be an attack vector for OP though, I don't think SPV clients are inherently unsafe or anything to that degree. Having a full node is definitely not only for privacy but also for your own security as well.


Did you import the PGP key of ThomasV? Did you download the correct signature file?


Title: Re: Should I Run a Node?
Post by: DiaperedDon on April 13, 2021, 03:44:11 PM
I think you don't need to run a full node just to transfer them to your ledger nano.


Y
Can't you just import your BIP 39 Seed with all your 30 inputs into electrum?
As you have a mix of all 3 formats, you will need to create 3 electrm wallets, with different derivation paths, for all 3 formats:

m/44'/0'/0'/0 for P2PKH (Legacy, starting with 1)
m/49'/0'/0'/0 for P2SH (segwit starting with 3)
m/84'/0'/0'/0 for Bech32 (native segwit, bc1)


I'm dealing with one SegWit private key on a paper wallet (LM...), not a BIP39 seed.

Creating 3 different wallets in Electrum makes no sense to me, I think you're misunderstanding but thanks for the help.


Title: Re: Should I Run a Node?
Post by: DiaperedDon on April 13, 2021, 03:52:59 PM
Thanks very, very much @BitMaxz and @seoincorporation!

Installing GnuGPG and the adventure continues...

Just to clarify, I'm "importing" the private key and not sweeping it in Electrum?

Are there any concerns or considerations I should be aware of when importing the key, entering it into Electrum and then executing the transaction?

Do I need to password the wallet and back anything up just in case?  Any settings i need to pay attention to?  Is it really as simple as importing the private key into electrum and then executing a transaction to move funds to my Ledger-generated wallet?

Cheers everyone.

Edit:  Installed Brew and Gnupg.  Now I'm stuck...

When entering:  gpg --recv-keys 2BD5824B7F9470E6

I get:

gpg: keyserver receive failed: General error

FIXED WITH:  gpg --keyserver keyserver.ubuntu.com --recv-key 2BD5824B7F9470E6

Now the wget command isn't being recognized...

FIXED WITH:  brew install wget



Title: Re: Should I Run a Node?
Post by: bitmover on April 13, 2021, 04:04:46 PM
I'm dealing with one SegWit private key on a paper wallet (LM...), not a BIP39 seed.

Creating 3 different wallets in Electrum makes no sense to me, I think you're misunderstanding but thanks for the help.


I agree that it makes no sense, but "this is the way"

You cannot create one wallet with 3 derivation paths in electrum

You need to choose one derivation path for each wallet. If anyone knows a different way to do this in electrum please share.,

https://github.com/spesmilo/electrum/issues/6015
Quote

 @SomberNight SomberNight commented on 4 Mar 2020

    My issue: should Electrum be able to handle a single wallet which supports SegWit and Legacy addresses seamlessly, the same way the Coinbase and Coinomi wallet do?

No, this is not implemented.


Title: Re: Should I Run a Node?
Post by: DiaperedDon on April 13, 2021, 04:06:02 PM


You need to choose one derivation path for each wallet. If anyone knows a different way to do this in electrum please share.,

But I only have one wallet and one private key that happens to contain a mixture of inputs?   How can I possibly seperate these inputs?


Title: Re: Should I Run a Node?
Post by: LoyceV on April 13, 2021, 04:17:17 PM
But I only have one wallet and one private key that happens to contain a mixture of inputs?   How can I possibly seperate these inputs?
In Electrum, just create a new wallet with the private key for Legacy, then do it again twice:
For P2SH-P2WPKH addresses (Addresses starting with "3")
Just add p2wpkh-p2sh: directly in front of your  private key.
For example
Code:
p2wpkh-p2sh:5BitcoinPrivateKey
This should generate the corresponding p2wpkh-p2sh bitcoin address.

For P2WPKH addresses (Bech32, starting with 'bc1')
This time we'll add p2wpkh: in front of the private key.
For example
Code:
p2wpkh:5PrivateKey
This should generate the corresponding Bech32 address
But you're going to want sign your transaction offline to be safe:
Online:
Install Electrum on your PC.
Import your address to create a watch-only wallet.
Preview the transaction, Copy the unsigned transaction. Put it on a USB stick.

Offline and running without hard drive storage:
Get a Linux LIVE DVD. Use Knoppix for instance, or any other distribution that comes with Electrum pre-installed.
Unplug your internet cable. Close the curtains. Reboot your computer and start up from that DVD. Don't enter any wireless connection password. Keep it offline.
Start Electrum. Import your private key.
Copy your unsigned transaction from the USB stick, load it into Electrum.
CHECK the transaction in Electrum. Check the fees, check the amount, check all destination addresses (character by character (https://bitcointalk.org/index.php?topic=5190776.0)).
If all is okay, sign the transaction. Copy it back to your USB stick.
Turn off the computer. That wipes the Live LINUX from memory and all traces are gone.

Online:
Use your normal online Electrum to (check again and) broadcast the transaction.

Bonus:
After moving all your Bitcoin, and once the transaction confirmed, check if you own Forkcoins (https://bitcointalk.org/index.php?topic=2836875.msg56016704#msg56016704).


Title: Re: Should I Run a Node?
Post by: DiaperedDon on April 13, 2021, 04:23:50 PM
Thanks guys, I'm a n00b obviously and this is a bit beyond me. 

I can't get the wget command to work in Gnupg to even download and verfiy Electrum.

This is why I was asking if it's just "easier" to setup a full node and do this with Core?

Really appreciate it everyone, thanks very much!


Title: Re: Should I Run a Node?
Post by: ranochigo on April 13, 2021, 04:37:18 PM
This is why I was asking if it's just "easier" to setup a full node and do this with Core?

Really appreciate it everyone, thanks very much!
You don't need to use wget. Just download both the.asc and the .tar.gz file to a directory, navigate from the terminal to that directory and validate it as stated in the post.

Bitcoin Core uses sha256 signatures in a PGP signed message for validation. Probably would be roughly the same complexity, if you aren't familiar with it. The only downside of Bitcoin Core is that you'll have to download and verify the entire blockchain which can take a very long time. Would you be fine with that?


Title: Re: Should I Run a Node?
Post by: DiaperedDon on April 13, 2021, 04:56:26 PM
With the apparent complications in using Electrum for this, which is beyond any tech ability and confidence I have, I'm just thinking of using Mycelium to sweep the private key, executing a transaction and taking my chances?

I installed wget and was able to download and verify the Electrum download anyway...

What a nightmare.


Title: Re: Should I Run a Node?
Post by: LoyceV on April 13, 2021, 05:00:51 PM
I'm just thinking of using Mycelium to sweep the private key, executing a transaction and taking my chances?
Don't rush things! If it's gone, it's gone forever!


Title: Re: Should I Run a Node?
Post by: DiaperedDon on April 13, 2021, 05:05:18 PM
I'm just thinking of using Mycelium to sweep the private key, executing a transaction and taking my chances?
Don't rush things! If it's gone, it's gone forever!

Of course but I've been given no reason why Mycelium can't handle this transaction and will calculate transaction fees properly?  I have experience scanning a private cold storage wallet and sending it but the electrum thing is beyond me.


Title: Re: Should I Run a Node?
Post by: DiaperedDon on April 13, 2021, 05:15:04 PM
But I only have one wallet and one private key that happens to contain a mixture of inputs?   How can I possibly seperate these inputs?
In Electrum, just create a new wallet with the private key for Legacy, then do it again twice:
For P2SH-P2WPKH addresses (Addresses starting with "3")
Just add p2wpkh-p2sh: directly in front of your  private key.
For example
Code:
p2wpkh-p2sh:5BitcoinPrivateKey
This should generate the corresponding p2wpkh-p2sh bitcoin address.

For P2WPKH addresses (Bech32, starting with 'bc1')
This time we'll add p2wpkh: in front of the private key.
For example
Code:
p2wpkh:5PrivateKey
This should generate the corresponding Bech32 address


Thanks very much for that explanation.  So then I would "import" the private key 3 times, once to each one of the new wallets?  Thanks for being so patient and for the amazing help!


Quote
But you're going to want sign your transaction offline to be safe:
Online:
Install Electrum on your PC.
Import your address to create a watch-only wallet.
Preview the transaction, Copy the unsigned transaction. Put it on a USB stick.

Offline and running without hard drive storage:
Get a Linux LIVE DVD. Use Knoppix for instance, or any other distribution that comes with Electrum pre-installed.
Unplug your internet cable. Close the curtains. Reboot your computer and start up from that DVD. Don't enter any wireless connection password. Keep it offline.
Start Electrum. Import your private key.
Copy your unsigned transaction from the USB stick, load it into Electrum.
CHECK the transaction in Electrum. Check the fees, check the amount, check all destination addresses (character by character (https://bitcointalk.org/index.php?topic=5190776.0)).
If all is okay, sign the transaction. Copy it back to your USB stick.
Turn off the computer. That wipes the Live LINUX from memory and all traces are gone.

Online:
Use your normal online Electrum to (check again and) broadcast the transaction.

Bonus:
After moving all your Bitcoin, and once the transaction confirmed, check if you own Forkcoins (https://bitcointalk.org/index.php?topic=2836875.msg56016704#msg56016704).

This is completely beyond my ability.


Title: Re: Should I Run a Node?
Post by: HCP on April 13, 2021, 05:20:25 PM
Theoretically, you should be able to setup your Ledger with Electrum... then sweep the UTXOs directly to your Ledger without needing to import them or create other wallets.


I have a p2sh SegWit BTC paper wallet and need to move it all in one transaction to a Ledger hardware wallet.  I need to get it off paper and into a proper, secure BIP39 wallet.  This is over 30 inputs and a mix of all 3 formats (Legacy, SegWit and Native SegWit) with a total raw data size of well over 30,000 bytes.  This is also a life-changing amount of BTC.
If you don't mind me asking... how did you end up with a mix of input types when you have "a p2sh SegWit BTC paper wallet"? ??? When you created the paper wallet did you also derive all 3 address types from the one private key and then sent coins to those addresses over time? ???


Title: Re: Should I Run a Node?
Post by: LoyceV on April 13, 2021, 05:33:09 PM
If you don't mind me asking... how did you end up with a mix of input types when you have "a p2sh SegWit BTC paper wallet"? ??? When you created the paper wallet did you also derive all 3 address types from the one private key and then sent coins to those addresses over time? ???
It's actually quite a cool feature in Mycelium, I only "discovered" it recently myself.
In short: on Mycelium (on mobile), you add a new Single Address Account, print a PDF backup, and write down 16 letters as a password. You can safely email the PDF to yourself and use any printer, because it's useless (https://bitcointalk.org/index.php?topic=5327950.msg56701759#msg56701759) without the letters. It gives you 3 addresses in 3 different formats, all from the same private key.

It looks like this (there are more pages to it):


Title: Re: Should I Run a Node?
Post by: bitmover on April 13, 2021, 05:34:40 PM
Of course but I've been given no reason why Mycelium can't handle this transaction and will calculate transaction fees properly?  I have experience scanning a private cold storage wallet and sending it but the electrum thing is beyond me.

I can give you a suggestion.

Why don't you do everything with a low amount first? Then you will learn how to do it and will get some confidence before dealing with the real money.

Create a new paper wallet, with just one input. Send some funds to it (i can send you some dust if you need, but I will use a low fee and it might take some time for confirmation)

Then you try to open it in electrum wallet, just like you would do in your real funded wallet. You do all the steps you will have to  do and send that amount to ledger nano.

You will be more confident before dealing with your real wallet.

You can also use Mycellium if you prefer, although I never used it and I   don't trust it as I trust electrum.


Title: Re: Should I Run a Node?
Post by: DiaperedDon on April 13, 2021, 05:38:00 PM
Theoretically, you should be able to setup your Ledger with Electrum... then sweep the UTXOs directly to your Ledger without needing to import them or create other wallets.


I have a p2sh SegWit BTC paper wallet and need to move it all in one transaction to a Ledger hardware wallet.  I need to get it off paper and into a proper, secure BIP39 wallet.  This is over 30 inputs and a mix of all 3 formats (Legacy, SegWit and Native SegWit) with a total raw data size of well over 30,000 bytes.  This is also a life-changing amount of BTC.
If you don't mind me asking... how did you end up with a mix of input types when you have "a p2sh SegWit BTC paper wallet"? ??? When you created the paper wallet did you also derive all 3 address types from the one private key and then sent coins to those addresses over time? ???

I generated the p2sh SegWit Wallet offline intially with a downloaded web site from  https://segwitaddress.org/ and then received all the inputs over time.  These inputs are comprised of all 3 formats but my total balance in my wallet is a total of all of these?  Does that make sense?


Title: Re: Should I Run a Node?
Post by: DiaperedDon on April 13, 2021, 05:56:48 PM
Of course but I've been given no reason why Mycelium can't handle this transaction and will calculate transaction fees properly?  I have experience scanning a private cold storage wallet and sending it but the electrum thing is beyond me.

I can give you a suggestion.

Why don't you do everything with a low amount first? Then you will learn how to do it and will get some confidence before dealing with the real money.

Create a new paper wallet, with just one input. Send some funds to it (i can send you some dust if you need, but I will use a low fee and it might take some time for confirmation)

Then you try to open it in electrum wallet, just like you would do in your real funded wallet. You do all the steps you will have to  do and send that amount to ledger nano.

You will be more confident before dealing with your real wallet.

You can also use Mycellium if you prefer, although I never used it and I   don't trust it as I trust electrum.

Thanks very much for your help and patience.  I don't have an issue with doing what you suggest as I've already prepared a couple of "test wallets" with small amounts.   Creating 3 different wallets on electrum then importing my private key to all three, etc. as you gents explain is where I start to sweat colors and not just sweat.  I'm quite scared in general but the procedure explained to me to be able to do this in electrum is freaking me out and beyond my ability or self-confidence.


Title: Re: Should I Run a Node?
Post by: HCP on April 13, 2021, 06:02:57 PM
I generated the p2sh SegWit Wallet offline intially with a downloaded web site from  https://segwitaddress.org/ and then received all the inputs over time.  These inputs are comprised of all 3 formats but my total balance in my wallet is a total of all of these?  Does that make sense?
So, you only have 1 address... that starts with a "3", correct? And you've only ever received payments to this address, correct? If so, you don't have a mix of "inputs".

You will only have nested Segwit UTXOs... it doesn't make any difference what address types the funds came from... you can receive from "1"-type, "3"-type or "bc1"-type addresses... but as long as you received all your funds to that one "3" address that you generated using segwitaddress.org, then your balance will be made up entirely of p2sh (aka nested) SegWit UTXOs.

So, you don't need to worry about creating multiple wallets or anything.

Personally, I would setup the Ledger... then connect it to Electrum... then sweep the paper wallet using Electrum+Ledger. That will put all the funds directly into the Ledger in one transaction and minimise exposure of your private key etc.


Title: Re: Should I Run a Node?
Post by: DiaperedDon on April 13, 2021, 06:17:13 PM
I generated the p2sh SegWit Wallet offline intially with a downloaded web site from  https://segwitaddress.org/ and then received all the inputs over time.  These inputs are comprised of all 3 formats but my total balance in my wallet is a total of all of these?  Does that make sense?
So, you only have 1 address... that starts with a "3", correct? And you've only ever received payments to this address, correct? If so, you don't have a mix of "inputs".

You will only have nested Segwit UTXOs... it doesn't make any difference what address types the funds came from... you can receive from "1"-type, "3"-type or "bc1"-type addresses... but as long as you received all your funds to that one "3" address that you generated using segwitaddress.org, then your balance will be made up entirely of p2sh (aka nested) SegWit UTXOs.

So, you don't need to worry about creating multiple wallets or anything.

Personally, I would setup the Ledger... then connect it to Electrum... then sweep the paper wallet using Electrum+Ledger. That will put all the funds directly into the Ledger in one transaction and minimise exposure of your private key etc.

Oh man, thanks for that!!!

Just one clarification, do I "import" the private key to Electrum or do I "sweep" it, which are two different things as far as I can gather?  No idea how to actually connect Electrum to my Ledger (which I don't have yet).

Thanks so very much!


Title: Re: Should I Run a Node?
Post by: DiaperedDon on April 20, 2021, 12:48:04 AM
Just an update if anyone is interested.

Tried my damndest to use Electrum on my laptop and Android tablet to use the air-gapped signing method and Electrum would absolutely not recognize my transactions properly and never presented me with a "Sign" button on the Android app when scanning the finalized, unsigned transaction from my laptop.  Will never use this POS wallet again.

Used Mycelium on my new tablet, swept my wallets and sent them.  It handled my big daddy (35 inputs, ~3500 vB in size) like a champ, close to US$800 in Tx fees for quick confirmation.

My BTC is now all snug as a bug in a rug on my BIP39 seed (Billfodl backed-up) now, love my new Ledger Nano X.  

Mycelium comes through just like it always did.

All the best and thanks for being here everyone.