ringsnetwork / rings Goto Github PK
View Code? Open in Web Editor NEWRings is a structured peer-to-peer network implementation using WebRTC, Chord DHT, and full WebAssembly (WASM) support.
License: GNU General Public License v3.0
Rings is a structured peer-to-peer network implementation using WebRTC, Chord DHT, and full WebAssembly (WASM) support.
License: GNU General Public License v3.0
value, visit_count, created_time, last_visit_time
When it reached max capacity size, it should be reduced/resized automatically, (sort by visit_count & last_visit_time).
So the trait may looks like
trait PersStorage {
fn useage(&self) -> u64 // in Mb
fn reduce(&self) -> Result<u64> // current usage
... (CURD, etc...)
}
#[cfg(feature = "wasm")]
mod storage {
struct PersStorage {}
}
#[cfg(not(feature = "wasm"))]
mod storage {
struct PersStorage {}
}
or
#[cfg(feature = "wasm")]
pub use wasm::IndexDBStroage as Stroage;
#[cfg(not(feature = "wasm"))]
pub use default::RedisStroage as Stroage;
#[cfg(feature = "wasm")]
mod wasm {
struct IDBStorage {}
}
#[cfg(not(feature = "wasm"))]
mod default {
struct RedisStorage {}
}
Just incorporate bns_is
into bns_node
A Msg:
{
data: String,
nonce: usize,
hash: sha256(data), // optional
did: String // (some eth addr for now),
sig: sign(hash, did)
}
There should have a module which provide:
fn sign(string, privkey) -> String
fn verify(string) -> bool // note that the pubkey is included in ECDSA signature (v, r, s)
2022-07-18T06:59:26 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T06:59:46 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:00:06 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:00:26 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:00:46 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:01:06 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:01:26 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:01:46 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:02:06 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:02:26 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:02:46 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:03:06 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:03:26 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:03:46 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:04:06 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:04:26 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:04:46 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:05:06 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:05:26 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:05:46 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:06:06 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:06:26 [ERROR] - failed to stabilize SwarmMissAddressInTable
2022-07-18T07:06:46 [ERROR] - failed to stabilize SwarmMissAddressInTable
Decouple the http services frombns-core/src/main.rs
to somehow like bns-node/src/discoveries/http.rs
.
In order to ensure a convergent implementation between WebAssembly (Wasm) and the native version, two principles should be followed:
More shared code: Both implementations should strive to have a larger portion of the codebase in common. This means implementing common functionalities, structures, and algorithms in a way that is shared between the two versions.
Minimizing differences: Any differences between the Wasm and native implementations should be kept to a minimum. This involves carefully identifying and isolating the areas where divergence is necessary due to technological constraints or platform-specific requirements.
The Processor/Client should use the same Config/ConfigBuilder: This means that both the Processor and Client components should utilize a shared Config or ConfigBuilder object for consistent configuration across the system. This helps maintain uniformity and ensures that both components have access to the same configuration settings.
Utilize the same method invocation approach, such as RPC: It is important to adopt a unified approach for invoking methods between different components. Using a consistent method invocation mechanism, such as Remote Procedure Calls (RPC), ensures that the Processor and Client can communicate and interact seamlessly, regardless of their underlying technologies or implementation details.
Use the same Logging module and Error handling module: Employing a common Logging module and Error handling module ensures consistency in logging practices and error management across the system. By utilizing the same logging framework and error handling mechanism, it becomes easier to track and troubleshoot issues, promoting code maintainability and efficient debugging.
A clear and concise description of any alternative solutions or features you've considered, and why you're proposed solution is better.
Add any other context or screenshots about the feature request here.
The Storage trait should support two function:
fn fetch_local(k: String) -> dyn Serialize.
async fn fetch_dht
-> dyn Serialize
then cached to local
cant install rings cargo on linux (zorian lite 16)
on linux (zorian lite 16)
sudo apt-get install protobuf-compiler
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install rings-node
expected rings cargo to install
error: failed to run custom build command for `rings-rpc v0.5.1`
Caused by:
process didn't exit successfully: `/tmp/cargo-installLaQRKw/release/build/rings-rpc-f327bde1df8b93af/build-script-build` (exit status: 101)
--- stderr
thread 'main' panicked at /home/nihil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prost-build-config-0.5.0/src/lib.rs:153:33:
Failed to compile proto files. Err: Custom { kind: Other, error: "protoc failed: rings_node.proto:117:14: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.\nrings_node.proto:125:14: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.\n" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `rings-node v0.5.1`, intermediate artifacts can be found at `/tmp/cargo-installLaQRKw`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
mentions
rings/crates/rpc/src/protos/rings_node.proto
Line 117 in 40e1661
bns_node daemon
bns_node connect <some http url>
bns_node sdp gen ----> <encoded sdp>
bns_node sdp connect <encoded sdp>
bns_node peer list
Handshake is slow because while a peer creating answer
, it has to test and ping all candidate pairs, (for my local test, with 3 candidates each peer, there are 3x3 times connection creating and pings).
Any solution?
We are currently using wasm_export
macro to prevent repeated code implementation for native and wasm.
But sadly it's not available for a function that return a Result with our customized Error type.
So, how to make the Result<T, rings_core::err::Error>
exportable for wasm-bindgen?
Waiting for discovery.
Although it's ugly, we can indeed avoid exporting a function that returns Result to the wasm environment.
I did that when implementing SessionManagerBuilder
.
I collected the logic that may return Result into the build
function and did not export this function.
The function that accepts SessionManager
created in wasm should receive a SessionManagerBuilder
instead, and then call the build
function inside the function.
Chord must be initialized with a ring containing a minimum of r +1
nodes, where r
is the length of each node’s list of successors. In fact, to be proven correct, a Chord network must maintain a “stable base” of r + 1
nodes that remain members of the network throughout its lifetime.
The Chord Paper defined the maintenance and use of finger tables
, which improve lookup speed by providing pointers that cross the ring like chords of a circle. Because finger tables are an optimization and they are built from successors and predecessors, correctness does not depend on them.
RemoteAction::FetchSuccessorList(Did)
After join operator, call FindSuccessor(did)
and FetchSuccessorList(Did)
immediately。
The loop is guaranteed to terminate before succList is empty, based on the assumption that successor lists are long enough so that each list contains at least one live node.
check_predecessor
.
ref: How to Make Chord Correct https://arxiv.org/pdf/1502.06461.pdf
#[tokio::test]
async fn test_31d_41d() -> Result<()> {
let did_1d = Did::from_str("0x32d9f459e066d1855b138d23733e4cd85fd3b7c7")?;
let did_2d = Did::from_str("0xc63fb6194b7f253404632fdce7c7ff1ce24b6ab3")?;
let did_31d = Did::from_str("0x99fee2794a7e3067bb97e17cb7d7fc551c596f9f")?;
let did_41d = Did::from_str("0x0298ba2b72ef040bbd99398f96594e8d8c0d0607")?;
let dht_1d = gen_pure_dht(did_1d).await?;
let dht_2d = gen_pure_dht(did_2d).await?;
let dht_31d = gen_pure_dht(did_31d).await?;
let dht_41d = gen_pure_dht(did_41d).await?;
dht_31d.join(did_1d)?;
dht_31d.join(did_2d)?;
dht_1d.join(did_31d)?;
dht_2d.join(did_31d)?;
{
let finger_31d = dht_31d.lock_finger()?;
assert!(finger_31d.contains(Some(did_1d)));
assert!(finger_31d.contains(Some(did_2d)));
}
let ret = dht_41d.join(did_31d).unwrap();
assert_eq!(
ret,
PeerRingAction::RemoteAction(did_31d, RemoteAction::FindSuccessorForConnect(did_41d))
);
{
let finger_31d = dht_31d.lock_finger().unwrap();
assert!(finger_31d.contains(Some(did_1d)));
assert!(finger_31d.contains(Some(did_2d)));
assert_eq!(finger_31d.closest_predecessor(did_41d), did_2d);
}
let ret = dht_31d.find_successor(did_41d).unwrap();
assert_eq!(
ret,
PeerRingAction::RemoteAction(did_2d, RemoteAction::FindSuccessor(did_41d))
);
dht_2d.join(did_1d)?;
{
let finger_2d = dht_2d.lock_finger().unwrap();
assert!(finger_2d.contains(Some(did_1d)), "{:?}", finger_2d.list());
}
let ret = dht_2d.find_successor(did_41d).unwrap();
assert_eq!(
ret,
PeerRingAction::Some(did_1d)
);
Ok(())
}
Maybe a HashMap<Addr, IceTransport>
?
Compiling bns-node v0.1.0 (/Users/ryan/Dev/bns/bns-node)
thread 'rustc' panicked at 'index out of bounds: the len is 55 but the index is 61', compiler/rustc_query_impl/src/on_disk_cache.rs:726:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.59.0-nightly (cfa3fe5af 2021-12-31) running on x86_64-apple-darwin
note: compiler flags: -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [codegen_fulfill_obligation] checking if `core::ops::function::FnOnce` fulfills its obligations
#1 [resolve_instance] resolving instance `<[closure@tokio::coop::with_budget<core::task::poll::Poll<core::result::Result<(), anyhow::Error>>, [closure@tokio::park::thread::CachedParkThread::block_on<core::future::from_generator::GenFuture<[static generator@src/main.rs:20:31: 55:2]>>::{closure#0}]>::{closure#0}] as core::ops::function::FnOnce<(&core::cell::Cell<tokio::coop::Budget>,)>>::call_once`
end of query stack
Hi,
Thanks for this interesting project
I searched in this repo and organization for any documentation about how to use or Bootstrap example but I didn't found and I stuck on how to use this.
there is another project called rings-fe, but I think that project needs to be updated to the latest version. Furthermore cant run a success message on that project (sorry for mention here).
so could you please provide any guidance about how to use it?
In Node/Processor:
impl Processor {
/// Generate Signature for Authorization
pub fn generate_signature(secret_key: &SecretKey) -> String {
let message = format!("rings-node: {}", secret_key.address().into_token());
let (signature, _recovery_id) = libsecp256k1::sign(
&libsecp256k1::Message::parse(&keccak256(message.as_bytes())),
secret_key,
);
base64::encode(signature.serialize())
}
/// verify signature
/// will throw error when signature is illegal
pub fn verify_signature(signature: &[u8], public_key: &PublicKey) -> Result<bool> {
let message = format!("rings-node: {}", public_key.address().into_token());
Ok(libsecp256k1::verify(
&libsecp256k1::Message::parse(&keccak256(message.as_bytes())),
&libsecp256k1::Signature::parse_standard_slice(
&base64::decode(signature).map_err(|_| Error::DecodeError)?,
)
.map_err(|_| Error::DecodeError)?,
&TryInto::<libsecp256k1::PublicKey>::try_into(*public_key)
.map_err(|_| Error::DecodeError)?,
))
}
...
}
The generate_signature
function actually generates a signature for "rings-node: ", which can be reused for replaying RPC calls.
The message for signing should include timestamp
and request_id
.
The signature is fixed, and the request/response can be replayed.
Hi,
Thanks for a great project!!!
i am trying hard to grasp how to establish a simple browser to browser communications example as well as a browser to native example.
I have read the documentation but i understand best through examples.
i have found your example here: https://github.com/RingsNetwork/rings-wasm-p2p but i couldnt get it past the initial handshake and could not send message or list peers.
i think i might need clarification on (and examples on):
my usecase for rings (or any other p2p) is making simple flows like this:
web clients write to server
server verifies data and adds to distributed db
web clients swarm on distributed db and get updates
for example:
web clients post documents containing "surplys items to be given away for free including a geocordinate of where to find them and an image"
server verifies the image is not NSFW and adds the document to the db
web clients replicate db in some way and gets the last added document
Provide any additional details here.
Rings DID::
executing
<script> function start() { document.getElementById("loading").style.visibility="visible"; }function done() {
document.getElementById("loading").style.visibility="hidden";
}
Create Offer SDP Accept Offer [SDP] and Create answer SDP Accept Answer [SDP] connect with [DID] list peers node info send message to [DID; MSG]
input
output
rings-wasm-p2p/:179
Rings DID::
executing
<script> function start() { document.getElementById("loading").style.visibility="visible"; }function done() {
document.getElementById("loading").style.visibility="hidden";
}
Create Offer SDP Accept Offer [SDP] and Create answer SDP Accept Answer [SDP] connect with [DID] list peers node info send message to [DID; MSG]
input
output
VM90:57 Provider {__wbg_ptr: 2621464}
VM100:57 Provider {__wbg_ptr: 2621464}
rings_node.js:1187 DEBUG crates/node/src/provider/mod.rs:133 request createOffer params: Array [String("0x432e3b128299d26686893ddb50A8D376a43A04C6")]
rings-wasm-p2p/:1 {offer: '82TFauPiYEj97DVKqvfScq9EGLh9VEEchA4vVh7eeD9DHnr7yE…qYC7YhuNJeJe1E39nZDp5Y3j5Cp9ZZbStxdnfvCL2Y91FCHWK'}
rings_node.js:1187 DEBUG crates/node/src/provider/mod.rs:133 request answerOffer params: Array [String("82TFauPiYEj97DVKqvfScq9EGLh9VEEchA4vVh7eeD9DHnr7yEh3GYaAEdX7sP4pP5HbURJ2kgZDZ111SqLLJEzNC74Pgutt1uhcuQCBxMMK4B1111zmM9zpT111111113d7BEcKx6JVutG8Yn2VxfPN7s9EBtF13YyV49Q7m8oAVybVDG9paKVdiqn9Q9v8FbetYQGTrF67m16buL8SqoGE8RzXGTrF67JKPx5KeHnepiFnYBDkv4F6MYJX7HGMCC6TTUMD8bFQEGiMgPeJeCFcdpxmx1HGMGAar4JUAHxyMJSdSHTF6QkQktooEG5KGmEMM8stJWHJS7bUV5XUcAZzHDfiMGCeCRt2KSX6zPDEQLAwrxkZvS8bMuD5ENC6UKUKdtsURHtqHbkJCEFCynj6PXtMSSN1UR9EJXAoEtCqhL8Sqm7uKsojHo7uqLLwJFaAEPxpwGVf7o9Yz4Yv2SHef9Pvkk29rEs29u2dKfYF8v8HnpLPMpYzT28ZY4CK6KvzuHm4kQpKXEXZAEYkqHh9adbK8xUL8PW5vT9ZfdhTp2LmdJU9vH8Hc9TKHyALiU1V1hH93ta26ez8iMJvkjdThniMeAa9RDhLxi8UHd7jximtcsVHw2rn1ZjBx4AEamGJVZTjd6PLqy8esdp4AES7mupaQjBHRpDnmE476tAPz2QFi7pzsA4zt8xLXtjr9EM8eudgwKW8mNH1H5ZqPy9Q7keop2hAo6RQ4vJsbGVaKTyy2H3g1gZ6PGJfJBoMvnL91Fc5Ay6J3Aa97kLs4w3WBGYTwSfizoALUBX8P7ZJc894q3YzPTQQtHoNiEzCkjj49ZfckVSEuyA94ZgmRbAQDyA4mgnKWc2DGAjaQKkCso73Aa4jCwfehT9AZogE1Hg9FFAPW1A71bPA1J8e28sWQtFdL6AWxc96Mn6L9LvMeV6YNhHyALiU1V1hH93ta26ez8iMJvkjdThniMeAa9RDhLxi8UHd7jximtcsVHw2qn244avCAEawiwgKh3aHoNiEzCkjj49QENaWajCvi8jAHf5WYzsw8j86BYJb6bJ9u9DtR5H578L8poce7kYcbHoT7CcQyUaT8j5is477NZH6PGJeWP3WfsHJS7bUV5X67KTyz4XEALUkHdeZD6BsbbnGTrF67JKQ6eHvYrVUzrAwbG7Tf5bSEeBXHGME9FLziZUHmLfioA52JuCF7zN5bjcCFLJbfdhKQzaDHyCVhhCacoEJdQ6RALY16YKe2RnQA11AiJy9DruvGiUQBGf8N7aFKUBL8wR3aPoyuA8ZTd9iE5Es3CFcE5KC9QZ9Ajj9mGL2jCf9uNc6EN8mSRAQN4CUf9We3AjW5rPojAGjAQUZfVVryE19jUyDCXXi5VAk9V1j4iokb94sCYM7vkN59ELkemfqzvLAkBVYBLgTKq9jft8QFZbEuHGMK8JZVJ1PHHnquVTdJrXL8Sqm7uPFEBAjWJufr251vLJQx9zsPtGqLSYxyKMCFSRGThVZWvMUyaKJHJYNhePQxLJeC1H8t9Ey9ELhk83c2Uh82TFauPiYEj97DVqBTDtRA94eRf2JGoLLAS7WostVRcUHxfnqZDVEtoHbbKMWZy3gvHnoUzumcjtK111111114gw9u11hUaBsJ3HxYmzNWV5mRA4tJi8JAb4gA6iAnPuz2tDAEfkb3SPcFE18bg9cZr6B1bBdrsQQno8T11111111111BsaiuUE4XPd8mQbWmdqUMnV1xvPw7tsPg1Bydij88p4JZ4EonNddkvsDWkaqveqgxuTgVQBeyzDYoYA6mAqmXYFmHrKm6Ayui815q9SEi7Nw2f17mTUmgEHJo1111111111113TsEaBhZyH14s5BZRrDNrPBSs4BfyirgLQLiuoPbawhYxDBBS75N7ZbY21kd7gVvwNorU63jAr2VQadzX6Wvr2Jg8KczYLgjNQRRRR1cCvBk3111Mv4JFfB5111R8uwMp97HvzfPTsKUWc9RsH9BbpnvhA6bCqJAka2ZHvh6YUHUym39Q1BJ3Rn2uD111112ErnN3Hm32poiwi899ZdSMFriUy2Aa2VpjgLEUCHdJenMZ8hhpHvjGRwSnVrX111111114gw9jQWKtxX8rVAQB4JVJBrGDAQKqj4o4V8d9tzzDWHdNgmHFzyvXCnEp582TFauPiYEj97DVqBTDtRA94eRf2JGoLLAS7WostVRcUHxfnqZDVEtoHbbKMWZy3gvHnoUzumcjtK111111114gw9u11hUaBsJ3HxYmzNWV5mRA4tJi8JAb4gA6iAnPuz2tDAEfkb3SPcFE18bg9cZr6B1bBdrsQQno8T11111111111BsaiuUE4XPd8mQbWmdqUMnV1xvPw7tsPg1Bydij88p4JZ4EonNddkvsDWkaqveqgxuTgVQBeyzDYoYA6mAqmXYFmHrKm6Ayui815q9SEi7Nw2f17t3vP7i2mV1111111111113TsEaBhZyH1A2Zxj2uhtTRz7gJjcm9QqNMXreGkdGVj9jTgBrtQzbwAvYAqYC7YhuNJeJe1E39nZDp5Y3j5Cp9ZZbStxdnfvCL2Y91FCHWK")]
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:164 webrtc_answer_offer, offer: "v=0\r\no=- 1134321010226326305 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS\r\nm=application 59954 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 77.241.136.144\r\na=candidate:1706697823 1 udp 2113937151 5184edae-62f1-49ea-b2d3-54640746aed4.local 54322 typ host generation 0 network-cost 999\r\na=candidate:35535175 1 udp 2113939711 5ebbb700-9658-457d-8687-02da14fbd67a.local 42628 typ host generation 0 network-cost 999\r\na=candidate:272190976 1 udp 1677732095 2a02:aa7:4626:6f43:2969:6697:417:490a 42628 typ srflx raddr :: rport 0 generation 0 network-cost 999\r\na=candidate:1323797552 1 udp 1677729535 77.241.136.144 59954 typ srflx raddr 0.0.0.0 rport 0 generation 0 network-cost 999\r\na=ice-ufrag:ZXQi\r\na=ice-pwd:kZKXLbC8apS8ChshTuPQRBes\r\na=ice-options:trickle\r\na=fingerprint:sha-256 7A:CE:54:84:64:5A:D5:70:66:87:78:B8:0B:2D:D8:09:7B:45:F6:88:AF:B6:00:25:48:14:3F:89:B0:3C:44:1D\r\na=setup:actpass\r\na=mid:0\r\na=sctp-port:5000\r\na=max-message-size:262144\r\n"
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:343 Peer Connection State has changed: Connecting
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:343 Peer Connection State has changed: Connecting
rings_node.js:1187 DEBUG crates/node/src/rpc_impl.rs:153 connect_peer_via_ice response: MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 749ce74a-ad2c-435e-b2db-21a441890c10, data: [3, 0, 0, 0, 243, 2, 0, 0, 0, 0, 0, 0, 34, 118, 61, 48, 92, 114, 92, 110, 111, 61, 45, 32, 57, 48, 51, 55, 54, 50, 52, 54, 51, 57, 56, 53, 54, 54, 55, 51, 56, 49, 56, 32, 50, 32, 73, 78, 32, 73, 80, 52, 32, 49, 50, 55, 46, 48, 46, 48, 46, 49, 92, 114, 92, 110, 115, 61, 45, 92, 114, 92, 110, 116, 61, 48, 32, 48, 92, 114, 92, 110, 97, 61, 103, 114, 111, 117, 112, 58, 66, 85, 78, 68, 76, 69, 32, 48, 92, 114, 92, 110, 97, 61, 101, 120, 116, 109, 97, 112, 45, 97, 108, 108, 111, 119, 45, 109, 105, 120, 101, 100, 92, 114, 92, 110, 97, 61, 109, 115, 105, 100, 45, 115, 101, 109, 97, 110, 116, 105, 99, 58, 32, 87, 77, 83, 92, 114, 92, 110, 109, 61, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 32, 57, 32, 85, 68, 80, 47, 68, 84, 76, 83, 47, 83, 67, 84, 80, 32, 119, 101, 98, 114, 116, 99, 45, 100, 97, 116, 97, 99, 104, 97, 110, 110, 101, 108, 92, 114, 92, 110, 99, 61, 73, 78, 32, 73, 80, 52, 32, 48, 46, 48, 46, 48, 46, 48, 92, 114, 92, 110, 97, 61, 99, 97, 110, 100, 105, 100, 97, 116, 101, 58, 51, 52, 55, 49, 51, 56, 49, 49, 57, 55, 32, 49, 32, 117, 100, 112, 32, 50, 49, 49, 51, 57, 51, 55, 49, 53, 49, 32, 54, 97, 49, 56, 50, 50, 51, 101, 45, 51, 56, 51, 101, 45, 52, 102, 57, 97, 45, 56, 52, 98, 102, 45, 49, 52, 54, 100, 48, 55, 48, 98, 51, 56, 98, 51, 46, 108, 111, 99, 97, 108, 32, 53, 56, 54, 52, 56, 32, 116, 121, 112, 32, 104, 111, 115, 116, 32, 103, 101, 110, 101, 114, 97, 116, 105, 111, 110, 32, 48, 32, 110, 101, 116, 119, 111, 114, 107, 45, 99, 111, 115, 116, 32, 57, 57, 57, 92, 114, 92, 110, 97, 61, 99, 97, 110, 100, 105, 100, 97, 116, 101, 58, 51, 48, 56, 50, 55, 51, 51, 49, 52, 50, 32, 49, 32, 117, 100, 112, 32, 50, 49, 49, 51, 57, 51, 57, 55, 49, 49, 32, 56, 55, 51, 99, 52, 53, 56, 48, 45, 48, 51, 51, 48, 45, 52, 56, 49, 50, 45, 57, 102, 55, 99, 45, 101, 102, 100, 57, 56, 55, 99, 99, 100, 53, 101, 52, 46, 108, 111, 99, 97, 108, 32, 53, 53, 57, 49, 54, 32, 116, 121, 112, 32, 104, 111, 115, 116, 32, 103, 101, 110, 101, 114, 97, 116, 105, 111, 110, 32, 48, 32, 110, 101, 116, 119, 111, 114, 107, 45, 99, 111, 115, 116, 32, 57, 57, 57, 92, 114, 92, 110, 97, 61, 105, 99, 101, 45, 117, 102, 114, 97, 103, 58, 114, 107, 110, 118, 92, 114, 92, 110, 97, 61, 105, 99, 101, 45, 112, 119, 100, 58, 104, 99, 71, 53, 106, 100, 85, 109, 69, 120, 86, 51, 122, 111, 117, 108, 70, 80, 117, 57, 102, 48, 69, 112, 92, 114, 92, 110, 97, 61, 105, 99, 101, 45, 111, 112, 116, 105, 111, 110, 115, 58, 116, 114, 105, 99, 107, 108, 101, 92, 114, 92, 110, 97, 61, 102, 105, 110, 103, 101, 114, 112, 114, 105, 110, 116, 58, 115, 104, 97, 45, 50, 53, 54, 32, 69, 50, 58, 55, 67, 58, 57, 57, 58, 65, 50, 58, 70, 69, 58, 69, 55, 58, 55, 67, 58, 51, 48, 58, 54, 54, 58, 55, 65, 58, 51, 52, 58, 57, 48, 58, 55, 69, 58, 56, 55, 58, 70, 68, 58, 70, 56, 58, 70, 68, 58, 55, 48, 58, 67, 49, 58, 51, 67, 58, 50, 50, 58, 55, 56, 58, 48, 65, 58, 55, 56, 58, 52, 48, 58, 55, 52, 58, 70, 51, 58, 49, 55, 58, 69, 70, 58, 69, 50, 58, 69, 68, 58, 69, 69, 92, 114, 92, 110, 97, 61, 115, 101, 116, 117, 112, 58, 97, 99, 116, 105, 118, 101, 92, 114, 92, 110, 97, 61, 109, 105, 100, 58, 48, 92, 114, 92, 110, 97, 61, 115, 99, 116, 112, 45, 112, 111, 114, 116, 58, 53, 48, 48, 48, 92, 114, 92, 110, 97, 61, 109, 97, 120, 45, 109, 101, 115, 115, 97, 103, 101, 45, 115, 105, 122, 101, 58, 50, 54, 50, 49, 52, 52, 92, 114, 92, 110, 34] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }
rings-wasm-p2p/:1 {answer: '82TFauPiYEj97DVKqvfScq9EGLh9VEEchA4vVh7eeD9DHnr7yE…nHRr1yWrvqy54M4yRNWxCL3dUuPxWnsYoTRZL5xAdzPMskTDE'}
rings_node.js:1187 DEBUG crates/node/src/provider/mod.rs:133 request acceptAnswer params: Array [String("82TFauPiYEj97DVKqvfScq9EGLh9VEEchA4vVh7eeD9DHnr7yEh3GYaAEdX7sP4pP5HbURJ2kgZDZ112153somQwCGaDAfomyqA324Rqptx3aP1112VeXEo5T111111113d7BEcKx6JVutG8Yn6UuWVUsb9jX7BRmqggdAEWaFkJrX6oDG9paKVdiqn9Q9v8FbetYQGTrF67m16buL8SqoGE8RzXGTrF67JKPx5KeHnepiFnYBDkv4F6MYJX7HGMCC6TTUMD8bFQEGiMgPeJeCFcdpxmx1HGMGAar4JUAHxyMJSdSHTF6QkQktooEG5KGmEMM8stJWHJS7bUV5XmqFGCKniRaqY68v7d4ofPEhrHU4V6s5RTKyHHnjuDYy6aFGTrF67MHLDj6QDfTqDef4b8j5qhx9UhfTHGMB9jT8TbHHJS5VwUF1xU9Ztp7hF5v6U6RtYgYRTJ889Zw2c18PFEPA6YwsazkZGQ8ZVr7vMmupqAbevvUpAaVz9ELikm3wxZP9ZuEX9ZwihYHJ7uHY44CjZ6RrXfCbZvoLLRaFUoxz55JLULmZPGkS3FHyEvd4JVyazKeDRdg5b22FL8Sqm7uKsojHo7uqLLwJFc94noaq4xKMV9PHPY7CwgP99Pvkk29rF1x9EDwGn3jW7u9uJ9dyJW7Wo8ZY3bYSvohfAGKywhstYKqAGLSqDTuCysK8xUL8PW5vUAZqWHxwU3LKJU9vH8Hc9TKHyALiU1V1hH93ta26ez8iMJvkjdThniMeAa9RDhLxi8UJdQ6RAVNZpLJGSkHKyC4mPGThVZWpSBNCKp4keoNtYh2Jo8q4vaQwvJMUn3WXzbG24J6Mi4fnuBvMHGME9FLziUwLULmZRPrse1JdQ9XZNYeeXKTpiibMeEVrL9CqNyo9sA2JTcYZk4PHzU9QGb5xEmj29BuV7x67hhK4AjmUiNMxLX7A55H8xReUY1AZoLrCT8XjcAkLTRKDe2ZTCQthJLecFLD9aK4tKT3NuDAjW5MWkzaNP94sF2eStR9b9ETM8QtthwFAkJFwSiQXz9GThVZX5GkJxKmkevhBt8TnGTrF67JKQQQHmLALyzQZx4BH9edpFjLZtL9M9KA8AjoHL8Sqm7uPEdD8bhiXLAFgUk8bvwQsBFxjf9PvnEo7sKdF6iSBezzUAYF12qXv6HPVLg96YLgC1msmvHHk5w3xpMEVHnrWP9XHqYCAGQSnXJmZwD9G7zewZyGX31111111111qM78T9oqiDdr9QC9cfxBaYDA4zsfKNekoMHRjpvZC1FNEA6YyMgzzdVcA2u3bLQQtQw198AskcFfVH1111111111113TsEaBhZyH198uXDVRdmeiz3a17Wp4NqcKu2q9KjC5BicLTUk1CirtNKRyjSDqXjgdz1ePizLtMsJLVnBKQ2YALVBqSi6XJeyXeeqcwM8hhhZ111ggqZx7BE11111111111111ZNMJ2yKM112HZ87WDh4agwyhvskaUUDF7msd8XywpUYd3FxQFGhxYyYiqdvYhDF2hL6n3kSsCjTrQWyAkcTZuhsJSMjxqSwVJbDx9Jr6fCs11115jqKrzb11116UAitc1Hvmsow83HTNAbmZrH5gw19AZvJHxPkExYAS4uLTz3QznHFrCW9hTALX1111111HHGF9Zg58bXy9x39QEQfZqmGhmA4zu9RHG1De96LyMtFEYYx9jQudPLUbFF1111111111qM78T9oqiDdr9QC9cfxBaYDA4zsfKNekoMHRjpvZC1FNEA6YyMgzzdVcA4Tdw9NLKtb12qXv6HPVLg96YLgC1msmvHHk5w3xpMEVHnrWP9XHqYCAGQSnXJmZwD9G7zewZyGX31111111111qM78T9oqiDdr9QC9cfxBaYDA4zsfKNekoMHRjpvZC1FNEA6YyMgzzdVcA2u3bLQQtQw198AskcFfVH1111111111113TsEaBhZyH198uXDVRdmeiz3a17Wp4NqcKu2q9KjC5BicLTUk1CirtNKRyjSDqXjgdz1ePizLtMsJLVnBKQ2YALVBqSi6XJeyXeeqcwM8hhhZ111hBik2bhr11111111111111ZNMJ2yKM1133dY1ZcXCJiNiUtsjDoQHzUNPNyUHw2dzPiHivcBAf5KtGSnHRr1yWrvqy54M4yRNWxCL3dUuPxWnsYoTRZL5xAdzPMskTDE")]
rings_node.js:1187 DEBUG crates/core/src/swarm/impls.rs:326 accept_answer: MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 749ce74a-ad2c-435e-b2db-21a441890c10, data: [3, 0, 0, 0, 243, 2, 0, 0, 0, 0, 0, 0, 34, 118, 61, 48, 92, 114, 92, 110, 111, 61, 45, 32, 57, 48, 51, 55, 54, 50, 52, 54, 51, 57, 56, 53, 54, 54, 55, 51, 56, 49, 56, 32, 50, 32, 73, 78, 32, 73, 80, 52, 32, 49, 50, 55, 46, 48, 46, 48, 46, 49, 92, 114, 92, 110, 115, 61, 45, 92, 114, 92, 110, 116, 61, 48, 32, 48, 92, 114, 92, 110, 97, 61, 103, 114, 111, 117, 112, 58, 66, 85, 78, 68, 76, 69, 32, 48, 92, 114, 92, 110, 97, 61, 101, 120, 116, 109, 97, 112, 45, 97, 108, 108, 111, 119, 45, 109, 105, 120, 101, 100, 92, 114, 92, 110, 97, 61, 109, 115, 105, 100, 45, 115, 101, 109, 97, 110, 116, 105, 99, 58, 32, 87, 77, 83, 92, 114, 92, 110, 109, 61, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 32, 57, 32, 85, 68, 80, 47, 68, 84, 76, 83, 47, 83, 67, 84, 80, 32, 119, 101, 98, 114, 116, 99, 45, 100, 97, 116, 97, 99, 104, 97, 110, 110, 101, 108, 92, 114, 92, 110, 99, 61, 73, 78, 32, 73, 80, 52, 32, 48, 46, 48, 46, 48, 46, 48, 92, 114, 92, 110, 97, 61, 99, 97, 110, 100, 105, 100, 97, 116, 101, 58, 51, 52, 55, 49, 51, 56, 49, 49, 57, 55, 32, 49, 32, 117, 100, 112, 32, 50, 49, 49, 51, 57, 51, 55, 49, 53, 49, 32, 54, 97, 49, 56, 50, 50, 51, 101, 45, 51, 56, 51, 101, 45, 52, 102, 57, 97, 45, 56, 52, 98, 102, 45, 49, 52, 54, 100, 48, 55, 48, 98, 51, 56, 98, 51, 46, 108, 111, 99, 97, 108, 32, 53, 56, 54, 52, 56, 32, 116, 121, 112, 32, 104, 111, 115, 116, 32, 103, 101, 110, 101, 114, 97, 116, 105, 111, 110, 32, 48, 32, 110, 101, 116, 119, 111, 114, 107, 45, 99, 111, 115, 116, 32, 57, 57, 57, 92, 114, 92, 110, 97, 61, 99, 97, 110, 100, 105, 100, 97, 116, 101, 58, 51, 48, 56, 50, 55, 51, 51, 49, 52, 50, 32, 49, 32, 117, 100, 112, 32, 50, 49, 49, 51, 57, 51, 57, 55, 49, 49, 32, 56, 55, 51, 99, 52, 53, 56, 48, 45, 48, 51, 51, 48, 45, 52, 56, 49, 50, 45, 57, 102, 55, 99, 45, 101, 102, 100, 57, 56, 55, 99, 99, 100, 53, 101, 52, 46, 108, 111, 99, 97, 108, 32, 53, 53, 57, 49, 54, 32, 116, 121, 112, 32, 104, 111, 115, 116, 32, 103, 101, 110, 101, 114, 97, 116, 105, 111, 110, 32, 48, 32, 110, 101, 116, 119, 111, 114, 107, 45, 99, 111, 115, 116, 32, 57, 57, 57, 92, 114, 92, 110, 97, 61, 105, 99, 101, 45, 117, 102, 114, 97, 103, 58, 114, 107, 110, 118, 92, 114, 92, 110, 97, 61, 105, 99, 101, 45, 112, 119, 100, 58, 104, 99, 71, 53, 106, 100, 85, 109, 69, 120, 86, 51, 122, 111, 117, 108, 70, 80, 117, 57, 102, 48, 69, 112, 92, 114, 92, 110, 97, 61, 105, 99, 101, 45, 111, 112, 116, 105, 111, 110, 115, 58, 116, 114, 105, 99, 107, 108, 101, 92, 114, 92, 110, 97, 61, 102, 105, 110, 103, 101, 114, 112, 114, 105, 110, 116, 58, 115, 104, 97, 45, 50, 53, 54, 32, 69, 50, 58, 55, 67, 58, 57, 57, 58, 65, 50, 58, 70, 69, 58, 69, 55, 58, 55, 67, 58, 51, 48, 58, 54, 54, 58, 55, 65, 58, 51, 52, 58, 57, 48, 58, 55, 69, 58, 56, 55, 58, 70, 68, 58, 70, 56, 58, 70, 68, 58, 55, 48, 58, 67, 49, 58, 51, 67, 58, 50, 50, 58, 55, 56, 58, 48, 65, 58, 55, 56, 58, 52, 48, 58, 55, 52, 58, 70, 51, 58, 49, 55, 58, 69, 70, 58, 69, 50, 58, 69, 68, 58, 69, 69, 92, 114, 92, 110, 97, 61, 115, 101, 116, 117, 112, 58, 97, 99, 116, 105, 118, 101, 92, 114, 92, 110, 97, 61, 109, 105, 100, 58, 48, 92, 114, 92, 110, 97, 61, 115, 99, 116, 112, 45, 112, 111, 114, 116, 58, 53, 48, 48, 48, 92, 114, 92, 110, 97, 61, 109, 97, 120, 45, 109, 101, 115, 115, 97, 103, 101, 45, 115, 105, 122, 101, 58, 50, 54, 50, 49, 52, 52, 92, 114, 92, 110, 34] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:187 webrtc_accept_answer, answer: "v=0\r\no=- 9037624639856673818 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\na=candidate:3471381197 1 udp 2113937151 6a18223e-383e-4f9a-84bf-146d070b38b3.local 58648 typ host generation 0 network-cost 999\r\na=candidate:3082733142 1 udp 2113939711 873c4580-0330-4812-9f7c-efd987ccd5e4.local 55916 typ host generation 0 network-cost 999\r\na=ice-ufrag:rknv\r\na=ice-pwd:hcG5jdUmExV3zoulFPu9f0Ep\r\na=ice-options:trickle\r\na=fingerprint:sha-256 E2:7C:99:A2:FE:E7:7C:30:66:7A:34:90:7E:87:FD:F8:FD:70:C1:3C:22:78:0A:78:40:74:F3:17:EF:E2:ED:EE\r\na=setup:active\r\na=mid:0\r\na=sctp-port:5000\r\na=max-message-size:262144\r\n"
rings-wasm-p2p/:1 {peer: {…}}
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:343 Peer Connection State has changed: Connected
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:343 Peer Connection State has changed: Connected
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:276 New DataChannel rings
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:276 New DataChannel rings
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:116 START HANDLE MESSAGE: 18053874-302c-4dc0-81fe-e791f9ad87bc JoinDHT(JoinDHT { did: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) })
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:141 FINISH HANDLE MESSAGE 18053874-302c-4dc0-81fe-e791f9ad87bc
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:173 Handle message handler event: JoinDHT(MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: 18053874-302c-4dc0-81fe-e791f9ad87bc, data: [0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }, Did(0x432e3b128299d26686893ddb50a8d376a43a04c6))
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:173 Handle message handler event: SendDirectMessage(FindSuccessorSend(FindSuccessorSend { did: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), strict: false, then: Report(Connect) }), Did(0x432e3b128299d26686893ddb50a8d376a43a04c6))
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:348 Try send MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 8d8d1f3f-2479-4976-ad5c-a40fa1e26db8, data: [4, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 53, 48, 100, 50, 101, 57, 51, 100, 101, 98, 51, 49, 50, 100, 99, 48, 54, 53, 57, 54, 54, 98, 56, 53, 54, 101, 99, 102, 101, 49, 53, 102, 55, 55, 101, 50, 50, 51, 52, 101, 0, 0, 0, 0, 0, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }, to node Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:375 Sent MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 8d8d1f3f-2479-4976-ad5c-a40fa1e26db8, data: [4, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 53, 48, 100, 50, 101, 57, 51, 100, 101, 98, 51, 49, 50, 100, 99, 48, 54, 53, 57, 54, 54, 98, 56, 53, 54, 101, 99, 102, 101, 49, 53, 102, 55, 55, 101, 50, 50, 51, 52, 101, 0, 0, 0, 0, 0, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }, to node Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:116 START HANDLE MESSAGE: 75a7ab39-e361-479b-9f12-ae69120740e5 JoinDHT(JoinDHT { did: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) })
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:141 FINISH HANDLE MESSAGE 75a7ab39-e361-479b-9f12-ae69120740e5
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:173 Handle message handler event: JoinDHT(MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 75a7ab39-e361-479b-9f12-ae69120740e5, data: [0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 53, 48, 100, 50, 101, 57, 51, 100, 101, 98, 51, 49, 50, 100, 99, 48, 54, 53, 57, 54, 54, 98, 56, 53, 54, 101, 99, 102, 101, 49, 53, 102, 55, 55, 101, 50, 50, 51, 52, 101] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }, Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e))
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:173 Handle message handler event: SendDirectMessage(FindSuccessorSend(FindSuccessorSend { did: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), strict: false, then: Report(Connect) }), Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e))
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:348 Try send MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: 7b197d64-de5e-408e-bb71-ba00e4133f39, data: [4, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54, 0, 0, 0, 0, 0, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }, to node Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:375 Sent MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: 7b197d64-de5e-408e-bb71-ba00e4133f39, data: [4, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54, 0, 0, 0, 0, 0, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }, to node Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:316 Received DataChannelMessage from 0x50d2e93deb312dc065966b856ecfe15f77e2234e: JsValue(ArrayBuffer)
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:316 Received DataChannelMessage from 0x432e3b128299d26686893ddb50a8d376a43a04c6: JsValue(ArrayBuffer)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:92 load message from channel: MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 8d8d1f3f-2479-4976-ad5c-a40fa1e26db8, data: [4, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 53, 48, 100, 50, 101, 57, 51, 100, 101, 98, 51, 49, 50, 100, 99, 48, 54, 53, 57, 54, 54, 98, 56, 53, 54, 101, 99, 102, 101, 49, 53, 102, 55, 55, 101, 50, 50, 51, 52, 101, 0, 0, 0, 0, 0, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:116 START HANDLE MESSAGE: 8d8d1f3f-2479-4976-ad5c-a40fa1e26db8 FindSuccessorSend(FindSuccessorSend { did: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), strict: false, then: Report(Connect) })
rings_node.js:1187 DEBUG crates/core/src/dht/chord.rs:301 find_successor: self: 0x432e3b128299d26686893ddb50a8d376a43a04c6, did: 0x50d2e93deb312dc065966b856ecfe15f77e2234e, successor: SuccessorSeq { did: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), max: 3, successors: RwLock { data: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], poisoned: false, .. } }, result: Ok(Some(Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)))
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:141 FINISH HANDLE MESSAGE 8d8d1f3f-2479-4976-ad5c-a40fa1e26db8
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:173 Handle message handler event: SendReportMessage(MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 8d8d1f3f-2479-4976-ad5c-a40fa1e26db8, data: [4, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 53, 48, 100, 50, 101, 57, 51, 100, 101, 98, 51, 49, 50, 100, 99, 48, 54, 53, 57, 54, 54, 98, 56, 53, 54, 101, 99, 102, 101, 49, 53, 102, 55, 55, 101, 50, 50, 51, 52, 101, 0, 0, 0, 0, 0, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }, FindSuccessorReport(FindSuccessorReport { did: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), handler: Connect }))
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:348 Try send MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: 8d8d1f3f-2479-4976-ad5c-a40fa1e26db8, data: [5, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 53, 48, 100, 50, 101, 57, 51, 100, 101, 98, 51, 49, 50, 100, 99, 48, 54, 53, 57, 54, 54, 98, 56, 53, 54, 101, 99, 102, 101, 49, 53, 102, 55, 55, 101, 50, 50, 51, 52, 101, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }, to node Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:375 Sent MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: 8d8d1f3f-2479-4976-ad5c-a40fa1e26db8, data: [5, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 53, 48, 100, 50, 101, 57, 51, 100, 101, 98, 51, 49, 50, 100, 99, 48, 54, 53, 57, 54, 54, 98, 56, 53, 54, 101, 99, 102, 101, 49, 53, 102, 55, 55, 101, 50, 50, 51, 52, 101, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }, to node Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:92 load message from channel: MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: 7b197d64-de5e-408e-bb71-ba00e4133f39, data: [4, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54, 0, 0, 0, 0, 0, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:116 START HANDLE MESSAGE: 7b197d64-de5e-408e-bb71-ba00e4133f39 FindSuccessorSend(FindSuccessorSend { did: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), strict: false, then: Report(Connect) })
rings_node.js:1187 DEBUG crates/core/src/dht/chord.rs:301 find_successor: self: 0x50d2e93deb312dc065966b856ecfe15f77e2234e, did: 0x432e3b128299d26686893ddb50a8d376a43a04c6, successor: SuccessorSeq { did: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), max: 3, successors: RwLock { data: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], poisoned: false, .. } }, result: Ok(Some(Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)))
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:141 FINISH HANDLE MESSAGE 7b197d64-de5e-408e-bb71-ba00e4133f39
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:173 Handle message handler event: SendReportMessage(MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: 7b197d64-de5e-408e-bb71-ba00e4133f39, data: [4, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54, 0, 0, 0, 0, 0, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }, FindSuccessorReport(FindSuccessorReport { did: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), handler: Connect }))
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:348 Try send MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 7b197d64-de5e-408e-bb71-ba00e4133f39, data: [5, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }, to node Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:375 Sent MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 7b197d64-de5e-408e-bb71-ba00e4133f39, data: [5, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }, to node Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:316 Received DataChannelMessage from 0x432e3b128299d26686893ddb50a8d376a43a04c6: JsValue(ArrayBuffer)
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:316 Received DataChannelMessage from 0x50d2e93deb312dc065966b856ecfe15f77e2234e: JsValue(ArrayBuffer)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:92 load message from channel: MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: 8d8d1f3f-2479-4976-ad5c-a40fa1e26db8, data: [5, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 53, 48, 100, 50, 101, 57, 51, 100, 101, 98, 51, 49, 50, 100, 99, 48, 54, 53, 57, 54, 54, 98, 56, 53, 54, 101, 99, 102, 101, 49, 53, 102, 55, 55, 101, 50, 50, 51, 52, 101, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:116 START HANDLE MESSAGE: 8d8d1f3f-2479-4976-ad5c-a40fa1e26db8 FindSuccessorReport(FindSuccessorReport { did: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), handler: Connect })
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:141 FINISH HANDLE MESSAGE 8d8d1f3f-2479-4976-ad5c-a40fa1e26db8
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:173 Handle message handler event: Connect(Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e))
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:92 load message from channel: MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 7b197d64-de5e-408e-bb71-ba00e4133f39, data: [5, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54, 1, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:116 START HANDLE MESSAGE: 7b197d64-de5e-408e-bb71-ba00e4133f39 FindSuccessorReport(FindSuccessorReport { did: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), handler: Connect })
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:141 FINISH HANDLE MESSAGE 7b197d64-de5e-408e-bb71-ba00e4133f39
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:173 Handle message handler event: Connect(Did(0x432e3b128299d26686893ddb50a8d376a43a04c6))
rings_node.js:1187 DEBUG crates/node/src/provider/mod.rs:133 request listPeers params: Array []
rings-wasm-p2p/:1 undefined
rings_node.js:1187 DEBUG crates/node/src/provider/mod.rs:133 request createOffer params: Array [String("0x50d2e93deB312Dc065966b856ECfE15f77E2234e")]
rings_node.js:1106 Uncaught (in promise) Error: Internal rpc services error: Server error: Create offer info failed: Found existing transport when answer offer from remote node..
at imports.wbg.__wbindgen_error_new (rings_node.js:1106:21)
at rings_node_bg.wasm:0x18aae3
at rings_node_bg.wasm:0x18db1
at rings_node_bg.wasm:0x148c06
at rings_node_bg.wasm:0x1a5332
at __wbg_adapter_78 (rings_node.js:260:10)
at real (rings_node.js:211:20)
imports.wbg.__wbindgen_error_new @ rings_node.js:1106
$func1369 @ rings_node_bg.wasm:0x18aae3
$func189 @ rings_node_bg.wasm:0x18db1
$func730 @ rings_node_bg.wasm:0x148c06
$_dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hab43ece25b3f66b1 @ rings_node_bg.wasm:0x1a5332
__wbg_adapter_78 @ rings_node.js:260
real @ rings_node.js:211
Promise.then (async)
onclick @ rings-wasm-p2p/:1
Show 7 more frames
Show less
rings_node.js:1187 DEBUG crates/node/src/provider/mod.rs:133 request connectWithDid params: Array [String("0x50d2e93deB312Dc065966b856ECfE15f77E2234e")]
rings_node.js:1187 DEBUG crates/core/src/measure.rs:56 [ConnectBehaviour] in Threadhold: 3, connect: 0, disconn: 0, delta: 0
rings_node.js:1187 DEBUG crates/core/src/swarm/impls.rs:104 [JudgeConnection] Try Connect Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)
rings_node.js:1187 INFO crates/core/src/swarm/impls.rs:408 Record connect Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)
rings_node.js:1187 INFO crates/core/src/swarm/impls.rs:410 [Judgement] Record connect
rings_node.js:1187 INFO crates/core/src/swarm/impls.rs:365 Try connect Did Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)
rings_node.js:1187 DEBUG crates/node/src/processor.rs:293 wait for connection connected
rings-wasm-p2p/:1 {}
rings_node.js:1187 DEBUG crates/node/src/provider/mod.rs:133 request connectWithDid params: Array [String("0x432e3b128299d26686893ddb50A8D376a43A04C6")]
rings_node.js:1187 DEBUG crates/core/src/measure.rs:56 [ConnectBehaviour] in Threadhold: 3, connect: 0, disconn: 0, delta: 0
rings_node.js:1187 DEBUG crates/core/src/swarm/impls.rs:104 [JudgeConnection] Try Connect Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)
rings_node.js:1187 INFO crates/core/src/swarm/impls.rs:408 Record connect Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)
rings_node.js:1187 INFO crates/core/src/swarm/impls.rs:410 [Judgement] Record connect
rings_node.js:1187 INFO crates/core/src/swarm/impls.rs:365 Try connect Did Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)
rings_node.js:1187 DEBUG crates/node/src/processor.rs:293 wait for connection connected
rings-wasm-p2p/:1 {}
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:161 STABILIZATION notify_predecessor start
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:88 STABILIZATION notify_predecessor: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:348 Try send MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: a3601296-cd11-40da-b9b1-3dc09fcb167f, data: [6, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 53, 48, 100, 50, 101, 57, 51, 100, 101, 98, 51, 49, 50, 100, 99, 48, 54, 53, 57, 54, 54, 98, 56, 53, 54, 101, 99, 102, 101, 49, 53, 102, 55, 55, 101, 50, 50, 51, 52, 101] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }, to node Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:375 Sent MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: a3601296-cd11-40da-b9b1-3dc09fcb167f, data: [6, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 53, 48, 100, 50, 101, 57, 51, 100, 101, 98, 51, 49, 50, 100, 99, 48, 54, 53, 57, 54, 54, 98, 56, 53, 54, 101, 99, 102, 101, 49, 53, 102, 55, 55, 101, 50, 50, 51, 52, 101] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }, to node Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:161 STABILIZATION notify_predecessor start
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:88 STABILIZATION notify_predecessor: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:348 Try send MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 6be81808-b719-4963-9cae-f6bbe2815786, data: [6, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }, to node Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:375 Sent MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 6be81808-b719-4963-9cae-f6bbe2815786, data: [6, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }, to node Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:316 Received DataChannelMessage from 0x50d2e93deb312dc065966b856ecfe15f77e2234e: JsValue(ArrayBuffer)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:92 load message from channel: MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: a3601296-cd11-40da-b9b1-3dc09fcb167f, data: [6, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 53, 48, 100, 50, 101, 57, 51, 100, 101, 98, 51, 49, 50, 100, 99, 48, 54, 53, 57, 54, 54, 98, 56, 53, 54, 101, 99, 102, 101, 49, 53, 102, 55, 55, 101, 50, 50, 51, 52, 101] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:116 START HANDLE MESSAGE: a3601296-cd11-40da-b9b1-3dc09fcb167f NotifyPredecessorSend(NotifyPredecessorSend { did: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) })
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:141 FINISH HANDLE MESSAGE a3601296-cd11-40da-b9b1-3dc09fcb167f
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:165 STABILIZATION notify_predecessor end
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:166 STABILIZATION fix_fingers start
rings_node.js:1187 DEBUG crates/core/src/dht/chord.rs:301 find_successor: self: 0x50d2e93deb312dc065966b856ecfe15f77e2234e, did: 0x0000000000000000000000000000000000000002, successor: SuccessorSeq { did: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), max: 3, successors: RwLock { data: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], poisoned: false, .. } }, result: Ok(Some(Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)))
rings_node.js:1187 DEBUG crates/core/src/dht/finger.rs:69 set finger table index: 1 did: 0x432e3b128299d26686893ddb50a8d376a43a04c6
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:170 STABILIZATION fix_fingers end
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:171 STABILIZATION clean_unavailable_connections start
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:178 STABILIZATION clean_unavailable_connections end
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:316 Received DataChannelMessage from 0x432e3b128299d26686893ddb50a8d376a43a04c6: JsValue(ArrayBuffer)
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:165 STABILIZATION notify_predecessor end
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:166 STABILIZATION fix_fingers start
rings_node.js:1187 DEBUG crates/core/src/dht/chord.rs:301 find_successor: self: 0x432e3b128299d26686893ddb50a8d376a43a04c6, did: 0x0000000000000000000000000000000000000002, successor: SuccessorSeq { did: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), max: 3, successors: RwLock { data: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], poisoned: false, .. } }, result: Ok(RemoteAction(Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), FindSuccessor(Did(0x0000000000000000000000000000000000000002))))
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:112 STABILIZATION fix_fingers: Did(0x0000000000000000000000000000000000000002)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:348 Try send MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: 56fb708e-4ea1-4c4e-846c-38e76bfa4676, data: [4, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 0, 0, 0, 0, 0, 2, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }, to node Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:375 Sent MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: 56fb708e-4ea1-4c4e-846c-38e76bfa4676, data: [4, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 0, 0, 0, 0, 0, 2, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }, to node Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:316 Received DataChannelMessage from 0x432e3b128299d26686893ddb50a8d376a43a04c6: JsValue(ArrayBuffer)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:92 load message from channel: MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 6be81808-b719-4963-9cae-f6bbe2815786, data: [6, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:116 START HANDLE MESSAGE: 6be81808-b719-4963-9cae-f6bbe2815786 NotifyPredecessorSend(NotifyPredecessorSend { did: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) })
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:141 FINISH HANDLE MESSAGE 6be81808-b719-4963-9cae-f6bbe2815786
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:170 STABILIZATION fix_fingers end
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:171 STABILIZATION clean_unavailable_connections start
rings_node.js:1187 DEBUG crates/core/src/dht/stabilization.rs:178 STABILIZATION clean_unavailable_connections end
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:92 load message from channel: MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: 56fb708e-4ea1-4c4e-846c-38e76bfa4676, data: [4, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 0, 0, 0, 0, 0, 2, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:116 START HANDLE MESSAGE: 56fb708e-4ea1-4c4e-846c-38e76bfa4676 FindSuccessorSend(FindSuccessorSend { did: Did(0x0000000000000000000000000000000000000002), strict: false, then: Report(FixFingerTable) })
rings_node.js:1187 DEBUG crates/core/src/dht/chord.rs:301 find_successor: self: 0x50d2e93deb312dc065966b856ecfe15f77e2234e, did: 0x0000000000000000000000000000000000000002, successor: SuccessorSeq { did: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), max: 3, successors: RwLock { data: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], poisoned: false, .. } }, result: Ok(Some(Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)))
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:141 FINISH HANDLE MESSAGE 56fb708e-4ea1-4c4e-846c-38e76bfa4676
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:173 Handle message handler event: SendReportMessage(MessagePayload { transaction: Transaction { destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), tx_id: 56fb708e-4ea1-4c4e-846c-38e76bfa4676, data: [4, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 0, 0, 0, 0, 0, 2, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)], next_hop: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e), destination: Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e) } }, FindSuccessorReport(FindSuccessorReport { did: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), handler: FixFingerTable }))
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:348 Try send MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 56fb708e-4ea1-4c4e-846c-38e76bfa4676, data: [5, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54, 2, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }, to node Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:375 Sent MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 56fb708e-4ea1-4c4e-846c-38e76bfa4676, data: [5, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54, 2, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }, to node Did(0x432e3b128299d26686893ddb50a8d376a43a04c6)
rings_node.js:1187 DEBUG crates/transport/src/connections/web_sys_webrtc/mod.rs:316 Received DataChannelMessage from 0x50d2e93deb312dc065966b856ecfe15f77e2234e: JsValue(ArrayBuffer)
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:92 load message from channel: MessagePayload { transaction: Transaction { destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), tx_id: 56fb708e-4ea1-4c4e-846c-38e76bfa4676, data: [5, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 48, 120, 52, 51, 50, 101, 51, 98, 49, 50, 56, 50, 57, 57, 100, 50, 54, 54, 56, 54, 56, 57, 51, 100, 100, 98, 53, 48, 97, 56, 100, 51, 55, 54, 97, 52, 51, 97, 48, 52, 99, 54, 2, 0, 0, 0] }, relay: MessageRelay { path: [Did(0x50d2e93deb312dc065966b856ecfe15f77e2234e)], next_hop: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), destination: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6) } }
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:116 START HANDLE MESSAGE: 56fb708e-4ea1-4c4e-846c-38e76bfa4676 FindSuccessorReport(FindSuccessorReport { did: Did(0x432e3b128299d26686893ddb50a8d376a43a04c6), handler: FixFingerTable })
rings_node.js:1187 DEBUG crates/core/src/message/handlers/mod.rs:141 FINISH HANDLE MESSAGE 56fb708e-4ea1-4c4e-846c-38e76bfa4676
rings_node.js:1187 DEBUG crates/core/src/swarm/mod.rs:173 Handle message handler event: Connect(Did(0x432e3b128299d26686893ddb50a8d376a43a04c6))
rings_node.js:1187 DEBUG crates/node/src/provider/mod.rs:133 request listPeers params: Array []
rings-wasm-p2p/:1 undefined
rings_node.js:1187 DEBUG crates/node/src/provider/mod.rs:133 request listPeers params: Array []
rings-wasm-p2p/:1 undefined
rings_node.js:1187 DEBUG crates/node/src/provider/mod.rs:133 request listPeers params: Array []
rings-wasm-p2p/:1 undefined
rings_node.js:1187 DEBUG crates/node/src/provider/mod.rs:133 request nodeInfo params: Array []
rings-wasm-p2p/:1 undefined
rings_node.js:1187 DEBUG crates/node/src/provider/mod.rs:133 request sendSimpleText params: Array [String("0x432e3b128299d26686893ddb50A8D376a43A04C6"), String(" lolcat")]
rings_node.js:1106 Uncaught (in promise) Error: Internal rpc services error: Method not found: method sendSimpleText is not found.
at imports.wbg.__wbindgen_error_new (rings_node.js:1106:21)
at rings_node_bg.wasm:0x18aae3
at rings_node_bg.wasm:0x18db1
at rings_node_bg.wasm:0x148c06
at rings_node_bg.wasm:0x1a5332
at __wbg_adapter_78 (rings_node.js:260:10)
at real (rings_node.js:211:20)
imports.wbg.__wbindgen_error_new @ rings_node.js:1106
$func1369 @ rings_node_bg.wasm:0x18aae3
$func189 @ rings_node_bg.wasm:0x18db1
$func730 @ rings_node_bg.wasm:0x148c06
$_dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hab43ece25b3f66b1 @ rings_node_bg.wasm:0x1a5332
__wbg_adapter_78 @ rings_node.js:260
real @ rings_node.js:211
Promise.then (async)
onclick @ rings-wasm-p2p/:1
Show 7 more frames
Show less
</details>
bns-node/src/main.rs
fail
, we should remove it from our table.FindSuccessor
, and C Response
A recorded B to it's DHT finger table, but dont really have connection to B. It will cause all futher relay message failed. dotenv::dotenv().ok();
let cli = Cli::parse();
Logger::init(cli.log_level.into())?;
// if config file was set, it should override existing .env
if let Some(conf) = cli.config_file {
dotenv::from_path(std::path::Path::new(&conf)).ok();
}
If may failed on Cli::parse()
.
Algorithm:
RID is a DID (Distributed ID) without public key, and rid(data) = sha1(data).hex()
MID is a DID (Distributed ID) without public key, and rid(relay_target) = BigUint(relay_target) + 1
Given a peer A
fn dht_set(rid<data>) {
match peer_a.find_successor(rid) {
Some(peer_a) => peer_a.local_store(data),
RemoteAction::FindSuccessor(b, rid) => {
// tell remote node B to store rid.
}
}
}
fn dht_get(rid<data>) {
match peer_a.find_successor(rid) {
Some(peer_a) => peer_a.local_fetch(data),
RemoteAction::FindSuccessor(b, rid) => {
// tell remote node B to fetch rid.
}
}
}
If self.successor is updated:
for did in peer.local_storage():
if did in [self, new_successor]:
new_successor.storage(rid)
#[test]
fn test_verify_bip137() {
// The sig is created by unisat.
// let sig = await window.unisat.signMessage("hello world");
// sig = "G4j29m8WutQfZJaonWuXLoXhlhlPfJzbN/Vmz2hdiAYwFMpvTPZslHaOBaotsFfkN26KpaCF3Az0ooUr6vMbNBg="
// signer = "bc1p43s0vyuq6wvsfqmw5vd2thhv5pg755ekasw2y8jwh754ezdayfkqvsrama"
let msg = "hello world";
let sig_b64 = "G4j29m8WutQfZJaonWuXLoXhlhlPfJzbN/Vmz2hdiAYwFMpvTPZslHaOBaotsFfkN26KpaCF3Az0ooUr6vMbNBg=";
let mut sig: Vec<u8> = general_purpose::STANDARD.decode(sig_b64).unwrap();
assert_eq!(sig.len(), 65);
sig.rotate_left(1);
assert_eq!(sig[64], 27);
let pk = ecdsa::recover(msg, sig).unwrap();
}
For now, it's using eip191 to handle the recover_id.
Nodes should have a filter to reject or allow certain nodes, which can include built-in rules such as whitelist/blacklist, as well as a custom callback filter(did, info)->bool
.
Its main use cases are:
Not allowing nodes with different versions to connect.
Allowing the construction of a partial network or an internal testnet.
Possible extension features:
For testing:
cargo run -- -d 127.0.0.1:50000
cargo run -- -d 127.0.0.1:50001
curl -v http://127.0.0.1:50000/connect\?node\=http://127.0.0.1:50001/sdp
And plz check the log @Raytlty
INFO - mDNS is using 0.0.0.0:5353 as dest_addr
INFO - Looping and listening Ok(0.0.0.0:5353)
INFO - signaling state changed to have-local-offer
INFO - signaling state changed to stable
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: operation can not be run in current signaling state', /Users/ryan/Dev/bns/bns-node/src/discoveries/http.rs:91:63
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
WARN - [controlled]: could not listen udp fe:80::: io error: Can't assign requested address (os error 49)
INFO - [controlling]: Setting new connection state: Checking
WARN - [controlling]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
WARN - [controlling]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
INFO - ICE connection state changed: checking
WARN - [controlling]: failed to resolve stun host: stun.l.google.com:19302: io error: No available ipv6 IP address found!
WARN - [controlling]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
Originally posted by @RyanKung in #24 (comment)
To avoid too frequent signing.
Suppose an Address A authorized Temporarily generated Address B for Msg Signing.
Struct AuthorizedInfo {
timestamp: Timestamp,
ttl: usize,
authorizer: Address, // Address A
}
Struct Msg {
address: Address, // Address A
authorized_info: AuthorizedInfo
authorized_sig: Signature(AuthorizedInfo, A)
Msg: <Some Message>,
sig: Signature(<Some Message>, B)
}
fn verify(s: Sig, m: Msg) {
if !(m.authorized_info.ttl + m.authorized_info.timestamp) < current_timestamp {
return false;
}
if !recover(hash(m.authorized_info), m.authorized_sig) == m.authorized_info.address {
return false;
}
return recover(hash(m), sig) == m.authorized_info.address;
}
The test test_processor_connect_with_did
cannot pass when running in headless browser test.
And the CI also failed timely because of this test.
cd node
wasm-pack test --chrome --headless --features browser_chrome_test --no-default-features -- test_processor_connect_with_did
The test should pass as if running in non-headless browser.
cd node
wasm-pack test --chrome --features browser_chrome_test --no-default-features -- test_processor_connect_with_did
# Use chrome to open the url given in the log.
The test failed timely in github action CI, and failed 100% when running locally.
The test may become stuck at any stage, and the exact code causing the issue cannot be identified from the logs.
It will eventually got a SIGKILL because of timeout.
Suppose there are Node A and Node B.
When the Node A found self.swarm.get_and_check_transport.is_some()
, it will return Message::AlreadyConnected(AlreadyConnected)
A transport that can pass get_and_check_transport may have three states, Checking
or Connected
or Completed
At this point, the Node B received AlreadyConnected
, but the search found that self.swarm.get_and_check_transport is None, the reason may be:
Case 1. Node A drops immediately after sending the message.
Case 2. Transport is in Checking / Completed state.
Consider Node X, Y, when X Connect Y:
X pushes the transport into the pending list through self.swarm.push_pending_transport(&transport)
. At this time, there are two possibilities for the Transport to enter the Swarm table
Receive `ConnectNodeReport` -> `self.swarm.register(&relay.sender(), transport).await`
Transprot itself issued a `ConnectEvent` to Swarm, triggering
`self.register(&address, t).await?;`
`self.pop_pending_transport(id)?;`
For Y, when a ConnectNodeSend
from X is received, a new transport will be constructed and inserted directly into the swarm table.
At this time, Y registers the Transport through self.swarm.get_or_register(&sender_id, trans).await?
. Since the precondition get_and_check
is already None, this is equivalent to register (to fix)
So in Case 2, the B end is Y
recurrent:
A links B through `ConnectNodeSend`, A creates a transport and stores it in the pending table
B creates transport and stores it in `swarm.table`
Since the Connection has been in the pending state, A sends a request to B for the second time, and B queries that there is a Transport in the Swarm table, so it returns A`lreadyConnected`
Since the connection is not created for A, B cannot be queried in the swarm table, so an error is reported.
The disadvantage of this is that it is possible to build a very large number of links.
The disadvantage of this is that the swarm table may explode in state, and if the other party switches networks, it will be in an already connected state before the previous transport failed / disconnected.
If the other party goes offline directly, it may hang in the checking state.
MSRP over WebRTC Data Channel is Published at Jan/2021, which is based on The Message Session Relay Protocol, and it's extension.
To implement MSRP over WebRTC, it's necessary to handle SCTP transport of peer connection (text data channel based on SCTP). For webrtc-rs
there is already an implementation, but unfortunately, it is not widely supported in browser environment, (we can modify web-sys
to support it, it may easy, but it still won't work in Firefox).
So the best solution of message relay is to create a similar protocol like MSRP.
MSRP defines two request types, or methods. RFC4975
A Send request should contain
a transaction identifier
that is also used for request framing.
To-Path
which is DID
of destination
and her own DID
in the From-Path
header field
message ID
which can be used to correlate status reports with the original message.
REPORT TYPE
When a relay forwards a request, it removes its address from the To-Path header and inserts it as the first DID in the From-Path header. RFC4976
For example, if the path from Alice to Bob is through relays A and B, when B receives the request it contains path headers that look like the following.
Eg.
To-Path: DID(bbb) \
DID(bob)
From-Path: DID(aaa) \
DID(alice)
After forwarding the request, the path headers look like this:
To-Path: DID(bob)
From-Path: DID(bbb)
DID(aaa)
DID(alice)
All node of sub ring MUST exist in main Ring.
When SubRing
is created, Creator
send a message to its successor
StoreVNode {
kind: subring,
data: SubRingData,
did: sha1(subRing.name)
}
SubRingData {
name: "foo",
did: sha1(<name>),
finger: Ring::FingerTable
pubkey: Option<some_key>,
admin: Option<some_did>,
}
VNode
will store data on its local storage.When Node A
Join SubRing.
First it send JoinSubRing(did)
to the SubRing address. The successor of the SubRing VNode will response the successor S
of Node A
on virtual finger table.
Second, Node A
connect to Node S
, and send FindSubRingSuccessor
to S
, meantime, S may send FindSubRingSuccessor
to A
.
Then, Node A and Node S update it's subring finger table.
All Node subscribed DO NOT need to hold the connection of nodes in subring finger table
SubRing VNode
's behaviour is as the same as a real node on the Ring. A Message can be sent from element of subRing to node of main ring, or from main ring to subring.A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.