2

Implementing smoldot (substrate-connect) on a fork of the polkadot-JS. Connecting to a light node boot node works most of the time, but is intermittent.

screenshot of connection that looks like it should work but is not connecting

When we are able to connect via light client, we can navigate through the entire website very well BUT we cannot send transactions of any kind. Each time a transaction is sent, we get either the infinite blue spinning circle and no result OR (one time only) we got a Dropped error.

screenshot of the infinite spinning blue circle with console output

We noticed a number of drops and reconnects in the web socket. We see these when connected to a normal RPC node as well so that is not unique to the light client.

What are we missing?

The chain spec header is:

    {
  "name": "Geode",
  "id": "geode_mainnet",
  "chainType": "Live",
  "bootNodes": [
    "/ip4/167.86.91.139/tcp/30336/ws/p2p/12D3KooWE6KQEVWgzzJvecLzAdzEyAozKb1wNhY61nCNxHociEQb",
    "/ip4/167.86.91.139/tcp/30334/ws/p2p/12D3KooWCTdxBFVwMs8yrm63SEJMcWWfGDdGvR4NWyhfMVyyQyBu",
    "/ip4/207.244.232.237/tcp/30334/ws/p2p/12D3KooWS6Zw8jy5yu5a2ShWBYk5E41GZ6wMVDyEBeCjBwGm2hUi",
    "/ip4/207.244.232.237/tcp/30336/ws/p2p/12D3KooWKmnUoPDwD9PDsZ4V9inUH7tE3XrGnHHbVJaXucCziY5T"
  ],
  "telemetryEndpoints": null,
  "protocolId": "geode",
  "properties": {
    "tokenSymbol": "GEODE"
  },
  "forkBlocks": null,
  "badBlocks": null,
  "lightSyncState": null,
  "codeSubstitutes": {},
  "genesis": {...

WSS and Certificates Setup: The second boot node ("/ip4/167.86.91.139/tcp/30334/ws/p2p/12D3KooWCTdxBFVwMs8yrm63SEJMcWWfGDdGvR4NWyhfMVyyQyBu")as an example, has these flags to set the listen addresses.

  --chain ./GeodeSpec20230211RAW.json \
  --listen-addr=/ip4/0.0.0.0/tcp/30333 \
  --listen-addr=/ip4/0.0.0.0/tcp/30334/ws \

And the following WSS/Certificates setup:

server {
  server_name getgeode.com www.getgeode.com;

  location / {
    proxy_buffers 16 4k;
    proxy_buffer_size 2k;
    proxy_pass http://localhost:30334;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
   }
}

I have verified that all relevant ports are allowed in the firewall (UFW).

2 Answers 2

0

Can you please share more information about how you connect to the light client? What chainspec you are using? what is the WSS and certificates set up for the bootnodes etc etc?

2
  • Thank you! I have added details on the chain spec, WSS/certificates setup on the boot nodes etc to the original question. I would love to know your thoughts! Commented Jun 9 at 18:24
  • I am wondering if the problem is in the chain spec where "lightSyncState": null. What are the options there other than null? Commented Jun 11 at 15:24
0

Can you provide the full chainspec? And/or a complete repro environment?

If the light client sync state is null it means it will resync from the start of the chain. since you're running a private chain this shouldnt be much of an issuing b/c there shouldn't be a lot of blocks.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.