Skip to content

Commit

Permalink
try dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
erhant committed Oct 8, 2024
1 parent 84895b8 commit 1edf491
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 62 deletions.
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ DKN_P2P_LISTEN_ADDR=/ip4/0.0.0.0/tcp/4001
DKN_RELAY_NODES=
# Comma-separated static bootstrap nodes
DKN_BOOTSTRAP_NODES=

# Set to a number of seconds to wait before exiting, only use in profiling build!
# Otherwise, leave this empty.
DKN_EXIT_TIMEOUT=

## Open AI (if used, required) ##
OPENAI_API_KEY=

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build_dev_container.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Create Dev Image
on:
push:
branches: ["master"]
paths:
- "src/**"
- "Cargo.lock"
- "Cargo.toml"
- "Dockerfile"
- "compose.yml"
branches: ["master", "erhant/subcrates"]
# paths:
# - "src/**"
# - "Cargo.lock"
# - "Cargo.toml"
# - "Dockerfile"
# - "compose.yml"

jobs:
build-and-push:
Expand Down
File renamed without changes.
37 changes: 0 additions & 37 deletions compute/.env.example

This file was deleted.

6 changes: 2 additions & 4 deletions p2p/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ use std::time::Duration;
use libp2p::identity::{Keypair, PeerId, PublicKey};
use libp2p::kad::store::MemoryStore;
use libp2p::StreamProtocol;
use libp2p::{autonat, dcutr, gossipsub, identify, kad, relay, swarm::NetworkBehaviour};
use libp2p::{autonat, dcutr, gossipsub, identify, kad, relay};

// use crate::versioning::{P2P_KADEMLIA_PROTOCOL, P2P_PROTOCOL_STRING};

#[derive(NetworkBehaviour)]
#[derive(libp2p::swarm::NetworkBehaviour)]
pub struct DriaBehaviour {
pub(crate) relay: relay::client::Behaviour,
pub(crate) gossipsub: gossipsub::Behaviour,
Expand Down
6 changes: 6 additions & 0 deletions p2p/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@ pub struct DriaP2PClient {
/// Last time the peer count was refreshed.
peer_last_refreshed: Instant,
/// Identity protocol string to be used for the Identity behaviour.
///
/// This is usually `dria/{version}`.
identity_protocol: String,
/// Kademlia protocol, must match with other peers in the network.
///
/// This is usually `/dria/kad/{version}`, notice the `/` at the start
/// which is mandatory for a `StreamProtocol`.
kademlia_protocol: StreamProtocol,
}

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

/// Number of seconds between refreshing the Kademlia DHT.
Expand Down
13 changes: 0 additions & 13 deletions workflows/.env.example

This file was deleted.

0 comments on commit 1edf491

Please sign in to comment.