Author

Topic: peerMagic vs Upstream Network ID vs IDENTIFIER (etc) .decode ('hex') (Read 509 times)

newbie
Activity: 32
Merit: 0
I have yet to find any place that properly describes the differences between the following in a single discussion to clear up confusion:

1) UNOMPs usage of the "peerMagic" number
2) Luke Jr's usage of the "Upstream Network ID"
3) P2Pool's usage of "IDENTIFIER = (insert random characters here).decode ('hex')"

The quotes at the beginning and end after... of ... are not meant to be taken as literal syntax, just to separate the idea/term/phrase.

Different mining pool software uses different coin identifiers to differentiate between different coins. Bitcoin is used as an example below since this is well documented and referenced, however; these coin identifiers are supposed to all come from the main.cpp

1) UNOMP uses the peerMagic number which is:  f9beb4d9
    -- the string comes from bitcoin core's main.cpp as
                       pchMessageStart[0] = 0xf9;
                       pchMessageStart[1] = 0xbe;
                       pchMessageStart[2] = 0xb4;
                       pchMessageStart[3] = 0xd9;

2) Luke Jr's Eloipool uses the "Upstream Network ID" which is:  b'\x0b\x11\x09\x07
Where does this come from?

3) P2Pool uses this: IDENTIFIER = 'e037d5b8c6923410'.decode('hex')
Where does this come from?

Now the call for help...

I understand (or at least hope I understand this correctly at this point) that the peerMagic number or the Upstream Network ID or the IDENTIFIER is only needed for P2P block notifications.

When I peruse various other coins there is not always this consistency of finding the proper peerMagic, Upstream Network ID, or IDENTIFIER in any other coin's main.cpp, but should be able to regardless of whether they are SHA256, Scrypt, X11, X13, etc etc etc... in order to build a pool for ANY coin in existence in any of the above pool software by getting the proper line of code from the main.cpp.

Does anyone know of a simple way to find these numbers so one can build a pool based on UNOMP or eloipool or P2Pool code for ANY coin? I'm not interested in arguing the need for code rewrites for LukeJr's eloipool to work for X11 or X13 or SCRYPT versus it's original bitcoin implementation.

This confusion has caused me to waste a lot of time reading many main.cpp files for many different coins only to be more confused with every new main.cpp i read. I am not a code monkey and do not spew problem solving skills for writing code, I'm just a firewall/network person with some very basic coding, scripting and debugging capabilities.

If I'm missing the boat on the differences between UNOMP's peerMagic number, LukeJr's NetworkUpstreamID and P2Pools IDENTIFIER, I along with many other random people in the world would love some sort of simplified explanation of these, and how you get them from what I believe is consistent with an unsigned char in the main.cpp for ANY coin created to date thus far.
Jump to: