Detect blockchain node is on a fork when it's obvious
Forks happen regularly on Goerli.
A deal/task can immediately go off-chain to a contribution timeout status if the contribution timeout value read on the blockchain was 0 (1970-01-01).
eg.: https://core.dev-pool.goerli.iex.ec/tasks/0xa4d31e17e8e55aa70a4a17c3c05a2832983f815b10adaba190e2a5d038e54a2b
contributionDeadline":"1970-01-01"
With latest code: https://github.com/iExecBlockchainComputing/iexec-core/blob/b283ce159b123cf1d84e49c98fde72f8ab6c7e1c/src/main/java/com/iexec/core/chain/DealWatcherService.java#L125 the task won't be added at all.
Nevertheless, if a deal has been received (meaning the task exists) while the on-chain contributionTimeout is 0, it is very likely the blockchain node is on a fork. In this case, we might be able to detect it and schedule a re-read until the blockchain node is on the right fork again.
Note: The case where we first received a deal on a fork which isn't the mainchain anymore (couple blocks after) is (probably?) less likely.