Bitcoin Forum
May 09, 2024, 10:30:58 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 »  All
  Print  
Author Topic: Upgrade problems from legacy version of Electrum. Coins stuck on WinXP PC wallet  (Read 614 times)
77Network (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 4


View Profile
December 29, 2020, 07:32:40 PM
 #21

Thank you HCP,

I am able to follow what you are saying. However, I am still a little confused about the rest of your transaction. The specification at https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#cite_note-6 says the PSBT should have 3 sets of key-value maps. (Global, input, and output). Your transaction appears to have 5 sets of maps.

70736274ff0100a002000000028e801dd1c31b8f6952d30ab71cb8cc2c0aed06340ad0b07f0895e8b876c829c b0000000000fdffffffde91c266e9c9a1a6d073cf5fe48253763855569fc0789e25e7f1f4ec5e06 4cf60000000000fdffffff0282839800000000001976a91407f1d4de636e42f16f49988c8dc17e9 44306d26588ac80969800000000001976a91450bac67862a3984fe72839af0f14e2ba08e6766488 ac89021d00000100df0200000001bdecc2290de66382eb8c5384f1d9c4482cfbb00c4f6db71db427105b7fa3308 d000000006a47304402200a0b02f5bc346324aedac80490af39d2d2d639e01dee391f6629b9fea9 c0891e0220754e4ee039e2cd6a483269a572ecf2cabaeec55d6b8d37e487b2e592f661bf7201210 3b0ef8a6bb035b3d710faa53dc03479ea13f724a358b35208b2c7bd8f835186fafdffffff022293 9800000000001976a914aebd0267e135531212e791eb225510be66f03cfe88ac00e1f5050000000 017a914a74bd62f91c707ea86bd70a4fab9a650639e8a38876f311b00220602636f8fefa33369d4 d2c07c07b00432ede5a155688c7b4fccda7fe845f119e74c0c6b163ff90100000022000000000100e20200000001959746d8e586847e97285ebc2f5ec2fe9e495a04fa396dd31c8e65f0a9cc43c 0000000006b483045022100875c175edebd0618155d041ac2723ecd6fc97e4d29ce1f8df5414cad 1d29501b02200745ce579fbbe5da28e838ec45330bfe53091f3074d40ae0371870c7b329d2f8012 1032a614933ee74e2dbfa8196e4c1eadca9d5a13c37760fadb91a2365199eed58eafdffffff0256 889800000000001976a9142909ed18fc26e7c67315a57a340266f48c1d454788ac8096980000000 0001976a9145e32926e03c3c26cb21ce44abca1cdb73ca77c4f88ac09041800220602029734bd50 b3af7a9f6d9710009c52f2b740b9ee5bf2251020d6126a1b8d8c380c6b163ff9010000001500000 00022020206dbf0c9c69646b18c80405e109116c434a57379b8e4fc0c273a6ece707795930c6b163ff 9010000002b000000002202033ba344a7661a33329ae181ecb34171cba5a0e56ffc03af440a134166bffbc3510c6b163ff 9000000000000000000


The first separator "ff" appears at position 8. The global map follows. The second separator "00" appears at position 336. The input map follows. The third separator "00" appears at position 886. The output map follows.

There are 2 more separators with key-value maps following. They are at position 1442 and 1540. In blue. There is a final separator at 1638 which terminates the transaction.


I also decided to look at the example I first started with. I found it contained one extra set of key-value maps.

Do you know what this extra data is used for?

Thank you,
James.









"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715250658
Hero Member
*
Offline Offline

Posts: 1715250658

View Profile Personal Message (Offline)

Ignore
1715250658
Reply with quote  #2

1715250658
Report to moderator
1715250658
Hero Member
*
Offline Offline

Posts: 1715250658

View Profile Personal Message (Offline)

Ignore
1715250658
Reply with quote  #2

1715250658
Report to moderator
1715250658
Hero Member
*
Offline Offline

Posts: 1715250658

View Profile Personal Message (Offline)

Ignore
1715250658
Reply with quote  #2

1715250658
Report to moderator
BitMaxz
Legendary
*
Offline Offline

Activity: 3248
Merit: 2965


Block halving is coming.


View Profile WWW
December 29, 2020, 11:03:59 PM
 #22


BitMaxz, your idea is very intriguing. However, I tried what you suggested and am getting an unable to parse error in 2.9.0. I am not sure what format it is expecting. I tried with Base64. Is it hex, or json? I have never used this feature before.


It's a hex format and how did you get the parse error it should be work unless you create an unsigned transaction which is not yours?

If you create an unsigned transaction from a watch-only wallet(Electrum 4.0.9) it should look like this.
Code:
0100000008b3cf1f8b710cad071bc0f4dd97626e37e6a77e57eae56438c53460b995a613d3000000001f148d7a0a3461e3891723e5fdf8129caa0075060cff0008f01f010000000000fdffffff9e13b269032bf0fb679afee85d6e5254711eb0e4993d73cd72b9ea2912e35f0a000000001f148d7a0a3461e3891723e5fdf8129caa0075060cff00086179020000000000fdffffff8527f6bbde7b77e4296817ad53c803712778d98821bcfeb5d30ce88aad01f5d1000000001f148d7a0a3461e3891723e5fdf8129caa0075060cff0008b63e1a0000000000fdffffff054b71be6d3a28fbe86b893a2381ffe5443dae08b687e2c753b31e645d666efd000000001f148d7a0a3461e3891723e5fdf8129caa0075060cff000890e7140000000000fdffffffa05368a4d3427ee61294e2683d5650ade5c31cabc46e7ce794524fbc9ebf38c7000000001f148d7a0a3461e3891723e5fdf8129caa0075060cff000890e7140000000000fdffffffd3c0e20d475704318636bf99a0cd1a77ef5ce61f782b12f318bdd5713095bd25000000001f148d7a0a3461e3891723e5fdf8129caa0075060cff000890e7140000000000fdffffff356739d57633167f606370be79711eaea05ed7ba7de56f5c7663b738653b5b04000000001f148d7a0a3461e3891723e5fdf8129caa0075060cff0008703f230000000000fdffffffaa72a90408fd72cd3523099e4a32a6e4894931735213af6259f473f2b8d03c0a000000001f148d7a0a3461e3891723e5fdf8129caa0075060cff00089076120000000000fdffffff01e73c9200000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000

It's a hex transaction you need to copy that thing to a notepad to transfer it to the offline machine and paste that thing into your offline wallet(Electrum 2.9.0).
Do it again by exporting the unsigned transaction and use "copy to clipboard" and paste it to notepad to transfer it to the offline machine then repeat the procedure above.

If it doesn't work I think you can download this page https://coinb.in/#sign and transfer it to your offline machine use a browser that supports javascript. Use that page to sign the transaction that you made from your watch-only wallet. It needs a private key so you need to export the private key from your offline Electrum wallet.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
December 30, 2020, 01:29:05 AM
Last edit: December 30, 2020, 01:55:47 AM by HCP
Merited by BitMaxz (1)
 #23

I am able to follow what you are saying. However, I am still a little confused about the rest of your transaction. The specification at https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#cite_note-6 says the PSBT should have 3 sets of key-value maps. (Global, input, and output). Your transaction appears to have 5 sets of maps.
...
I also decided to look at the example I first started with. I found it contained one extra set of key-value maps.

Do you know what this extra data is used for?
You can have multiple input and output key-value maps...

Looking at the data (and what Bitcoin Core outputs when I used decodepsbt with that, they appear to be BIP32 derivation info for outputs (pubkey, master_fingerprint and path etc)




It's a hex format and how did you get the parse error it should be work unless you create an unsigned transaction which is not yours?
...
If you create an unsigned transaction from a watch-only wallet(Electrum 4.0.9) it should look like this.
*snip*
It's a hex transaction you need to copy that thing to a notepad to transfer it to the offline machine and paste that thing into your offline wallet(Electrum 2.9.0).
Do it again by exporting the unsigned transaction and use "copy to clipboard" and paste it to notepad to transfer it to the offline machine then repeat the procedure above.
That doesn't work any longer, and hasn't for a while (changed in 4.0.1 - https://github.com/spesmilo/electrum/blob/master/RELEASE-NOTES#L123)... Electrum has moved away from it's old "custom" unsigned transaction format and it is no longer supported. Electrum is now using "Partially Signed Bitcoin Transaction" PSBT format. Using "copy to clipboard" now gives a Base64 encoded "PSBT"...

As noted in the release notes:
* Partially Signed Bitcoin Transactions (PSBT, BIP-174) are supported
   (#5721). The previous Electrum partial transaction format is no
   longer supported, i.e. this is an incompatible change. Users should
   make sure that all instances of Electrum they use to co-sign or
   offline sign, are updated together.


█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
77Network (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 4


View Profile
December 30, 2020, 04:28:54 AM
 #24

Thank you HCP,

I think I understand 95% of this now. I did review the specification again and I do see my mistake. It is one Global Map followed by 1 or more Input maps followed by 1 or more Output maps.

I can see how to parse out all of the key-value maps. I am still confused how to determine where Input maps end and the Output maps start. The keys are only unique in the same "scope." IE PSBT_IN_NON_WITNESS_UTXO = 0x00, PSBT_OUT_REDEEM_SCRIPT = 0x00. Presumably, the first map after the Global map is an Input map. And the last map in the transaction is an Output map. But, what about the maps in-between? How can we tell if it an input map or an output map?

James.


As an aside, I decided that I am going to configure my old Win XP, to be a duel boot with ubuntu. Sadly, the hardware does not support boot from USB and I don't own a DVD burner. So I ordered a cheap one off of ebay and will have to try to install the os after that arrives.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
December 30, 2020, 09:12:32 AM
Last edit: December 30, 2020, 09:25:14 AM by HCP
 #25

Presumably, the first map after the Global map is an Input map. And the last map in the transaction is an Output map. But, what about the maps in-between? How can we tell if it an input map or an output map?
Each input in the transaction has to have a matching input map... so 2 inputs = 2 input maps... 2 outputs = 2 output maps. So, I think you actually need to decode the raw transaction, and work out how many inputs/outputs you have.


Here is the full breakdown of the psbt that I had earlier (showing the different keys/values etc):

Raw PSBT HEX:
Code:
70736274ff0100a002000000028e801dd1c31b8f6952d30ab71cb8cc2c0aed06340ad0b07f0895e8b876c829cb0000000000fdffffffde91c266e9c9a1a6d073cf5fe48253763855569fc0789e25e7f1f4ec5e064cf60000000000fdffffff0282839800000000001976a91407f1d4de636e42f16f49988c8dc17e944306d26588ac80969800000000001976a91450bac67862a3984fe72839af0f14e2ba08e6766488ac89021d00000100df0200000001bdecc2290de66382eb8c5384f1d9c4482cfbb00c4f6db71db427105b7fa3308d000000006a47304402200a0b02f5bc346324aedac80490af39d2d2d639e01dee391f6629b9fea9c0891e0220754e4ee039e2cd6a483269a572ecf2cabaeec55d6b8d37e487b2e592f661bf72012103b0ef8a6bb035b3d710faa53dc03479ea13f724a358b35208b2c7bd8f835186fafdffffff0222939800000000001976a914aebd0267e135531212e791eb225510be66f03cfe88ac00e1f5050000000017a914a74bd62f91c707ea86bd70a4fab9a650639e8a38876f311b00220602636f8fefa33369d4d2c07c07b00432ede5a155688c7b4fccda7fe845f119e74c0c6b163ff90100000022000000000100e20200000001959746d8e586847e97285ebc2f5ec2fe9e495a04fa396dd31c8e65f0a9cc43c0000000006b483045022100875c175edebd0618155d041ac2723ecd6fc97e4d29ce1f8df5414cad1d29501b02200745ce579fbbe5da28e838ec45330bfe53091f3074d40ae0371870c7b329d2f80121032a614933ee74e2dbfa8196e4c1eadca9d5a13c37760fadb91a2365199eed58eafdffffff0256889800000000001976a9142909ed18fc26e7c67315a57a340266f48c1d454788ac80969800000000001976a9145e32926e03c3c26cb21ce44abca1cdb73ca77c4f88ac09041800220602029734bd50b3af7a9f6d9710009c52f2b740b9ee5bf2251020d6126a1b8d8c380c6b163ff901000000150000000022020206dbf0c9c69646b18c80405e109116c434a57379b8e4fc0c273a6ece707795930c6b163ff9010000002b000000002202033ba344a7661a33329ae181ecb34171cba5a0e56ffc03af440a134166bffbc3510c6b163ff9000000000000000000

Split PSBT HEX:
Code:
70736274 - Magic Bytes
ff - Global Separator

01 - Key Length = 1 byte
00 - Key Data = 00 -> Unsigned Transaction
a0 - Value length = a0 bytes = 160 bytes
02000000028e801dd1c31b8f6952d30ab71cb8cc2c0aed06340ad0b07f0895e8b876c829cb0000000000fdffffffde91c266e9c9a1a6d073cf5fe48253763855569fc0789e25e7f1f4ec5e064cf60000000000fdffffff0282839800000000001976a91407f1d4de636e42f16f49988c8dc17e944306d26588ac80969800000000001976a91450bac67862a3984fe72839af0f14e2ba08e6766488ac89021d00

00 - Separator

INPUT MAP #1 Starts here!

01 - Key length = 1 byte
00 - Key Data = 00 -> PSBT_IN_NON_WITNESS_UTXO
df - Value length = df bytes = 446 bytes
0200000001bdecc2290de66382eb8c5384f1d9c4482cfbb00c4f6db71db427105b7fa3308d000000006a47304402200a0b02f5bc346324aedac80490af39d2d2d639e01dee391f6629b9fea9c0891e0220754e4ee039e2cd6a483269a572ecf2cabaeec55d6b8d37e487b2e592f661bf72012103b0ef8a6bb035b3d710faa53dc03479ea13f724a358b35208b2c7bd8f835186fafdffffff0222939800000000001976a914aebd0267e135531212e791eb225510be66f03cfe88ac00e1f5050000000017a914a74bd62f91c707ea86bd70a4fab9a650639e8a38876f311b00

22 - Key Length = 34 bytes
0602636f8fefa33369d4d2c07c07b00432ede5a155688c7b4fccda7fe845f119e74c - Key Data
=> 06 - PSBT_IN_BIP32_DERIVATION
=> 2636f8fefa33369d4d2c07c07b00432ede5a155688c7b4fccda7fe845f119e74c - Public Key
0c - Value Length = 12 bytes
6b163ff90100000022000000 - Value Data
=> 6b163ff9 - Master Key Fingerprint
=> 0100000022000000 = Derivation path 01000000\22000000 (little endian!) => m\1\34

00 - Separator

INPUT MAP #2 starts here!

01 - Key Length = 1 byte
00 - Key Data == 00 -> PSBT_IN_NON_WITNESS_UTXO
e2 - Value length = e2 bytes = 452 bytes
0200000001959746d8e586847e97285ebc2f5ec2fe9e495a04fa396dd31c8e65f0a9cc43c0000000006b483045022100875c175edebd0618155d041ac2723ecd6fc97e4d29ce1f8df5414cad1d29501b02200745ce579fbbe5da28e838ec45330bfe53091f3074d40ae0371870c7b329d2f80121032a614933ee74e2dbfa8196e4c1eadca9d5a13c37760fadb91a2365199eed58eafdffffff0256889800000000001976a9142909ed18fc26e7c67315a57a340266f48c1d454788ac80969800000000001976a9145e32926e03c3c26cb21ce44abca1cdb73ca77c4f88ac09041800

22 - key length = 34 bytes
0602029734bd50b3af7a9f6d9710009c52f2b740b9ee5bf2251020d6126a1b8d8c38 - Key Data
=> 06 - PSBT_IN_BIP32_DERIVATION
=> 02029734bd50b3af7a9f6d9710009c52f2b740b9ee5bf2251020d6126a1b8d8c38 - Public Key
0c - value length = 12 bytes
6b163ff90100000015000000 - Value Data
=> 6b163ff9 - Master Key Fingerprint
=> 0100000015000000 = Derivation Path 01000000\15000000 (little endian!) => m\1\21

00 - separator

Output Map #1 starts here!

22 - key length = 34 bytes
020206dbf0c9c69646b18c80405e109116c434a57379b8e4fc0c273a6ece70779593 - Key Data
=> 02 - PSBT_OUT_BIP32_DERIVATION
=> 0206dbf0c9c69646b18c80405e109116c434a57379b8e4fc0c273a6ece70779593 - Public Key
0c - value length = 12 bytes
6b163ff9010000002b000000 - Value Data
=> 6b163ff9 - Master Key Fingerprint
=> 010000002b000000 = Derivation Path 01000000\2b000000 (little endian!) => m\1\43

00 - Separator

Output Map #2 starts here!

22 - Key length = 34 bytes
02033ba344a7661a33329ae181ecb34171cba5a0e56ffc03af440a134166bffbc351 - Key data
=> 02 - PSBT_OUT_BIP32_DERIVATION
=> 033ba344a7661a33329ae181ecb34171cba5a0e56ffc03af440a134166bffbc351 - Public Key
0c - value length = 12 bytes
6b163ff90000000000000000 - Value Data
=> 6b163ff9 - Master Key Fingerprint
=> 0000000000000000 = Derivation Path 00000000\00000000 => m\0\0

00 - Separator


NOTE: I had an issue with some other PSBT that I was trying to "decode" manually... the "length" values are in "compact sized unsigned int" form... ie. if the "length" is > 252, it'll actually be displayed as 3 bytes... starting "fd"... and in little endian!!?!

so "fd0201" (the example I was looking at) actually means 0x0102 == 258 bytes Roll Eyes

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
77Network (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 4


View Profile
December 30, 2020, 02:52:31 PM
 #26

Thank you HCP,

I apologize for letting this go way beyond the scope of my original question. But, I am intrigued by this and I want to learn more.

I completely understand your response. 2 inputs = 2 maps, 2 outputs = 2 maps. But, you created the transaction and know what to expect. How does a person, or algorithm decode this if they have no prior knowledge of the transaction.

My confusion is with the data types that duplicate the values from the other scope.

Scope Type Values    Name    BIP Number
Input     0    PSBT_IN_NON_WITNESS_UTXO    BIP 174
Input     1    PSBT_IN_WITNESS_UTXO    BIP 174
Input     2    PSBT_IN_PARTIAL_SIG    BIP 174
Output    0    PSBT_OUT_REDEEM_SCRIPT    BIP 174
Output    1    PSBT_OUT_WITNESS_SCRIPT    BIP 174
Output    2    PSBT_OUT_BIP32_DERIVATION    BIP 174


Do I need to also look at the format of the data to determine which scope it belongs to? Or, am I guaranteed that each map will contain at least one data type value which is unique across both Input and Output and I can use that to determine which scope the map belongs to?





HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
December 30, 2020, 06:53:51 PM
 #27

I apologize for letting this go way beyond the scope of my original question. But, I am intrigued by this and I want to learn more.
I feel ya... it's why I've been delving into these PSBTs and trying to decode them by hand in a text editor Wink


Quote
I completely understand your response. 2 inputs = 2 maps, 2 outputs = 2 maps. But, you created the transaction and know what to expect. How does a person, or algorithm decode this if they have no prior knowledge of the transaction.
All PSBT's must contain the unsigned transaction as part of the global map, which comes first. So, my "theory" is that you need to decode that transaction to identify the number of inputs/outputs involved. That then allows you to "assume" what the following maps are going to be, knowing that the order is: "Global - Inputs - Outputs"


Quote
My confusion is with the data types that duplicate the values from the other scope.

Scope Type Values    Name    BIP Number
Input     0    PSBT_IN_NON_WITNESS_UTXO    BIP 174
Input     1    PSBT_IN_WITNESS_UTXO    BIP 174
Input     2    PSBT_IN_PARTIAL_SIG    BIP 174
Output    0    PSBT_OUT_REDEEM_SCRIPT    BIP 174
Output    1    PSBT_OUT_WITNESS_SCRIPT    BIP 174
Output    2    PSBT_OUT_BIP32_DERIVATION    BIP 174

Do I need to also look at the format of the data to determine which scope it belongs to? Or, am I guaranteed that each map will contain at least one data type value which is unique across both Input and Output and I can use that to determine which scope the map belongs to?
Yeah, I know what you mean... it's weird seeing the same "Type" value for both Inputs and Outputs and trying to determine which one it is... that confused the hell out of me until I figured out that the unsigned transaction must be included and must be the first item.

So you can derive the number of inputs/outputs from that unsigned tx and then process the rest of the maps.



█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
77Network (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 4


View Profile
December 30, 2020, 08:42:09 PM
 #28

Ah.. I got it now. I agree. The transaction always comes first and then that tells you the quantity of input and output maps that follow.

I might have considered making the key values unique across all scopes to eliminate the possibility of confusion.

I think all my questions are answered. Thank you. It is a very good discussion.

I am on the lookout for a web based utility that will accept an uploaded psbt file and return a json representation of the transaction. Please let me know if you are aware of one.

I am still waiting for my DVD burner to arrive. Once that gets here I will try to update my legacy hardware with ubuntu and let you know if I get my offline wallet working again.

Kind Regards,
James.





bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
December 31, 2020, 05:48:30 PM
 #29

I am still waiting for my DVD burner to arrive. Once that gets here I will try to update my legacy hardware with ubuntu and let you know if I get my offline wallet working again.

Windows XP, DVD burner, ... which century are you from?

You don't need to burn disks to run a live linux distro.
Nowadays, we use USB flash drives. They are reusable, smaller and more handy. And they even can store more than 4GB already!  Cheesy

HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
January 01, 2021, 01:59:52 AM
 #30

You don't need to burn disks to run a live linux distro.
Nowadays, we use USB flash drives. They are reusable, smaller and more handy. And they even can store more than 4GB already!  Cheesy
Which would be a great idea, except his hardware doesn't support booting from USB... Tongue

As an aside, I decided that I am going to configure my old Win XP, to be a duel boot with ubuntu. Sadly, the hardware does not support boot from USB and I don't own a DVD burner. So I ordered a cheap one off of ebay and will have to try to install the os after that arrives.


It still doesn't cease to amaze me the lengths people will go to, to keep old hardware ticking along... There is a point where it's just easier (and often cheaper) to simply purchase something a bit more modern Wink

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
77Network (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 4


View Profile
January 03, 2021, 11:55:11 PM
 #31

Thank you Bob, maybe you missed the first part of the thread. I have a 20yo Pentium with XP that I was using as an offline cold wallet to sign transactions created with my online laptop. It is the only thing I was using that PC for. The most recent version of Electrum does not work on XP. There are legacy versions of Electrum which work on XP, but all of them are too old to connect to any server nodes.

The suggestion was to install Linux on the box. The bios only supports boot up from DVD, floppys or HD. I needed a DVD burner to create an installation disk. I wanted a DVD burner anyway. I have a bunch tvs and dvd players. I also have a couple hundred movie iso files. I wanted to be able to burn movies again too.

So my burner arrived and I gave it a shot, but no success. I tried about 5 varieties of Linux which claimed to be able to run on my hardware. All seem to start ok and show some kind of splash screen, but eventually all would hang and display a plain black screen.

I guess I will need to spend money on something else.

Thanks for all the help.
77Network (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 4


View Profile
January 04, 2021, 04:49:17 PM
Merited by ABCbits (1)
 #32

I tried Ubuntu 16.4, Lubuntu 18.4 & 16.4, a few versions of puppy.

I don't feel it matters though. I think the idea was doomed to fail from the start. I see that the Linux build of Electrum is for 64bit. My hardware is 32bit.

I am thinking about creating a Linux VM to run inside of Windows 10. Then keep my signing wallet inside that VM and only mount that VM when the laptop is not connect to WIFI. It is not exactly a cold wallet, but I think it gives me a little more security.


77Network (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 4


View Profile
January 04, 2021, 05:48:30 PM
 #33

Hey guys,

I just noticed that the documentation suggests that I could use an android phone to sign the transactions. I am sure I have an old phone around here that I could factory reset and leave in airplane mode. That might be a good solution. Does anyone know if the Android version will work in this fashion? (Completely off line.)

Thanks,
James.
DaveF
Legendary
*
Offline Offline

Activity: 3472
Merit: 6269


Crypto Swap Exchange


View Profile WWW
January 04, 2021, 05:55:47 PM
 #34

Hey guys,

I just noticed that the documentation suggests that I could use an android phone to sign the transactions. I am sure I have an old phone around here that I could factory reset and leave in airplane mode. That might be a good solution. Does anyone know if the Android version will work in this fashion? (Completely off line.)

Thanks,
James.


It should...with a few issues:
1) You will have to get an OTG cable so you can plug a USB drive into the phone.
2) Not all phones allow this.
3) On the ones that do not all of them like all USB drives some do not put out enough power to actually run them.
4) Now does your phone see the files on the stick and allow you to read / write to it?

I don't know where you are in the world or what your budget is, but you can get a cheap ($50 or less) Win 7 laptop that you can update to Win 10 in most places.

-Dave

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
igor72
Legendary
*
Offline Offline

Activity: 1834
Merit: 2019


Crypto Swap Exchange


View Profile
January 04, 2021, 09:18:17 PM
Last edit: January 04, 2021, 09:36:10 PM by igor72
 #35

I tried Ubuntu 16.4, Lubuntu 18.4 & 16.4, a few versions of puppy.

I don't feel it matters though. I think the idea was doomed to fail from the start. I see that the Linux build of Electrum is for 64bit. My hardware is 32bit.
Maybe you didn't see my post above? I use LXLE 32-bit, it's a very light system and the latest Electrum installs on it without problems and works fine.

https://lxle.net/


It should...with a few issues
There is no need for all this. It's more convenient and reliable to work with QR codes.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
77Network (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 4


View Profile
January 05, 2021, 01:11:36 AM
 #36

I saw it, but I did not try that OS. I will give it a try.

But, How were you able to get the 64 bit electrum to run on a 32 bit OS?



77Network (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 4


View Profile
January 05, 2021, 02:25:49 AM
 #37

OK. Tried it. Kernal panic.

It does not matter, but I am pretty sure I will have problems with a 64 bit on a 32 bit os anyway.

pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10558



View Profile
January 05, 2021, 04:48:12 AM
 #38

I tried Ubuntu 16.4, Lubuntu 18.4 & 16.4, a few versions of puppy.

I don't feel it matters though. I think the idea was doomed to fail from the start. I see that the Linux build of Electrum is for 64bit. My hardware is 32bit.
Electrum is actually 32 bit and can run on both 32 and 64 bit operating systems. You should make sure that the Linux distribution that you are installing is a 32 bit version because you can't install it otherwise.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
77Network (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 4


View Profile
January 05, 2021, 04:06:24 PM
 #39


Electrum is actually 32 bit and can run on both 32 and 64 bit operating systems. You should make sure that the Linux distribution that you are installing is a 32 bit version because you can't install it otherwise.

Which download are you speaking about? The Linux version located at: https://download.electrum.org/4.0.9/electrum-4.0.9-x86_64.AppImage is a 64 bit executable.

bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
January 05, 2021, 04:17:35 PM
Merited by pooya87 (1)
 #40

Electrum is actually 32 bit and can run on both 32 and 64 bit operating systems. You should make sure that the Linux distribution that you are installing is a 32 bit version because you can't install it otherwise.
Which download are you speaking about? The Linux version located at: https://download.electrum.org/4.0.9/electrum-4.0.9-x86_64.AppImage is a 64 bit executable.

The Windows binary can be run on a 32 bit system.
And on linux, you could simply use python to run it on a 32 bit system. You don't need to use the .AppImage file, given that python3.6+ is installed.

Pages: « 1 [2] 3 »  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!