For Cryptonight, the input is the "block hashing blob". This is basically the serialized block, plus the root of the merkle tree of transactions it contains and the number of transactions. I think getblocktemplate gets you pretty much that. This does not include the transactions themselves, just the root of the merkle tree consisting of hte transactions.
What are the inputs to the hash function?
I wrote an implementation of the cryptonight hash function (a purely academic exercise). Now I want to take it to the next level. I understand that hashing in reality involves a set of inputs, notably the previous block hash, some current transaction data, and a nonce. Is that correct? What is the actual raw input of the monero hash function?
I see the API has a "getblocktemplate" method which returns some of this data. The previous hash is there. Is the blob returned considered the current blob of transactions? If not, where does that come from? And in the end, how do I string this together with the prev hash and nonce to produce a new block?