Skip to content

Commit

Permalink
[WIP] vm: refactor vm deps to make it compile to mips (#3675)
Browse files Browse the repository at this point in the history
* dep refactor

* vm-runtime: remove deps on starcoin-config

* Cargo.lock

* deps: refactor vm-runtime deps

* vm: add feature metrics

* cleanup

* fix compile

* cleanup
  • Loading branch information
nanne007 authored Aug 23, 2022
1 parent 5ad8a48 commit cb0549f
Show file tree
Hide file tree
Showing 140 changed files with 868 additions and 705 deletions.
59 changes: 48 additions & 11 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ members = [
"commons/api-limiter",
"commons/accumulator",
"commons/forkable-jellyfish-merkle",
"commons/time-service",
"types",
"types/uint",
"genesis",
Expand Down Expand Up @@ -52,6 +53,7 @@ members = [
"network-p2p/types",
"network-p2p/peerset",
"network",
"network/types",
"network/api",
"network-rpc",
"network-rpc/derive",
Expand Down
1 change: 1 addition & 0 deletions benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ starcoin-state-tree = {path = "../state/state-tree"}
starcoin-storage = {path = "../storage"}
starcoin-vm-runtime = {path = "../vm/vm-runtime"}
starcoin-vm-types = {path = "../vm/types"}
starcoin-transaction-builder = {path = "../vm/transaction-builder"}
types = {path = "../types", package = "starcoin-types"}
[target."cfg(target_os=\"linux\")".dependencies]
pprof = {version = "0.10", features = ["flamegraph", "criterion"]}
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) The Starcoin Core Contributors
// SPDX-License-Identifier: Apache-2.0

use starcoin_executor::{peer_to_peer_txn_sent_as_association, DEFAULT_EXPIRATION_TIME};

use crypto::ed25519::random_public_key;
use starcoin_config::ChainNetwork;
use starcoin_transaction_builder::peer_to_peer_txn_sent_as_association;
use starcoin_vm_types::account_address;
use types::account::DEFAULT_EXPIRATION_TIME;
use types::transaction::SignedUserTransaction;

pub mod chain;
Expand Down
1 change: 1 addition & 0 deletions block-relayer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ starcoin-sync-api = {package = "starcoin-sync-api", path = "../sync/api"}
starcoin-txpool = {path = "../txpool"}
starcoin-txpool-api = {path = "../txpool/api"}
starcoin-types = {path = "../types", package = "starcoin-types"}
starcoin-time-service = {path = "../commons/time-service"}

[dev-dependencies]
hex = "0.4.3"
Expand Down
5 changes: 2 additions & 3 deletions block-relayer/src/block_relayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,23 @@ use crypto::HashValue;
use futures::FutureExt;
use logger::prelude::*;
use network_api::messages::{CompactBlockMessage, NotificationMessage, PeerCompactBlockMessage};
use network_api::{NetworkService, PeerProvider, PeerSelector, PeerStrategy};
use network_api::{NetworkService, PeerId, PeerProvider, PeerSelector, PeerStrategy};
use starcoin_chain::verifier::StaticVerifier;
use starcoin_network::NetworkServiceRef;
use starcoin_network_rpc_api::GetTxnsWithHash;
use starcoin_service_registry::{ActorService, EventHandler, ServiceContext, ServiceFactory};
use starcoin_sync::block_connector::BlockConnectorService;
use starcoin_sync::verified_rpc_client::VerifiedRpcClient;
use starcoin_sync_api::PeerNewBlock;
use starcoin_time_service::TimeService;
use starcoin_txpool::TxPoolService;
use starcoin_txpool_api::TxPoolSyncService;
use starcoin_types::block::ExecutedBlock;
use starcoin_types::sync_status::SyncStatus;
use starcoin_types::system_events::{NewBranch, SyncStatusChangeEvent};
use starcoin_types::time::TimeService;
use starcoin_types::{
block::{Block, BlockBody},
compact_block::{CompactBlock, ShortId},
peer_info::PeerId,
system_events::NewHeadBlock,
transaction::SignedUserTransaction,
};
Expand Down
1 change: 1 addition & 0 deletions chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ starcoin-statedb = {path = "../state/statedb"}
starcoin-types = {path = "../types", package = "starcoin-types"}
starcoin-vm-types = {path = "../vm/types"}
state-tree = {path = "../state/state-tree", package = "starcoin-state-tree"}
starcoin-time-service={path="../commons/time-service"}
storage = {package = "starcoin-storage", path = "../storage"}
thiserror = "1.0"

Expand Down
1 change: 1 addition & 0 deletions chain/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ starcoin-state-api = {path = "../../state/api"}
starcoin-statedb = {path = "../../state/statedb"}
starcoin-types = {path = "../../types"}
starcoin-vm-types = {path = "../../vm/types"}
starcoin-time-service = {path = "../../commons/time-service"}
thiserror = "1.0"
[dev-dependencies]

Expand Down
Loading

0 comments on commit cb0549f

Please sign in to comment.