Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vanitygen for MOONcoin #13

Open
bobkasho opened this issue Apr 9, 2021 · 30 comments
Open

vanitygen for MOONcoin #13

bobkasho opened this issue Apr 9, 2021 · 30 comments

Comments

@bobkasho
Copy link

bobkasho commented Apr 9, 2021

I would like to use the program for the mooncoin [MOON].
Thank you

sources:
site: https://mooncoin.eco/
wallet: 0.17.1.0 https://github.com/mooncoincore/wallet/releases

prefix: "M" and "2"

@10gic
Copy link
Owner

10gic commented Apr 9, 2021

You can just add its configuration into file base58prefix.txt. Format is:

Symbol, Coin name, Address prefix, Address base58 version (prefix), Private key base58 version (prefix)

You need to know the ‘address base58 version’ and ‘private key base58 version’.

@bobkasho
Copy link
Author

bobkasho commented Apr 9, 2021

tnks!

@10gic
Copy link
Owner

10gic commented Apr 10, 2021

@bobkasho Have you found ‘address base58 version’ and ‘private key base58 version’ for Mooncoin?
It should be 3 and 131 respectively, refer: https://github.com/mooncoincore/wallet/blob/master/src/chainparams.cpp#L122

@bobkasho
Copy link
Author

@bobkasho Have you found ‘address base58 version’ and ‘private key base58 version’ for Mooncoin?
It should be 3 and 131 respectively, refer: https://github.com/mooncoincore/wallet/blob/master/src/chainparams.cpp#L122

unfortunately I don't quite understand this question :(

10gic added a commit that referenced this issue Apr 10, 2021
@10gic
Copy link
Owner

10gic commented Apr 10, 2021

@bobkasho I have commit the code, help me to verify it. Here is an example:

$ ./vanitygen++ -C MOON 2abcd
Generating MOON Address
Difficulty: 4553521
MOON Pattern: 2abcd
MOON Address: 2abcdz7jEQUXNxFhqoqNX4duPw8LUkR2G8
MOON Privkey: 5RVcaVev4ZvyksMmqnJLz9NSD8LytPiCsQmGoVFqSX6GaAW7pmC

@bobkasho
Copy link
Author

@bobkasho
Copy link
Author

The coin also has a prefix "M" - it is more modern. "2" is already deprecated

@10gic
Copy link
Owner

10gic commented Apr 10, 2021

I am not very familiar with Mooncoin.

$ ./vanitygen++ -C MOON -F script -X 50 -Y 131 MMMM
Generating MOON Address
Difficulty: 78508
MOON Pattern: MMMM                                                             
P2SHMOON  Address: MMMM7ER6NgC5Puv7W5gjhizDUJvEiWuAuU
MOON Address: MLE5FsAi6cpUDxq8URz12WPvCzNAXxp5j2
MOON Privkey: 5Pv7zZZisUyCrAEW87c42iebZvQmeunqQ1ZsShJS3vEBEFAVAR9

The value -X 50 -Y 131 comes from https://github.com/mooncoincore/wallet/blob/master/src/chainparams.cpp#L124

You can customize prefix MMMM, please don't send too much coin to the generated address before you verified. All coins may be lost forever. Use as your own risk.

@bobkasho
Copy link
Author

I am not very familiar with Mooncoin.

$ ./vanitygen++ -C MOON -F script -X 50 -Y 131 MMMM
Generating MOON Address
Difficulty: 78508
MOON Pattern: MMMM                                                             
P2SHMOON  Address: MMMM7ER6NgC5Puv7W5gjhizDUJvEiWuAuU
MOON Address: MLE5FsAi6cpUDxq8URz12WPvCzNAXxp5j2
MOON Privkey: 5Pv7zZZisUyCrAEW87c42iebZvQmeunqQ1ZsShJS3vEBEFAVAR9

The value -X 50 -Y 131 comes from https://github.com/mooncoincore/wallet/blob/master/src/chainparams.cpp#L124

You can customize prefix MMMM, please don't send too much coin to the generated address before you verified. All coins may be lost forever. Use as your own risk.

but what is correct for Windows?
that's how it works for me :

"C:\vangen152>vanitygen.exe -C MOON -F script -X 50 -Y 131 Moon
Prefix 'Moon' not possible
Hint: Run vanitygen with "-C LIST" for a list of valid prefixes. Also note that many coin
s only allow certain characters as the second character in the prefix.

C:\vangen152>"

@10gic
Copy link
Owner

10gic commented Apr 10, 2021

@bobkasho Have you see any Mooncoin address starts with 'Moon' ? May be it's impossible, you can try another prefix:

$ ./vanitygen++ -C MOON -F script -X 50 -Y 131 MMoon
Generating MOON Address
Difficulty: 4553521
MOON Pattern: MMoon
P2SHMOON  Address: MMoonoitKan6uXCGf9ug9KXYTCN9Ghttdd
MOON Address: MFpbov7KAYQYnRbwMCVFqJSh9WC5FMDTZ9
MOON Privkey: 5QAuMvoFW3ZgB4gPkxB15d3CdshDRZwzTwSy4XK6eqTxsz3vamh

@bobkasho
Copy link
Author

@10gic
C:\vangen152>vanitygen.exe -C MOON -F script -X 50 -Y 131 Mmoon
Prefix 'Mmoon' not possible
Hint: Run vanitygen with "-C LIST" for a list of valid prefixes. Also note that many coin
s only allow certain characters as the second character in the prefix.

C:\vangen152>vanitygen.exe -C MOON -F script -X 50 -Y 131 Mmnm
Prefix 'Mmnm' not possible
Hint: Run vanitygen with "-C LIST" for a list of valid prefixes. Also note that many coin
s only allow certain characters as the second character in the prefix.

C:\vangen152>

@10gic
Copy link
Owner

10gic commented Apr 10, 2021

@bobkasho There is no vanitygen.exe in this project, only vanitygen++.exe. How did you get this program?

@bobkasho
Copy link
Author

@10gic please link

@10gic
Copy link
Owner

10gic commented Apr 10, 2021

I don't use Windows. You can build it by yourself, or download a prebuilt https://github.com/10gic/vanitygen-plusplus/releases/download/v0.1.0/prebuilt.win32.v0.1.0.zip

As file base58prefix.txt is not shipped in package, you can't use -C MOON, it don't matter, just ignore it:
vanitygen++.exe -F script -X 50 -Y 131 Mmoon

@bobkasho
Copy link
Author

@10gic
COOL!
"C:\vangen>vanitygen++.exe -F script -X 50 -Y 131 MM
Difficulty: 23
Pattern: MM
P2SH Address: MMZ1S3jhWtVpJfqK411L9FvMbaHquG7a7R
Address: M9H6iPY2gijF8HrZfQpuSpSyX56fHyFKbh
Privkey: 5QeyCBXyex46mNyQkaC98ZwUBviid4yo5uC8zYx3DgukaUmspe1"

dont cool :(
"C:\vangen>oclvanitygen++.exe -F script -X 50 -131 MMMMM
Invalid format 'script'"

@bobkasho
Copy link
Author

@10gic
and why the second character of the prefix must necessarily be "M" - addresses come with one "M" at the beginning.
example: MTGTA72cSCwUJNu1TuQzkGBvoqpft2HLSV

@10gic
Copy link
Owner

10gic commented Apr 10, 2021

@bobkasho The second character doesn't required be "M", it's just an example. You can use another prefix:

./vanitygen++ -F script -X 50 -Y 131 MTG
Difficulty: 1353
Pattern: MTG
P2SH Address: MTGWPq2EVdNojrVFmXRuJ5koo3MNBmCr3A
Address: MNS1VbY2dXPwqVA6ysChDbaJpY2pqfC5ML
Privkey: 5QUqAKNqTbVe8PAsGrUEhQHa7TefbXMYF8SFs5xauZQTbNvbca6

Again, I am not familiar with Mooncoin, use as your own risk. You need verify the generated private key.

@10gic
Copy link
Owner

10gic commented Apr 10, 2021

@10gic
COOL!
"C:\vangen>vanitygen++.exe -F script -X 50 -Y 131 MM
Difficulty: 23
Pattern: MM
P2SH Address: MMZ1S3jhWtVpJfqK411L9FvMbaHquG7a7R
Address: M9H6iPY2gijF8HrZfQpuSpSyX56fHyFKbh
Privkey: 5QeyCBXyex46mNyQkaC98ZwUBviid4yo5uC8zYx3DgukaUmspe1"

dont cool :(
"C:\vangen>oclvanitygen++.exe -F script -X 50 -131 MMMMM
Invalid format 'script'"

Currently, -F script is not implemented for oclvanitygen++.exe.

Many people report that oclvanitygen++.exe doesn't work in Windows. Could you help me check if oclvanitygen++.exe works for legacy mooncoin address? Just run:

oclvanitygen++.exe -X 3 -Y 131  2abcd

See what happens?

@bobkasho
Copy link
Author

@10gic
C:\vangen>oclvanitygen++.exe -X 3 -Y 131 -p 0 -d 0 2bobKash
Difficulty: 888446610538
Error loading kernel file 'calc_addrs.cl': No such file or directory
Could not open any device
Available OpenCL platforms:
0: [NVIDIA Corporation] NVIDIA CUDA
0: [NVIDIA Corporation] GeForce GTX 1060 6GB, endian little: true
1: [Intel(R) Corporation] Intel(R) OpenCL
0: [Intel(R) Corporation] Intel(R) Core(TM) i5-4440 CPU @ 3.10GHz, endian little: true
1: [Intel(R) Corporation] Intel(R) HD Graphics 4600, endian little: true
2: [Advanced Micro Devices, Inc.] AMD Accelerated Parallel Processing
clGetDeviceIDs(0): CL_DEVICE_NOT_FOUND

@10gic
Copy link
Owner

10gic commented Apr 10, 2021

@10gic
C:\vangen>oclvanitygen++.exe -X 3 -Y 131 -p 0 -d 0 2bobKash
Difficulty: 888446610538
Error loading kernel file 'calc_addrs.cl': No such file or directory
Could not open any device
Available OpenCL platforms:
0: [NVIDIA Corporation] NVIDIA CUDA
0: [NVIDIA Corporation] GeForce GTX 1060 6GB, endian little: true
1: [Intel(R) Corporation] Intel(R) OpenCL
0: [Intel(R) Corporation] Intel(R) Core(TM) i5-4440 CPU @ 3.10GHz, endian little: true
1: [Intel(R) Corporation] Intel(R) HD Graphics 4600, endian little: true
2: [Advanced Micro Devices, Inc.] AMD Accelerated Parallel Processing
clGetDeviceIDs(0): CL_DEVICE_NOT_FOUND

It seems calc_addrs.cl is missing. Could you download file https://raw.githubusercontent.com/10gic/vanitygen-plusplus/master/calc_addrs.cl into the same directory of oclvanitygen++.exe, and run it again?

@bobkasho
Copy link
Author

bobkasho commented Apr 10, 2021

10042021-21
@10gic
crash ))
10042021-2

@10gic
Copy link
Owner

10gic commented Apr 10, 2021

Thanks for share the result.

This is not good news. Currently, I don't have a windows device, and I don't have time to fix this problem. Suggest you use vanitygen++.exe in Windows, or try oclvanitygen++ in CentOS.

The fix of this issue is welcome.

@bobkasho
Copy link
Author

@10gic
The address is not displayed in the wallet :( after import
10042021-22

@10gic
Copy link
Owner

10gic commented Apr 10, 2021

There are two common types of P2SH address: MULTISIG and segwit address.

The -F script would generate P2SH (MULTISIG, but in case 1-of-1 ), refer:

if (vcp->vc_format == VCF_SCRIPT) {

Very likely, the "M" address in Mooncoin is the segwit address. If so, you would not get the matched address after import private key.

I will check it later.

@10gic
Copy link
Owner

10gic commented Apr 10, 2021

@bobkasho Could you help me confirm that the following information matches?

Private key: 5PiUadgWDWjGcVHCKctSq1RiCRY1Y2CCKZrX8PgaJTwKUBeYnKs
Address: MRkY26CMfAbLGB1niZRfML3XX1Ca5ZoWBo

@bobkasho
Copy link
Author

@bobkasho Could you help me confirm that the following information matches?

Private key: 5PiUadgWDWjGcVHCKctSq1RiCRY1Y2CCKZrX8PgaJTwKUBeYnKs
Address: MRkY26CMfAbLGB1niZRfML3XX1Ca5ZoWBo

OK! I started importing. it will take up to one hour

@bobkasho
Copy link
Author

@bobkasho Could you help me confirm that the following information matches?

Private key: 5PiUadgWDWjGcVHCKctSq1RiCRY1Y2CCKZrX8PgaJTwKUBeYnKs
Address: MRkY26CMfAbLGB1niZRfML3XX1Ca5ZoWBo

@10gic
the address is not displayed in the wallet after import
10042021-24
10042021-23

@10gic
Copy link
Owner

10gic commented Apr 11, 2021

@bobkasho I see a button "Generate native segwit (Bech32) address" in GUI, is the "M" address a native segwit (Bech32) address?

BTW, what's the address derived from private key: 5PiUadgWDWjGcVHCKctSq1RiCRY1Y2CCKZrX8PgaJTwKUBeYnKs ?

I can't find the technical doc about Mooncoin address derivation. The BTC address derivation is very clear: https://en.bitcoin.it/wiki/Invoice_address. I want to find similar technical doc for Mooncoin. Please share me if you known this.

@bobkasho
Copy link
Author

@bobkasho I see a button "Generate native segwit (Bech32) address" in GUI, is the "M" address a native segwit (Bech32) address?

BTW, what's the address derived from private key: 5PiUadgWDWjGcVHCKctSq1RiCRY1Y2CCKZrX8PgaJTwKUBeYnKs ?

I didn't get the address in the shossel from this private key 5PiUadgWDWjGcVHCKctSq1RiCRY1Y2CCKZrX8PgaJTwKUBeYnKs

I can't find the technical doc about Mooncoin address derivation. The BTC address derivation is very clear: https://en.bitcoin.it/wiki/Invoice_address. I want to find similar technical doc for Mooncoin. Please share me if you known this.

I will clarify

@bobkasho
Copy link
Author

@10gic
More than likely there isn't a specific document saying the same thing
Mooncoin addresses are generated at time of send/receive/request by the wallet itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants