Bitcoin Forum
May 08, 2024, 07:56:41 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [Solvd]Sent testnet coin from p2sh-segwit address to native-segwit address error  (Read 149 times)
anykao (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 1


View Profile
September 09, 2020, 06:36:24 AM
Last edit: September 10, 2020, 04:26:17 AM by anykao
 #1

Got this error message.

Code:
b'\xa8*\x08\xe9\xfb@\x170zz\x08\x88\x13\t\x19\x8a\xceB\x1eP\x95\x05\x00u\xc1\x05\xb3\x08\x08\x8b\x83\x8d'

How could I check the what is going wrong?
1715155001
Hero Member
*
Offline Offline

Posts: 1715155001

View Profile Personal Message (Offline)

Ignore
1715155001
Reply with quote  #2

1715155001
Report to moderator
1715155001
Hero Member
*
Offline Offline

Posts: 1715155001

View Profile Personal Message (Offline)

Ignore
1715155001
Reply with quote  #2

1715155001
Report to moderator
1715155001
Hero Member
*
Offline Offline

Posts: 1715155001

View Profile Personal Message (Offline)

Ignore
1715155001
Reply with quote  #2

1715155001
Report to moderator
The forum strives to allow free discussion of any ideas. All policies are built around this principle. This doesn't mean you can post garbage, though: posts should actually contain ideas, and these ideas should be argued reasonably.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715155001
Hero Member
*
Offline Offline

Posts: 1715155001

View Profile Personal Message (Offline)

Ignore
1715155001
Reply with quote  #2

1715155001
Report to moderator
1715155001
Hero Member
*
Offline Offline

Posts: 1715155001

View Profile Personal Message (Offline)

Ignore
1715155001
Reply with quote  #2

1715155001
Report to moderator
1715155001
Hero Member
*
Offline Offline

Posts: 1715155001

View Profile Personal Message (Offline)

Ignore
1715155001
Reply with quote  #2

1715155001
Report to moderator
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10555



View Profile
September 09, 2020, 09:21:49 AM
 #2

it looks like the python code printed the raw bytes instead of the human readable string. i tried converting it to a string but i'm not a python expert and i got encoder out of range errors.

this could be for a couple of reasons that involved your transaction being rejected by your client or the node that received it. you could post the testnet transaction here so that we may see what the problem is.

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

Activity: 5
Merit: 1


View Profile
September 09, 2020, 01:12:42 PM
 #3

Thanks for your reply.

Quote
this could be for a couple of reasons that involved your transaction being rejected by your client or the node that received it. you could post the testnet transaction here so that we may see what the problem is.

Since the sending cannot be signed, there is no transaction.

I also tried other addresses, but failed with different error messages.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
September 09, 2020, 01:55:13 PM
 #4

Since the sending cannot be signed, there is no transaction.

Just because it is not signed, it still is called a transaction..
The transaction first has to be constructed. Then it is going to be signed.

You should start explaining what exactly you did and what exactly you are trying to accomplish.
This seems to be  a XY problem.


Without any information, no one is able to help you.

anykao (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 1


View Profile
September 09, 2020, 03:04:40 PM
Last edit: September 09, 2020, 03:18:44 PM by anykao
Merited by ABCbits (1)
 #5

I mean the transaction is not broadcasted, since the signing failed.
I got a capture of the transaction and the error message.

https://imgur.com/a/7waSHOa

By the way, I use trezor with electrum, and succeeded in sending coins using trezor web wallet.

Actually I checked write logs to file, but couldn't find the log file.
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
September 09, 2020, 05:27:36 PM
 #6

the log files are in the data directory:

https://electrum.readthedocs.io/en/latest/faq.html#datadir

are you using electrum 4.0.2 ? this bug may have been fixed in recent versions.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
September 09, 2020, 09:27:58 PM
 #7

are you using electrum 4.0.2 ? this bug may have been fixed in recent versions.
The buttons on the bottom of the "advanced preview" indicate that that screenshot is not from 4.0.2...


Since the sending cannot be signed, there is no transaction.
I mean the transaction is not broadcasted, since the signing failed.
I got a capture of the transaction and the error message.

https://imgur.com/a/7waSHOa
NOTE: If you click the "copy" button on the window shown in your screenshot from the link above, it will copy the raw transaction hex data to your clipboard and you'll be able to paste that data here... that might assist folks in troubleshooting why your transaction is not working.

Having said that, I would definitely take Abdussamad's advice and update to 4.0.2 first and then try your transaction again.

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6730


bitcoincleanup.com / bitmixlist.org


View Profile WWW
September 09, 2020, 11:08:19 PM
Merited by ABCbits (1)
 #8

Exploring the Python functions that implements the sign transaction button on Electrum, and going down through calls leads me to here, in ECPrivkey.sign(msg_hash, sigencode): https://github.com/spesmilo/electrum/blob/9b4414fb2ea87dbb3ce410fc030af0c23c0bcd79/electrum/ecc.py#L444. I found this error message in that function:

Code:
"msg_hash to be signed must be bytes, and 32 bytes exactly"

The error message you posted is 31 bytes. It may not actually be an error message, it looks to me like it is an invalid message hash.

When I decoded this transaction using
Code:
>>> byte_array = bytearray(b'\xa8*\x08\xe9\xfb@\x170zz\x08\x88\x13\t\x19\x8a\xceB\x1eP\x95\x05\x00u\xc1\x05\xb3\x08\x08\x8b\x83')
>>> hexadecimal_string = byte_array.hex()
>>> print(hexadecimal_string)

I got the transaction a82a08e9fb4017307a7a08881309198ace421e5095050075c105b308088b83. It doesn't look to me like this is a valid transaction hash, at least from putting it in Blockcypher.

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

Activity: 5
Merit: 1


View Profile
September 10, 2020, 02:21:46 AM
Last edit: September 10, 2020, 03:51:51 AM by anykao
 #9

Quote
are you using electrum 4.0.2 ? this bug may have been fixed in recent versions.

Forgot to mention that I am using electrum 3.3.8.
Code:
20200910T001913.665524Z |     INFO | logging | Electrum version: 3.3.8 - https://electrum.org - https://github.com/spesmilo/electrum
I actually succeeded sending by upgrading 4.0.2, but I'm would like to stick to 3.3.8.

In the log file, I just got this error message.

Code:
20200910T034828.887916Z |    ERROR | gui.qt.main_window.[meng_wallet] | on_error
Traceback (most recent call last):
  File "electrum\gui\qt\util.py", line 718, in run
  File "electrum\wallet.py", line 1112, in sign_transaction
  File "C:\Program Files (x86)\Electrum\electrum\plugins\trezor\trezor.py", line 91, in sign_transaction
    self.plugin.sign_transaction(self, tx, prev_tx, xpub_path)
  File "C:\Program Files (x86)\Electrum\electrum\plugins\trezor\trezor.py", line 336, in sign_transaction
    signatures, _ = client.sign_tx(self.get_coin_name(), inputs, outputs, details=details, prev_txes=prev_tx)
  File "C:\Program Files (x86)\Electrum\electrum\plugins\trezor\clientbase.py", line 224, in sign_tx
    return trezorlib.btc.sign_tx(self.client, *args, **kwargs)
  File "site-packages\trezorlib\tools.py", line 233, in wrapped_f
  File "site-packages\trezorlib\btc.py", line 158, in sign_tx
KeyError: b'\x16\xa4n[\x10\xb1\xc8\x84\xe2\xe9\\\x88!\xa6\x11p~9/\x95\x16.-p\x85\xf1f>}\x80z4'

And the raw transaction is

Code:
45505446ff0002000000000101347a807d3e66f185702d2e16952f397e7011a621885ce9e284c8b1105b6ea41601000000171600143fa041c1cc9a4e15e8f1ce48f6a984c9a053403ffdffffff02a0860100000000001600147db29ebf97d94c484ee65d92f7b69fd808fd62f7fbba0d000000000017a9144e2be4952ea47f45e6e57ad3f527ee40b34a98d587feffffffff40420f000000000000000201ff53ff044a5262034a756f47800000006f2a80d928ace8c63f924145ec0c47bd82c085456e714dd7c6cc2a988c2b09310318415245f4db17ee7e313d9ab4c94cd7451f017a72a0f2e000c298b3d2c773b0000000000bf71b00
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5591


Self-proclaimed Genius


View Profile
September 10, 2020, 03:47:37 AM
Merited by ABCbits (1)
 #10

I actually succeeded sending by upgrading 4.0.2, but I'm would like to stick to 3.3.8.
Too bad, you won't be able to use that wallet file to 3.3.8 unless you have a backup or create another copy (which is easy).

It seems like it was an issue of compatibly with a certain Trezor firmware version:
https://github.com/spesmilo/electrum/issues/6214 Read the replies to the issue for more info.

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

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

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

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

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

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











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











▄▄▄▄█
anykao (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 1


View Profile
September 10, 2020, 03:55:36 AM
 #11

Quote
It seems like it was an issue of compatibly with a certain Trezor firmware version:
https://github.com/spesmilo/electrum/issues/6214 Read the replies to the issue for more info.

Exactly.

Thank you very much. You saved my day.
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!