Open pmensik opened 1 year ago
Hey @pmensik . You will probably need a TLS certificate on your bootnode (also wss
) in order to workaround the browser's security measures. You can have a look at this post that says some things that you could test as well, but overall browsers do not allow non secure connections - thus a wss would be needed
Hey @wirednkod, thanks for the reply! Yeah, I already have done the whole setup, I was just wondering how to test it and make sure it's really working. In other words, if there is some other way than interacting with smoldot
directly since I found it a bit inconclusive (sometimes even Parity bootnodes won't work). But I am gonna try to play with it a bit more.
By the way, I just have a two questions regarding the bootnode config
/443/wss/p2p
). Does that mean that bootnode just needs to provide its WSS address and not a plain one in a form of /tcp/30333/p2p
? The reason I am asking is that some bootnodes are actually providing both types of addresses. I include my config for clarity
Nginx
server {
server_name polkadot-bootnode.polkadotters.com;
access_log /var/log/nginx/polkadot-bootnode.log;
listen 443 ssl;
gzip off;
location / {
proxy_pass http://127.0.0.1:30334;
proxy_http_version 1.1;
# setting the headers
}
ssl_certificate /etc/letsencrypt/live/polkadot-bootnode.polkadotters.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/polkadot-bootnode.polkadotters.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
Node config
ExecStart=/usr/local/bin/polkadot \
--name Polkadotters-Bootnode \
--telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
--base-path '/var/lib/polkadot' \
--chain=polkadot
--listen-addr /ip4/0.0.0.0/tcp/30333 \
--listen-addr /ip4/0.0.0.0/tcp/30334/ws \
--public-addr /dns/polkadot-bootnode.polkadotters.com/tcp/30333 \
--public-addr /dns/polkadot-bootnode.polkadotters.com/tcp/30334/ws \
--ws-external \
--rpc-external \
--rpc-methods Safe \
--rpc-cors all \
You can interact with smoldot straight by using the demo provided in it's repo: https://github.com/paritytech/smoldot/blob/main/bin/wasm-node/javascript/demo/demo.mjs
Unfortunately I cannot give you a definitive answer on your second question but for the first one I am aware that these are the bootnodes that light client correctly interacts with. The rest are there since the creation of the chainspec some time ago.
Hello, I hope I am asking in the right repository :-) I wanted to set up a bootnode for Polkadot/Kusama/Westend networks and I ran into an issue - how to test that the websocket configuration with my own certificate is really working? I didn't find any documentation on this so I thought I will ask here. This is what I have tried
polkadot.json
spec which lists only my bootnode. This works both for IP and DNS records of my bootnodebin/polkadot.json
- the weird issue is that sometimes even official Parity bootnodes won't work so it doesn't produce conclusive results as well. I actually tried to test various bootnodes while was at it and again, most of them didn't work - Polkadot JS times out while connecting to the RPC.So now I am pretty much lost and wondering what would be the best to conclusively test that my bootnode configuration for WSS is working before I create PR to the polkadot repository. FYI, the bootnode I am trying to set up is
/dns/polkadot-bootnode.polkadotters.com/tcp/30333/p2p/12D3KooWCgNAXvn3spYBeieVWeZ5V5jcMha5Qq1hLMtGTcFPk93Y
/dns/polkadot-bootnode.polkadotters.com/tcp/30334/ws/p2p/12D3KooWCgNAXvn3spYBeieVWeZ5V5jcMha5Qq1hLMtGTcFPk93Y
Thanks a lot for any hints!