Sfoglia il codice sorgente

Makefile improvement

tacryt-socryp 8 mesi fa
parent
commit
c57745e436
3 ha cambiato i file con 45 aggiunte e 25 eliminazioni
  1. 2 0
      .gitignore
  2. 42 14
      Cargo.lock
  3. 1 11
      Makefile

+ 2 - 0
.gitignore

@@ -7,3 +7,5 @@ test-follower
 target
 assets/*.jam
 !crates/nockapp/test-jams
+miner-node
+.env

+ 42 - 14
Cargo.lock

@@ -131,12 +131,12 @@ dependencies = [
 
 [[package]]
 name = "anstyle-wincon"
-version = "3.0.7"
+version = "3.0.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
+checksum = "6680de5231bd6ee4c6191b8a1325daa282b415391ec9d3a37bd34f2060dc73fa"
 dependencies = [
  "anstyle",
- "once_cell",
+ "once_cell_polyfill",
  "windows-sys 0.59.0",
 ]
 
@@ -209,14 +209,6 @@ dependencies = [
  "syn 2.0.101",
 ]
 
-[[package]]
-name = "assert_no_alloc"
-version = "1.1.2"
-dependencies = [
- "backtrace",
- "log",
-]
-
 [[package]]
 name = "async-io"
 version = "2.4.0"
@@ -2130,6 +2122,8 @@ dependencies = [
 name = "hoonc"
 version = "0.2.0"
 dependencies = [
+ "bincode",
+ "blake3",
  "bytes",
  "clap",
  "dirs",
@@ -2138,8 +2132,10 @@ dependencies = [
  "nockvm",
  "nockvm_macros",
  "tempfile",
+ "thiserror 2.0.12",
  "tokio",
  "tracing",
+ "tracing-subscriber",
  "walkdir",
 ]
 
@@ -2756,6 +2752,7 @@ dependencies = [
  "libp2p-mdns",
  "libp2p-memory-connection-limits",
  "libp2p-metrics",
+ "libp2p-peer-store",
  "libp2p-ping",
  "libp2p-quic",
  "libp2p-request-response",
@@ -2940,6 +2937,16 @@ dependencies = [
  "web-time",
 ]
 
+[[package]]
+name = "libp2p-peer-store"
+version = "0.1.0"
+source = "git+https://github.com/libp2p/rust-libp2p.git?rev=da0017ee887a868e231ed78c7de892779c17800d#da0017ee887a868e231ed78c7de892779c17800d"
+dependencies = [
+ "libp2p-core",
+ "libp2p-swarm",
+ "lru",
+]
+
 [[package]]
 name = "libp2p-ping"
 version = "0.46.0"
@@ -3451,7 +3458,6 @@ name = "nockapp"
 version = "0.1.0"
 dependencies = [
  "anyhow",
- "assert_no_alloc",
  "async-trait",
  "axum 0.8.4",
  "bincode",
@@ -3475,6 +3481,8 @@ dependencies = [
  "opentelemetry_sdk",
  "rand 0.8.5",
  "serde",
+ "signal-hook",
+ "signal-hook-tokio",
  "tempfile",
  "termimad",
  "thiserror 2.0.12",
@@ -3496,6 +3504,7 @@ dependencies = [
  "bs58",
  "clap",
  "equix",
+ "futures",
  "hoonc",
  "kernels",
  "libp2p",
@@ -3580,7 +3589,6 @@ dependencies = [
 name = "nockvm"
 version = "0.1.0"
 dependencies = [
- "assert_no_alloc",
  "autotools",
  "bitvec",
  "cc",
@@ -3611,7 +3619,6 @@ version = "0.1.0"
 dependencies = [
  "aes",
  "aes-siv",
- "assert_no_alloc",
  "curve25519-dalek",
  "ed25519-dalek",
  "ibig",
@@ -3769,6 +3776,15 @@ version = "1.21.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
 
+[[package]]
+name = "once_cell_polyfill"
+version = "1.70.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2611b99ab098a31bdc8be48b4f1a285ca0ced28bd5b4f23e45efa8c63b09efa5"
+dependencies = [
+ "once_cell",
+]
+
 [[package]]
 name = "oorandom"
 version = "11.1.5"
@@ -4881,6 +4897,18 @@ dependencies = [
  "libc",
 ]
 
+[[package]]
+name = "signal-hook-tokio"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "213241f76fb1e37e27de3b6aa1b068a2c333233b59cca6634f634b80a27ecf1e"
+dependencies = [
+ "futures-core",
+ "libc",
+ "signal-hook",
+ "tokio",
+]
+
 [[package]]
 name = "signature"
 version = "2.2.0"

+ 1 - 11
Makefile

@@ -83,20 +83,10 @@ build-hoon-all: nuke-assets update-hoonc ensure-dirs build-trivial $(HOON_TARGET
 build-hoon: ensure-dirs update-hoonc $(HOON_TARGETS)
 	$(call show_env_vars)
 
-.PHONY: run-nockchain-leader
-run-nockchain-leader:  # Run nockchain node in leader mode
-	$(call show_env_vars)
-	mkdir -p test-leader && cd test-leader && rm -f nockchain.sock && RUST_BACKTRACE=1 cargo run --release --bin nockchain -- --fakenet --genesis-leader --npc-socket nockchain.sock --mining-pubkey $(MINING_PUBKEY) --bind /ip4/0.0.0.0/udp/3005/quic-v1 --peer /ip4/127.0.0.1/udp/3006/quic-v1 --new-peer-id --no-default-peers
-
-.PHONY: run-nockchain-follower
-run-nockchain:  # Run a nockchain node in follower mode with a mining pubkey
-	$(call show_env_vars)
-	mkdir -p miner-node && cd miner-node && rm -f nockchain.sock && RUST_BACKTRACE=1 cargo run --release --bin nockchain -- --fakenet --genesis-watcher --npc-socket nockchain.sock --mining-pubkey $(MINING_PUBKEY) --bind /ip4/0.0.0.0/udp/3006/quic-v1 --peer /ip4/127.0.0.1/udp/3005/quic-v1 --new-peer-id --no-default-peers
-
 .PHONY: run-nockchain
 run-nockchain:  # Run a nockchain node in follower mode with a mining pubkey
 	$(call show_env_vars)
-	mkdir -p miner-node && cd miner-node && rm -f nockchain.sock && RUST_BACKTRACE=1 cargo run --release --bin nockchain -- --npc-socket nockchain.sock --mining-pubkey $(MINING_PUBKEY) --bind /ip4/0.0.0.0/udp/3006/quic-v1
+	mkdir -p miner-node && cd miner-node && rm -f nockchain.sock && RUST_BACKTRACE=1 cargo run --release --bin nockchain -- --npc-socket nockchain.sock --mining-pubkey $(MINING_PUBKEY) --bind /ip4/0.0.0.0/udp/3006/quic-v1 --mine
 
 HOON_SRCS := $(find hoon -type file -name '*.hoon')