Bitcoin Forum
May 06, 2024, 04:11:50 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: whats is best collation to store bitcoin WIF key and bitcoin address in mysql ?  (Read 325 times)
btctousd81 (OP)
Sr. Member
****
Offline Offline

Activity: 434
Merit: 270


View Profile WWW
September 01, 2017, 04:57:06 AM
 #1

i need to know which collation in mysql is best to keep the size as low as possible so that the db size will be smaller and queries will be quicker.

i am currently using utf8_unicode_ci, but i read ascii stores more data in less space.

i want to lower db size so it can be fit in RAM.

so what are you guys using ?


thanks

1714968710
Hero Member
*
Offline Offline

Posts: 1714968710

View Profile Personal Message (Offline)

Ignore
1714968710
Reply with quote  #2

1714968710
Report to moderator
1714968710
Hero Member
*
Offline Offline

Posts: 1714968710

View Profile Personal Message (Offline)

Ignore
1714968710
Reply with quote  #2

1714968710
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, but full nodes are more resource-heavy, and they must do a lengthy initial syncing process. As a result, lightweight clients with somewhat less security are commonly used.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714968710
Hero Member
*
Offline Offline

Posts: 1714968710

View Profile Personal Message (Offline)

Ignore
1714968710
Reply with quote  #2

1714968710
Report to moderator
1714968710
Hero Member
*
Offline Offline

Posts: 1714968710

View Profile Personal Message (Offline)

Ignore
1714968710
Reply with quote  #2

1714968710
Report to moderator
1714968710
Hero Member
*
Offline Offline

Posts: 1714968710

View Profile Personal Message (Offline)

Ignore
1714968710
Reply with quote  #2

1714968710
Report to moderator
elbandi
Hero Member
*****
Offline Offline

Activity: 525
Merit: 529


View Profile
September 02, 2017, 05:41:47 PM
 #2

you can decode base58 to hex, and store the hex as binary.
btctousd81 (OP)
Sr. Member
****
Offline Offline

Activity: 434
Merit: 270


View Profile WWW
September 02, 2017, 05:51:52 PM
 #3

you can decode base58 to hex, and store the hex as binary.

i still dont get it., what do you mean by decode base58 to hex ?

do i have tp decode both WIF and bitcoin address ? and store as binary ?

what charset should i use ?

can i later search directly by using bitcoin address ?


thanks

elbandi
Hero Member
*****
Offline Offline

Activity: 525
Merit: 529


View Profile
September 02, 2017, 06:01:45 PM
 #4

you can decode base58 to hex, and store the hex as binary.

i still dont get it., what do you mean by decode base58 to hex ?

do i have tp decode both WIF and bitcoin address ? and store as binary ?

what charset should i use ?

can i later search directly by using bitcoin address ?


thanks
you have an address, like 1QCkaDkCDAtsxG9LrLDbPrSne7q3hM3qm3 decode base58, you get: 00FE83D76016CF60187F978ACECB3480086BDD6443A1B813CA
you can store this hex (as binary) in mysql: https://dev.mysql.com/doc/refman/5.5/en/blob.html
btctousd81 (OP)
Sr. Member
****
Offline Offline

Activity: 434
Merit: 270


View Profile WWW
September 02, 2017, 06:03:51 PM
 #5

you can decode base58 to hex, and store the hex as binary.

i still dont get it., what do you mean by decode base58 to hex ?

do i have tp decode both WIF and bitcoin address ? and store as binary ?

what charset should i use ?

can i later search directly by using bitcoin address ?


thanks
you have an address, like 1QCkaDkCDAtsxG9LrLDbPrSne7q3hM3qm3 decode base58, you get: 00FE83D76016CF60187F978ACECB3480086BDD6443A1B813CA
you can store this hex (as binary) in mysql: https://dev.mysql.com/doc/refman/5.5/en/blob.html


okie, this is new., i am looking in to it,

thanks

looks like i can then decode WIF key too.

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!