-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deployment: base and mainnet #50
Conversation
Signed-off-by: Elliot <elliotfriedman3@gmail.com>
Signed-off-by: Elliot <elliotfriedman3@gmail.com>
Signed-off-by: Elliot <elliotfriedman3@gmail.com>
Signed-off-by: Elliot <elliotfriedman3@gmail.com>
keccak256(type(TimelockFactory).runtimeCode), | ||
keccak256(factory.code.sliceBytes(0, 24116)), | ||
keccak256( | ||
type(TimelockFactory).runtimeCode.sliceBytes(0, 24116) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is differences in last 128 bytes. Works with sliceBytes(0, 24187)
.
I don't understand why 128 bytes are different when CBOR bytes tell that metadata is 51 bytes long.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last 138 bytes cab be removed.
a2646970667358221220faf3b7cb28c8bf5fe4d307231fad9edac131eccb00c5a5e363d013efe4a59a9764736f6c6343000819003308f913ffb0ba4369820330664f249be5a609b8d6503893d07eda734fd42bd4c6a264697066735822122090333ae03f10ea21d15a94de29f40350f00e215ed90ab2b63844e3dae2d05b6364736f6c63430008190033
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i'm not sure what accounts for this change either, only that it is necessary to make things work.
assertEq( | ||
keccak256(guard.code), | ||
keccak256(type(Guard).runtimeCode), | ||
keccak256(guard.code.sliceBytes(0, 950)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is difference in last 53 bytes. 2 CBOR bytes and 51 metadata bytes. so removing last 53 bytes would work i.e. sliceBytes(0, 953)
assertEq( | ||
keccak256(recoverySpellFactory.code), | ||
keccak256(type(RecoverySpellFactory).runtimeCode), | ||
keccak256(recoverySpellFactory.code.sliceBytes(0, 9470)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last 106. bytes are metadata. two metadatas one for RecoverySpell
and other for RecoverySpellFactory
. So last 106 bytes should be removed.
Ref: ethereum/solidity#14827
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the data to be removed.
a26469706673582212207bc965e90185648126b9111f159955c4b4afbc31cf59b1f93a4ec86501d4215e64736f6c63430008190033a2646970667358221220903c7bdd4b158ba0037ba1c0fc25619bd86084c68e73a918d80f5b7310271df864736f6c63430008190033
@@ -77,23 +80,29 @@ contract SystemDeploy is MultisigProposal { | |||
if (addresses.isAddressSet("TIMELOCK_FACTORY")) { | |||
address factory = addresses.getAddress("TIMELOCK_FACTORY"); | |||
assertEq( | |||
keccak256(factory.code), | |||
keccak256(type(TimelockFactory).runtimeCode), | |||
keccak256(factory.code.sliceBytes(0, 24116)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought .code
only returns the runtime bytecode. What is the reason for the slice here? Could you add a comment explaining, please? And why at 24116? How did you calculate that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was calculated based on the data that afterwards we needed to remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing we can get from a deployed contract is the bytecode as it exists onchain. So yes, that is what we are getting here.
Going to redeploy things, will see if the metadata issue persists on redeployment, and if so will slice the last bytes off. |
…ainnet-test-deployment
No description provided.