Skip to content

Commit

Permalink
Undo changes to the node, mock the runtime interface
Browse files Browse the repository at this point in the history
  • Loading branch information
ekovalev committed Jan 21, 2025
1 parent 16b79c9 commit 35ab836
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 145 deletions.
5 changes: 0 additions & 5 deletions Cargo.lock

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

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ members = [
"node/service",
"node/authorship",
"node/testing",
"node/ark",
"pallets/*",
"runtime/*",
"runtime-interface/sandbox",
Expand Down Expand Up @@ -240,7 +239,6 @@ gtest = { path = "gtest" }
gmeta = { path = "gmeta" }
gmeta-codegen = { path = "gmeta/codegen" }
gprimitives = { path = "gprimitives", default-features = false }
gear-ark = { path = "node/ark" }
gear-authorship = { path = "node/authorship" }
gear-core-backend = { path = "core-backend", default-features = false }
gear-call-gen = { path = "utils/call-gen" }
Expand Down
15 changes: 0 additions & 15 deletions node/ark/Cargo.toml

This file was deleted.

101 changes: 0 additions & 101 deletions node/ark/src/lib.rs

This file was deleted.

3 changes: 0 additions & 3 deletions runtime-interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ gear-core.workspace = true
gear-lazy-pages-common.workspace = true
gear-lazy-pages = { workspace = true, optional = true }
gear-sandbox-interface.workspace = true
gear-ark = { workspace = true, optional = true }

sp-io.workspace = true
sp-runtime-interface.workspace = true
Expand Down Expand Up @@ -54,6 +53,4 @@ std = [
"ark-ff/std",
"ark-scale/std",
"sha2/std",

"gear-ark/std",
]
20 changes: 2 additions & 18 deletions runtime-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ use {
},
ark_ff::fields::field_hashers::DefaultFieldHasher,
ark_scale::ArkScale,
gear_ark::{
field::{
goldilocks_field::GoldilocksField,
types::{Field, PrimeField64},
},
hash::poseidon::Poseidon,
},
gear_lazy_pages::LazyPagesStorage,
};

Expand Down Expand Up @@ -422,16 +415,7 @@ pub trait GearBls12_381 {

#[runtime_interface]
pub trait GearPoseidonHash {
fn poseidon(input: Vec<u64>) -> Vec<u64> {
let data: [GoldilocksField; 12] = input
.into_iter()
.map(GoldilocksField::from_canonical_u64)
.collect::<Vec<_>>()
.try_into()
.expect("Expect input to be of length 12");

let hash = <GoldilocksField as Poseidon>::poseidon(data);

hash.iter().map(|x| x.to_canonical_u64()).collect()
fn poseidon(_input: Vec<u64>) -> Vec<u64> {
unimplemented!("Comes in a separate PR")
}
}
1 change: 0 additions & 1 deletion utils/crates-io/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ pub const STACKED_DEPENDENCIES: &[&str] = &[
"gear-lazy-pages-common",
"gear-lazy-pages",
"gear-sandbox-interface",
"gear-ark",
"gear-runtime-interface",
"gear-sandbox",
"gear-core-backend",
Expand Down

0 comments on commit 35ab836

Please sign in to comment.