From 6cebfef1df7f5dca5557a957ea171a7da062398d Mon Sep 17 00:00:00 2001 From: Amin Moghaddam Date: Fri, 13 Oct 2023 15:45:35 +0200 Subject: [PATCH] [evm] Evm runs (#1099) * Show chain id when checking proposals * Reduce number of optimizations to 200 in order to defeat the Spurious Dragon --- contract_manager/scripts/check_proposal.ts | 6 +++--- target_chains/ethereum/contracts/foundry.toml | 2 +- target_chains/ethereum/contracts/hardhat.config.ts | 2 +- target_chains/ethereum/contracts/truffle-config.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contract_manager/scripts/check_proposal.ts b/contract_manager/scripts/check_proposal.ts index e60a0dd2..aa0cf60e 100644 --- a/contract_manager/scripts/check_proposal.ts +++ b/contract_manager/scripts/check_proposal.ts @@ -87,7 +87,7 @@ async function main() { JSON.stringify(guardianSet) ); 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 code = await contract.getCodeDigestWithoutAddress(); // 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)); // this should be the same checksums.txt in our release file console.log( - `Code Id:${codeId} digest:${createHash("sha256") + `${chain.getId()} Code Id:${codeId} digest:${createHash("sha256") .update(code) .digest("hex")}` ); diff --git a/target_chains/ethereum/contracts/foundry.toml b/target_chains/ethereum/contracts/foundry.toml index 98f0f038..5c7dffc8 100644 --- a/target_chains/ethereum/contracts/foundry.toml +++ b/target_chains/ethereum/contracts/foundry.toml @@ -1,7 +1,7 @@ [profile.default] solc_version = '0.8.4' optimizer = true -optimizer_runs = 2000 +optimizer_runs = 200 src = 'contracts' # We put the tests into the forge-test directory (instead of test) so that # truffle doesn't try to build them diff --git a/target_chains/ethereum/contracts/hardhat.config.ts b/target_chains/ethereum/contracts/hardhat.config.ts index bd4a1d88..191b0392 100644 --- a/target_chains/ethereum/contracts/hardhat.config.ts +++ b/target_chains/ethereum/contracts/hardhat.config.ts @@ -107,7 +107,7 @@ module.exports = { settings: { optimizer: { enabled: true, - runs: 2000, + runs: 200, }, }, }, diff --git a/target_chains/ethereum/contracts/truffle-config.js b/target_chains/ethereum/contracts/truffle-config.js index b6ffe587..309bdade 100644 --- a/target_chains/ethereum/contracts/truffle-config.js +++ b/target_chains/ethereum/contracts/truffle-config.js @@ -37,7 +37,7 @@ module.exports = { settings: { optimizer: { enabled: true, - runs: 2000, + runs: 200, }, }, },