Bitcoin Forum
April 26, 2024, 03:45:53 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: scripthash to address  (Read 148 times)
linuxqq (OP)
Jr. Member
*
Offline Offline

Activity: 34
Merit: 6


View Profile
July 09, 2020, 03:48:47 AM
Merited by ABCbits (1)
 #1

Maybe I don’t have a special understanding of the principles of Bitcoin, but I’m working hard to learn. I currently read the electrumx rosksdb directly. It seems that electrumx stores scripthash, but I want to get all the wallet addresses, a lot of BTC explorer How did they get the wallet address? electrumx's database does not store scriptPubKey,I have used electrumx to synchronize all the data, but I can’t get all the addresses because the scripthash is stored
1714103153
Hero Member
*
Offline Offline

Posts: 1714103153

View Profile Personal Message (Offline)

Ignore
1714103153
Reply with quote  #2

1714103153
Report to moderator
1714103153
Hero Member
*
Offline Offline

Posts: 1714103153

View Profile Personal Message (Offline)

Ignore
1714103153
Reply with quote  #2

1714103153
Report to moderator
1714103153
Hero Member
*
Offline Offline

Posts: 1714103153

View Profile Personal Message (Offline)

Ignore
1714103153
Reply with quote  #2

1714103153
Report to moderator
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10500



View Profile
July 09, 2020, 04:59:11 AM
Merited by ABCbits (1)
 #2

you can't reverse a hash so you can't go from the hash that ElectrumX database stores to the address.
it is not meant to be used like that anyways, the purpose of this design is for a user to hash their own address then send that hash to the Electrum node, then the node that has stored simple fixed length hashes can easily look up the balance and history and return it.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
linuxqq (OP)
Jr. Member
*
Offline Offline

Activity: 34
Merit: 6


View Profile
July 09, 2020, 05:45:59 AM
 #3

If all I get is an address hash, does that mean I can't get all wallet addresses from electrumx?
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
July 09, 2020, 08:00:28 AM
Merited by ABCbits (1)
 #4

If all I get is an address hash, does that mean I can't get all wallet addresses from electrumx?

Not directly in terms of calculate the input out of the resulting hash.
But in this case you could just create a list of all addresses and their hash. Then lookup the hash in your table and you got the corresponding address.


[...] It seems that electrumx stores scripthash, but I want to get all the wallet addresses, a lot of BTC explorer How did they get the wallet address?

Block explorer run a full node (e.g. bitcoin core) with txindex=1 and some custom software to query the needed data.
They most likely don't run an electrum server. There is no obvious reason to do so.

linuxqq (OP)
Jr. Member
*
Offline Offline

Activity: 34
Merit: 6


View Profile
July 09, 2020, 10:36:56 AM
 #5

If all I get is an address hash, does that mean I can't get all wallet addresses from electrumx?

Not directly in terms of calculate the input out of the resulting hash.
But in this case you could just create a list of all addresses and their hash. Then lookup the hash in your table and you got the corresponding address.


[...] It seems that electrumx stores scripthash, but I want to get all the wallet addresses, a lot of BTC explorer How did they get the wallet address?

Block explorer run a full node (e.g. bitcoin core) with txindex=1 and some custom software to query the needed data.
They most likely don't run an electrum server. There is no obvious reason to do so.

Thank you very much, I think your suggestion is very good, I can create my own database to map hash and publickey in redis
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!