Skip to content

Commit

Permalink
Disabling default native feature
Browse files Browse the repository at this point in the history
  • Loading branch information
citizen-stig committed Aug 16, 2023
1 parent 6371c32 commit ee78b85
Show file tree
Hide file tree
Showing 34 changed files with 197 additions and 204 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

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

16 changes: 9 additions & 7 deletions adapters/celestia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ borsh = { workspace = true, features = ["bytes"] }
bech32 = { workspace = true }
prost = "0.11"
prost-types = "0.11"
# I keep this commented as a reminder to opportunity to optimze this crate for non native compilation
#tendermint = { version = "0.32", default-features = false, features = ["std"] }
tendermint = "0.32"
tendermint-proto = "0.32"

Expand All @@ -23,13 +25,13 @@ hex = { version = "0.4.3", features = ["serde"] }
hex-literal = "0.4.1"
jsonrpsee = { version = "0.16.2", features = ["http-client"], optional = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_json = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
thiserror = { workspace = true }
tracing = { workspace = true }
zk-cycle-macros = {path = "../../utils/zk-cycle-macros", optional=true}
risc0-zkvm = { version = "0.16", default-features = false, features = ["std"], optional=true}
risc0-zkvm-platform = { version = "0.16", optional=true}
zk-cycle-macros = { path = "../../utils/zk-cycle-macros", optional = true }
risc0-zkvm = { version = "0.16", default-features = false, features = ["std"], optional = true }
risc0-zkvm-platform = { version = "0.16", optional = true }

sov-rollup-interface = { path = "../../rollup-interface" }
nmt-rs = { git = "https://github.com/Sovereign-Labs/nmt-rs.git", rev = "dd37588444fca72825d11fe4a46838f66525c49f", features = ["serde", "borsh"] }
Expand All @@ -45,7 +47,7 @@ wiremock = "0.5"
prost-build = { version = "0.11" }

[features]
default = ["native"]
native = ["dep:tokio", "dep:jsonrpsee"]
bench = ["zk-cycle-macros/bench","risc0-zkvm","risc0-zkvm-platform"]
default = []
native = ["dep:tokio", "dep:jsonrpsee", "dep:serde_json", "tendermint/default"]
bench = ["zk-cycle-macros/bench", "risc0-zkvm", "risc0-zkvm-platform"]
verifier = []
12 changes: 6 additions & 6 deletions adapters/risc0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ readme = "README.md"
[dependencies]
anyhow = { workspace = true }
bincode = { workspace = true }
risc0-zkvm = { version = "0.16", default-features = false, features = ['std'] }
risc0-zkvm = { version = "0.16", default-features = false, features = ["std"] }
risc0-zkvm-platform = { version = "0.16" }
risc0-zkp = { version = "0.16", optional = true }
risc0-circuit-rv32im = { version = "0.16", optional = true }
serde = { workspace = true }
bytemuck = "1.13.1"
once_cell = { version = "1.7.2", optional = true}
parking_lot = { version = "0.11.1", optional = true}
zk-cycle-utils = { path = "../../utils/zk-cycle-utils"}
once_cell = { version = "1.7.2", optional = true }
parking_lot = { version = "0.11.1", optional = true }
zk-cycle-utils = { path = "../../utils/zk-cycle-utils" }
sov-rollup-interface = { path = "../../rollup-interface" }

[features]
default = ["native"]
default = []
native = ["risc0-zkvm/prove", "dep:risc0-zkp", "dep:risc0-circuit-rv32im"]
bench = ["once_cell","parking_lot"]
bench = ["once_cell", "parking_lot"]
8 changes: 5 additions & 3 deletions examples/demo-nft-module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,20 @@ anyhow = { workspace = true }
borsh = { workspace = true, features = ["rc"] }
serde = { workspace = true, optional = true }

sov-modules-api = { path = "../../module-system/sov-modules-api", default-features = false, features = ["macros"] }
sov-state = { path = "../../module-system/sov-state", default-features = false }
sov-modules-api = { path = "../../module-system/sov-modules-api" }
sov-state = { path = "../../module-system/sov-state" }

jsonrpsee = { workspace = true, features = ["macros", "client-core", "server"], optional = true }

[dev-dependencies]
sov-rollup-interface = { path = "../../rollup-interface" }
sov-data-generators = { path = "../../module-system/utils/sov-data-generators" }
tempfile = { workspace = true }
demo-nft-module = { version = "*", features = ["native"], path = "." }


[features]
default = ["native"]
default = []
serde = ["dep:serde"]
native = ["serde", "sov-state/native", "sov-modules-api/native", "jsonrpsee"]
test = ["native"]
12 changes: 6 additions & 6 deletions examples/demo-prover/host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resolver = "2"
[dependencies]
anyhow = { workspace = true }
borsh = { workspace = true }
bincode = {workspace = true}
bincode = { workspace = true }
hex = { workspace = true }
jsonrpsee = { workspace = true, features = ["http-client", "server"] }
risc0-zkvm = { workspace = true }
Expand All @@ -19,21 +19,21 @@ tokio = { workspace = true }
tracing = "0.1.37"
tracing-subscriber = "0.3.16"

jupiter = { path = "../../../adapters/celestia", features = ["native","bench"] }
demo-stf = { path = "../../demo-stf" }
jupiter = { path = "../../../adapters/celestia", features = ["native", "bench"] }
demo-stf = { path = "../../demo-stf", features = ["native"] }
sov-rollup-interface = { path = "../../../rollup-interface" }
risc0-adapter = { path = "../../../adapters/risc0" }
risc0-adapter = { path = "../../../adapters/risc0", features = ["native"] }
const-rollup-config = { path = "../../const-rollup-config" }
sov-modules-api = { path = "../../../module-system/sov-modules-api", features = ["native"] }
sov-state = { path = "../../../module-system/sov-state", features = ["native"] }
zk-cycle-macros = { path = "../../../utils/zk-cycle-macros", optional=true }
zk-cycle-macros = { path = "../../../utils/zk-cycle-macros", optional = true }
sov-stf-runner = { path = "../../../full-node/sov-stf-runner" }

methods = { path = "../methods" }


[dev-dependencies]
sov-demo-rollup = {path = "../../demo-rollup"}
sov-demo-rollup = { path = "../../demo-rollup" }
tempfile = { workspace = true }
once_cell = "1.7.2"
parking_lot = "0.11.1"
Expand Down
10 changes: 3 additions & 7 deletions examples/demo-prover/methods/guest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,16 @@ anyhow = "1.0.68"
risc0-zkvm = { version = "0.16", default-features = false, features = ["std"] }
risc0-zkvm-platform = "0.16"
borsh = { version = "0.10.3", features = ["bytes"] }
jupiter = { path = "../../../../adapters/celestia", default-features = false }
demo-stf = { path = "../../../demo-stf", default-features = false }
jupiter = { path = "../../../../adapters/celestia" }
demo-stf = { path = "../../../demo-stf" }
sov-rollup-interface = { path = "../../../../rollup-interface", default-features = false}
risc0-adapter = { path = "../../../../adapters/risc0", default-features = false }
risc0-adapter = { path = "../../../../adapters/risc0" }
const-rollup-config = { path = "../../../const-rollup-config" }
sov-modules-stf-template = {path = "../../../../module-system/sov-modules-stf-template", optional=true}
sov-state = {path = "../../../../module-system/sov-state", default-features = false, optional=true}
sov-modules-api = {path = "../../../../module-system/sov-modules-api", default-features = false, optional=true}
sov-sequencer-registry = {path = "../../../../module-system/module-implementations/sov-sequencer-registry", default-features = false, optional=true}

# TODO: Just for test
tracing = "0.1.37"
log = "0.4.17"

[build-dependencies]
directories = "5.0"
downloader = "0.2"
Expand Down
10 changes: 5 additions & 5 deletions examples/demo-rollup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ futures = "0.3"
tokio = { workspace = true }
tracing-subscriber = "0.3.17"

jupiter = { path = "../../adapters/celestia" }
jupiter = { path = "../../adapters/celestia", features = ["native"] }
demo-stf = { path = "../demo-stf", features = ["native"] }
sov-rollup-interface = { path = "../../rollup-interface" }
sov-db = { path = "../../full-node/db/sov-db" }
sov-ethereum = { path = "../../full-node/sov-ethereum", optional = true }
sov-sequencer = { path = "../../full-node/sov-sequencer" }
sov-stf-runner = { path = "../../full-node/sov-stf-runner" }
risc0-adapter = { path = "../../adapters/risc0" }
risc0-adapter = { path = "../../adapters/risc0", features = ["native"] }
sov-modules-stf-template = { path = "../../module-system/sov-modules-stf-template" }

sov-bank = { path = "../../module-system/module-implementations/sov-bank", default-features = false }
sov-election = { path = "../../module-system/module-implementations/examples/sov-election", default-features = false }
sov-value-setter = { path = "../../module-system/module-implementations/examples/sov-value-setter", default-features = false }
sov-bank = { path = "../../module-system/module-implementations/sov-bank", features = ["native"] }
sov-election = { path = "../../module-system/module-implementations/examples/sov-election", features = ["native"] }
sov-value-setter = { path = "../../module-system/module-implementations/examples/sov-value-setter", features = ["native"] }
sov-modules-api = { path = "../../module-system/sov-modules-api", features = ["native"] }
sov-state = { path = "../../module-system/sov-state", features = ["native"] }
const-rollup-config = { path = "../const-rollup-config" }
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-rollup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ else
endif

build-sov-cli:
cd ../demo-stf && cargo build --bin sov-cli
cd ../demo-stf && cargo build --bin sov-cli --features=native

test-generate-create-token-tx: check-container-running build-sov-cli
$(SOV_CLI_REL_PATH) generate-transaction-from-json ../test-data/keys/token_deployer_private_key.json Bank ../test-data/requests/create_token.json 0
Expand Down
24 changes: 12 additions & 12 deletions examples/demo-stf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ tracing = { workspace = true }

const-rollup-config = { path = "../const-rollup-config" }
sov-rollup-interface = { path = "../../rollup-interface" }
sov-election = { path = "../../module-system/module-implementations/examples/sov-election", default-features = false }
sov-sequencer-registry = { path = "../../module-system/module-implementations/sov-sequencer-registry", default-features = false }
sov-blob-storage = { path = "../../module-system/module-implementations/sov-blob-storage", default-features = false }
sov-bank = { path = "../../module-system/module-implementations/sov-bank", default-features = false }
sov-modules-stf-template = { path = "../../module-system/sov-modules-stf-template", default-features = false }
sov-value-setter = { path = "../../module-system/module-implementations/examples/sov-value-setter", default-features = false }
sov-accounts = { path = "../../module-system/module-implementations/sov-accounts", default-features = false }
sov-state = { path = "../../module-system/sov-state", default-features = false }
sov-modules-api = { path = "../../module-system/sov-modules-api", default-features = false, features = ["macros"] }
sov-election = { path = "../../module-system/module-implementations/examples/sov-election" }
sov-sequencer-registry = { path = "../../module-system/module-implementations/sov-sequencer-registry" }
sov-blob-storage = { path = "../../module-system/module-implementations/sov-blob-storage" }
sov-bank = { path = "../../module-system/module-implementations/sov-bank" }
sov-modules-stf-template = { path = "../../module-system/sov-modules-stf-template" }
sov-value-setter = { path = "../../module-system/module-implementations/examples/sov-value-setter" }
sov-accounts = { path = "../../module-system/module-implementations/sov-accounts" }
sov-state = { path = "../../module-system/sov-state" }
sov-modules-api = { path = "../../module-system/sov-modules-api" }
sov-sequencer = { path = "../../full-node/sov-sequencer", optional = true }
sov-stf-runner = { path = "../../full-node/sov-stf-runner", optional = true }
# Only enable the evm on "experimental" feature
sov-evm = { path = "../../module-system/module-implementations/sov-evm", default-features = false, optional = true }
sov-evm = { path = "../../module-system/module-implementations/sov-evm", optional = true }

[dev-dependencies]
sov-rollup-interface = { path = "../../rollup-interface", features = ["mocks"] }
Expand All @@ -49,9 +49,8 @@ tempfile = { workspace = true }
rand = "0.8"

[features]
default = ["native"]
default = []
experimental = ["sov-evm/experimental"]

native = [
"sov-bank/native",
"sov-accounts/native",
Expand All @@ -61,6 +60,7 @@ native = [
"sov-value-setter/native",
"sov-modules-api/native",
"sov-rollup-interface/mocks",
"sov-modules-stf-template/native",
"sov-sequencer",
"sov-stf-runner",
"clap",
Expand Down
3 changes: 0 additions & 3 deletions full-node/db/sov-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,3 @@ bincode = { workspace = true }

[dev-dependencies]
tempfile = { workspace = true }

[features]
default = []
7 changes: 3 additions & 4 deletions full-node/sov-ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ resolver = "2"
[dependencies]
jsonrpsee = { workspace = true, features = ["http-client", "server"] }

sov-evm = { path = "../../module-system/module-implementations/sov-evm", default-features = false }
sov-evm = { path = "../../module-system/module-implementations/sov-evm" }
demo-stf = { path = "../../examples/demo-stf", features = ["native"] }
sov-modules-api = { path = "../../module-system/sov-modules-api", default-features = false }
sov-modules-api = { path = "../../module-system/sov-modules-api" }
const-rollup-config = { path = "../../examples/const-rollup-config" }
jupiter = { path = "../../adapters/celestia", features = ["native"] }

Expand All @@ -33,7 +33,6 @@ tokio = { workspace = true }


[features]
default = ["native"]
default = []
experimental = ["demo-stf/experimental", "sov-evm/experimental"]

native = ["demo-stf/native", "sov-evm/native"]
2 changes: 1 addition & 1 deletion full-node/sov-sequencer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ serde = { workspace = true, features = ["derive"] }
tracing = { workspace = true }

sov-rollup-interface = { path = "../../rollup-interface" }
sov-modules-api = { path = "../../module-system/sov-modules-api" }
sov-modules-api = { path = "../../module-system/sov-modules-api", features = ["native"] }

[dev-dependencies]
async-trait = { workspace = true }
Expand Down
29 changes: 20 additions & 9 deletions full-node/sov-stf-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,28 @@ tracing-subscriber = "0.3.17"

sov-db = { path = "../db/sov-db" }
sov-rollup-interface = { path = "../../rollup-interface", version = "0.1" }
sov-state = { path = "../../module-system/sov-state", version = "0.1"}
sov-modules-api = { path = "../../module-system/sov-modules-api", version = "0.1" }
jupiter = { path = "../../adapters/celestia" }
sov-state = { path = "../../module-system/sov-state", version = "0.1", features = ["native"] }
sov-modules-api = { path = "../../module-system/sov-modules-api", version = "0.1", features = ["native"] }
jupiter = { path = "../../adapters/celestia", features = ["native"] }

[dev-dependencies]
tempfile = { workspace = true }
rand = { workspace = true }

sov-election = { path = "../../module-system/module-implementations/examples/sov-election", default-features = false }
sov-sequencer-registry = { path = "../../module-system/module-implementations/sov-sequencer-registry", default-features = false }
sov-bank = { path = "../../module-system/module-implementations/sov-bank", default-features = false }
sov-modules-stf-template = { path = "../../module-system/sov-modules-stf-template" }
sov-value-setter = { path = "../../module-system/module-implementations/examples/sov-value-setter", default-features = false }
sov-accounts = { path = "../../module-system/module-implementations/sov-accounts", default-features = false }
sov-election = { path = "../../module-system/module-implementations/examples/sov-election", features = ["native"] }
sov-sequencer-registry = { path = "../../module-system/module-implementations/sov-sequencer-registry", features = ["native"] }
sov-bank = { path = "../../module-system/module-implementations/sov-bank", features = ["native"] }
sov-modules-stf-template = { path = "../../module-system/sov-modules-stf-template", features = ["native"] }
sov-value-setter = { path = "../../module-system/module-implementations/examples/sov-value-setter", features = ["native"] }
sov-accounts = { path = "../../module-system/module-implementations/sov-accounts", features = ["native"] }

#[features]
#default = []
#native = [
# "sov-election/native",
# "sov-sequencer-registry/native",
# "sov-bank/native",
# "sov-value-setter/native",
# "sov-accounts/native",
# "jupiter/native",
#]
2 changes: 1 addition & 1 deletion full-node/sov-stf-runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ where
})
}

/// Starts an rpc server with provided rpc methods.
/// Starts a RPC server with provided rpc methods.
pub async fn start_rpc_server(&self, methods: RpcModule<()>) {
let listen_address = self.listen_address;
let _handle = tokio::spawn(async move {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ schemars = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }

sov-modules-api = { path = "../../../sov-modules-api", default-features = false, features = ["macros"] }
sov-state = { path = "../../../sov-state", default-features = false }
sov-modules-api = { path = "../../../sov-modules-api" }
sov-state = { path = "../../../sov-state" }
sov-rollup-interface = { path = "../../../../rollup-interface" }

[dev-dependencies]
sov-modules-api = { path = "../../../sov-modules-api" }
tempfile = { workspace = true }

[features]
default = ["native"]
default = []
serde = ["dep:serde", "dep:serde_json"]
native = ["serde", "sov-modules-api/native", "dep:jsonrpsee", "dep:schemars", "dep:clap"]
native = ["serde", "dep:jsonrpsee", "dep:schemars", "dep:clap", "sov-state/native", "sov-modules-api/native"]
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ resolver = "2"
publish = false

[dev-dependencies]
sov-modules-api = { path = "../../../sov-modules-api" }
tempfile = { workspace = true }

[dependencies]
anyhow = { workspace = true }
sov-modules-api = { path = "../../../sov-modules-api", default-features = false, features = ["macros"] }
sov-state = { path = "../../../sov-state", default-features = false }
sov-modules-api = { path = "../../../sov-modules-api" }
sov-state = { path = "../../../sov-state" }
sov-rollup-interface = { path = "../../../../rollup-interface" }
schemars = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
Expand All @@ -30,6 +29,6 @@ jsonrpsee = { workspace = true, features = ["macros", "client-core", "server"],
clap = { workspace = true, optional = true }

[features]
default = ["native"]
default = []
serde = ["dep:serde", "dep:serde_json"]
native = ["serde", "sov-modules-api/native", "dep:jsonrpsee", "dep:schemars", "dep:clap"]
native = ["serde", "sov-modules-api/native", "dep:jsonrpsee", "dep:schemars", "dep:clap", "sov-state/native"]
Loading

0 comments on commit ee78b85

Please sign in to comment.