Skip to content

Commit

Permalink
Crystalin remove sha3 precompile (paritytech#316)
Browse files Browse the repository at this point in the history
* Removes unofficial Sha3FIPS256 precompiles

* Removes sha3fips  test

* Removes precompile sha3fips lib
  • Loading branch information
crystalin authored Apr 1, 2021
1 parent cb18776 commit 9563577
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion runtime/precompiles/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ pallet-evm-precompile-bn128 = { git = "https://github.com/purestake/frontier", d
pallet-evm-precompile-dispatch = { git = "https://github.com/purestake/frontier", default-features = false, branch = "notlesh-moonbeam-v0.7" }
pallet-evm-precompile-modexp = { git = "https://github.com/purestake/frontier", default-features = false, branch = "notlesh-moonbeam-v0.7" }
pallet-evm-precompile-simple = { git = "https://github.com/purestake/frontier", default-features = false, branch = "notlesh-moonbeam-v0.7" }
pallet-evm-precompile-sha3fips = { git = "https://github.com/purestake/frontier", default-features = false, branch = "notlesh-moonbeam-v0.7" }

[features]
default = [ "std" ]
Expand Down
2 changes: 0 additions & 2 deletions runtime/precompiles/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use pallet_evm_precompile_bn128::{Bn128Add, Bn128Mul, Bn128Pairing};
use pallet_evm_precompile_dispatch::Dispatch;
use pallet_evm_precompile_modexp::Modexp;
use pallet_evm_precompile_sha3fips::Sha3FIPS256;
use pallet_evm_precompile_simple::{ECRecover, Identity, Ripemd160, Sha256};

/// The PrecompileSet installed in the Moonbeam runtime.
Expand All @@ -38,6 +37,5 @@ pub type MoonbeamPrecompiles<Runtime> = (
Bn128Add,
Bn128Mul,
Bn128Pairing,
Sha3FIPS256,
Dispatch<Runtime>,
);
19 changes: 0 additions & 19 deletions tests/tests/test-precompiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,23 +358,4 @@ describeWithMoonbeam("Moonbeam (Precompiles)", `simple-specs.json`, (context) =>
"81a27be30121349505bb5c64736f6c63430007060033"
);
});

// Test taken from https://github.com/binance-chain/bsc/pull/118
it("sha3fips should be valid", async function () {
const tx_call = await customRequest(context.web3, "eth_call", [
{
from: GENESIS_ACCOUNT,
value: "0x0",
gas: "0x10000",
gasPrice: "0x01",
to: "0x0000000000000000000000000000000000000009",
data:
"0x0448250ebe88d77e0a12bcf530fe6a2cf1ac176945638d309b840d631940c93b78c2bd6d16f227a8877e" +
"3f1604cd75b9c5a8ab0cac95174a8a0a0f8ea9e4c10bca",
},
]);
expect(tx_call.result).equals(
"0xc7647f7e251bf1bd70863c8693e93a4e77dd0c9a689073e987d51254317dc704"
);
});
});

0 comments on commit 9563577

Please sign in to comment.