Author

Topic: [base58] PUBKEY_ADDRESS has to contain prefix Mo and address length 35 (Read 375 times)

legendary
Activity: 2674
Merit: 2334
What I want to know is how to get address which starts with «Mo» or Ro with address length 35 bytes?
For example, you can use this online Base58 converter:
http://lenschulwitz.com/base58

I tested these Bitcoin-addresses 35-byte length:

Code:
Mo111111111111111111111111111111111 (Base58)
0BB52C7E52DC7D16D2A362767FE633FE3751B8D2E73C00000000 (hex)

Mozzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz (Base58)
0BB7A8B59E7FB242C83304156096CABFCE80B3AB9875FFFFFFFF (hex)

Ro111111111111111111111111111111111 (Base58)
0DF5BE9ADEC4ACED5CCDDA721FEED36F39E50D3383CC00000000 (hex)

Rozzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz (Base58)
0DF83AD22A67E219525D7C11009F6A30D114080C3505FFFFFFFF (hex)

As you can see, the first tree octets (1.5 bytes) are always identical in each hex addresses.


Maybe I don't follow you but in case I do follow, is it enough to put here 9(09 hex) and 247(f6 hex)?
base58Prefixes[PUBKEY_ADDRESS] = std::vector(9,247);
?
If you want "Mo":
0B (hex) = 11 (dec)
B6 (hex) = 182 (dec)
Code:
base58Prefixes[PUBKEY_ADDRESS] = std::vector(11,182);

If you want "Ro":
0D (hex) = 13 (dec)
F6 (hex) = 246 (dec)
Code:
base58Prefixes[PUBKEY_ADDRESS] = std::vector(13,246);
newbie
Activity: 5
Merit: 0
In order to get a base-58 address with 35 characters starting with "Mo", you must encode a value between 09f5d59d241b1a2e29a5bec083bc33dfea4958764a7400000000 and 09f851d46fbe4f5a1f35605f646ccaa18178534efbadffffffff (hex). Note that these are 26 bytes long and don't fit the standard version byte + 20 bytes + 4-byte checksum format. The simplest fix would probably be to extend the version byte to two bytes with a value of 09f6 or 09f7 (hex).

Likewise, "Ro" would require a value between 0df5be9adec4aced5ccdda721feed36f39e50d3383cc00000000 and 0df83ad22a67e219525d7c11009f6a30d114080c3505ffffffff (hex), or a 2-byte version with value of 0df6 or 0df7 (hex).

Note:

I computed the "Mo" range as (20x58+46) x 5833 to (20x58+46+1) x 5833 - 1
and the "Ro" range as  (24x58+46) x 5833 to (24x58+46+1) x 5833 - 1
Maybe I don't follow you but in case I do follow, is it enough to put here 9(09 hex) and 247(f6 hex)?
base58Prefixes[PUBKEY_ADDRESS] = std::vector(9,247);
?
legendary
Activity: 4522
Merit: 3426
In order to get a base-58 address with 35 characters starting with "Mo", you must encode a value between 0bb52c7e52dc7d16d2a362767fe633fe3751b8d2e73c00000000 and 0bb7a8b59e7fb242c83304156096cabfce80b3ab9875ffffffff (hex). Note that these are 26 bytes long and don't fit the standard version byte + 20 bytes + 4-byte checksum format. The simplest fix would probably be to extend the version byte to two bytes with a value of 0bb6 (hex).

Likewise, "Ro" would require a value between 0df5be9adec4aced5ccdda721feed36f39e50d3383cc00000000 and 0df83ad22a67e219525d7c11009f6a30d114080c3505ffffffff (hex), or a 2-byte version with value of 0df6 or 0df7 (hex).

Note:

I computed the "Mo" range as (20x58+46) x 5833 to (20x58+46+1) x 5833 - 1
and the "Ro" range as  (24x58+46) x 5833 to (24x58+46+1) x 5833 - 1

Also note: My original numbers were wrong due to a miscalculation.
newbie
Activity: 5
Merit: 0
I read from Bitcoin wiki https://en.bitcoin.it/wiki/List_of_address_prefixes about address prefix which is in most cases just single version byte. There are even basic examples.
What I want to know is how to get address which starts with «Mo» or Ro with address length 35 bytes?
What I have to put in PUBKEY_ADDRESS from chainparams.cpp (https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp) to achieve this?
Jump to: