Verifying contracts with immutables that are older
Looking into the https://github.com/celo-org/celo-monorepo/issues/9182#issuecomment-1035954373 issue, I noticed for older transactions the JSON RPC call eth_getTransactionByHash fails for geth full nodes, but works for archive nodes. I don't exactly know for how old transactions this happens but seems to be somewhere around 10+ months.
As manifested in that issue, this can become a problem when verifying contracts with immutables that are older, as currently for their verification the creation bytecode of the contract is retrieved from their creation transaction hash, but this would fail if the contract is "older".
This is the reason why currently the test verifyContractWithImmutables fails for Celo Alfajores. It's expected more tests will start to fail if the node behind the RPC is a full node and the transaction that created the contract becomes unavailable via eth_getTransactionByHash.
This would, however, be irrelevant for Ethereum networks once https://github.com/ethereum/sourcify/pull/507 is implemented.
Edit: This is related to the geth flag --txlookuplimit: https://geth.ethereum.org/docs/interface/command-line-options
Also fails for the Celo Mainnet contract 0xFCC5A03BF803213E478ccbE6517857faa3136978 https://gist.github.com/lastperson/4ffc43310d5aa8f35b35b3cc5c22c7a4
Lets explain this in the docs
Added in the docs with https://github.com/sourcifyeth/docs/commit/67e24ca3722775b9cdabb579d45e1f393b43b088