From 472098b35c1b792aa4b7a1d33d7ddf280729078e Mon Sep 17 00:00:00 2001 From: Oleksandr Zarudnyi Date: Fri, 6 Dec 2024 22:35:58 +0800 Subject: [PATCH] fix: deploy the identity precompile --- .gitmodules | 2 +- .../src/vm/eravm/system_contracts.rs | 10 +++++++++- system-contracts-stable-build | Bin 946341 -> 948150 bytes tests | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 72622394..faaab707 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "tests"] path = tests url = https://github.com/matter-labs/era-compiler-tests - branch = main + branch = az-identity-precompile-no-memcopy [submodule "solidity"] path = solidity url = https://github.com/ethereum/solidity diff --git a/compiler_tester/src/vm/eravm/system_contracts.rs b/compiler_tester/src/vm/eravm/system_contracts.rs index fae0d6b2..faf0c818 100644 --- a/compiler_tester/src/vm/eravm/system_contracts.rs +++ b/compiler_tester/src/vm/eravm/system_contracts.rs @@ -59,6 +59,9 @@ impl SystemContracts { const PATH_SHA256: &'static str = "era-contracts/system-contracts/contracts/precompiles/SHA256.yul"; + /// The `identity` system contract implementation path. + const PATH_IDENTITY: &'static str = "tests/solidity/simple/system/identity.sol:Identity"; + /// The `ecadd` system contract implementation path. const PATH_ECADD: &'static str = "era-contracts/system-contracts/contracts/precompiles/EcAdd.yul"; @@ -194,6 +197,10 @@ impl SystemContracts { let solidity_system_contracts = vec![ (web3::types::Address::zero(), Self::PATH_EMPTY_CONTRACT), + ( + web3::types::Address::from_low_u64_be(zkevm_opcode_defs::ADDRESS_IDENTITY.into()), + Self::PATH_IDENTITY, + ), ( web3::types::Address::from_low_u64_be( zkevm_opcode_defs::ADDRESS_ACCOUNT_CODE_STORAGE.into(), @@ -274,8 +281,9 @@ impl SystemContracts { debug_config.clone(), )?; - let mut solidity_file_paths = Vec::with_capacity(solidity_system_contracts.len() + 1); + let mut solidity_file_paths = Vec::with_capacity(solidity_system_contracts.len() + 2); for pattern in [ + "tests/solidity/simple/system/identity.sol", "era-contracts/system-contracts/contracts/*.sol", "era-contracts/system-contracts/contracts/libraries/**/*.sol", "era-contracts/system-contracts/contracts/interfaces/**/*.sol", diff --git a/system-contracts-stable-build b/system-contracts-stable-build index d6f4aaa3529dd281193915016e440d5b7ae18b5f..0da7f24c7905d54404ac764929eb52ac725d7bfe 100644 GIT binary patch delta 591 zcmZ4b&~n>*OGe?1j1DXb1_lNu3QPVUWU|=yqlGmBs z$S*&+S5RQ`0e;Qt6V5OzOxK;mA~IQkk!8|yF8`>qf_Hu{EAMZ8a7*ys(xylM!^@vl z7TW5Fo@7(bjXk-EL5mS+fuQ78=E8>xnV}^!dW1S_0@Leado{Mrbmmo*cAO8i3<4Ni zSSI%~ii&2Yq~?`mmQ?B$=jT{?LOIh9^s{MCJ}fN9nv+tN!#VxnHzvvH4I5cFryDE; z60_Vn1ST5w3rMHrf+m$)t&ypla*t-)GOAhlPCSy)$GF3?!v+d n#7scU48$NlD-g2*F*^`*05K;Ja{)0o5c2>r?{*g!zQh~=Mp=-p delta 73 zcmdn?-g4AiX1jNih%mT!$K+Fcj>_E%`#GF9P1;ik=JV4C5 KJ&2nxB?kZu4HIYp diff --git a/tests b/tests index 9c809589..8f5de305 160000 --- a/tests +++ b/tests @@ -1 +1 @@ -Subproject commit 9c80958998132ae8f1a6df1ba9f9db4f6c66c48f +Subproject commit 8f5de30570b698fa5f3f5ea2231be880993306fe