Skip to content

Commit

Permalink
chore: filenames fastx -> sui
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker committed Feb 11, 2022
1 parent 930f2a9 commit 28af62a
Show file tree
Hide file tree
Showing 112 changed files with 172 additions and 172 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
members = [
"sui_core",
"sui",
"fastx_programmability/adapter",
"fastx_programmability/framework",
"fastx_types",
"sui_programmability/adapter",
"sui_programmability/framework",
"sui_types",
]

[profile.release]
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ cargo build --release
cd target/release
```

This will create `fastx` and `wallet` binaries in `target/release` directory.
This will create `sui` and `wallet` binaries in `target/release` directory.

### 2. Genesis

```shell
./fastx genesis
./sui genesis
```

The genesis command creates 4 authorities, 5 user accounts each with 5 gas objects.
Expand All @@ -37,13 +37,13 @@ A `wallet.conf` will also be generated to be used by the `wallet` binary to mana
Run the following command to start the local Sui network:

```shell
./fastx start
./sui start
```

or

```shell
./fastx start --config [config file path]
./sui start --config [config file path]
```

The network config file path is defaulted to `./network.conf` if not specified.
Expand Down
4 changes: 2 additions & 2 deletions network_utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "fastx-network"
name = "sui-network"
version = "0.1.0"
authors = ["Mysten Labs <[email protected]>"]
license = "Apache-2.0"
Expand All @@ -14,7 +14,7 @@ net2 = "0.2.37"
tokio = { version = "1.15.0", features = ["full"] }
tracing = { version = "0.1", features = ["log"] }

fastx-types = { path = "../fastx_types" }
sui-types = { path = "../sui_types" }

[package.metadata.cargo-udeps.ignore]
normal = ["net2"]
2 changes: 1 addition & 1 deletion network_utils/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

use crate::transport::*;
use bytes::Bytes;
use fastx_types::{error::*, serialize::*};
use futures::future::FutureExt;
use std::sync::atomic::{AtomicUsize, Ordering};
use sui_types::{error::*, serialize::*};
use tracing::*;

use std::io;
Expand Down
10 changes: 5 additions & 5 deletions sui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ tracing-subscriber = { version = "0.3", features = ["time", "env-filter"] }

bcs = "0.1.3"
sui_core = { path = "../sui_core" }
fastx-adapter = { path = "../fastx_programmability/adapter" }
fastx-network = { path = "../network_utils" }
fastx-types = { path = "../fastx_types" }
sui-adapter = { path = "../sui_programmability/adapter" }
sui-network = { path = "../network_utils" }
sui-types = { path = "../sui_types" }

rustyline = "9.1.2"
rustyline-derive = "0.6.0"
Expand All @@ -53,5 +53,5 @@ name = "wallet"
path = "src/wallet.rs"

[[bin]]
name = "fastx"
path = "src/fastx.rs"
name = "sui"
path = "src/sui.rs"
8 changes: 4 additions & 4 deletions sui/src/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
#![deny(warnings)]

use bytes::Bytes;
use fastx_network::{network::NetworkClient, transport};
use fastx_types::FASTX_FRAMEWORK_ADDRESS;
use fastx_types::{base_types::*, committee::*, messages::*, object::Object, serialize::*};
use futures::stream::StreamExt;
use move_core_types::ident_str;
use rand::rngs::StdRng;
use rand::Rng;
use std::time::{Duration, Instant};
use structopt::StructOpt;
use sui_core::{authority::*, authority_server::AuthorityServer};
use sui_network::{network::NetworkClient, transport};
use sui_types::SUI_FRAMEWORK_ADDRESS;
use sui_types::{base_types::*, committee::*, messages::*, object::Object, serialize::*};
use tokio::runtime::Runtime;
use tokio::{runtime::Builder, time};
use tracing::subscriber::set_global_default;
Expand Down Expand Up @@ -209,7 +209,7 @@ impl ClientServerBenchmark {
let order = if self.use_move {
// TODO: authority should not require seq# or digets for package in Move calls. Use dummy values
let framework_obj_ref = (
FASTX_FRAMEWORK_ADDRESS,
SUI_FRAMEWORK_ADDRESS,
SequenceNumber::new(),
ObjectDigest::new([0; 32]),
);
Expand Down
8 changes: 4 additions & 4 deletions sui/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
// Copyright (c) Facebook, Inc. and its affiliates.
// SPDX-License-Identifier: Apache-2.0

use fastx_types::{
use sui_core::client::ClientState;
use sui_types::{
base_types::*,
messages::{CertifiedOrder, OrderKind},
};
use sui_core::client::ClientState;

use crate::utils::Config;
use fastx_network::transport;
use fastx_types::object::Object;
use move_core_types::language_storage::TypeTag;
use move_core_types::{identifier::Identifier, transaction_argument::TransactionArgument};
use serde::{Deserialize, Serialize};
Expand All @@ -22,6 +20,8 @@ use std::{
io::{BufReader, BufWriter, Write},
iter::FromIterator,
};
use sui_network::transport;
use sui_types::object::Object;

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct AuthorityConfig {
Expand Down
8 changes: 4 additions & 4 deletions sui/src/fastx.rs → sui/src/sui.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// Copyright (c) Mysten Labs
// SPDX-License-Identifier: Apache-2.0
use fastx_types::base_types::{get_key_pair, ObjectID, SequenceNumber};
use fastx_types::committee::Committee;
use fastx_types::object::Object;
use futures::future::join_all;
use std::collections::BTreeMap;
use std::net::TcpListener;
Expand All @@ -14,6 +11,9 @@ use sui::config::{AccountInfo, AuthorityInfo, AuthorityPrivateInfo, NetworkConfi
use sui::utils::Config;
use sui_core::authority::{AuthorityState, AuthorityStore};
use sui_core::authority_server::AuthorityServer;
use sui_types::base_types::{get_key_pair, ObjectID, SequenceNumber};
use sui_types::committee::Committee;
use sui_types::object::Object;
use tracing::error;
use tracing::subscriber::set_global_default;
use tracing_subscriber::EnvFilter;
Expand All @@ -36,7 +36,7 @@ struct FastXOpt {
#[derive(StructOpt)]
#[structopt(rename_all = "kebab-case")]
pub enum FastXCommand {
/// Start fastx network.
/// Start sui network.
#[structopt(name = "start")]
Start,
#[structopt(name = "genesis")]
Expand Down
2 changes: 1 addition & 1 deletion sui/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async fn main() -> Result<(), anyhow::Error> {
println!();

let mut shell = Shell {
prompt: "fastx>-$ ",
prompt: "sui>-$ ",
state: context,
handler: ClientCommandHandler,
description: String::new(),
Expand Down
14 changes: 7 additions & 7 deletions sui/src/wallet_commands.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
// Copyright (c) Mysten Labs
// SPDX-License-Identifier: Apache-2.0
use crate::config::{AccountInfo, AuthorityInfo, WalletConfig};
use fastx_network::network::NetworkClient;
use fastx_types::base_types::{
use sui_core::authority_client::AuthorityClient;
use sui_core::client::{Client, ClientState};
use sui_network::network::NetworkClient;
use sui_types::base_types::{
decode_address_hex, encode_address_hex, get_key_pair, AuthorityName, ObjectID, PublicKeyBytes,
SuiAddress,
};
use fastx_types::committee::Committee;
use fastx_types::messages::{ExecutionStatus, OrderEffects};
use sui_core::authority_client::AuthorityClient;
use sui_core::client::{Client, ClientState};
use sui_types::committee::Committee;
use sui_types::messages::{ExecutionStatus, OrderEffects};

use crate::utils::Config;
use fastx_types::error::SuiError;
use move_core_types::identifier::Identifier;
use move_core_types::language_storage::TypeTag;
use move_core_types::parser::{parse_transaction_argument, parse_type_tag};
Expand All @@ -22,6 +21,7 @@ use std::path::PathBuf;
use std::time::{Duration, Instant};
use structopt::clap::AppSettings;
use structopt::StructOpt;
use sui_types::error::SuiError;
use tracing::*;

#[derive(StructOpt)]
Expand Down
8 changes: 4 additions & 4 deletions sui_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ tracing = { version = "0.1", features = ["log"] }
signature = "1.5.0"
ed25519-dalek = "1.0.1"

fastx-adapter = { path = "../fastx_programmability/adapter" }
fastx-framework = { path = "../fastx_programmability/framework" }
fastx-network = { path = "../network_utils" }
fastx-types = { path = "../fastx_types" }
sui-adapter = { path = "../sui_programmability/adapter" }
sui-framework = { path = "../sui_programmability/framework" }
sui-network = { path = "../network_utils" }
sui-types = { path = "../sui_types" }

move-binary-format = { git = "https://github.com/diem/move", rev="1e5e36cb1fede8073c8688886a0943bb5bfe40d5" }
move-core-types = { git = "https://github.com/diem/move", rev="1e5e36cb1fede8073c8688886a0943bb5bfe40d5", features=["address20"] }
Expand Down
20 changes: 10 additions & 10 deletions sui_core/src/authority.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
// Copyright (c) Facebook, Inc. and its affiliates.
// SPDX-License-Identifier: Apache-2.0

use fastx_adapter::{adapter, genesis};
use fastx_types::{
base_types::*,
committee::Committee,
error::{SuiError, SuiResult},
fp_bail, fp_ensure, gas,
messages::*,
object::{Data, Object},
storage::Storage,
};
use move_core_types::{
account_address::AccountAddress,
language_storage::{ModuleId, StructTag},
Expand All @@ -22,6 +12,16 @@ use std::{
pin::Pin,
sync::Arc,
};
use sui_adapter::{adapter, genesis};
use sui_types::{
base_types::*,
committee::Committee,
error::{SuiError, SuiResult},
fp_bail, fp_ensure, gas,
messages::*,
object::{Data, Object},
storage::Storage,
};

#[cfg(test)]
#[path = "unit_tests/authority_tests.rs"]
Expand Down
2 changes: 1 addition & 1 deletion sui_core/src/authority/temporary_store.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use fastx_types::event::Event;
use sui_types::event::Event;

use super::*;

Expand Down
6 changes: 3 additions & 3 deletions sui_core/src/authority_aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
use crate::authority_client::AuthorityAPI;
use crate::safe_client::SafeClient;

use fastx_types::object::{Object, ObjectRead};
use fastx_types::{
use futures::{future, StreamExt};
use sui_types::object::{Object, ObjectRead};
use sui_types::{
base_types::*,
committee::Committee,
error::{SuiError, SuiResult},
messages::*,
};
use futures::{future, StreamExt};

use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
use std::time::Duration;
Expand Down
4 changes: 2 additions & 2 deletions sui_core/src/authority_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// SPDX-License-Identifier: Apache-2.0

use async_trait::async_trait;
use fastx_network::network::NetworkClient;
use fastx_types::{error::SuiError, messages::*, serialize::*};
use sui_network::network::NetworkClient;
use sui_types::{error::SuiError, messages::*, serialize::*};

#[async_trait]
pub trait AuthorityAPI {
Expand Down
4 changes: 2 additions & 2 deletions sui_core/src/authority_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// SPDX-License-Identifier: Apache-2.0

use crate::authority::AuthorityState;
use fastx_network::{
use sui_network::{
network::NetworkServer,
transport::{spawn_server, MessageHandler, SpawnedServer},
};
use fastx_types::{error::*, messages::*, serialize::*};
use sui_types::{error::*, messages::*, serialize::*};

use std::io;
use tracing::*;
Expand Down
14 changes: 7 additions & 7 deletions sui_core/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

use crate::{authority_aggregator::AuthorityAggregator, authority_client::AuthorityAPI};
use async_trait::async_trait;
use fastx_framework::build_move_package_to_bytes;
use fastx_types::{
base_types::*, committee::Committee, error::SuiError, fp_ensure, messages::*,
object::ObjectRead,
};
use futures::future;
use itertools::Itertools;
use move_core_types::identifier::Identifier;
use move_core_types::language_storage::TypeTag;
use sui_framework::build_move_package_to_bytes;
use sui_types::{
base_types::*, committee::Committee, error::SuiError, fp_ensure, messages::*,
object::ObjectRead,
};
use typed_store::rocks::open_cf;
use typed_store::Map;

Expand All @@ -34,7 +34,7 @@ pub mod client_store;
use self::client_store::ClientStore;

#[cfg(test)]
use fastx_types::FASTX_FRAMEWORK_ADDRESS;
use sui_types::SUI_FRAMEWORK_ADDRESS;

pub type AsyncResult<'a, T, E> = future::BoxFuture<'a, Result<T, E>>;

Expand Down Expand Up @@ -237,7 +237,7 @@ where

#[cfg(test)]
pub async fn get_framework_object_ref(&mut self) -> Result<ObjectRef, anyhow::Error> {
let info = self.get_object_info(FASTX_FRAMEWORK_ADDRESS).await?;
let info = self.get_object_info(SUI_FRAMEWORK_ADDRESS).await?;
Ok(info.reference()?)
}

Expand Down
2 changes: 1 addition & 1 deletion sui_core/src/client/client_store.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use super::*;
use fastx_types::object::Object;
use rocksdb::{DBWithThreadMode, MultiThreaded};
use std::path::PathBuf;
use std::sync::Arc;
use sui_types::object::Object;
use typed_store::rocks::DBMap;

const CERT_CF_NAME: &str = "certificates";
Expand Down
2 changes: 1 addition & 1 deletion sui_core/src/generate_format.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Facebook, Inc. and its affiliates.
// SPDX-License-Identifier: Apache-2.0

use fastx_types::{error, messages, serialize};
use sui_types::{error, messages, serialize};
use serde_reflection::{Registry, Result, Samples, Tracer, TracerConfig};
use std::{fs::File, io::Write};
use structopt::{clap::arg_enum, StructOpt};
Expand Down
4 changes: 2 additions & 2 deletions sui_core/src/safe_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

use crate::authority_client::AuthorityAPI;
use async_trait::async_trait;
use fastx_types::{base_types::*, committee::*, fp_ensure};
use sui_types::{base_types::*, committee::*, fp_ensure};

use fastx_types::{
use sui_types::{
error::{SuiError, SuiResult},
messages::*,
};
Expand Down
Loading

0 comments on commit 28af62a

Please sign in to comment.