Installing rana. Excited to start playing around and seeing what vanity keys I can mine.
Discussion
Is there any way to calculate (estimate) how long it would take to mine a npub prefix of x characters? All the ones I want to search for are too long.
I am not sure if there is a way to estimate time. I will keep you posted if I find out.
Does anyone have a link for the characters that can be used in an npub key?
I had seen a list somewhere but can’t find it now.
It'll check when you run and I think it'll display the bech32 charset if there's an invalid char.
Thank you both!
I also just found the bech32 list at your generator’s github page #[3]
Thanks again!
I just found a key with estimated proof of work of 20 in 31 seconds.
Now searching for a key with an estimated pow of 40 and my Mac sounds like an airplane.
🔥🔥🔥 thanks for the info! GL
7-char vanity npub takes a few days on M1 Macbook Pro. #[6] 8-char npub took a few weeks!
I’ve got some simple code here if you can interpret python.
https://github.com/armstrys/nostrfastr/blob/main/nbs/04_vanity.ipynb
Npub chars are “023456789acdefghjklmnpqrstuvwxyz” and if you use the hashrate estimates provided by rana you can calculate a rough time with a couple simple equations listed in that nb.
Take advantage of the ability to search for multiple vanity targets at the same time!
Thank you for making rana #[0]
Having a great time using it.
#[1]
Nice! On my list of things to do. Still not sure how to do it though.
Any tips on how to actually run it on a MacBook? Not ashamed to say I’m very new to GitHub stuff (plus I’m asking because I think others will want to know too).
I am also a noobie 👊 but was able to get it running with a few commands.
I started here: https://github.com/grunch/rana
Then I installed rust using the command here:
https://www.rust-lang.org/tools/install
I then ran the following command as told at the rana github:
cargo install rana
From there I was able to run rana in the terminal. It went pretty smooth and I might have got lucky. Haha
Also for reference I am running a 2015 MacBook pro with mojave 10.14.6.
Brilliant! And thanks - excellent starting points (have the same MacBook Pro at the mo too 😄). 🤙🏼⚡️
👊 they are nice machines!! good luck mining!
Thanks! 🤙🏼 How’s your battery doing? Mine’s pretty dead now.
It seems ok, but this mining activity is doing some damage to it! Haha
Cool! And yes it will push it 😂. Tried to get a vanity npub with another program (forget it’s name now) but it struggled when I went for 7 characters. I can only use my MBP when it’s permanently plugged in. Unplug it and the battery just doesn’t retain a charge. Still a workhorse but probably time for a new M2 one…
What exactly are vanity keys? I am lost again
Vanity keys are Nostr npub keys that contain a word or phrase or something unique/special for the individual.
They are a fun way to add personality to your experience/profile but not mandatory.
You can “mine” vanity keys by running programs that target a word or phrase that you have set. The longer the phrase the more time it will take to mine. So an npub containing the word dog would be exponentially faster than one containing the words dogwalker.
That is my understanding and hopefully gets info across. Someone more technical could probably explain it better!
oh man, thanks so much!
I wonder:
say I would like to have a vanity address with crypt0 in it or something like bada55cafe in HEX
what are the chances that somebody else mines it as well and effectively have access to the same private key?
are "vanity" addresses more prone to get accidentally-hacked?
Good question! I am not sure on the chances of someone else mining a duplicate key. I imagine pretty slim even with “shorter” vanity words or phrases but I don’t know what the cutoff is as far as number of characters goes. I imagine for longer characters though and good key management you would be pretty safe.
There could be weaknesses introduced by the mining alg that make it predictable but, naively, it's the probability that the rest of the bits randomly selected are the same.
So, assuming your vanity is 6 bytes, thats 32-6 => 26 bytes or 208 bits of entropy if i'm remembering the pubkey size right, so chances are 1/2^208 => 2.4308653429×10⁻⁶³ to choose the same key that was mined, then doing that over and over until you find it. 208 bits is pretty safe. #[2]