I've been playing with the chainlink getRandom call which returns a random number every time it's called. What I'm confused by though is the blockchain should be deterministic so if we were to rebuild this entire network from node 0 wouldn't that same call to getRandom be a different number and this not be deterministic? Same for external api calls, what if that node goes away and when you rebuild that data is no longer available, wouldn't that change the entire chain going forward?
You're correct in saying that blockchains are deterministic, oracles however, operate outside of blockchains. Oracles deliver data the same way that people make transactions.
When you replay a blockchain that uses oracle data, your replay what the oracle returned. In the same way when you replay a blockchain that has human transactions, you replay the result of those transactions.
An oracle works by delivering data in a transaction. So the oracle only delivers the data once, and that becomes a part of the historical transaction data of the blockchain.
Does that make sense?