Skip to content

Commit

Permalink
doc: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkingLee committed Dec 23, 2023
1 parent 7987692 commit de6b1eb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
.PHONY: run-dev build-release build-default purge-dev test
.PHONY: run-dev build-release build-default purge-dev test run-light

run-dev:
./target/release/redot-node --dev --rpc-external

run-light:
./target/release/melodot-light

build:
cargo build --release

Expand Down
6 changes: 3 additions & 3 deletions crates/rc-validator-network/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use libp2p::{
kad::{store::MemoryStore, Kademlia, KademliaConfig, KademliaEvent},
mdns::{tokio::Behaviour as TokioMdns, Config as MdnsConfig, Event as MdnsEvent},
ping::{Behaviour as Ping, Event as PingEvent},
swarm::NetworkBehaviour,
swarm::NetworkBehaviour, identity::Keypair,
};

pub struct BehaviorConfig {
Expand Down Expand Up @@ -60,14 +60,14 @@ pub struct Behavior {

impl Behavior {
/// Creates a new [`Behavior`] instance.
pub fn new(config: BehaviorConfig) -> Result<Self> {
pub fn new(config: BehaviorConfig, keypair: &Keypair) -> Result<Self> {
let mdns = TokioMdns::new(MdnsConfig::default())?;

let kademlia = Kademlia::with_config(config.peer_id, config.kad_store, config.kademlia);

let gossipsub_config = GossipsubConfig::default();
let gossipsub =
Gossipsub::new(MessageAuthenticity::Author(config.peer_id), gossipsub_config)
Gossipsub::new(MessageAuthenticity::Signed(keypair.clone()), gossipsub_config)
.expect("Correct Gossipsub configuration");

Ok(Self {
Expand Down
2 changes: 1 addition & 1 deletion crates/rc-validator-network/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub fn create(
identify,
kademlia: KademliaConfig::default(),
kad_store: MemoryStore::new(local_peer_id),
})?;
},&keypair)?;

let mut swarm = SwarmBuilder::with_tokio_executor(transport, behaviour, local_peer_id)
.max_negotiating_inbound_streams(SWARM_MAX_NEGOTIATING_INBOUND_STREAMS)
Expand Down
2 changes: 1 addition & 1 deletion redlight/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub const DEFAULT_RPC_LISTEN_ADDR: &str = "127.0.0.1:4177";
const DEV_RPC_URL: &str = "ws://127.0.0.1:9944";
const TEST_RPC_URL: &str = "wss://dev.melodot.io:9944";

const DEFAULT_RPC_URL: &str = "ws://127.0.0.1:9944";
const DEFAULT_RPC_URL: &str = "ws://127.0.0.1:36565";

/// Command line interface configuration
#[derive(Parser, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion redlight/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub async fn run(config: &cli::Config) -> anyhow::Result<()> {
},
};

let das_client = DasClient::new("http://example.com/rpc".to_string());
let das_client = DasClient::new("http://127.0.0.1:4177".to_string());

tokio::spawn(network_worker.run());
tokio::spawn(async move {
Expand Down

0 comments on commit de6b1eb

Please sign in to comment.