[evm] Evm runs (#1099)

* Show chain id when checking proposals

* Reduce number of optimizations to 200 in order to defeat the Spurious Dragon
This commit is contained in:
Amin Moghaddam 2023-10-13 15:45:35 +02:00 committed by GitHub
parent f72c0d93ad
commit 6cebfef1df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -87,7 +87,7 @@ async function main() {
JSON.stringify(guardianSet) JSON.stringify(guardianSet)
); );
console.log( console.log(
`Address:\t\t${address}\nproxy digest:\t\t${proxyDigest}\nimplementation digest:\t${implementationDigest} \nguardian set index:\t${currentIndex} \nguardian set:\t\t${guardianSetDigest}` `${chain.getId()} Address:\t\t${address}\nproxy digest:\t\t${proxyDigest}\nimplementation digest:\t${implementationDigest} \nguardian set index:\t${currentIndex} \nguardian set:\t\t${guardianSetDigest}`
); );
} }
} }
@ -107,7 +107,7 @@ async function main() {
const contract = new EvmContract(chain, address); const contract = new EvmContract(chain, address);
const code = await contract.getCodeDigestWithoutAddress(); const code = await contract.getCodeDigestWithoutAddress();
// this should be the same keccak256 of the deployedCode property generated by truffle // this should be the same keccak256 of the deployedCode property generated by truffle
console.log(`Address:${address} digest:${code}`); console.log(`${chain.getId()} Address:${address} digest:${code}`);
} }
} }
} }
@ -125,7 +125,7 @@ async function main() {
const code = await chain.getCode(Number(codeId)); const code = await chain.getCode(Number(codeId));
// this should be the same checksums.txt in our release file // this should be the same checksums.txt in our release file
console.log( console.log(
`Code Id:${codeId} digest:${createHash("sha256") `${chain.getId()} Code Id:${codeId} digest:${createHash("sha256")
.update(code) .update(code)
.digest("hex")}` .digest("hex")}`
); );

View File

@ -1,7 +1,7 @@
[profile.default] [profile.default]
solc_version = '0.8.4' solc_version = '0.8.4'
optimizer = true optimizer = true
optimizer_runs = 2000 optimizer_runs = 200
src = 'contracts' src = 'contracts'
# We put the tests into the forge-test directory (instead of test) so that # We put the tests into the forge-test directory (instead of test) so that
# truffle doesn't try to build them # truffle doesn't try to build them

View File

@ -107,7 +107,7 @@ module.exports = {
settings: { settings: {
optimizer: { optimizer: {
enabled: true, enabled: true,
runs: 2000, runs: 200,
}, },
}, },
}, },

View File

@ -37,7 +37,7 @@ module.exports = {
settings: { settings: {
optimizer: { optimizer: {
enabled: true, enabled: true,
runs: 2000, runs: 200,
}, },
}, },
}, },