Current SQL queries determine cycle number using the the BlockProposals table.
These messages are somewhat lossy. Now that we have pox constants from #7 we can always calculate cycle numbers given a block burn height, and calculate block burn height ranges for a given cycle number.