Block hash endianness?

Hi there,

I’m trying to write my own mining programme, and I’m currently stuck at the core algorithm.
The XPM paper says that

To achieve this, the prime chain is linked to the block header hash by requiring that its origin be divisible by the block header hash.

However, in genesis block (I looked it up at http://primecoin.21stcenturymoneytalk.org), we have:

block hash (in hex) = 963d17ba4dc753138078a2f56afb3af9674e2546822badff26837db9a0152106
chain origin (in dec) = 8965952996020407064364391577136065268670542909213664815741310568010946895662880601479081230

and the problem is: origin is not divisible by a block hash.

What do I miss? Maybe the block hash endianness is the problem? What bytes should I swap to get correct results?
Help appreciated! :slight_smile:

Where did you find this paper?

Also I want to make a miner for shits and giggles. Does getwork crash your primecoin client?

The paper is available at http://primecoin.org/static/primecoin-paper.pdf.

I think I know where the problem was: the “block hash” is not the same as the “block header hash”.
The prime chain origin must be divisible from the block header hash, which is apparently not available in block explorers.

Can you try and go the getwork command on the primecoin-qt client. Does it crash your client?