The question NetworkByte for Monero Stagenet gave me the impression that, there's a relation between ADDRESS_BASE58_PREFIX and NETWORK_ID, defined in src/cryptonote_config.h

If it is so, I can't find it. Anyone care to elaborate?

And how is it related to the public address prefix?

up vote 2 down vote accepted

NETWORK_ID is a 16 byte identifier that allows Monero nodes to identify themselves to other nodes, in order to prevent different Monero networks (e.g. mainnet vs stagenet) from accidentally talking to each other. It has nothing directly to do with wallet addresses, although there are different wallet address prefixes designed for use on different networks.

The web site you've linked to uses the the separate term "Network Byte", and shows the hex representations of what src/cryptonote_config.h defines using decimal numbers instead.

E.g. a network byte of 0x12 in hex is the number 18 in decimal, which is why the web site you've linked defaults to the value 12 and the cryptonote_config.h defines the value as CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 18;

  • I get the NETWORK_ID 0x12 ,0x30,,,,,, 0xA1, 0x10, 0x12 ,0x30,,,,,, 0xA1, 0x12, 0x12 ,0x30,,,,,, 0xA1, 0x12 That make sense. I'm thinking it's not just some random numbers, so where does they come from? CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 18; CRYPTONOTE_PUBLIC_INTEGRATED_ADDRESS_BASE58_PREFIX = 19; CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX = 42; CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 53; CRYPTONOTE_PUBLIC_INTEGRATED_ADDRESS_BASE58_PREFIX = 54; CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX = 63; How were these specific numbers choosen? – Mogens TrasherDK Oct 11 at 13:57
  • @MogensTrasherDK The NETWORK_ID is arbitrarily chosen. The wallet address prefixes are also arbitrarily chosen, but care is taken to ensure that the choice is such that a consistent first character appears in the base58 address that is generated for each prefix, so that they are easily human identifiable without having to do the math to convert the base58 back into hex to check. – knaccc Oct 11 at 14:30
  • @MogensTrasherDK Btw you might be guessing that network byte means the first byte of the network_id. But that can't be the case, because the network byte is different for different networks, but the network_id starts with 0x12 regardless of the network. – knaccc Oct 11 at 18:08

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.