diff --git a/.gitignore b/.gitignore index b06d753df719..34c7f9da048b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,50 +1,36 @@ +/target + *.pyc -*.pickle *.sage.py +*.wasm *.zk.bin + *_circuit_layout.png -.vscode/ -.idea/ -.cargo/ -.DS_Store -.#* -*.profraw -*_original -python-venv - -/vendor/* -/target/* -/tmp/* - -/cashierd -/dao -/daod -/dhtd -/darkfid + +/bin/zkas/zkas +/zkas + +/bin/darkfid2/darkfid2 /darkfid2 + +/bin/darkfi-mmproxy/darkfi-mmproxy /darkfi-mmproxy -/darkotc -/dnetview -/drk -/faucetd -/fu -/fud -/genevd -/genev -/ircd + +/bin/darkirc/darkirc /darkirc -/tau + +/bin/genev/genev-cli/genev +/genev + +/bin/genev/genevd/genevd +/genevd + +/bin/lilith/lilith +/lilith + +/bin/tau/taud/taud /taud + +/bin/vanityaddr/vanityaddr /vanityaddr -/zkas -/lilith -/darkwiki -/darkwikid -/zktool -/riscv-bins -/static-bins - -# tags, ctags, rusty-tags -TAGS -rusty-tags.emacs -rusty-tags.vi + diff --git a/Cargo.lock b/Cargo.lock index 1c78223b4909..38bf55d1d1f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1708,28 +1708,6 @@ dependencies = [ "x509-parser", ] -[[package]] -name = "darkfi-consensus-contract" -version = "0.4.1" -dependencies = [ - "blake3", - "bs58", - "chacha20poly1305", - "darkfi", - "darkfi-contract-test-harness", - "darkfi-money-contract", - "darkfi-sdk", - "darkfi-serial", - "getrandom 0.2.11", - "halo2_proofs", - "log", - "rand 0.8.5", - "simplelog", - "sled", - "smol", - "thiserror", -] - [[package]] name = "darkfi-contract-test-harness" version = "0.4.1" @@ -1737,48 +1715,16 @@ dependencies = [ "blake3", "bs58", "darkfi", - "darkfi-consensus-contract", - "darkfi-dao-contract", - "darkfi-deployooor-contract", - "darkfi-money-contract", - "darkfi-sdk", - "darkfi-serial", - "log", - "rand 0.8.5", - "simplelog", - "sled", -] - -[[package]] -name = "darkfi-dao-contract" -version = "0.4.1" -dependencies = [ - "bs58", - "chacha20poly1305", - "darkfi", - "darkfi-contract-test-harness", - "darkfi-money-contract", "darkfi-sdk", "darkfi-serial", - "getrandom 0.2.11", - "halo2_proofs", + "darkfi_consensus_contract", + "darkfi_dao_contract", + "darkfi_deployooor_contract", + "darkfi_money_contract", "log", "rand 0.8.5", "simplelog", "sled", - "smol", - "thiserror", -] - -[[package]] -name = "darkfi-deployooor-contract" -version = "0.4.1" -dependencies = [ - "async-trait", - "darkfi-sdk", - "darkfi-serial", - "getrandom 0.2.11", - "thiserror", ] [[package]] @@ -1826,27 +1772,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "darkfi-money-contract" -version = "0.4.1" -dependencies = [ - "blake3", - "bs58", - "chacha20poly1305", - "darkfi", - "darkfi-contract-test-harness", - "darkfi-sdk", - "darkfi-serial", - "getrandom 0.2.11", - "halo2_proofs", - "log", - "rand 0.8.5", - "simplelog", - "sled", - "smol", - "thiserror", -] - [[package]] name = "darkfi-sdk" version = "0.4.1" @@ -1896,27 +1821,78 @@ dependencies = [ ] [[package]] -name = "darkfid" +name = "darkfi_consensus_contract" +version = "0.4.1" +dependencies = [ + "blake3", + "bs58", + "chacha20poly1305", + "darkfi", + "darkfi-contract-test-harness", + "darkfi-sdk", + "darkfi-serial", + "darkfi_money_contract", + "getrandom 0.2.11", + "halo2_proofs", + "log", + "rand 0.8.5", + "simplelog", + "sled", + "smol", + "thiserror", +] + +[[package]] +name = "darkfi_dao_contract" +version = "0.4.1" +dependencies = [ + "bs58", + "chacha20poly1305", + "darkfi", + "darkfi-contract-test-harness", + "darkfi-sdk", + "darkfi-serial", + "darkfi_money_contract", + "getrandom 0.2.11", + "halo2_proofs", + "log", + "rand 0.8.5", + "simplelog", + "sled", + "smol", + "thiserror", +] + +[[package]] +name = "darkfi_deployooor_contract" version = "0.4.1" dependencies = [ "async-trait", + "darkfi-sdk", + "darkfi-serial", + "getrandom 0.2.11", + "thiserror", +] + +[[package]] +name = "darkfi_money_contract" +version = "0.4.1" +dependencies = [ "blake3", "bs58", + "chacha20poly1305", "darkfi", + "darkfi-contract-test-harness", "darkfi-sdk", "darkfi-serial", - "easy-parallel", + "getrandom 0.2.11", + "halo2_proofs", "log", - "serde", - "signal-hook", - "signal-hook-async-std", + "rand 0.8.5", "simplelog", "sled", "smol", - "structopt", - "structopt-toml", - "tinyjson", - "url", + "thiserror", ] [[package]] @@ -1927,11 +1903,11 @@ dependencies = [ "blake3", "bs58", "darkfi", - "darkfi-consensus-contract", "darkfi-contract-test-harness", - "darkfi-money-contract", "darkfi-sdk", "darkfi-serial", + "darkfi_consensus_contract", + "darkfi_money_contract", "easy-parallel", "log", "num-bigint", @@ -2703,33 +2679,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" -[[package]] -name = "faucetd" -version = "0.4.1" -dependencies = [ - "async-trait", - "blake3", - "chrono", - "darkfi", - "darkfi-money-contract", - "darkfi-sdk", - "darkfi-serial", - "easy-parallel", - "log", - "rand 0.8.5", - "rusqlite", - "serde", - "signal-hook", - "signal-hook-async-std", - "simplelog", - "sled", - "smol", - "structopt", - "structopt-toml", - "tinyjson", - "url", -] - [[package]] name = "fdeflate" version = "0.3.1" @@ -2914,27 +2863,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "fud" -version = "0.4.1" -dependencies = [ - "async-trait", - "blake3", - "darkfi", - "darkfi-serial", - "easy-parallel", - "log", - "serde", - "signal-hook", - "signal-hook-async-std", - "simplelog", - "smol", - "structopt", - "structopt-toml", - "tinyjson", - "url", -] - [[package]] name = "funty" version = "2.0.0" diff --git a/Cargo.toml b/Cargo.toml index c4eae5be9e52..04fdd5b472c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,13 +20,13 @@ doctest = false [workspace] members = [ "bin/zkas", - "bin/darkfid", + #"bin/darkfid", "bin/darkfid2", "bin/darkfi-mmproxy", #"bin/drk", - "bin/faucetd", + #"bin/faucetd", #"bin/fud/fu", - "bin/fud/fud", + #"bin/fud/fud", "bin/genev/genevd", "bin/genev/genev-cli", "bin/darkirc", diff --git a/Makefile b/Makefile index 590b953ca9e6..7c2fefc5bd30 100644 --- a/Makefile +++ b/Makefile @@ -11,29 +11,26 @@ RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) # Uncomment when doing musl static builds #RUSTFLAGS = -C target-feature=+crt-static -C link-self-contained=yes -# Binaries to be built +# List of zkas circuits to compile, used for tests +PROOFS_SRC = $(shell find proof -type f -name '*.zk') +PROOFS_BIN = $(PROOFS_SRC:=.bin) + +# List of all binaries built BINS = \ zkas \ - darkfid \ darkfid2 \ - faucetd \ - darkirc \ darkfi-mmproxy \ - genev/genev-cli \ - genev/genevd \ + darkirc \ + genev \ + genevd \ lilith \ - tau/tau-cli \ - tau/taud \ + taud \ vanityaddr -# ZK proofs to compile with zkas -PROOFS_SRC = $(shell find proof -type f -name '*.zk') example/simple.zk -PROOFS_BIN = $(PROOFS_SRC:=.bin) - all: $(BINS) zkas: - $(MAKE) -C bin/zkas \ + $(MAKE) -C bin/$@ \ PREFIX="$(PREFIX)" \ CARGO="$(CARGO)" \ RUST_TARGET="$(RUST_TARGET)" \ @@ -44,105 +41,112 @@ $(PROOFS_BIN): zkas $(PROOFS_SRC) contracts: zkas $(MAKE) -C src/contract/money - $(MAKE) -C src/contract/dao $(MAKE) -C src/contract/consensus + $(MAKE) -C src/contract/dao $(MAKE) -C src/contract/deployooor -darkfid: $(PROOFS_BIN) contracts - $(MAKE) -C bin/darkfid - darkfid2: contracts - $(MAKE) -C bin/darkfid2 - -faucetd: contracts - $(MAKE) -C bin/faucetd - -darkirc: zkas - $(MAKE) -C bin/darkirc \ + $(MAKE) -C bin/$@ \ PREFIX="$(PREFIX)" \ CARGO="$(CARGO)" \ RUST_TARGET="$(RUST_TARGET)" \ RUSTFLAGS="$(RUSTFLAGS)" darkfi-mmproxy: - $(MAKE) -C bin/darkfi-mmproxy \ + $(MAKE) -C bin/$@ \ + PREFIX="$(PREFIX)" \ + CARGO="$(CARGO)" \ + RUST_TARGET="$(RUST_TARGET)" \ + RUSTFLAGS="$(RUSTFLAGS)" + +darkirc: zkas + $(MAKE) -C bin/$@ \ PREFIX="$(PREFIX)" \ CARGO="$(CARGO)" \ RUST_TARGET="$(RUST_TARGET)" \ RUSTFLAGS="$(RUSTFLAGS)" genev: - $(MAKE) -C bin/genev/genev-cli + $(MAKE) -C bin/genev/genev-cli \ + PREFIX="$(PREFIX)" \ + CARGO="$(CARGO)" \ + RUST_TARGET="$(RUST_TARGET)" \ + RUSTFLAGS="$(RUSTFLAGS)" genevd: - $(MAKE) -C bin/genev/genevd + $(MAKE) -C bin/genev/genevd \ + PREFIX="$(PREFIX)" \ + CARGO="$(CARGO)" \ + RUST_TARGET="$(RUST_TARGET)" \ + RUSTFLAGS="$(RUSTFLAGS)" lilith: - $(MAKE) -C bin/lilith - -tau: - $(MAKE) -C bin/tau/tau-cli + $(MAKE) -C bin/$@ \ + PREFIX="$(PREFIX)" \ + CARGO="$(CARGO)" \ + RUST_TARGET="$(RUST_TARGET)" \ + RUSTFLAGS="$(RUSTFLAGS)" taud: - $(MAKE) -C bin/tau/taud + $(MAKE) -C bin/tau/$@ \ + PREFIX="$(PREFIX)" \ + CARGO="$(CARGO)" \ + RUST_TARGET="$(RUST_TARGET)" \ + RUSTFLAGS="$(RUSTFLAGS)" vanityaddr: - $(MAKE) -C bin/vanityaddr + $(MAKE) -C bin/$@ \ + PREFIX="$(PREFIX)" \ + CARGO="$(CARGO)" \ + RUST_TARGET="$(RUST_TARGET)" \ + RUSTFLAGS="$(RUSTFLAGS)" + +# -- END OF BINS -- fmt: - $(CARGO) fmt + $(CARGO) fmt --all -check: $(PROOFS_BIN) contracts - $(CARGO) hack check --release --feature-powerset --workspace +check: contracts $(PROOFS_BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) hack check --target=$(RUST_TARGET) \ + --release --feature-powerset --workspace -clippy: $(PROOFS_BIN) contracts - $(CARGO) clippy --release --all-features --workspace --tests +clippy: contracts $(PROOFS_BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clippy --target=$(RUST_TARGET) \ + --release --all-features --workspace --tests -fix: $(PROOFS_BIN) contracts - $(CARGO) clippy --release --all-features --fix --allow-dirty --workspace --tests +fix: contracts $(PROOFS_BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clippy --target=$(RUST_TARGET) \ + --release --all-features --workspace --tests --fix --allow-dirty -rustdoc: $(PROOFS_BIN) contracts - $(CARGO) doc --release --all-features --workspace --document-private-items --no-deps +rustdoc: contracts $(PROOFS_BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) doc --target=$(RUST_TARGET) \ + --release --all-features --workspace --document-private-items --no-deps -test: $(PROOFS_BIN) contracts - $(CARGO) test --release --all-features --workspace +test: contracts $(PROOFS_BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) test --target=$(RUST_TARGET) \ + --release --all-features --workspace -coverage: $(PROOFS_BIN) contracts - $(CARGO) llvm-cov --release --all-features --workspace --html +coverage: contracts $(PROOFS_BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) llvm-cov --target=$(RUST_TARGET) \ + --release --all-features --workspace --html clean: $(MAKE) -C src/contract/money clean - $(MAKE) -C src/contract/dao clean $(MAKE) -C src/contract/consensus clean + $(MAKE) -C src/contract/dao clean $(MAKE) -C src/contract/deployooor clean $(MAKE) -C bin/zkas clean - $(MAKE) -C bin/darkfid clean $(MAKE) -C bin/darkfid2 clean $(MAKE) -C bin/darkfi-mmproxy clean - $(MAKE) -C bin/faucetd clean $(MAKE) -C bin/darkirc clean $(MAKE) -C bin/genev/genev-cli clean $(MAKE) -C bin/genev/genevd clean $(MAKE) -C bin/lilith clean - $(MAKE) -C bin/tau/tau-cli clean $(MAKE) -C bin/tau/taud clean $(MAKE) -C bin/vanityaddr clean - rm -f $(PROOFS_BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clean --target=$(RUST_TARGET) --release distclean: clean - $(CARGO) clean rm -rf target -install: $(BINS) - @for i in $(BINS); \ - do \ - $(MAKE) -C bin/$$i install; \ - done; - -uninstall: - for i in $(BINS); \ - do \ - $(MAKE) -C bin/$$i uninstall; \ - done; - -.PHONY: all contracts check fix fmt clippy rustdoc test coverage distclean clean install uninstall $(BINS) +.PHONY: all $(BINS) fmt check clippy fix rustdoc test coverage clean distclean diff --git a/bin/darkfi-mmproxy/Makefile b/bin/darkfi-mmproxy/Makefile index e7fbef1b70f3..dbdadc8fd259 100644 --- a/bin/darkfi-mmproxy/Makefile +++ b/bin/darkfi-mmproxy/Makefile @@ -8,6 +8,8 @@ CARGO = cargo +nightly # Compile target RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) +# Uncomment when doing musl static builds +#RUSTFLAGS = -C target-feature=+crt-static -C link-self-contained=yes SRC = \ Cargo.toml \ @@ -15,23 +17,25 @@ SRC = \ $(shell find src -type f -name '*.rs') \ $(shell find ../../src -type f -name '*.rs') \ -BIN = ../../darkfi-mmproxy +BIN = $(shell grep '^name = ' Cargo.toml | cut -d' ' -f3 | tr -d '"') all: $(BIN) $(BIN): $(SRC) - RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package darkfi-mmproxy - cp -f ../../target/$(RUST_TARGET)/release/darkfi-mmproxy $@ + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package $@ + cp -f ../../target/$(RUST_TARGET)/release/$@ $@ + cp -f ../../target/$(RUST_TARGET)/release/$@ ../../$@ clean: - rm -f $(BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clean --target=$(RUST_TARGET) --release --package $(BIN) + rm -f $(BIN) ../../$(BIN) install: all mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin - chmod 755 $(DESTDIR)$(PREFIX)/bin/darkfi-mmproxy + chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN) uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/darkfi-mmproxy + rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) .PHONY: all clean install uninstall diff --git a/bin/darkfid2/Cargo.toml b/bin/darkfid2/Cargo.toml index 36aebf02b483..140dac9fe665 100644 --- a/bin/darkfid2/Cargo.toml +++ b/bin/darkfid2/Cargo.toml @@ -11,8 +11,8 @@ edition = "2021" [dependencies] # Darkfi darkfi = {path = "../../", features = ["async-daemonize", "bs58"]} -darkfi-consensus-contract = {path = "../../src/contract/consensus"} -darkfi-money-contract = {path = "../../src/contract/money"} +darkfi_consensus_contract = {path = "../../src/contract/consensus"} +darkfi_money_contract = {path = "../../src/contract/money"} darkfi-contract-test-harness = {path = "../../src/contract/test-harness"} darkfi-sdk = {path = "../../src/sdk"} darkfi-serial = {path = "../../src/serial"} diff --git a/bin/darkfid2/Makefile b/bin/darkfid2/Makefile index 5ab613c3052f..c5a759666683 100644 --- a/bin/darkfid2/Makefile +++ b/bin/darkfid2/Makefile @@ -6,29 +6,37 @@ PREFIX = $(HOME)/.cargo # Cargo binary CARGO = cargo +nightly +# Compile target +RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) +# Uncomment when doing musl static builds +#RUSTFLAGS = -C target-feature=+crt-static -C link-self-contained=yes + SRC = \ Cargo.toml \ ../../Cargo.toml \ - $(shell find src -type f) \ - $(shell find ../../src -type f) \ + $(shell find src -type f -name '*.rs') \ + $(shell find ../../src -type f -name '*.rs') \ + $(shell find ../../src/contract -type f -name '*.wasm') -BIN = ../../darkfid2 +BIN = $(shell grep '^name = ' Cargo.toml | cut -d' ' -f3 | tr -d '"') all: $(BIN) $(BIN): $(SRC) - $(CARGO) build $(TARGET_PRFX)$(RUST_TARGET) --release --package darkfid2 - cp -f ../../target/$(RUST_TARGET)/release/darkfid2 $@ + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package $@ + cp -f ../../target/$(RUST_TARGET)/release/$@ $@ + cp -f ../../target/$(RUST_TARGET)/release/$@ ../../$@ clean: - rm -f $(BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clean --target=$(RUST_TARGET) --release --package $(BIN) + rm -f $(BIN) ../../$(BIN) install: all mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin - chmod 755 $(DESTDIR)$(PREFIX)/bin/darkfid2 + chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN) uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/darkfid2 + rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) .PHONY: all clean install uninstall diff --git a/bin/darkirc/Makefile b/bin/darkirc/Makefile index 7daaa5729f8b..f3531708797b 100644 --- a/bin/darkirc/Makefile +++ b/bin/darkirc/Makefile @@ -8,6 +8,15 @@ CARGO = cargo +nightly # Compile target RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) +# Uncomment when doing musl static builds +#RUSTFLAGS = -C target-feature=+crt-static -C link-self-contained=yes + +# zkas compiler binary +ZKAS = ../../zkas + +# zkas circuits +PROOFS_SRC = $(shell find proof -type f -name '*.zk') +PROOFS_BIN = $(PROOFS_SRC:=.bin) SRC = \ Cargo.toml \ @@ -15,43 +24,43 @@ SRC = \ $(shell find src -type f -name '*.rs') \ $(shell find ../../src -type f -name '*.rs') \ -BIN = ../../darkirc - -ZKAS = ../../zkas - -ZKSRC = $(shell find proof -type f -name '*.zk') -ZKBIN = $(ZKSRC:=.bin) +BIN = $(shell grep '^name = ' Cargo.toml | cut -d' ' -f3 | tr -d '"') all: $(BIN) -$(ZKBIN): $(ZKAS) $(ZKSRC) +$(PROOFS_BIN): $(ZKAS) $(PROOFS_SRC) $(ZKAS) $(basename $@) -o $@ -$(BIN): $(ZKBIN) $(SRC) - RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package darkirc - cp -f ../../target/$(RUST_TARGET)/release/darkirc $@ - -android: - docker build -t test:latest . --file android.Dockerfile - # Use this command to get an interactive terminal inside docker: - #docker run -v $(shell pwd)/../../:/root/src -it test:latest /bin/bash - docker run --rm -v $(shell pwd)/../../:/root/src -t test:latest make _aarch64-android - cp -f ../../target/aarch64-linux-android/release/darkirc darkirc.aarch64-android - -# Invoked inside docker by the command above -# We need to mount this directory as a volume using -v so docker can access it -_aarch64-android: - cargo build --release --target aarch64-linux-android --package darkirc +$(BIN): $(PROOFS_BIN) $(SRC) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package $@ + cp -f ../../target/$(RUST_TARGET)/release/$@ $@ + cp -f ../../target/$(RUST_TARGET)/release/$@ ../../$@ + +# To build for android, install the Android NDK (Android Studio) +# and then install cargo-ndk: `cargo install cargo-ndk`. +# After that, add new android rust toolchains: +# - rustup target add aarch64-linux-android +# - rustup target add armv7-linux-androideabi +# - rustup target add x86_64-linux-android +# - rustup target add i686-linux-android +$(BIN).android64: + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) ndk -t arm64-v8a -o ./jniLibs build --release --package $(BIN) + cp -f ../../target/aarch64-linux-android/release/$(BIN) $(BIN).$@ + +$(BIN).android32: + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) ndk -t armeabi-v7a -o ./jniLibs build --release --package $(BIN) + cp -f ../../target/armv7-linux-androideabi/release/$(BIN) $(BIN).$@ clean: - rm -f $(BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clean --target=$(RUST_TARGET) --release --package $(BIN) + rm -f $(BIN) ../../$(BIN) $(BIN).android64 $(BIN).android32 install: all mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin - chmod 755 $(DESTDIR)$(PREFIX)/bin/darkirc + chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN) uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/darkirc + rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) .PHONY: all clean install uninstall diff --git a/bin/darkirc/src/irc/command.rs b/bin/darkirc/src/irc/command.rs index d6b9f3a4b601..b3f2c433eed8 100644 --- a/bin/darkirc/src/irc/command.rs +++ b/bin/darkirc/src/irc/command.rs @@ -19,7 +19,7 @@ //! IRC command implemenatations //! //! These try to follow the RFCs, modified in order for our P2P stack. -//! Copied from https://simple.wikipedia.org/wiki/List_of_Internet_Relay_Chat_commands +//! Copied from //! //! Unimplemented commands: //! * `AWAY` @@ -354,7 +354,7 @@ impl Client { /// `LIST [ []]` /// /// List all channels on the server. If the list `` is given, it - /// will return the channel topics. If is given, the command will + /// will return the channel topics. If `` is given, the command will /// be sent to `` for evaluation. pub async fn handle_cmd_list(&self, _args: &str) -> Result> { if !self.registered.load(SeqCst) { @@ -431,7 +431,7 @@ impl Client { /// `MOTD []` /// - /// Returns the message of the day on or the current server if + /// Returns the message of the day on `` or the current server if /// it is not stated. pub async fn handle_cmd_motd(&self, _args: &str) -> Result> { let nick = self.nickname.read().await.to_string(); @@ -448,8 +448,8 @@ impl Client { /// `NAMES []` /// - /// Returns a list of who is on the list of , by channel name. - /// If is not used, all users are shown. They are grouped by + /// Returns a list of who is on the list of ``, by channel name. + /// If `` is not used, all users are shown. They are grouped by /// channel name with all users who are not on a channel being shown as /// part of channel "*". pub async fn handle_cmd_names(&self, args: &str) -> Result> { @@ -563,7 +563,7 @@ impl Client { /// `PART ` /// - /// Causes a user to leave the channel . + /// Causes a user to leave the channel ``. pub async fn handle_cmd_part(&self, args: &str) -> Result> { if !self.registered.load(SeqCst) { self.penalty.fetch_add(1, SeqCst); @@ -635,7 +635,7 @@ impl Client { /// `PRIVMSG ` /// - /// Sends to . The target is usually a user or + /// Sends `` to ``. The target is usually a user or /// a channel. pub async fn handle_cmd_privmsg(&self, args: &str) -> Result> { if !self.registered.load(SeqCst) { @@ -703,8 +703,8 @@ impl Client { /// `TOPIC []` /// - /// Used to get the channel topic on . If is given, it - /// sets the channel topic to . + /// Used to get the channel topic on ``. If `` is given, it + /// sets the channel topic to ``. pub async fn handle_cmd_topic(&self, args: &str) -> Result> { if !self.registered.load(SeqCst) { self.penalty.fetch_add(1, SeqCst); @@ -762,7 +762,7 @@ impl Client { /// /// This command is used at the beginning of a connection to specify the /// username, hostname, real name, and the initial user modes of the - /// connecting client. may contain spaces, and thus must be + /// connecting client. `` may contain spaces, and thus must be /// prefixed with a colon. pub async fn handle_cmd_user(&self, args: &str) -> Result> { if self.registered.load(SeqCst) { diff --git a/bin/darkirc/src/irc/rpl.rs b/bin/darkirc/src/irc/rpl.rs index cac10be8f487..e14f7fe4ce58 100644 --- a/bin/darkirc/src/irc/rpl.rs +++ b/bin/darkirc/src/irc/rpl.rs @@ -32,7 +32,7 @@ pub const INVALID_SYNTAX: &str = "Syntax error"; /// The first message sent after client registration. pub const RPL_WELCOME: u16 = 001; -/// ` :Your host is , running version :Your host is , running version ` /// /// Part of the post-registration greeting. pub const RPL_YOURHOST: u16 = 002; @@ -50,19 +50,19 @@ pub const RPL_ADMINME: u16 = 256; /// ` :` /// -/// Sent as a reply to an ADMIN command. is a string intended to +/// Sent as a reply to an ADMIN command. `` is a string intended to /// provide information about the location of the server. pub const RPL_ADMINLOC1: u16 = 257; /// ` :` /// -/// Sent as a reply to an ADMIN command. is a string intended to +/// Sent as a reply to an ADMIN command. `` is a string intended to /// provide information about whoever runs the server. pub const RPL_ADMINLOC2: u16 = 258; /// ` :` /// -/// Sent as a reply to an ADMIN command. MUST contain the email +/// Sent as a reply to an ADMIN command. `` MUST contain the email /// address to contact the administrator(s) of the server. pub const RPL_ADMINEMAIL: u16 = 259; @@ -75,12 +75,12 @@ pub const RPL_LISTSTART: u16 = 321; /// ` :` /// /// Sent as a reply to the LIST command, this numeric sends information -/// about a channel to the client. is the name of the channel. -/// is an integer indicating how many clients are joined -/// to that channel. is the channel’s topic. +/// about a channel to the client. `` is the name of the channel. +/// `` is an integer indicating how many clients are joined +/// to that channel. `` is the channel’s topic. pub const RPL_LIST: u16 = 322; -/// :End of /LIST +/// ` :End of /LIST` /// /// Sent as a reply to the LIST command, this numeric indicates the end /// of a LIST response. @@ -89,18 +89,18 @@ pub const RPL_LISTEND: u16 = 323; /// ` ...` /// /// Sent to a client to inform them of the currently-set modes of a channel. -/// is the name of the channel. +/// `` is the name of the channel. pub const RPL_CHANNELMODEIS: u16 = 324; /// ` :No topic is set` /// /// Sent to a client when joining a channel to inform them that the channel -/// with the name does not have any topic set. +/// with the name `` does not have any topic set. pub const RPL_NOTOPIC: u16 = 331; /// ` :` /// -/// Sent to a client when joining the to inform them of the +/// Sent to a client when joining the `` to inform them of the /// current topic of the channel. pub const RPL_TOPIC: u16 = 332; @@ -159,7 +159,7 @@ pub const ERR_NOSUCHCHANNEL: u16 = 403; /// /// Indicates a PING or PONG message missing the originator parameter /// which is required by old IRC servers. Nowadays, this may be used by -/// some servers when the PING is empty. +/// some servers when the PING `` is empty. pub const ERR_NOORIGIN: u16 = 409; /// ` :No recipient given ()` @@ -174,7 +174,7 @@ pub const ERR_NORECIPIENT: u16 = 411; /// delivered because there was no text to send. pub const ERR_NOTEXTTOSEND: u16 = 412; -/// :Erroneus nickname +/// ` :Erroneus nickname` /// /// Returned when a NICK command cannot be successfully completed as /// the desired nickname contains characters that are disallowed by the server. diff --git a/bin/faucetd/Cargo.toml b/bin/faucetd/Cargo.toml index a1fd614675db..2dc4daa8957d 100644 --- a/bin/faucetd/Cargo.toml +++ b/bin/faucetd/Cargo.toml @@ -15,7 +15,7 @@ chrono = "0.4.31" darkfi = {path = "../../", features = ["async-daemonize", "validator"]} darkfi-serial = {path = "../../src/serial"} darkfi-sdk = {path = "../../src/sdk"} -darkfi-money-contract = {path = "../../src/contract/money", features = ["no-entrypoint", "client"]} +darkfi_money_contract = {path = "../../src/contract/money", features = ["no-entrypoint", "client"]} log = "0.4.20" rand = "0.8.5" rusqlite = "0.29.0" diff --git a/bin/genev/genev-cli/Makefile b/bin/genev/genev-cli/Makefile index f83a641213dd..f292a22714fd 100644 --- a/bin/genev/genev-cli/Makefile +++ b/bin/genev/genev-cli/Makefile @@ -6,29 +6,36 @@ PREFIX = $(HOME)/.cargo # Cargo binary CARGO = cargo +nightly +# Compile target +RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) +# Uncomment when doing musl static builds +#RUSTFLAGS = -C target-feature=+crt-static -C link-self-contained=yes + SRC = \ Cargo.toml \ ../../../Cargo.toml \ - $(shell find src -type f) \ - $(shell find ../../../src -type f) \ + $(shell find src -type f -name '*.rs') \ + $(shell find ../../../src -type f -name '*.rs') \ -BIN = ../../../genev +BIN = $(shell grep '^name = ' Cargo.toml | cut -d' ' -f3 | tr -d '"') all: $(BIN) $(BIN): $(SRC) - $(CARGO) build $(TARGET_PRFX)$(RUST_TARGET) --release --package genev - cp -f ../../../target/$(RUST_TARGET)/release/genev $@ + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package $@ + cp -f ../../../target/$(RUST_TARGET)/release/$@ $@ + cp -f ../../../target/$(RUST_TARGET)/release/$@ ../../../$@ clean: - rm -f $(BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clean --target=$(RUST_TARGET) --release --package $(BIN) + rm -f $(BIN) ../../../$(BIN) install: all mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin - chmod 755 $(DESTDIR)$(PREFIX)/bin/genev + chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN) uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/genev + rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) .PHONY: all clean install uninstall diff --git a/bin/genev/genevd/Makefile b/bin/genev/genevd/Makefile index bcf2d9fca6e1..2a15600cf7d5 100644 --- a/bin/genev/genevd/Makefile +++ b/bin/genev/genevd/Makefile @@ -6,29 +6,36 @@ PREFIX = $(HOME)/.cargo # Cargo binary CARGO = cargo +nightly +# Compile target +RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) +# Uncomment when doing musl static builds +#RUSTFLAGS = -C target-feature=+crt-static -C link-self-contained=yes + SRC = \ Cargo.toml \ ../../../Cargo.toml \ - $(shell find src -type f) \ - $(shell find ../../../src -type f) \ + $(shell find src -type f -name '*.rs') \ + $(shell find ../../../src -type f -name '*.rs') \ -BIN = ../../../genevd +BIN = $(shell grep '^name = ' Cargo.toml | sed 1q | cut -d' ' -f3 | tr -d '"') all: $(BIN) $(BIN): $(SRC) - $(CARGO) build $(TARGET_PRFX)$(RUST_TARGET) --release --package genevd - cp -f ../../../target/$(RUST_TARGET)/release/genevd $@ + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package $@ + cp -f ../../../target/$(RUST_TARGET)/release/$@ $@ + cp -f ../../../target/$(RUST_TARGET)/release/$@ ../../../$@ clean: - rm -f $(BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clean --target=$(RUST_TARGET) --release --package $(BIN) + rm -f $(BIN) ../../../$(BIN) install: all mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin - chmod 755 $(DESTDIR)$(PREFIX)/bin/genevd + chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN) uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/genevd + rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) .PHONY: all clean install uninstall diff --git a/bin/lilith/Makefile b/bin/lilith/Makefile index 64e99e8e843c..5ac277d8bf8d 100644 --- a/bin/lilith/Makefile +++ b/bin/lilith/Makefile @@ -8,6 +8,8 @@ CARGO = cargo +nightly # Compile target RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) +# Uncomment when doing musl static builds +#RUSTFLAGS = -C target-feature=+crt-static -C link-self-contained=yes SRC = \ Cargo.toml \ @@ -15,23 +17,25 @@ SRC = \ $(shell find src -type f -name '*.rs') \ $(shell find ../../src -type f -name '*.rs') \ -BIN = ../../lilith +BIN = $(shell grep '^name = ' Cargo.toml | cut -d' ' -f3 | tr -d '"') all: $(BIN) $(BIN): $(SRC) - RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package lilith - cp -f ../../target/$(RUST_TARGET)/release/lilith $@ + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package $@ + cp -f ../../target/$(RUST_TARGET)/release/$@ $@ + cp -f ../../target/$(RUST_TARGET)/release/$@ ../../$@ clean: - rm -f $(BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clean --target=$(RUST_TARGET) --release --package $(BIN) + rm -f $(BIN) ../../$(BIN) install: all mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin - chmod 755 $(DESTDIR)$(PREFIX)/bin/lilith + chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN) uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/lilith + rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) .PHONY: all clean install uninstall diff --git a/bin/tau/taud/Makefile b/bin/tau/taud/Makefile index 928b4c3d1bf6..2a15600cf7d5 100644 --- a/bin/tau/taud/Makefile +++ b/bin/tau/taud/Makefile @@ -8,6 +8,8 @@ CARGO = cargo +nightly # Compile target RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) +# Uncomment when doing musl static builds +#RUSTFLAGS = -C target-feature=+crt-static -C link-self-contained=yes SRC = \ Cargo.toml \ @@ -15,23 +17,25 @@ SRC = \ $(shell find src -type f -name '*.rs') \ $(shell find ../../../src -type f -name '*.rs') \ -BIN = ../../../taud +BIN = $(shell grep '^name = ' Cargo.toml | sed 1q | cut -d' ' -f3 | tr -d '"') all: $(BIN) $(BIN): $(SRC) - RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package taud - cp -f ../../../target/$(RUST_TARGET)/release/taud $@ + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package $@ + cp -f ../../../target/$(RUST_TARGET)/release/$@ $@ + cp -f ../../../target/$(RUST_TARGET)/release/$@ ../../../$@ clean: - rm -f $(BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clean --target=$(RUST_TARGET) --release --package $(BIN) + rm -f $(BIN) ../../../$(BIN) install: all mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin - chmod 755 $(DESTDIR)$(PREFIX)/bin/taud + chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN) uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/taud + rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) .PHONY: all clean install uninstall diff --git a/bin/vanityaddr/Makefile b/bin/vanityaddr/Makefile index ac24d97862a7..5909809e113f 100644 --- a/bin/vanityaddr/Makefile +++ b/bin/vanityaddr/Makefile @@ -8,6 +8,8 @@ CARGO = cargo +nightly # Compile target RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) +# Uncomment when doing musl static builds +#RUSTFLAGS = -C target-feature=+crt-static -C link-self-contained=yes SRC = \ Cargo.toml \ @@ -15,23 +17,25 @@ SRC = \ $(shell find src -type f -name '*.rs') \ $(shell find ../../src -type f -name '*.rs') \ -BIN = ../../vanityaddr +BIN = vanityaddr all: $(BIN) $(BIN): $(SRC) - RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package vanityaddr - cp -f ../../target/$(RUST_TARGET)/release/vanityaddr $@ + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package $@ + cp -f ../../target/$(RUST_TARGET)/release/$@ $@ + cp -f ../../target/$(RUST_TARGET)/release/$@ ../../$@ clean: - rm -f $(BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clean --target=$(RUST_TARGET) --release --package $(BIN) + rm -f $(BIN) ../../$(BIN) install: all mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin - chmod 755 $(DESTDIR)$(PREFIX)/bin/vanityaddr + chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN) uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/vanityaddr + rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) .PHONY: all clean install uninstall diff --git a/bin/zkas/Makefile b/bin/zkas/Makefile index da2f4024b9d1..44ad65c4df8b 100644 --- a/bin/zkas/Makefile +++ b/bin/zkas/Makefile @@ -8,6 +8,8 @@ CARGO = cargo +nightly # Compile target RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2) +# Uncomment when doing musl static builds +#RUSTFLAGS = -C target-feature=+crt-static -C link-self-contained=yes SRC = \ Cargo.toml \ @@ -16,23 +18,25 @@ SRC = \ $(shell find ../../src/serial -type f -name '*.rs') \ $(shell find ../../src/zkas -type f -name '*.rs') -BIN = ../../zkas +BIN = zkas all: $(BIN) $(BIN): $(SRC) - RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package zkas - cp -f ../../target/$(RUST_TARGET)/release/zkas $@ + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package $@ + cp -f ../../target/$(RUST_TARGET)/release/$@ $@ + cp -f ../../target/$(RUST_TARGET)/release/$@ ../../$@ clean: - rm -f $(BIN) + RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clean --target=$(RUST_TARGET) --release --package $(BIN) + rm -f $(BIN) ../../$(BIN) install: all mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin - chmod 755 $(DESTDIR)$(PREFIX)/bin/zkas + chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN) uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/zkas + rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) .PHONY: all clean install uninstall diff --git a/src/consensus/validator.rs b/src/consensus/validator.rs index f49b38cdbf0e..4e2884e304cc 100644 --- a/src/consensus/validator.rs +++ b/src/consensus/validator.rs @@ -153,19 +153,19 @@ impl ValidatorState { ( "Money Contract", *MONEY_CONTRACT_ID, - include_bytes!("../contract/money/money_contract.wasm").to_vec(), + include_bytes!("../contract/money/darkfi_money_contract.wasm").to_vec(), money_contract_deploy_payload, ), ( "DAO Contract", *DAO_CONTRACT_ID, - include_bytes!("../contract/dao/dao_contract.wasm").to_vec(), + include_bytes!("../contract/dao/darkfi_dao_contract.wasm").to_vec(), dao_contract_deploy_payload, ), ( "Consensus Contract", *CONSENSUS_CONTRACT_ID, - include_bytes!("../contract/consensus/consensus_contract.wasm").to_vec(), + include_bytes!("../contract/consensus/darkfi_consensus_contract.wasm").to_vec(), consensus_contract_deploy_payload, ), ]; diff --git a/src/contract/consensus/Makefile b/src/contract/consensus/Makefile index d577efd03fbc..af7c58087e4a 100644 --- a/src/contract/consensus/Makefile +++ b/src/contract/consensus/Makefile @@ -25,6 +25,10 @@ PROOFS_BIN = $(PROOFS_SRC:=.bin) # wasm source files WASM_SRC = \ + Cargo.toml \ + ../../../Cargo.toml \ + ../../../src/sdk/Cargo.toml \ + ../../../src/serial/Cargo.toml \ $(shell find src -type f -name '*.rs') \ $(shell find ../../sdk -type f -name '*.rs') \ $(shell find ../../serial -type f -name '*.rs') diff --git a/src/contract/dao/Makefile b/src/contract/dao/Makefile index d5e093ce09b8..40b2be687379 100644 --- a/src/contract/dao/Makefile +++ b/src/contract/dao/Makefile @@ -25,6 +25,10 @@ PROOFS_BIN = $(PROOFS_SRC:=.bin) # wasm source files WASM_SRC = \ + Cargo.toml \ + ../../../Cargo.toml \ + ../../../src/sdk/Cargo.toml \ + ../../../src/serial/Cargo.toml \ $(shell find src -type f -name '*.rs') \ $(shell find ../../sdk -type f -name '*.rs') \ $(shell find ../../serial -type f -name '*.rs') diff --git a/src/contract/deployooor/Makefile b/src/contract/deployooor/Makefile index 0578ebf28183..288d34522f46 100644 --- a/src/contract/deployooor/Makefile +++ b/src/contract/deployooor/Makefile @@ -25,6 +25,10 @@ PROOFS_BIN = $(PROOFS_SRC:=.bin) # wasm source files WASM_SRC = \ + Cargo.toml \ + ../../../Cargo.toml \ + ../../../src/sdk/Cargo.toml \ + ../../../src/serial/Cargo.toml \ $(shell find src -type f -name '*.rs') \ $(shell find ../../sdk -type f -name '*.rs') \ $(shell find ../../serial -type f -name '*.rs') diff --git a/src/contract/money/Makefile b/src/contract/money/Makefile index 071146e1c0f9..de83005a731d 100644 --- a/src/contract/money/Makefile +++ b/src/contract/money/Makefile @@ -25,6 +25,10 @@ PROOFS_BIN = $(PROOFS_SRC:=.bin) # wasm source files WASM_SRC = \ + Cargo.toml \ + ../../../Cargo.toml \ + ../../../src/sdk/Cargo.toml \ + ../../../src/serial/Cargo.toml \ $(shell find src -type f -name '*.rs') \ $(shell find ../../sdk -type f -name '*.rs') \ $(shell find ../../serial -type f -name '*.rs') diff --git a/src/event_graph/event.rs b/src/event_graph/event.rs index c853a05cf49f..0ff561b2e3a0 100644 --- a/src/event_graph/event.rs +++ b/src/event_graph/event.rs @@ -34,7 +34,7 @@ pub struct Event { } impl Event { - /// Create a new event with the given data and an [`EventGraph`] reference. + /// Create a new event with the given data and an `EventGraph` reference. /// The timestamp of the event will be the current time, and the parents /// will be `N_EVENT_PARENTS` from the current event graph unreferenced tips. /// The parents can also include NULL, but this should be handled by the rest diff --git a/src/lib.rs b/src/lib.rs index f8a4de372da2..3ed012e597d5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,8 +24,10 @@ pub use error::{ClientFailed, ClientResult, Error, Result}; #[cfg(feature = "blockchain")] pub mod blockchain; +/* #[cfg(feature = "validator")] pub mod consensus; +*/ #[cfg(feature = "validator")] pub mod validator; diff --git a/src/validator/utils.rs b/src/validator/utils.rs index 4366a5e8f5ac..8e0e79011185 100644 --- a/src/validator/utils.rs +++ b/src/validator/utils.rs @@ -68,19 +68,19 @@ pub fn deploy_native_contracts( ( "Money Contract", *MONEY_CONTRACT_ID, - include_bytes!("../contract/money/money_contract.wasm").to_vec(), + include_bytes!("../contract/money/darkfi_money_contract.wasm").to_vec(), money_contract_deploy_payload, ), ( "DAO Contract", *DAO_CONTRACT_ID, - include_bytes!("../contract/dao/dao_contract.wasm").to_vec(), + include_bytes!("../contract/dao/darkfi_dao_contract.wasm").to_vec(), dao_contract_deploy_payload, ), ( "Consensus Contract", *CONSENSUS_CONTRACT_ID, - include_bytes!("../contract/consensus/consensus_contract.wasm").to_vec(), + include_bytes!("../contract/consensus/darkfi_consensus_contract.wasm").to_vec(), consensus_contract_deploy_payload, ), ];