Skip to content

Commit

Permalink
Feat(standalone): Bootstrap storage from relayer and state snapshots (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
birchmd committed Nov 29, 2021
1 parent 0150324 commit d22156a
Show file tree
Hide file tree
Showing 10 changed files with 911 additions and 7 deletions.
217 changes: 211 additions & 6 deletions Cargo.lock

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

31 changes: 31 additions & 0 deletions engine-sdk/src/promise.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,34 @@ pub trait PromiseHandler {
self.promise_attach_callback(base, &args.callback)
}
}

/// A promise handler which does nothing. Probably shouldn't be used in production.
pub struct Noop;

impl PromiseHandler for Noop {
fn promise_results_count(&self) -> u64 {
0
}

fn promise_result(&self, _index: u64) -> Option<PromiseResult> {
None
}

fn promise_create_call(&mut self, _args: &PromiseCreateArgs) -> PromiseId {
PromiseId::new(0)
}

fn promise_attach_callback(
&mut self,
_base: PromiseId,
_callback: &PromiseCreateArgs,
) -> PromiseId {
PromiseId::new(0)
}

fn promise_create_batch(&mut self, _args: &PromiseBatchAction) -> PromiseId {
PromiseId::new(0)
}

fn promise_return(&mut self, _promise: PromiseId) {}
}
4 changes: 4 additions & 0 deletions engine-standalone-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ aurora-engine-sdk = { path = "../engine-sdk", default-features = false, features
borsh = { version = "0.8.2" }
evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", default-features = false }
rocksdb = "0.16.0"
postgres = "0.19.2"
serde = "1.0.130"
serde_json = "1.0.72"
base64 = "0.13.0"

[features]
default = []
Expand Down
Loading

0 comments on commit d22156a

Please sign in to comment.