Bitcoin Forum
December 10, 2025, 06:51:29 AM *
News: Latest Bitcoin Core release: 30.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Old Key Import Issue - 2 on 1 eh.  (Read 133 times)
MikeJ_NpC (OP)
Member
**
Offline Offline

Activity: 127
Merit: 10

if you want to lie *cough*use your data; not mine.


View Profile
October 27, 2025, 03:58:33 AM
Last edit: October 27, 2025, 08:45:33 AM by MikeJ_NpC
 #1

I have tied to import a WIF which is correct, but its from ye olden days..  
Ive adjusted for the import bug on pre compression addys...

Ive tried to import it and it says coding error. On the original and recomputed on the address which matters.
Is there some other way to address these?  Ive validated the hex and checksum and pretty much everything over and over .. base58 and ecdsa alike.
I have sigs which conclude the results are correct.  Ive recomputed it 100x over.

Ive tried earlier version, command-line switch import and gui... only thing i havent done is load in Ubuntu but i presume it would be the same outcome.
Is this something a dev needs to do ? or ... i would like to import it and resolve it.

The uncompressed side imports no error..The compressed side imports with error.. -Invalid private key encoding (code -5)
The Hex imports with a error Invalid private key encoding (code -5)

There is a same d and compression flag along with the ECDSA bug in play here. Hence, both addresses can be validly used for the same private key depending on serialization.- How is this suppose to be resolved?  
I can compute both and it flips back and forth on variance.  I am about out of ideas... any help would be appreciated.

Thank you.

its more extensive than i let on and have ran all kinds of validations and adjustments. I come out to the same results and ummm yeah.
IF its a import procedure or some way to do it more direct or leaving something out...

Core’s error means it’s rejecting the encoding format — not the key itself.

If Karma is a bitch, then god is a woman. I ask to know, not to be screwed or hear trite excuses (after the fact) which a 3rd grader could do better on. If you give your word, keep it atleast..
nc50lc
Legendary
*
Online Online

Activity: 2982
Merit: 8060


Self-proclaimed Genius


View Profile
October 27, 2025, 04:56:42 AM
Merited by ABCbits (1)
 #2

The uncompressed side imports no error..The compressed side imports with error.. -Invalid private key encoding (code -5)
The Hex imports with a error Invalid private key encoding (code -5)
Try to explain the steps that you did to encode the private key to WIF compressed.
Because the error is surely caused by something as simple as missing/wrong "network byte", "compression flag byte" or "checksum" since the uncompressed form works.

Or if you have an air-gap machine, you can use this tool offline: github.com/iancoleman/keycompression

MikeJ_NpC (OP)
Member
**
Offline Offline

Activity: 127
Merit: 10

if you want to lie *cough*use your data; not mine.


View Profile
October 27, 2025, 08:42:22 AM
Last edit: October 28, 2025, 10:43:12 AM by Mr. Big
 #3

I think i fixed it..
Its added and i can pull the addresses up in core. It wasnt the key more so the software rejecting it.
I dont like this new way of doing it, as i had to repeat it about 20x over .. true false etc..  but in the end it took the checksum and key.

just having db issues now where its out of order on child and parent blocks and i really dont want to close it Cheesy
I have all the steps noted and formulations, which ill try to do the cliff notes if i still have a issue so you can go down the rabbit hole

I just thought there might have been a more direct way to accomplish this via dev coder from core.

The comp flag i took into account and the checksum also even the byte too.. it was something else..
besides all the other variable, convergence and the resolving .. im leaning towards a few reasons.. well see what happens. Smiley
no -5 so ill take the small victory for now heh



Nope still stuck..  

I dont think you can spend a uncompressed on a compressed in descriptor -- it takes it as watchonly....
....and legacy import wont work on the compressed side... so much fun



If Karma is a bitch, then god is a woman. I ask to know, not to be screwed or hear trite excuses (after the fact) which a 3rd grader could do better on. If you give your word, keep it atleast..
nc50lc
Legendary
*
Online Online

Activity: 2982
Merit: 8060


Self-proclaimed Genius


View Profile
October 28, 2025, 03:36:06 AM
 #4

I dont think you can spend a uncompressed on a compressed in descriptor -- it takes it as watchonly....
It's imported as watch-only if the descriptor contains a public key and the wallet is watch-only in the first place ("Disable Private Key" toggled).
What you'd want is to create a "Blank Wallet" and import a descriptor containing the compressed WIF private key (starts with K or L).

....and legacy import wont work on the compressed side... so much fun
It works on compressed WIF, that "encoding error" is literally what it means.

Pages: [1]
  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!