Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
210 changes: 79 additions & 131 deletions Cargo.lock

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions packages/ic-error-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "ic-error-types"
version = "0.2.0"
license = "Apache-2.0"
authors.workspace = true
categories = ["api-bindings", "development-tools"]
description = "Error types of the Internet Computer"
repository = "https://github.com/dfinity/ic"
documentation = "https://docs.rs/ic-error-types/latest/ic_error_types/"
readme = "README.md"
categories = ["api-bindings", "development-tools"]
keywords = ["icp", "error", "smart-contract", "internet-computer"]
include = ["src", "Cargo.toml", "CHANGELOG.md", "README.md", "LICENSE"]
authors.workspace = true
edition.workspace = true
include = ["CHANGELOG.md", "Cargo.toml", "LICENSE", "README.md", "src"]
keywords = ["error", "icp", "internet-computer", "smart-contract"]
license = "Apache-2.0"
name = "ic-error-types"
readme = "README.md"
repository = "https://github.com/dfinity/ic"
version = "0.2.0"

[dependencies]
ic-heap-bytes = { path = "../ic-heap-bytes" }
Expand Down
19 changes: 0 additions & 19 deletions rs/bitcoin/consensus/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ rust_library(
"//rs/monitoring/logger",
"//rs/monitoring/metrics",
"//rs/protobuf",
"//rs/registry/helpers",
"//rs/registry/subnet_features",
"//rs/replicated_state",
"//rs/types/types",
"@crate_index//:prometheus",
Expand All @@ -38,33 +36,16 @@ rust_test(
],
deps = [
# Keep sorted.
"//packages/ic-error-types",
"//rs/bitcoin/replica_types",
"//rs/config",
"//rs/interfaces",
"//rs/interfaces/adapter_client",
"//rs/interfaces/registry",
"//rs/interfaces/registry/mocks",
"//rs/interfaces/state_manager",
"//rs/interfaces/state_manager/mocks",
"//rs/monitoring/logger",
"//rs/monitoring/metrics",
"//rs/protobuf",
"//rs/registry/helpers",
"//rs/registry/subnet_features",
"//rs/replicated_state",
"//rs/test_utilities",
"//rs/test_utilities/logger",
"//rs/test_utilities/state",
"//rs/test_utilities/time",
"//rs/test_utilities/types",
"//rs/types/types",
"@crate_index//:ic-btc-interface",
"@crate_index//:mockall",
"@crate_index//:prometheus",
"@crate_index//:proptest",
"@crate_index//:prost",
"@crate_index//:slog",
"@crate_index//:thiserror",
],
)
9 changes: 3 additions & 6 deletions rs/bitcoin/consensus/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "ic-btc-consensus"
version.workspace = true
authors.workspace = true
edition.workspace = true
description.workspace = true
documentation.workspace = true
edition.workspace = true
name = "ic-btc-consensus"
version.workspace = true

[dependencies]
ic-btc-replica-types = { path = "../replica_types" }
Expand All @@ -17,8 +17,6 @@ ic-interfaces-state-manager = { path = "../../interfaces/state_manager" }
ic-logger = { path = "../../monitoring/logger" }
ic-metrics = { path = "../../monitoring/metrics" }
ic-protobuf = { path = "../../protobuf" }
ic-registry-client-helpers = { path = "../../registry/helpers" }
ic-registry-subnet-features = { path = "../../registry/subnet_features" }
ic-replicated-state = { path = "../../replicated_state" }
ic-types = { path = "../../types/types" }
prometheus = { workspace = true }
Expand All @@ -32,7 +30,6 @@ ic-interfaces-state-manager-mocks = { path = "../../interfaces/state_manager/moc
ic-test-utilities = { path = "../../test_utilities" }
ic-test-utilities-logger = { path = "../../test_utilities/logger" }
ic-test-utilities-state = { path = "../../test_utilities/state" }
ic-test-utilities-time = { path = "../../test_utilities/time" }
ic-test-utilities-types = { path = "../../test_utilities/types" }
mockall = { workspace = true }
proptest = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions rs/bitcoin/replica_types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "ic-btc-replica-types"
version.workspace = true
authors.workspace = true
edition.workspace = true
description.workspace = true
documentation.workspace = true
edition.workspace = true
name = "ic-btc-replica-types"
version.workspace = true

[dependencies]
candid = { workspace = true }
Expand Down
12 changes: 0 additions & 12 deletions rs/bitcoin/validation/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ rust_test(
],
deps = [
# Keep sorted.
"@crate_index//:bitcoin",
"@crate_index//:csv",
"@crate_index//:hex",
"@crate_index//:proptest",
"@crate_index//:rstest",
],
)
Expand All @@ -37,13 +34,4 @@ rust_test_suite(
# Keep sorted.
"tests/data/headers.csv",
],
deps = [
# Keep sorted.
":validation",
"@crate_index//:bitcoin",
"@crate_index//:csv",
"@crate_index//:hex",
"@crate_index//:proptest",
"@crate_index//:rstest",
],
)
8 changes: 3 additions & 5 deletions rs/bitcoin/validation/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
[package]
name = "ic-btc-validation"
version.workspace = true
authors.workspace = true
edition.workspace = true
description.workspace = true
documentation.workspace = true
edition.workspace = true
name = "ic-btc-validation"
version.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bitcoin = { workspace = true }
hex = { workspace = true }

[dev-dependencies]
csv = "1.1"
proptest = "0.9.4"
rstest = { workspace = true }
128 changes: 52 additions & 76 deletions rs/canister_sandbox/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,85 +4,51 @@ load("//bazel:defs.bzl", "rust_ic_test")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
# Keep sorted.
"//rs/config",
"//rs/cycles_account_manager",
"//rs/embedders",
"//rs/interfaces",
"//rs/interfaces/state_manager",
"//rs/limits",
"//rs/memory_tracker",
"//rs/monitoring/logger",
"//rs/monitoring/metrics",
"//rs/registry/subnet_type",
"//rs/replicated_state",
"//rs/sys",
"//rs/types/base_types",
"//rs/types/management_canister_types",
"//rs/types/types",
"//rs/types/wasm_types",
"//rs/utils",
"@crate_index//:bincode",
"@crate_index//:bytes",
"@crate_index//:lazy_static",
"@crate_index//:libc",
"@crate_index//:libflate",
"@crate_index//:nix",
"@crate_index//:num-traits",
"@crate_index//:once_cell",
"@crate_index//:prometheus",
"@crate_index//:rayon",
"@crate_index//:regex",
"@crate_index//:serde",
"@crate_index//:serde_bytes",
"@crate_index//:serde_json",
"@crate_index//:slog",
"@crate_index//:threadpool",
"@crate_index//:which",
]

DEV_DEPENDENCIES = [
# Keep sorted.
"//packages/ic-error-types",
"//rs/registry/routing_table",
"//rs/test_utilities",
"//rs/test_utilities/execution_environment",
"//rs/test_utilities/metrics",
"//rs/test_utilities/types",
"@crate_index//:mockall",
"@crate_index//:rand",
"@crate_index//:rstest",
"@crate_index//:slog-async",
"@crate_index//:slog-term",
"@crate_index//:tempfile",
"@crate_index//:wat",
]

MACRO_DEPENDENCIES = []

ALIASES = {}

rust_library(
name = "backend_lib",
srcs = glob(["src/**/*.rs"]),
aliases = ALIASES,
crate_features = select({
"//bazel:fuzzing_code_enabled": ["fuzzing_code"],
"//conditions:default": [],
}),
crate_name = "ic_canister_sandbox_backend_lib",
proc_macro_deps = MACRO_DEPENDENCIES,
version = "0.9.0",
deps = DEPENDENCIES + select({
deps = [
# Keep sorted.
"//rs/config",
"//rs/embedders",
"//rs/interfaces",
"//rs/interfaces/state_manager",
"//rs/monitoring/logger",
"//rs/monitoring/metrics",
"//rs/replicated_state",
"//rs/types/management_canister_types",
"//rs/types/types",
"//rs/types/wasm_types",
"@crate_index//:bincode",
"@crate_index//:bytes",
"@crate_index//:lazy_static",
"@crate_index//:libc",
"@crate_index//:nix",
"@crate_index//:num-traits",
"@crate_index//:once_cell",
"@crate_index//:prometheus",
"@crate_index//:rayon",
"@crate_index//:regex",
"@crate_index//:serde",
"@crate_index//:serde_bytes",
"@crate_index//:serde_json",
"@crate_index//:slog",
"@crate_index//:threadpool",
"@crate_index//:which",
] + select({
"//bazel:fuzzing_code_enabled": ["@crate_index//:object"],
"//conditions:default": [],
}),
)

rust_ic_test(
name = "backend_lib_test",
aliases = ALIASES,
crate = ":backend_lib",
data = [
"//rs/universal_canister/impl:universal_canister.module",
Expand All @@ -92,8 +58,26 @@ rust_ic_test(
"UNIVERSAL_CANISTER_WASM_PATH": "$(rootpath //rs/universal_canister/impl:universal_canister.wasm.gz)",
"UNIVERSAL_CANISTER_SERIALIZED_MODULE_PATH": "$(rootpath //rs/universal_canister/impl:universal_canister.module)",
},
proc_macro_deps = MACRO_DEPENDENCIES,
deps = DEPENDENCIES + DEV_DEPENDENCIES,
deps = [
# Keep sorted.
"//packages/ic-error-types",
"//rs/cycles_account_manager",
"//rs/limits",
"//rs/registry/subnet_type",
"//rs/test_utilities",
"//rs/test_utilities/execution_environment",
"//rs/test_utilities/metrics",
"//rs/test_utilities/types",
"//rs/types/base_types",
"//rs/types/wasm_types",
"@crate_index//:mockall",
"@crate_index//:rand",
"@crate_index//:rstest",
"@crate_index//:slog-async",
"@crate_index//:slog-term",
"@crate_index//:tempfile",
"@crate_index//:wat",
],
)

cargo_build_script(
Expand All @@ -106,9 +90,7 @@ cargo_build_script(
rust_binary(
name = "canister_sandbox",
srcs = ["bin/canister_sandbox.rs"],
aliases = ALIASES,
crate_name = "canister_sandbox",
proc_macro_deps = MACRO_DEPENDENCIES,
version = "0.9.0",
deps = [
# Keep sorted.
Expand All @@ -128,9 +110,8 @@ rust_binary(
rust_binary(
name = "test_controller",
srcs = ["bin/test_controller.rs"],
aliases = ALIASES,
proc_macro_deps = MACRO_DEPENDENCIES,
deps = DEPENDENCIES + [
deps = [
# Keep sorted.
":backend_lib",
"@crate_index//:tempfile",
],
Expand All @@ -139,12 +120,7 @@ rust_binary(
rust_binary(
name = "test_sandbox",
srcs = ["bin/test_sandbox.rs"],
aliases = ALIASES,
proc_macro_deps = MACRO_DEPENDENCIES,
deps = DEPENDENCIES + [
":backend_lib",
"@crate_index//:tempfile",
],
deps = [":backend_lib"],
)

rust_binary(
Expand Down
8 changes: 2 additions & 6 deletions rs/canister_sandbox/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@ ic-management-canister-types-private = { path = "../types/management_canister_ty
ic-metrics = { path = "../monitoring/metrics" }
ic-registry-subnet-type = { path = "../registry/subnet_type" }
ic-replicated-state = { path = "../replicated_state" }
ic-sys = { path = "../sys" }
ic-types = { path = "../types/types" }
ic-utils = { path = "../utils" }
ic-wasm-types = { path = "../types/wasm_types" }
lazy_static = { workspace = true }
libc = { workspace = true }
libflate = { workspace = true }
memory_tracker = { path = "../memory_tracker" }
nix = { workspace = true }
num-traits = { workspace = true }
object = { workspace = true, optional = true}
object = { workspace = true, optional = true }
once_cell = "1.8"
prometheus = { workspace = true }
rayon = { workspace = true }
Expand All @@ -49,7 +46,6 @@ which = "4.2.2"

[dev-dependencies]
ic-error-types = { path = "../../packages/ic-error-types" }
ic-registry-routing-table = { path = "../registry/routing_table" }
ic-test-utilities = { path = "../test_utilities" }
ic-test-utilities-execution-environment = { path = "../test_utilities/execution_environment" }
ic-test-utilities-metrics = { path = "../test_utilities/metrics" }
Expand All @@ -66,8 +62,8 @@ slog-term = { workspace = true }
wat = { workspace = true }

[features]
sigsegv_handler_checksum = ["memory_tracker/sigsegv_handler_checksum"]
fuzzing_code = ["dep:object"]
sigsegv_handler_checksum = ["memory_tracker/sigsegv_handler_checksum"]

[[bin]]
name = "canister_sandbox"
Expand Down
Loading
Loading