Skip to content

Commit 1edf491

Browse files
committed
try dev build
1 parent 84895b8 commit 1edf491

File tree

7 files changed

+19
-62
lines changed

7 files changed

+19
-62
lines changed

.env.example

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ DKN_P2P_LISTEN_ADDR=/ip4/0.0.0.0/tcp/4001
1616
DKN_RELAY_NODES=
1717
# Comma-separated static bootstrap nodes
1818
DKN_BOOTSTRAP_NODES=
19-
19+
# Set to a number of seconds to wait before exiting, only use in profiling build!
20+
# Otherwise, leave this empty.
21+
DKN_EXIT_TIMEOUT=
22+
2023
## Open AI (if used, required) ##
2124
OPENAI_API_KEY=
2225

.github/workflows/build_dev_container.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Create Dev Image
22
on:
33
push:
4-
branches: ["master"]
5-
paths:
6-
- "src/**"
7-
- "Cargo.lock"
8-
- "Cargo.toml"
9-
- "Dockerfile"
10-
- "compose.yml"
4+
branches: ["master", "erhant/subcrates"]
5+
# paths:
6+
# - "src/**"
7+
# - "Cargo.lock"
8+
# - "Cargo.toml"
9+
# - "Dockerfile"
10+
# - "compose.yml"
1111

1212
jobs:
1313
build-and-push:
File renamed without changes.

compute/.env.example

Lines changed: 0 additions & 37 deletions
This file was deleted.

p2p/src/behaviour.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ use std::time::Duration;
55
use libp2p::identity::{Keypair, PeerId, PublicKey};
66
use libp2p::kad::store::MemoryStore;
77
use libp2p::StreamProtocol;
8-
use libp2p::{autonat, dcutr, gossipsub, identify, kad, relay, swarm::NetworkBehaviour};
8+
use libp2p::{autonat, dcutr, gossipsub, identify, kad, relay};
99

10-
// use crate::versioning::{P2P_KADEMLIA_PROTOCOL, P2P_PROTOCOL_STRING};
11-
12-
#[derive(NetworkBehaviour)]
10+
#[derive(libp2p::swarm::NetworkBehaviour)]
1311
pub struct DriaBehaviour {
1412
pub(crate) relay: relay::client::Behaviour,
1513
pub(crate) gossipsub: gossipsub::Behaviour,

p2p/src/client.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,18 @@ pub struct DriaP2PClient {
2424
/// Last time the peer count was refreshed.
2525
peer_last_refreshed: Instant,
2626
/// Identity protocol string to be used for the Identity behaviour.
27+
///
28+
/// This is usually `dria/{version}`.
2729
identity_protocol: String,
2830
/// Kademlia protocol, must match with other peers in the network.
31+
///
32+
/// This is usually `/dria/kad/{version}`, notice the `/` at the start
33+
/// which is mandatory for a `StreamProtocol`.
2934
kademlia_protocol: StreamProtocol,
3035
}
3136

3237
/// Number of seconds before an idle connection is closed.
38+
/// TODO: default is 0, is 60 a good value?
3339
const IDLE_CONNECTION_TIMEOUT_SECS: u64 = 60;
3440

3541
/// Number of seconds between refreshing the Kademlia DHT.

workflows/.env.example

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)