Skip to content

Commit

Permalink
Remove bls12-377 as it's not properly implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrylavrenov committed May 6, 2024
1 parent 4cdadca commit 5a44b34
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 61 deletions.
24 changes: 0 additions & 24 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ pallet-ethereum = { git = "https://github.com/humanode-network/frontier", branch
pallet-evm = { git = "https://github.com/humanode-network/frontier", branch = "locked/polkadot-v0.9.40", default-features = false }
pallet-evm-balances = { git = "https://github.com/humanode-network/frontier", branch = "locked/polkadot-v0.9.40", default-features = false }
pallet-evm-precompile-blake2 = { git = "https://github.com/humanode-network/frontier", branch = "locked/polkadot-v0.9.40", default-features = false }
pallet-evm-precompile-bls12377 = { git = "https://github.com/humanode-network/frontier", branch = "locked/polkadot-v0.9.40", default-features = false }
pallet-evm-precompile-bn128 = { git = "https://github.com/humanode-network/frontier", branch = "locked/polkadot-v0.9.40", default-features = false }
pallet-evm-precompile-modexp = { git = "https://github.com/humanode-network/frontier", branch = "locked/polkadot-v0.9.40", default-features = false }
pallet-evm-precompile-sha3fips = { git = "https://github.com/humanode-network/frontier", branch = "locked/polkadot-v0.9.40", default-features = false }
Expand Down
2 changes: 0 additions & 2 deletions crates/humanode-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ pallet-ethereum = { workspace = true }
pallet-evm = { workspace = true }
pallet-evm-balances = { workspace = true }
pallet-evm-precompile-blake2 = { workspace = true }
pallet-evm-precompile-bls12377 = { workspace = true }
pallet-evm-precompile-bn128 = { workspace = true }
pallet-evm-precompile-modexp = { workspace = true }
pallet-evm-precompile-sha3fips = { workspace = true }
Expand Down Expand Up @@ -177,7 +176,6 @@ std = [
"pallet-ethereum/std",
"pallet-evm-accounts-mapping/std",
"pallet-evm-precompile-blake2/std",
"pallet-evm-precompile-bls12377/std",
"pallet-evm-precompile-bn128/std",
"pallet-evm-precompile-modexp/std",
"pallet-evm-precompile-sha3fips/std",
Expand Down
34 changes: 0 additions & 34 deletions crates/humanode-runtime/src/frontier_precompiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ use pallet_evm::{
IsPrecompileResult, Precompile, PrecompileHandle, PrecompileResult, PrecompileSet,
};
use pallet_evm_precompile_blake2::Blake2F;
use pallet_evm_precompile_bls12377::{
Bls12377G1Add, Bls12377G1Mul, Bls12377G1MultiExp, Bls12377G2Add, Bls12377G2Mul,
Bls12377G2MultiExp, Bls12377Pairing,
};
use pallet_evm_precompile_bn128::{Bn128Add, Bn128Mul, Bn128Pairing};
use pallet_evm_precompile_modexp::Modexp;
use pallet_evm_precompile_sha3fips::Sha3FIPS256;
Expand Down Expand Up @@ -67,21 +63,6 @@ pub mod precompiles_constants {
/// `Bls12381MapG2` precompile constant.
pub const BLS12381_MAP_G2: u64 = 19;

/// `Bls12377G1Add` precompile constant.
pub const BLS12377_G1_ADD: u64 = 21;
/// `Bls12377G1Mul` precompile constant.
pub const BLS12377_G1_MUL: u64 = 22;
/// `Bls12377G1MultiExp` precompile constant.
pub const BLS12377_G1_MULTI_EXP: u64 = 23;
/// `Bls12377G2Add` precompile constant.
pub const BLS12377_G2_ADD: u64 = 24;
/// `Bls12377G2Mul` precompile constant.
pub const BLS12377_G2_MUL: u64 = 25;
/// `Bls12377G2MultiExp` precompile constant.
pub const BLS12377_G2_MULTI_EXP: u64 = 26;
/// `Bls12377Pairing` precompile constant.
pub const BLS12377_PAIRING: u64 = 27;

/// `Sha3FIPS256` precompile constant.
pub const SHA_3_FIPS256: u64 = 1024;
/// `ECRecoverPublicKey` precompile constant.
Expand Down Expand Up @@ -131,13 +112,6 @@ where
BLS12381_PAIRING,
BLS12381_MAP_G1,
BLS12381_MAP_G2,
BLS12377_G1_ADD,
BLS12377_G1_MUL,
BLS12377_G1_MULTI_EXP,
BLS12377_G2_ADD,
BLS12377_G2_MUL,
BLS12377_G2_MULTI_EXP,
BLS12377_PAIRING,
SHA_3_FIPS256,
EC_RECOVER_PUBLIC_KEY,
BIOAUTH,
Expand Down Expand Up @@ -189,14 +163,6 @@ where
a if a == hash(BLS12381_PAIRING) => Some(Bls12381Pairing::execute(handle)),
a if a == hash(BLS12381_MAP_G1) => Some(Bls12381MapG1::execute(handle)),
a if a == hash(BLS12381_MAP_G2) => Some(Bls12381MapG2::execute(handle)),
// BLS12-377 precompiles:
a if a == hash(BLS12377_G1_ADD) => Some(Bls12377G1Add::execute(handle)),
a if a == hash(BLS12377_G1_MUL) => Some(Bls12377G1Mul::execute(handle)),
a if a == hash(BLS12377_G1_MULTI_EXP) => Some(Bls12377G1MultiExp::execute(handle)),
a if a == hash(BLS12377_G2_ADD) => Some(Bls12377G2Add::execute(handle)),
a if a == hash(BLS12377_G2_MUL) => Some(Bls12377G2Mul::execute(handle)),
a if a == hash(BLS12377_G2_MULTI_EXP) => Some(Bls12377G2MultiExp::execute(handle)),
a if a == hash(BLS12377_PAIRING) => Some(Bls12377Pairing::execute(handle)),
// Non-Frontier specific nor Ethereum precompiles :
a if a == hash(SHA_3_FIPS256) => Some(Sha3FIPS256::execute(handle)),
a if a == hash(EC_RECOVER_PUBLIC_KEY) => Some(ECRecoverPublicKey::execute(handle)),
Expand Down

0 comments on commit 5a44b34

Please sign in to comment.