Skip to content
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

fix: remove the branch replacing call(0x04) with memcopy #127

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions compiler_tester/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ vm2 = { git = "https://github.com/matter-labs/vm2", optional = true, package = "

era-compiler-common = { git = "https://github.com/matter-labs/era-compiler-common", branch = "main" }
era-compiler-downloader = { git = "https://github.com/matter-labs/era-compiler-common", branch = "main" }
era-compiler-llvm-context = { git = "https://github.com/matter-labs/era-compiler-llvm-context", branch = "main" }
era-compiler-solidity = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "main" }
era-solc = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "main" }
era-compiler-vyper = { git = "https://github.com/matter-labs/era-compiler-vyper", branch = "main" }
era-compiler-llvm-context = { git = "https://github.com/matter-labs/era-compiler-llvm-context", branch = "az-identity-precompile-no-memcopy" }
era-compiler-solidity = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "az-identity-precompile-no-memcopy" }
era-solc = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "az-identity-precompile-no-memcopy" }
era-compiler-vyper = { git = "https://github.com/matter-labs/era-compiler-vyper", branch = "az-identity-precompile-no-memcopy" }

solidity-adapter = { path = "../solidity_adapter" }
benchmark-analyzer = { path = "../benchmark_analyzer" }
Expand Down
10 changes: 9 additions & 1 deletion compiler_tester/src/vm/eravm/system_contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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",
Expand Down
Binary file modified system-contracts-stable-build
Binary file not shown.
Loading