Bitcoin Forum
April 24, 2024, 07:46:42 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: P2PKH hex to address  (Read 116 times)
linuxqq (OP)
Jr. Member
*
Offline Offline

Activity: 34
Merit: 6


View Profile
May 20, 2021, 04:00:17 AM
 #1

I encountered an address that could not be converted during the process of transcoding the p2pkh address,Below is the transaction tx hash

Quote
4f1433d6433d3ce8a877519ba9ddc310dbee96dba939aca0dbef0176a3563436

I get the content of scriptpubkey hex
Quote
b'0804678afd04678afd75a820894eeb82f9a851f5d1cb1be3249f58bc8d259963832c5e7474a76f7 a859ee95c87'

Get the byte array of this hex

Quote
b'\x08\x04g\x8a\xfd\x04g\x8a\xfdu\xa8 \x89N\xeb\x82\xf9\xa8Q\xf5\xd1\xcb\x1b\xe3$\x9fX\xbc\x8d%\x99c\x83,^tt\xa7oz\x85\x9e\xe9\\\x87'

Which part of this hex is the public key? Isn't the address flag of p2pkh 0x00?
1713944802
Hero Member
*
Offline Offline

Posts: 1713944802

View Profile Personal Message (Offline)

Ignore
1713944802
Reply with quote  #2

1713944802
Report to moderator
The network tries to produce one block per 10 minutes. It does this by automatically adjusting how difficult it is to produce blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713944802
Hero Member
*
Offline Offline

Posts: 1713944802

View Profile Personal Message (Offline)

Ignore
1713944802
Reply with quote  #2

1713944802
Report to moderator
NotATether
Legendary
*
Offline Offline

Activity: 1582
Merit: 6677


bitcoincleanup.com / bitmixlist.org


View Profile WWW
May 20, 2021, 04:40:54 AM
Merited by bitmover (1)
 #2

The scriptPubKey will not contain the public key itself, only the public key hash (after bytes "76a9"). The actual public key is at the end of scriptSig.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
odolvlobo
Legendary
*
Offline Offline

Activity: 4298
Merit: 3200



View Profile
May 20, 2021, 05:30:33 AM
 #3

There is no address. It is a non-standard script:
Code:
04678afd04678afd
OP_DROP
OP_SHA256
894eeb82f9a851f5d1cb1be3249f58bc8d259963832c5e7474a76f7a859ee95c
OP_EQUAL

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5531


Self-proclaimed Genius


View Profile
May 20, 2021, 05:44:27 AM
 #4

I encountered an address that could not be converted during the process of transcoding the p2pkh address,Below is the transaction tx hash

Quote
4f1433d6433d3ce8a877519ba9ddc310dbee96dba939aca0dbef0176a3563436

I get the content of scriptpubkey hex
Quote
b'0804678afd04678afd75a820894eeb82f9a851f5d1cb1be3249f58bc8d259963832c5e7474a76f7 a859ee95c87'
-snip-
The input that you're looking at isn't P2PKH thus, shouldn't be converted into an address, it's a non-standard script which translates into:
Code:
OP_PUSHBYTES_8 04678afd04678afd OP_DROP OP_SHA256 OP_PUSHBYTES_32 894eeb82f9a851f5d1cb1be3249f58bc8d259963832c5e7474a76f7a859ee95c OP_EQUAL

I believe it's the output of the mentioned txn in this thread: https://bitcointalk.org/index.php?topic=52378.msg625507#msg625507
Thread has some guesses on how to spend it.

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

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

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

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

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

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











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











▄▄▄▄█
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!