Coder Social home page Coder Social logo

nectar's People

Contributors

bonomat avatar bors[bot] avatar d4nte avatar da-kami avatar luckysori avatar rishflab avatar thomaseizinger avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

thomaseizinger

nectar's Issues

Nectar does not properly restart the swap execution after `respawn`ing an unfinished swap

Setup:

  1. Take SELL order in taker UI
  2. Swap started between taker cnd and nectar.
  3. cnd redeems Bitcoin and yields swap finished
  4. Nectar gets stuck looking for cnd's redeem.
  5. Kill nectar.
  6. After restarting Nectar it does not properly trigger swap execution in respawn.

Quick investigation yielded, that this statement is causing problems:

Respawn triggers swap execution:

nectar/src/command/trade.rs

Lines 259 to 291 in e873a48

async fn execute_swap(
db: Arc<Database>,
bitcoin_wallet: Arc<bitcoin::Wallet>,
ethereum_wallet: Arc<ethereum::Wallet>,
bitcoin_connector: Arc<comit::btsieve::bitcoin::BitcoindConnector>,
ethereum_connector: Arc<comit::btsieve::ethereum::Web3Connector>,
mut finished_swap_sender: Sender<FinishedSwap>,
swap: SwapKind,
) -> anyhow::Result<()> {
db.insert_swap(swap.clone()).await?;
swap.execute(
Arc::clone(&db),
Arc::clone(&bitcoin_wallet),
Arc::clone(&ethereum_wallet),
Arc::clone(&bitcoin_connector),
Arc::clone(&ethereum_connector),
)
.await?;
let _ = finished_swap_sender
.send(FinishedSwap::new(
swap.clone(),
swap.params().taker,
Local::now(),
))
.await
.map_err(|_| {
tracing::trace!("Error when sending execution finished from sender to receiver.")
});
Ok(())
}

But we fail when calling the insert statement on the DB. The actual execution is never triggered.

This is most probably because we run into the Ok path when loading the swap.

nectar/src/swap/db.rs

Lines 69 to 95 in 713199d

pub async fn insert_swap(&self, swap: SwapKind) -> anyhow::Result<()> {
let swap_id = swap.swap_id();
let stored_swap = self.get_swap(&swap_id);
match stored_swap {
Ok(_) => Err(anyhow!("Swap is already stored")),
Err(_) => {
// TODO: Consider using https://github.com/3Hren/msgpack-rust instead
let key = serialize(&swap_id)?;
let swap: Swap = swap.into();
let new_value = serialize(&swap).context("Could not serialize new swap value")?;
self.db
.compare_and_swap(key, Option::<Vec<u8>>::None, Some(new_value))
.context("Could not write in the DB")?
.context("Stored swap somehow changed, aborting saving")?;
self.db
.flush_async()
.await
.map(|_| ())
.context("Could not flush db")
}
}
}

However, I never see the error anyhow!("Swap is already stored") - how is this lost? Sync db vs async problem?

Did not investigate further from there.

Better `Rate` model

Note: In an attempt to document this closer to the code and have proper highlighting I decided to write a ticket instead of a ToDo on Basecamp. Please don't hate me for that :)

Problem

Rate, Order and Spread are not aligned (which is a problem on top of this ticket).

To fix this I would propose to get the Rate model fixed first and then see how/if we want to change Order and Spread.

The Rate is currently depicted like this:

nectar/src/markets.rs

Lines 9 to 15 in 44cd27c

#[derive(Debug, Copy, Clone, PartialEq)]
pub struct Rate {
trading_pair: TradingPair,
position: Position,
rate: f64,
timestamp: DateTime<Utc>,
}

I would generally suggest to stick to bid and ask for rates and buy and sell for orders. Because buy and sell are order positions, whereas the rate is independent of the order and expressed the bid and ask price for a trading pair.

This is an attempt to iterate on the model to come up with a better one. I want to document this choice and put it up for discussion first, because I feel otherwise the model will not improve :)

Goal

The Rate should include enough information to crate orders for both positions (both buy and sell orders).

Have a more uniform model that adheres to the actual meaning of certain terms.

Suggestion:

I came to the conclusion that the Rate is agnostic of the order. It's probably better to stick to bid/ask and not buy/sell to avoid confusion.
Only the order has to decide which part of the rate (bid/ask) is relevant to come up with the correct amounts.

Depict the Rate similar to Kraken (they actually did think about it when they modelled it...) so it is relatable what we are doing.

Suggested:

#[derive(Debug, Copy, Clone, PartialEq)]
pub struct Rate {
    trading_pair: TradingPair,
    bid: f64,
	ask: f64,
    timestamp: DateTime<Utc>,
}

Note that we don't have to use f64, but could also depict as satoshi to USD-millicents (as DAI represents USD), but that is a different discussion that can be solved at a later point.

Investigate nectar missing swap events (that are properly detected on cnd's side)

Setup:

  1. Take SELL order in taker UI
  2. Swap started between taker cnd and nectar.
  3. cnd redeems Bitcoin and yields swap finished
  4. Nectar gets stuck looking for cnd's redeem.

The redeem is properly detected on on cnd's side (yielded swap finished). Nectar kept looking for the transaction.

I noticed this behaviour on multiple occasions. My hunch, that Nectar somehow does not properly initializes the timestamp for watching transactions for btsieve, could not be proven to be the problem, we seem to set that correctly:

nectar/src/network.rs

Lines 449 to 529 in e873a48

let swap = match order.position {
// Bob is buying (=redeeming) bitcoin (funding DAI on beta, redeeming bitcoin on alpha)
comit::network::Position::Buy => {
let redeem_identity = identity::Bitcoin::from_secret_key(
&crate::SECP,
&maker_bitcoin_transient_sk,
);
let hbit_params = hbit::Params::new(
hbit::SharedParams {
asset: order.bitcoin_amount,
redeem_identity,
refund_identity: taker_bitcoin_identity,
expiry: order.bitcoin_absolute_expiry.into(),
secret_hash,
network: order.bitcoin_ledger.into(),
},
maker_bitcoin_transient_sk,
);
let herc20_params = herc20::Params {
asset: asset::Erc20::new(
order.token_contract,
order.ethereum_amount.clone(),
),
redeem_identity: taker_ethereum_identity,
refund_identity: maker_ethereum_identity,
expiry: order.ethereum_absolute_expiry.into(),
secret_hash,
chain_id: order.ethereum_ledger.chain_id,
};
SwapKind::HbitHerc20(SwapParams {
hbit_params,
herc20_params,
secret_hash,
start_of_swap: Utc::now().naive_local(),
swap_id: crate::SwapId::default(),
taker,
})
}
// Bob is selling (=funding) bitcoin (funding bitcoin on beta, redeeming DAI on alpha)
comit::network::Position::Sell => {
let refund_identity = identity::Bitcoin::from_secret_key(
&crate::SECP,
&maker_bitcoin_transient_sk,
);
let hbit_params = hbit::Params::new(
hbit::SharedParams {
asset: order.bitcoin_amount,
redeem_identity: taker_bitcoin_identity,
refund_identity,
expiry: order.bitcoin_absolute_expiry.into(),
secret_hash,
network: order.bitcoin_ledger.into(),
},
maker_bitcoin_transient_sk,
);
let herc20_params = herc20::Params {
asset: asset::Erc20::new(
order.token_contract,
order.ethereum_amount.clone(),
),
redeem_identity: maker_ethereum_identity,
refund_identity: taker_ethereum_identity,
expiry: order.ethereum_absolute_expiry.into(),
secret_hash,
chain_id: order.ethereum_ledger.chain_id,
};
SwapKind::Herc20Hbit(SwapParams {
hbit_params,
herc20_params,
secret_hash,
start_of_swap: Utc::now().naive_local(),
swap_id: crate::SwapId::default(),
taker,
})
}
};

It could be, that we somehow set the timestamp different when starting to look for redeem?

Did not investigate further.

Investigate nectar closing connection with cnd

Setup

System: MacOS Catalina 10.15.5

  1. start cnd
  2. start nectar
  3. Dial from cnd to nectar (using nectar's port and localhost IP-adr)

Nectar's rate update (and hence order publication) set to 10 minutes.

on nectar branch https://github.com/coblox/nectar/tree/new-orderbook

Behaviour

The connection between Nectar and cnd is just closed after 10 minutes.

Note that this always happens at the moment, not matter if during, after swap execution, or just order fetching.
Note that Nectar was set to publish orders only every 10 minutes (fetch rate after 10 minutes and place new order based on it). This might be related, but not necessarily.

Example logs where cnd dials nectar and then just runs fetching orders until connection is closed is below.

cnd:

Aug 12 15:14:44.617  INFO http: - "POST /dial HTTP/1.1" 200 "-" "PostmanRuntime/7.26.2" 1.74729ms    
Aug 12 15:14:44.652 DEBUG comit::network::orderbook::order_source: connected to 12D3KooWH5U7zEknZCU5rDgz5zLPxRFzKrpe8fWvBVNUAbDRuf5J, attempting to get orders
Aug 12 15:14:44.675 DEBUG comit::network::orderbook::order_source: fetched 2 orders from 12D3KooWH5U7zEknZCU5rDgz5zLPxRFzKrpe8fWvBVNUAbDRuf5J

...

12D3KooWH5U7zEknZCU5rDgz5zLPxRFzKrpe8fWvBVNUAbDRuf5J
Aug 12 15:20:32.278 DEBUG comit::network::orderbook::order_source: fetched 2 orders from 12D3KooWH5U7zEknZCU5rDgz5zLPxRFzKrpe8fWvBVNUAbDRuf5J
Aug 12 15:20:38.275 DEBUG comit::network::orderbook::order_source: fetched 2 orders from 12D3KooWH5U7zEknZCU5rDgz5zLPxRFzKrpe8fWvBVNUAbDRuf5J
Aug 12 15:20:43.277 DEBUG comit::network::orderbook::order_source: fetched 2 orders from 12D3KooWH5U7zEknZCU5rDgz5zLPxRFzKrpe8fWvBVNUAbDRuf5J
Aug 12 15:20:48.278 DEBUG comit::network::orderbook::order_source: fetched 2 orders from 12D3KooWH5U7zEknZCU5rDgz5zLPxRFzKrpe8fWvBVNUAbDRuf5J
Aug 12 15:20:53.831  INFO comit::network::orderbook::order_source: removing 12D3KooWH5U7zEknZCU5rDgz5zLPxRFzKrpe8fWvBVNUAbDRuf5J as a potential order source because we failed to establish a connection to them: ConnectionClosed

nectar:

/Users/dakami/.cargo/bin/cargo run --color=always --package nectar --bin nectar -- --config /Users/dakami/CoBloX/repos/nectar/demo/example-config.toml trade
    Finished dev [unoptimized + debuginfo] target(s) in 1.18s
     Running `target/debug/nectar --config /Users/dakami/CoBloX/repos/nectar/demo/example-config.toml trade`
Using config file /Users/dakami/CoBloX/repos/nectar/demo/example-config.toml
Aug 12 15:10:47.531  INFO nectar::trace: Initialized tracing with level: TRACE
Aug 12 15:10:47.536  INFO nectar::config::seed: Read in seed from file: /Users/dakami/Library/Application Support/nectar/seed.pem
Aug 12 15:10:48.248  INFO nectar::network: Started with peer-id: 12D3KooWH5U7zEknZCU5rDgz5zLPxRFzKrpe8fWvBVNUAbDRuf5J
Aug 12 15:10:48.249  INFO nectar::network: Started with peer-id: 12D3KooWH5U7zEknZCU5rDgz5zLPxRFzKrpe8fWvBVNUAbDRuf5J
Aug 12 15:10:48.249  INFO libp2p_gossipsub::behaviour: Subscribed to topic: /comit/makers    
Aug 12 15:10:48.250  INFO nectar::network: Publishing new order: Sell, 0.09990725 BTC, 1166.76881727 DAI
Aug 12 15:10:48.251  INFO comit::network::orderbook::orders: created new order with id d44812da-e862-407d-9a6d-79b01f883d75
Aug 12 15:10:48.251  INFO nectar::network: Publishing new order: Buy, 0.0009464 BTC, 10 DAI
Aug 12 15:10:48.251  INFO comit::network::orderbook::orders: created new order with id 86340909-087f-4014-847f-d9c0cb68dd7a
Aug 12 15:10:48.252  INFO nectar::command::trade: NewListenAddr("/ip4/127.0.0.1/tcp/9940")
Aug 12 15:10:48.252  INFO nectar::command::trade: NewListenAddr("/ip6/::1/tcp/9940")
Aug 12 15:10:48.252  INFO nectar::command::trade: NewListenAddr("/ip4/10.1.20.38/tcp/9940")
Aug 12 15:14:44.618  INFO nectar::command::trade: IncomingConnection { local_addr: "/ip4/127.0.0.1/tcp/9940", send_back_addr: "/ip4/127.0.0.1/tcp/53972" }
Aug 12 15:14:44.638 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:14:44.642 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:14:44.642  INFO libp2p_gossipsub::behaviour: New peer connected: PeerId("12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR")    
Aug 12 15:14:44.642 DEBUG comit::network::orderbook::order_source: connected to 12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR, attempting to get orders
Aug 12 15:14:44.642  INFO nectar::command::trade: ConnectionEstablished { peer_id: PeerId("12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR"), endpoint: Listener { local_addr: "/ip4/127.0.0.1/tcp/9940", send_back_addr: "/ip4/127.0.0.1/tcp/53972" }, num_established: 1 }
Aug 12 15:14:44.655 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:14:44.655 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:14:44.657 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:14:44.658 DEBUG comit::network::orderbook::order_source: fetched 0 orders from 12D3KooWJd

...

Aug 12 15:20:43.275 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:20:48.272 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:20:48.274 DEBUG comit::network::orderbook::order_source: fetched 0 orders from 12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR
Aug 12 15:20:48.275 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:20:48.758  INFO nectar::network: Publishing new order: Sell, 0.09990725 BTC, 1167.32480111625 DAI
Aug 12 15:20:48.758  INFO comit::network::orderbook::orders: created new order with id 04596aef-3389-490f-94de-3df43f3ffe96
Aug 12 15:20:48.758  INFO nectar::network: Publishing new order: Buy, 0.00094595 BTC, 10 DAI
Aug 12 15:20:48.758  INFO comit::network::orderbook::orders: created new order with id 84d70acd-8abe-4044-b20e-9b08bc4bf33a
Aug 12 15:20:53.829 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:20:53.832  INFO nectar::command::trade: ConnectionClosed { peer_id: PeerId("12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR"), endpoint: Listener { local_addr: "/ip4/127.0.0.1/tcp/9940", send_back_addr: "/ip4/127.0.0.1/tcp/53972" }, num_established: 0, cause: IO(Custom { kind: Other, error: "yamux error: connection is closed" }) }
Aug 12 15:20:53.833  INFO comit::network::orderbook::order_source: removing 12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR as a potential order source because we failed to establish a connection to them: ConnectionClosed
Aug 12 15:30:50.646  INFO nectar::network: Publishing new order: Sell, 0.09990725 BTC, 1162.5517322475 DAI
Aug 12 15:30:50.646  INFO comit::network::orderbook::orders: created new order with id f2306d19-3253-4539-8427-3272017e034a
Aug 12 15:30:50.646  INFO nectar::network: Publishing new order: Buy, 0.00094983 BTC, 10 DAI
Aug 12 15:30:50.647  INFO comit::network::orderbook::orders: created new order with id 0454ac4f-32f8-45e3-838c-4b744fc9e86a

Another example log where it happens after (successful) swap execution:

cnd:

Aug 12 14:49:59.766  INFO cnd::herc20: yielded event Redeemed
Aug 12 14:49:59.766  INFO cnd::herc20: swap finished
Aug 12 14:50:00.693  INFO http: - "GET /swaps/88fa1e28-c944-439d-9da5-9ce1d6ec9ee2 HTTP/1.1" 200 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.130 Electron/7.2.4 Safari/537.36" 2.486211ms    
Aug 12 14:50:01.497  INFO comit::network::orderbook::order_source: removing 12D3KooWH5U7zEknZCU5rDgz5zLPxRFzKrpe8fWvBVNUAbDRuf5J as a potential order source because we failed to establish a connection to them: ConnectionClosed
Aug 12 14:50:01.728  INFO http: - "GET /swaps/88fa1e28-c944-439d-9da5-9ce1d6ec9ee2 HTTP/1.1" 200 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.130 Electron/7.2.4 Safari/537.36" 1.567835ms    

nectar:

Aug 12 14:49:59.222 TRACE watch_redeem: comit::btsieve::ethereum::web3_connector: Fetched receipt from web3: 0x2132227e48884273290987a980053d2130a0354809e470589d7f46f8c3f559b1
Aug 12 14:49:59.222  INFO watch_redeem: comit::btsieve::ethereum: transaction matched
Aug 12 14:49:59.583  INFO nectar::network: Publishing new order: Buy, 0.00094626 BTC, 10 DAI
Aug 12 14:49:59.583  INFO comit::network::orderbook::orders: created new order with id 4cc393f5-0a55-40b9-a468-2642fd2f73ce
Aug 12 14:49:59.648  INFO nectar::network: Publishing new order: Sell, 0.09990725 BTC, 1166.941906580625 DAI
Aug 12 14:49:59.648  INFO comit::network::orderbook::orders: created new order with id 7bc8021f-6836-4b20-be38-18f678b853f5
Aug 12 14:50:01.494 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 14:50:01.497  INFO nectar::command::trade: ConnectionClosed { peer_id: PeerId("12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR"), endpoint: Listener { local_addr: "/ip4/127.0.0.1/tcp/9940", send_back_addr: "/ip4/127.0.0.1/tcp/61576" }, num_established: 0, cause: IO(Custom { kind: Other, error: "yamux error: decode error: i/o error: I/O error: Connection reset by peer (os error 54)" }) }
Aug 12 14:59:00.061  INFO nectar::network: Publishing new order: Sell, 0.09990725 BTC, 1167.76539208875 DAI
Aug 12 14:59:00.061  INFO comit::network::orderbook::orders: created new order with id 6c4e697d-3c90-4ec3-ae6d-aa33b4727d8a
Aug 12 14:59:00.061  INFO nectar::network: Publishing new order: Buy, 0.00094559 BTC, 10 DAI
Aug 12 14:59:00.062  INFO comit::network::orderbook::orders: created new order with id 134c308c-827e-4c81-9656-3d77a6a14015
Aug 12 15:01:01.795  INFO nectar::command::trade: IncomingConnection { local_addr: "/ip4/127.0.0.1/tcp/9940", send_back_addr: "/ip4/127.0.0.1/tcp/49171" }
Aug 12 15:01:01.807 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:01:01.808 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:01:01.808  INFO libp2p_gossipsub::behaviour: New peer connected: PeerId("12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR")    
Aug 12 15:01:01.809 DEBUG comit::network::orderbook::order_source: connected to 12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR, attempting to get orders
Aug 12 15:01:01.809  INFO nectar::command::trade: ConnectionEstablished { peer_id: PeerId("12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR"), endpoint: Listener { local_addr: "/ip4/127.0.0.1/tcp/9940", send_back_addr: "/ip4/127.0.0.1/tcp/49171" }, num_established: 1 }
Aug 12 15:01:01.818 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:01:01.818 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:01:01.820 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:01:01.822 DEBUG comit::network::orderbook::order_source: fetched 0 orders from 12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR
Aug 12 15:01:01.825 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:01:01.835  INFO nectar::command::trade: ConnectionClosed { peer_id: PeerId("12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR"), endpoint: Listener { local_addr: "/ip4/127.0.0.1/tcp/9940", send_back_addr: "/ip4/127.0.0.1/tcp/49171" }, num_established: 0, cause: IO(Custom { kind: Other, error: "yamux error: connection is closed" }) }
Aug 12 15:01:23.049  INFO nectar::command::trade: IncomingConnection { local_addr: "/ip4/127.0.0.1/tcp/9940", send_back_addr: "/ip4/127.0.0.1/tcp/49301" }
Aug 12 15:01:23.066 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:01:23.085 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:01:23.086  INFO libp2p_gossipsub::behaviour: New peer connected: PeerId("12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR")    
Aug 12 15:01:23.086 DEBUG comit::network::orderbook::order_source: connected to 12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR, attempting to get orders
Aug 12 15:01:23.086  INFO nectar::command::trade: ConnectionEstablished { peer_id: PeerId("12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR"), endpoint: Listener { local_addr: "/ip4/127.0.0.1/tcp/9940", send_back_addr: "/ip4/127.0.0.1/tcp/49301" }, num_established: 1 }
Aug 12 15:01:23.116 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:01:23.119 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:01:23.121 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:01:23.122 DEBUG comit::network::orderbook::order_source: fetched 0 orders from 12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR
Aug 12 15:01:23.123 DEBUG libp2p_core::upgrade::apply: Successfully applied negotiated protocol    
Aug 12 15:01:23.173  INFO nectar::command::trade: ConnectionClosed { peer_id: PeerId("12D3KooWJdBwGAohCJbaZDFurkFkVkLuXCQmSa7wJ7cVMgujLJRR"), endpoint: Listener { local_addr: "/ip4/127.0.0.1/tcp/9940", send_back_addr: "/ip4/127.0.0.1/tcp/49301" }, num_established: 0, cause: IO(Custom { kind: Other, error: "yamux error: connection is closed" }) }

Expected Behaviour

A stable connection over long period of time between Nectar and cnd.
Nectar should only close the connection if there is a problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.