Skip to main content
deleted 35 characters in body
Source Link

This is my parachain terminal command. './target/release/polkadot-parachain --chain customSpecRaw.json --tmp --rpc-cors all --port 4003 --unsafe-rpc-external --rpc-methods=unsafe --collator --detailed-log-output --reserved-only --sync=fast-unsafe -l peerset=trace'

This is my parachain terminal command. './target/release/polkadot-parachain --chain customSpecRaw.json --tmp --rpc-cors all --port 4003 --unsafe-rpc-external --rpc-methods=unsafe --collator --detailed-log-output --reserved-only --sync=fast-unsafe -l peerset=trace'

This is my parachain terminal command. './target/release/polkadot-parachain --chain customSpecRaw.json --tmp --rpc-cors all --port 4003 --unsafe-rpc-external --rpc-methods=unsafe --collator --detailed-log-output -l peerset=trace'

added 4 characters in body
Source Link

node.addEventListener('peer:discovery', async (event) => {
const peerInfo = event.detail; console.log("New peer discovered", peerInfo.id.toString());

 const peerInfo = event.detail;
 console.log("New peer discovered", peerInfo.id.toString());

const rpcUrl = 'http://127.0.0.1:9944';
  
  const body = JSON.stringify({
    jsonrpc: '2.0',
    method: 'system_addReservedPeer',
    params: [
      `/ip4/192.168.1.203/tcp/4003/ws/p2p/${peerId}`
    ],
    id: 2
  });

  const response = await fetch(rpcUrl, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body
  });

node.addEventListener('peer:connect', async (event) => { console.log('peer connect', event.detail)

 console.log('peer connect', event.detail)

})

node.addEventListener('peer:discovery', async (event) => {
const peerInfo = event.detail; console.log("New peer discovered", peerInfo.id.toString());

const rpcUrl = 'http://127.0.0.1:9944';
  
  const body = JSON.stringify({
    jsonrpc: '2.0',
    method: 'system_addReservedPeer',
    params: [
      `/ip4/192.168.1.203/tcp/4003/ws/p2p/${peerId}`
    ],
    id: 2
  });

  const response = await fetch(rpcUrl, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body
  });

node.addEventListener('peer:connect', async (event) => { console.log('peer connect', event.detail) })

node.addEventListener('peer:discovery', async (event) => {

 const peerInfo = event.detail;
 console.log("New peer discovered", peerInfo.id.toString());

const rpcUrl = 'http://127.0.0.1:9944';
  
  const body = JSON.stringify({
    jsonrpc: '2.0',
    method: 'system_addReservedPeer',
    params: [
      `/ip4/192.168.1.203/tcp/4003/ws/p2p/${peerId}`
    ],
    id: 2
  });

  const response = await fetch(rpcUrl, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body
  });

node.addEventListener('peer:connect', async (event) => {

 console.log('peer connect', event.detail)

})

added 2409 characters in body
Source Link

This is the result of me trying to connect the node to the polkadot-parachain:

2024-03-02 19:17:21.748 TRACE tokio-runtime-worker peerset: [Parachain] Adding reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0). 2024-03-02 19:17:21.749 TRACE tokio-runtime-worker peerset: [Parachain] Connecting to 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0) (0/8 num_out/max_out). 2024-03-02 19:17:21.750 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0). 2024-03-02 19:17:21.750 TRACE tokio-runtime-worker peerset: [Parachain] Adding a new known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6. 2024-03-02 19:17:21.750 TRACE tokio-runtime-worker peerset: [Parachain] Trying to add an already known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6, bumping last_updated. 2024-03-02 19:17:21.759 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0). 2024-03-02 19:17:21.769 TRACE tokio-runtime-worker peerset: [Parachain] Reserved peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 (Outbound) dropped from SetId(0). 2024-03-02 19:17:21.769 TRACE tokio-runtime-worker peerset: [Parachain] Peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 disconnected, reputation: -256 to -256 2024-03-02 19:17:21.899 TRACE tokio-runtime-worker peerset: [Parachain] Connecting to 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0) (0/8 num_out/max_out). 2024-03-02 19:17:22.067 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0). 2024-03-02 19:17:22.077 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0). 2024-03-02 19:17:22.105 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0). 2024-03-02 19:17:22.193 TRACE tokio-runtime-worker peerset: [Parachain] Trying to add an already known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6, bumping last_updated.

This is my express block of codes that I'm creating the node through js-libp2p.

This is my express block of codes that I'm creating the node through js-libp2p.

This is the result of me trying to connect the node to the polkadot-parachain:

2024-03-02 19:17:21.748 TRACE tokio-runtime-worker peerset: [Parachain] Adding reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0). 2024-03-02 19:17:21.749 TRACE tokio-runtime-worker peerset: [Parachain] Connecting to 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0) (0/8 num_out/max_out). 2024-03-02 19:17:21.750 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0). 2024-03-02 19:17:21.750 TRACE tokio-runtime-worker peerset: [Parachain] Adding a new known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6. 2024-03-02 19:17:21.750 TRACE tokio-runtime-worker peerset: [Parachain] Trying to add an already known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6, bumping last_updated. 2024-03-02 19:17:21.759 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0). 2024-03-02 19:17:21.769 TRACE tokio-runtime-worker peerset: [Parachain] Reserved peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 (Outbound) dropped from SetId(0). 2024-03-02 19:17:21.769 TRACE tokio-runtime-worker peerset: [Parachain] Peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 disconnected, reputation: -256 to -256 2024-03-02 19:17:21.899 TRACE tokio-runtime-worker peerset: [Parachain] Connecting to 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0) (0/8 num_out/max_out). 2024-03-02 19:17:22.067 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0). 2024-03-02 19:17:22.077 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0). 2024-03-02 19:17:22.105 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0). 2024-03-02 19:17:22.193 TRACE tokio-runtime-worker peerset: [Parachain] Trying to add an already known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6, bumping last_updated.

This is my express block of codes that I'm creating the node through js-libp2p.

Source Link
Loading