mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 03:12:41 +00:00
#8311 Removes the `git_version` crate from `lighthouse_version` and implements git `HEAD` tracking manually. This removes the (mostly) broken dirty tracking but prevents spurious recompilation of the `lighthouse_version` crate. This also reworks the way crate versions are handled by utilizing workspace version inheritance and Cargo environment variables. This means the _only_ place where Lighthouse's version is defined is in the top level `Cargo.toml` for the workspace. All relevant binaries then inherit this version. This largely makes the `change_version.sh` script useless so I've removed it, although we could keep a version which just alters the workspace version (if we need to maintain compatibility with certain build/release tooling. ### When is a Rebuild Triggered? 1. When the build.rs file is changed. 2. When the HEAD commit changes (added, removed, rebased, etc) 3. When the branch changes (this includes changing to the current branch, and creating a detached HEAD) Note that working/staged changes will not trigger a recompile of `lighthouse_version`. Co-Authored-By: Mac L <mjladson@pm.me> Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
99 lines
3.4 KiB
TOML
99 lines
3.4 KiB
TOML
[package]
|
|
name = "lighthouse"
|
|
version = { workspace = true }
|
|
authors = ["Sigma Prime <contact@sigmaprime.io>"]
|
|
edition = { workspace = true }
|
|
autotests = false
|
|
rust-version = "1.88.0"
|
|
|
|
# Prevent cargo-udeps from flagging the dummy package `target_check`, which exists only
|
|
# to assert properties of the compilation target.
|
|
[package.metadata.cargo-udeps.ignore]
|
|
normal = ["target_check"]
|
|
|
|
[features]
|
|
default = ["slasher-lmdb", "beacon-node-leveldb"]
|
|
# Writes debugging .ssz files to /tmp during block processing.
|
|
write_ssz_files = ["beacon_node/write_ssz_files"]
|
|
# Compiles the BLS crypto code so that the binary is portable across machines.
|
|
portable = ["bls/supranational-portable"]
|
|
# Compiles BLST so that it always uses ADX instructions.
|
|
modern = ["bls/supranational-force-adx"]
|
|
# Support minimal spec (used for testing only).
|
|
spec-minimal = []
|
|
# Support Gnosis spec and Gnosis Beacon Chain.
|
|
gnosis = []
|
|
# Support slasher MDBX backend.
|
|
slasher-mdbx = ["slasher/mdbx"]
|
|
# Support slasher LMDB backend.
|
|
slasher-lmdb = ["slasher/lmdb"]
|
|
# Support slasher redb backend.
|
|
slasher-redb = ["slasher/redb"]
|
|
# Supports beacon node leveldb backend.
|
|
beacon-node-leveldb = ["store/leveldb"]
|
|
# Supports beacon node redb backend.
|
|
beacon-node-redb = ["store/redb"]
|
|
# Supports console subscriber for debugging
|
|
console-subscriber = ["console-subscriber/default"]
|
|
# Force the use of the system memory allocator rather than jemalloc.
|
|
sysmalloc = ["malloc_utils/sysmalloc"]
|
|
|
|
[dependencies]
|
|
account_manager = { "path" = "../account_manager" }
|
|
account_utils = { workspace = true }
|
|
beacon_node = { workspace = true }
|
|
bls = { workspace = true }
|
|
boot_node = { path = "../boot_node" }
|
|
clap = { workspace = true }
|
|
clap_utils = { workspace = true }
|
|
console-subscriber = { workspace = true, optional = true }
|
|
database_manager = { path = "../database_manager" }
|
|
directory = { workspace = true }
|
|
environment = { workspace = true }
|
|
eth2_network_config = { workspace = true }
|
|
ethereum_hashing = { workspace = true }
|
|
futures = { workspace = true }
|
|
lighthouse_tracing = { workspace = true }
|
|
lighthouse_version = { workspace = true }
|
|
logging = { workspace = true }
|
|
metrics = { workspace = true }
|
|
network_utils = { workspace = true }
|
|
opentelemetry = { workspace = true }
|
|
opentelemetry-otlp = { workspace = true }
|
|
opentelemetry_sdk = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
serde_yaml = { workspace = true }
|
|
slasher = { workspace = true }
|
|
store = { workspace = true }
|
|
task_executor = { workspace = true }
|
|
tracing = { workspace = true }
|
|
tracing-opentelemetry = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
types = { workspace = true }
|
|
validator_client = { workspace = true }
|
|
validator_manager = { path = "../validator_manager" }
|
|
|
|
[target.'cfg(not(target_os = "windows"))'.dependencies]
|
|
malloc_utils = { workspace = true, features = ["jemalloc"] }
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
malloc_utils = { workspace = true, features = [] }
|
|
|
|
[dev-dependencies]
|
|
beacon_node = { workspace = true, features = ["testing"] }
|
|
beacon_node_fallback = { workspace = true }
|
|
beacon_processor = { workspace = true }
|
|
eth2 = { workspace = true }
|
|
initialized_validators = { workspace = true }
|
|
lighthouse_network = { workspace = true }
|
|
sensitive_url = { workspace = true }
|
|
slashing_protection = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
validator_dir = { workspace = true }
|
|
zeroize = { workspace = true }
|
|
|
|
[[test]]
|
|
name = "lighthouse_tests"
|
|
path = "tests/main.rs"
|