rocket-pool/rocketpool

Storage contracts accessible by older contracts

epiccoolguy opened this issue · 2 comments

I think this require statement only tests that the calling contract's address was set, but there doesn't seem to be any logic to prevent older contracts from accessing the storage, despite the modifier being called "onlyLatestRocketNetworkContract". Is this how the eternal storage pattern is supposed to work?

require(addressStorage[keccak256(abi.encodePacked("contract.address", msg.sender))] != address(0x0));

@epiccoolguy Old addresses are deleted in the upgrade:

rocketStorage.deleteAddress(keccak256(abi.encodePacked("contract.address", oldContractAddress)));

Apologies for the late reply all!

@epiccoolguy , @gorgos is correct, old contract addresses are removed from storage whenever an upgrade is made, therefore old network contracts are unable to communicate with the rest of the RP network :)