segra Posted August 20, 2017 Share Posted August 20, 2017 Hey All, Have been putting this together for some fun/learnings over the last couple of weeks. Given an i7 @ 3.6GH/z; running with 8 threads, you can obtain about 37,000 keys per second. Multiple prefixes can be searched at once without really affecting performance https://github.com/segrax/xrp-vanity Quote ./xrpvanity 4 XRP rWET xrp-vanity Search Threads: 8 Prefix difficulty: 4553521 rXRP Prefix difficulty: 4553521 rWET [2017-08-19 20:36:53] rXRPmxYJkZv62ULvRbrGhsfsfgkFNhqQg => sh4tVp3FBCeda6WumVdhj43BuPWWL [2017-08-19 20:38:40] rXRPpuecmxEVEjjbZoDe777UYg5tac9dH => saUk8nDtNevADo58Kc8y7raZFTRMd [2017-08-19 20:39:22] rWETXYMtiF7qwAhCfURTqp1tytFiqPfvi => sh1ZFEi38oXyahqXfRbwt2HMKSxaJ [37.38 Kkey/s][total 7394035][Prob 4.9%][50% in 39.2s] A few pieces, such as difficulty/probability are taken from samr7's Bitcoin vanity generator. Have fun one_giant_leap, Professor Hantzen and T8493 2 1 Link to comment Share on other sites More sharing options...
Guest Posted August 20, 2017 Share Posted August 20, 2017 Noice! So do you have the r and s keys? Idle hands do the devils work.... Link to comment Share on other sites More sharing options...
Professor Hantzen Posted August 20, 2017 Share Posted August 20, 2017 4 hours ago, segra said: Have been putting this together for some fun/learnings over the last couple of weeks. Given an i7 @ 3.6GH/z; running with 8 threads, you can obtain about 37,000 keys per second. Awesome!! That's about 10x faster than the node.js version. (And this is why things like rippled are written in C++...) A couple of questions: 1) Can it search only for strings at the beginning of addresses? 2) What's with the b58 table at the beginning of prefix.cpp? (I'm asking this as on a brief skim of the code I'm guessing the answer could unlock a bunch about what your code is doing.) Thanks! Link to comment Share on other sites More sharing options...
T8493 Posted August 20, 2017 Share Posted August 20, 2017 6 minutes ago, Professor Hantzen said: Awesome!! That's about 10x faster than the node.js version. (And this is why things like rippled are written in C++...) It looks like the main code in written in OpenCL (not C++). Link to comment Share on other sites More sharing options...
T8493 Posted August 20, 2017 Share Posted August 20, 2017 Where is the "secp256k1.cl" file in this repository? Link to comment Share on other sites More sharing options...
segra Posted August 20, 2017 Author Share Posted August 20, 2017 Just now, Professor Hantzen said: Awesome!! That's about 10x faster than the node.js version. (And this is why things like rippled are written in C++...) A couple of questions: 1) Can it search only for strings at the beginning of addresses? 2) What's with the b58 table at the beginning of prefix.cpp? (I'm asking this as on a brief skim of the code I'm guessing the answer could unlock a bunch about what your code is doing.) Thanks! Yeah, at the moment Its the reverse of the Ripple base 58 alphabet, You search for 'rS' 'r' has the ASCII value 0x72 g_Alphabet_B58_ReverseMap[0x72] == 0 (g_RippleAlphabet[0] = 'r) 'S' has the ASCII value 0x53 g_Alphabet_B58_ReverseMap[0x53] == 0x19 (g_RippleAlphabet[0x19] = 'S') g_RippleAlphabet = "rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"; Link to comment Share on other sites More sharing options...
segra Posted August 20, 2017 Author Share Posted August 20, 2017 2 minutes ago, T8493 said: Where is the "secp256k1.cl" file in this repository? Thats unused at this time, it was the original goal to use the GPU, but after some discoveries while learning wNAF (used in big number multiplication), i decided to release it as just a CPU generator for the moment as it was considerably faster than any other xrp address generator available Link to comment Share on other sites More sharing options...
segra Posted August 20, 2017 Author Share Posted August 20, 2017 3 hours ago, Tinyaccount said: Noice! So do you have the r and s keys? Idle hands do the devils work.... Haha, I would hope anyone feeling the need to ask such a question, wouldn't believe the answer given by me. But I know that this forum has a number of members who can review the code and see if anything malicious is going on Link to comment Share on other sites More sharing options...
Professor Hantzen Posted August 20, 2017 Share Posted August 20, 2017 7 minutes ago, T8493 said: It looks like the main code in written in OpenCL (not C++). Huh - I just saw ".cpp" and assumed. Never heard of OpenCL - the main.cpp sure looks like C++ to me? Link to comment Share on other sites More sharing options...
segra Posted August 20, 2017 Author Share Posted August 20, 2017 2 minutes ago, Professor Hantzen said: Huh - I just saw ".cpp" and assumed. Never heard of OpenCL - the main.cpp sure looks like C++ to me? OpenCL is a version of C for GPUs, originally I started working on this to implement some of it using a GPU, I never removed the file from the git repo as i dont consider this finished yet, its just at the CPU only stage right now. Although I must admit, i have no idea how much the GPU will speed things up from here Link to comment Share on other sites More sharing options...
Professor Hantzen Posted August 20, 2017 Share Posted August 20, 2017 14 minutes ago, segra said: Yeah, at the moment Its the reverse of the Ripple base 58 alphabet, You search for 'rS' 'r' has the ASCII value 0x72 g_Alphabet_B58_ReverseMap[0x72] == 0 (g_RippleAlphabet[0] = 'r) 'S' has the ASCII value 0x53 g_Alphabet_B58_ReverseMap[0x53] == 0x19 (g_RippleAlphabet[0x19] = 'S') g_RippleAlphabet = "rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"; Thanks - why do you need to map it this way? The code is well-commented - but maybe I'm missing the comment at the beginning of prefix.cpp that explains what it does overall? Link to comment Share on other sites More sharing options...
Professor Hantzen Posted August 20, 2017 Share Posted August 20, 2017 2 minutes ago, segra said: Although I must admit, i have no idea how much the GPU will speed things up from here @JonHolmquist These are the droids you're looking for. Link to comment Share on other sites More sharing options...
segra Posted August 20, 2017 Author Share Posted August 20, 2017 (edited) 13 minutes ago, Professor Hantzen said: Thanks - why do you need to map it this way? The code is well-commented - but maybe I'm missing the comment at the beginning of prefix.cpp that explains what it does overall? Instead of base58 encoding the entire AccountID for a generated public key, it simply compares the value of it to the range of the prefix eg. the prefix 'rS' multiples out to a 'big number' range of Low: 04BA6627CBA86E6B6102C76096E28AC9C917FBD680000000 High: 04EAD0A44471BA84277387AC220A52E65641E730FFFFFFFF Any public key (the SHA256 and RIPEMD160 result) which matches the 'rS' prefix, will be a big number in between the low and high Maybe an easier way to look at it, is it searches for something like >= rS00000000000000000000000 and <= rSFFFFFFFFFFFFFFFFFFFFFFF (this 2 values are 100% made up for visual explanation purposes) Edited August 20, 2017 by segra Professor Hantzen 1 Link to comment Share on other sites More sharing options...
Professor Hantzen Posted August 20, 2017 Share Posted August 20, 2017 13 minutes ago, segra said: Instead of base58 encoding the entire AccountID for a generated public key, it simply compares the value of it to the range of the prefix Right, thanks that all makes sense. Link to comment Share on other sites More sharing options...
Trippy Posted August 20, 2017 Share Posted August 20, 2017 (edited) Sorry if this is a dumb question, but is one possible use of this to scour addresses for balances in XRP? Edited August 20, 2017 by Trippy verb Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now