TO be specific, how to read block headers of Rinkeby on Ropsten blockchain? Since both the blockchains are public test networks, reading data of one blockchain on another should be possible using smart contracts, isn't it?
1 Answer
Both Rinkeby and Ropsten are public networks. But they are two different ethereum networks and have two seperate blockchains. By design, a blockchain Smart Contract cannot access any outside information other than what it receives by means of the signed payload which is the transaction that invoked this Smart Contract. The Smart Contract in a blockchain is able to read the block number etc. in that chain because there is already a consensus on what these values are between the nodes in that network where the contract is running and thus does not affect determinism.
The block headers of a different blockchain are surely outside information which might be read differently by different nodes and hence cannot be read directly by a Smart Contract. So to answer your question.. No. It is not possible directly.
Having said that you can implement an oracle which is a way to make outside information available to your Smart Contract.
of Rinkeby **and** Ropsten
?