I've been trying to figure out if it's at all possible to create a smart contract in Solana that will run a long-ish calculation (e.g. many sha256 iterations, or a KDF), maybe in parts, even though the calculation as a whole is obviously longer than the maximum compute budget for a transaction.
A CPI will not cut it since, as the docs say, the budget is transferred to the other program.
Any help on this issue would be appreciated. Thanks!