Skip to content

Commit

Permalink
feat(lazy-pages): Implement generic storage (#3379)
Browse files Browse the repository at this point in the history
  • Loading branch information
ark0f authored Nov 15, 2023
1 parent f27dea3 commit 9650de2
Show file tree
Hide file tree
Showing 23 changed files with 506 additions and 372 deletions.
8 changes: 3 additions & 5 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -420,17 +420,17 @@ demo-wat = { path = "examples/wat" }
#
# TODO: remove these dependencies (from this file?) or add more docs.
cfg-if = "1.0.0" # gear-lazy-pages
errno = "0.3" # gear-lazy-pages
nix = "0.26.4" # gear-lazy-pages
# TODO: upgrade this package ( issue #2694 )
cargo_metadata = "=0.15.3" # utils/wasm-builder
errno = "0.3" # gear-lazy-pages
impl-trait-for-tuples = "0.2.2" # pallets/staking-rewards
indexmap = "2.1.0" # utils/weight-diff
indicatif = "*" # utils/wasm-gen
keyring = "1.2.1" # gcli
libp2p = "=0.50.1" # gcli (same version as sc-consensus)
mimalloc = { version = "0.1.39", default-features = false } # node/cli
nacl = "0.5.3" # gcli
nix = "0.26.4" # gear-lazy-pages
nonempty = "0.8.1" # utils/utils
libfuzzer-sys = "0.4" # utils/runtime-fuzzer/fuzz
pwasm-utils = "0.19.0" # utils/wasm-builder
Expand Down
2 changes: 1 addition & 1 deletion gstd/src/async_runtime/signals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl WakeSignals {
self.signals.contains_key(&reply_to)
}

pub fn poll(&mut self, reply_to: MessageId, cx: &mut Context<'_>) -> ReplyPoll {
pub fn poll(&mut self, reply_to: MessageId, cx: &Context<'_>) -> ReplyPoll {
match self.signals.remove(&reply_to) {
None => ReplyPoll::None,
Some(mut signal @ WakeSignal { payload: None, .. }) => {
Expand Down
2 changes: 1 addition & 1 deletion gstd/src/msg/async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use core::{
use futures::future::FusedFuture;
use scale_info::scale::Decode;

fn poll<F, R>(waiting_reply_to: MessageId, cx: &mut Context<'_>, f: F) -> Poll<Result<R>>
fn poll<F, R>(waiting_reply_to: MessageId, cx: &Context<'_>, f: F) -> Poll<Result<R>>
where
F: Fn(Vec<u8>) -> Result<R>,
{
Expand Down
7 changes: 3 additions & 4 deletions gtest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ license.workspace = true
gear-core.workspace = true
gear-core-errors.workspace = true
core-processor = { workspace = true, features = ["std"] }
gear-lazy-pages-interface = { workspace = true, features = ["std"] }
gear-lazy-pages.workspace = true
gear-lazy-pages-common.workspace = true
gear-utils.workspace = true
gear-wasm-instrument.workspace = true
gsys.workspace = true

sp-io = { workspace = true, features = ["std"] }

codec = { workspace = true, features = ["derive"] }
hex.workspace = true
colored.workspace = true
derive_more = { workspace = true, features = ["add", "add_assign", "display", "mul", "mul_assign"] }
env_logger.workspace = true
path-clean.workspace = true
rand = { workspace = true, features = ["std", "std_rng"] }
gear-wasm-instrument.workspace = true
log.workspace = true

[dev-dependencies]
Expand Down
Loading

0 comments on commit 9650de2

Please sign in to comment.