Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,51 @@ jobs:
- id: set_image
run: echo "IMAGE=${{ env.IMAGE }}" >> $GITHUB_OUTPUT

smoldot-connectivity-test:
name: Smoldot connectivity test (${{ matrix.network }})
runs-on: parity-large
needs: [set-image]
container: ${{ needs.set-image.outputs.IMAGE }}
strategy:
fail-fast: false
matrix:
network: [westend-asset-hub, kusama-asset-hub, polkadot-asset-hub, paseo-asset-hub]
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Cache Rust dependencies
uses: swatinem/rust-cache@v2
with:
key: ${{ runner.os }}-rust-staking-miner-${{ hashFiles('**/Cargo.lock') }}
cache-on-failure: true

- name: Build staking-miner
run: |
echo "🔧 Building staking-miner..."
cargo build --release

- name: Test smoldot connectivity to ${{ matrix.network }} Asset Hub
run: |
echo "🔗 Testing smoldot connectivity to ${{ matrix.network }} Asset Hub..."
echo "Note: Initial sync may take a few minutes..."

# Run the info command with smoldot to verify connectivity
# Use timeout to prevent hanging indefinitely (10 minutes should be enough for initial sync)
timeout 600 ./target/release/polkadot-staking-miner --smoldot ${{ matrix.network }} info

echo "✅ Smoldot connectivity test passed for ${{ matrix.network }}!"

- name: Notify smoldot test failure
if: failure()
uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3
with:
room_id: "!tXyUlsDAYvDfRKbzKx:parity.io"
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
server: m.parity.io
message: |
@room Smoldot connectivity test failed for ${{ matrix.network }} https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks/${{ github.run_id }}

nightly-test:
runs-on: parity-large
needs: [set-image]
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ pin-project-lite = "0.2"

# subxt
scale-value = "0.18"
subxt = { version = "0.44.0", features = ["reconnecting-rpc-client"] }
subxt = { version = "0.44.0", features = ["reconnecting-rpc-client", "unstable-light-client"] }
subxt-lightclient = { version = "0.44.0", features = ["native"] }
subxt-rpcs = "0.44.0"


Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,28 @@ You can check the help with:
polkadot-staking-miner --help
```

### Connection Options

The staking miner supports two ways to connect to the network:

#### WebSocket RPC (default)

Connect to a specific RPC node using `--uri`:

```bash
polkadot-staking-miner --uri wss://asset-hub-polkadot-rpc.polkadot.io monitor --seed-or-path //Alice
```

#### Smoldot Light Client

Connect using the embedded smoldot light client with `--smoldot`:

```bash
polkadot-staking-miner --smoldot polkadot-asset-hub monitor --seed-or-path //Alice
```

Available networks: `polkadot-asset-hub`, `kusama-asset-hub`, `westend-asset-hub`, `paseo-asset-hub`.

### Info command

Check remote node's metadata.
Expand Down
62 changes: 62 additions & 0 deletions chainspecs/kusama.json

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions chainspecs/kusama_asset_hub.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "Kusama Asset Hub",
"id": "asset-hub-kusama",
"chainType": "Live",
"bootNodes": [
"/dns/kusama-asset-hub-connect-0.polkadot.io/tcp/30334/p2p/12D3KooWMzvdGcUXxacLdMQzRVrsP1mJrZHcrz8LtGbhLzve84Qx",
"/dns/kusama-asset-hub-connect-0.polkadot.io/tcp/443/wss/p2p/12D3KooWMzvdGcUXxacLdMQzRVrsP1mJrZHcrz8LtGbhLzve84Qx",
"/dns/kusama-asset-hub-connect-1.polkadot.io/tcp/30334/p2p/12D3KooWQmGf5z3DU1kKcZoLzMNgdbP31ybjuwxS1VGLKMUjq5ez",
"/dns/kusama-asset-hub-connect-1.polkadot.io/tcp/443/wss/p2p/12D3KooWQmGf5z3DU1kKcZoLzMNgdbP31ybjuwxS1VGLKMUjq5ez",
"/dns/asset-hub-kusama.boot.stake.plus/tcp/30332/wss/p2p/12D3KooWGfJsBTxWttMwFkyBi6ZvEzAU3mvcVAzE7yFXMZuasicr",
"/dns/asset-hub-kusama.boot.stake.plus/tcp/31332/wss/p2p/12D3KooWK7hHQbFEhhgZURY7V4LzY6BkqLsnCCpEJ69eUF7ucPcE",
"/dns/boot.metaspan.io/tcp/26052/p2p/12D3KooW9z9hKqe3mqYAp5UJMhZiCqhkTHyiR43fegnGmTJ3JAba",
"/dns/boot.metaspan.io/tcp/26056/wss/p2p/12D3KooW9z9hKqe3mqYAp5UJMhZiCqhkTHyiR43fegnGmTJ3JAba",
"/dns/boot.gatotech.network/tcp/33210/p2p/12D3KooWRMUYeWMPkadDG8baX9j1e95fspfp8MhPGym5BQza7Fm5",
"/dns/boot.gatotech.network/tcp/35210/wss/p2p/12D3KooWRMUYeWMPkadDG8baX9j1e95fspfp8MhPGym5BQza7Fm5",
"/dns/statemine-bootnode.turboflakes.io/tcp/30320/p2p/12D3KooWN2Qqvp5wWgjbBMpbqhKgvSibSHfomP5VWVD9VCn3VrV4",
"/dns/statemine-bootnode.turboflakes.io/tcp/30420/wss/p2p/12D3KooWN2Qqvp5wWgjbBMpbqhKgvSibSHfomP5VWVD9VCn3VrV4",
"/dns/boot-node.helikon.io/tcp/10210/p2p/12D3KooWFXRQce3aMgZMn5SxvHtYH4PsR63TZLf8LrnBsEVTyzdr",
"/dns/boot-node.helikon.io/tcp/10212/wss/p2p/12D3KooWFXRQce3aMgZMn5SxvHtYH4PsR63TZLf8LrnBsEVTyzdr",
"/dns/asset-hub-kusama.bootnode.amforc.com/tcp/30007/p2p/12D3KooWHy1CPndZYphwdVqMb295KPC6LRt17Ae3zNSr7evzeF5a",
"/dns/asset-hub-kusama.bootnode.amforc.com/tcp/29999/wss/p2p/12D3KooWHy1CPndZYphwdVqMb295KPC6LRt17Ae3zNSr7evzeF5a",
"/dns/statemine-boot-ng.dwellir.com/tcp/30343/p2p/12D3KooWQNJKBaNfW6Nn7HZDi5pSSEFmHL2Qz7chr9RksQUDR1Wk",
"/dns/statemine-boot-ng.dwellir.com/tcp/443/wss/p2p/12D3KooWQNJKBaNfW6Nn7HZDi5pSSEFmHL2Qz7chr9RksQUDR1Wk",
"/dns/statemine-bootnode.radiumblock.com/tcp/30333/p2p/12D3KooWCKUrE5uaXQ288ko3Ex3zCyozyJLG47KEYTopinnXNtYL",
"/dns/statemine-bootnode.radiumblock.com/tcp/30336/wss/p2p/12D3KooWCKUrE5uaXQ288ko3Ex3zCyozyJLG47KEYTopinnXNtYL",
"/dns/mine14.rotko.net/tcp/33524/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu",
"/dns/mine14.rotko.net/tcp/34524/ws/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu",
"/dns/mine14.rotko.net/tcp/35524/wss/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu",
"/dns/asset-hub-kusama.bootnodes.polkadotters.com/tcp/30511/p2p/12D3KooWDpk7wVH7RgjErEvbvAZ2kY5VeaAwRJP5ojmn1e8b8UbU",
"/dns/asset-hub-kusama.bootnodes.polkadotters.com/tcp/30513/wss/p2p/12D3KooWDpk7wVH7RgjErEvbvAZ2kY5VeaAwRJP5ojmn1e8b8UbU",
"/dns/boot-kusama-assethub.luckyfriday.io/tcp/443/wss/p2p/12D3KooWSwaeFs6FNgpgh54fdoxSDAA4nJNaPE3PAcse2GRrG7b3"
],
"properties": {
"ss58Format": 2,
"tokenDecimals": 12,
"tokenSymbol": "KSM"
},
"relay_chain": "ksmcc3",
"para_id": 1000,
"consensusEngine": null,
"genesis": {
"stateRootHash": "0x299ac939ea4722d1fcf7f4873675040ebc83d144620c76206dbeb7468cf30cdf"
}
}
42 changes: 42 additions & 0 deletions chainspecs/paseo.json

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions chainspecs/paseo_asset_hub.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "Paseo Asset Hub",
"id": "asset-hub-paseo",
"chainType": "Live",
"bootNodes": [
"/dns/asset-hub-paseo-bootnode.turboflakes.io/tcp/30330/p2p/12D3KooWJzfVkdDnKfn2hQ1c3ysrbmReTjVKrEBHkdwgZThbB1BM",
"/dns/asset-hub-paseo-bootnode.turboflakes.io/tcp/30430/wss/p2p/12D3KooWJzfVkdDnKfn2hQ1c3ysrbmReTjVKrEBHkdwgZThbB1BM",
"/dns/asset-hub-paseo.bootnode.amforc.com/tcp/29999/wss/p2p/12D3KooWLGk5uPRPnfVafLXSuMiFn1nPUbUqHFB9Ac5ps14g9Vpe",
"/dns/asset-hub-paseo.bootnode.amforc.com/tcp/30004/p2p/12D3KooWLGk5uPRPnfVafLXSuMiFn1nPUbUqHFB9Ac5ps14g9Vpe"
],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"ss58Format": 0,
"tokenDecimals": 10,
"tokenSymbol": "PAS"
},
"relay_chain": "paseo",
"para_id": 1000,
"codeSubstitutes": {},
"genesis": {
"stateRootHash": "0xe24abb446f9aa757610fedc53cc631536f3b456a927a1ab1b9018ea2df3c925d"
}
}
60 changes: 60 additions & 0 deletions chainspecs/polkadot.json

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions chainspecs/polkadot_asset_hub.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "Polkadot Asset Hub",
"id": "asset-hub-polkadot",
"chainType": "Live",
"bootNodes": [
"/dns/polkadot-asset-hub-connect-0.polkadot.io/tcp/30334/p2p/12D3KooWLHqbcQtoBygf7GJgVjVa3TaeLuf7VbicNdooaCmQM2JZ",
"/dns/polkadot-asset-hub-connect-0.polkadot.io/tcp/443/wss/p2p/12D3KooWLHqbcQtoBygf7GJgVjVa3TaeLuf7VbicNdooaCmQM2JZ",
"/dns/polkadot-asset-hub-connect-1.polkadot.io/tcp/30334/p2p/12D3KooWNDrKSayoZXGGE2dRSFW2g1iGPq3fTZE2U39ma9yZGKd3",
"/dns/polkadot-asset-hub-connect-1.polkadot.io/tcp/443/wss/p2p/12D3KooWNDrKSayoZXGGE2dRSFW2g1iGPq3fTZE2U39ma9yZGKd3",
"/dns/asset-hub-polkadot.boot.stake.plus/tcp/30332/wss/p2p/12D3KooWJzTrFcc11AZKTMUmmLr5XLJ9qKVupZXkwHUMx4ULbwm2",
"/dns/asset-hub-polkadot.boot.stake.plus/tcp/31332/wss/p2p/12D3KooWNWF2zwxWDuZfXEzL29yeXAAubFy8tCCMjPwWLCZdLRqc",
"/dns/boot.metaspan.io/tcp/16052/p2p/12D3KooWLwiJuvqQUB4kYaSjLenFKH9dWZhGZ4qi7pSb3sUYU651",
"/dns/boot.metaspan.io/tcp/16056/wss/p2p/12D3KooWLwiJuvqQUB4kYaSjLenFKH9dWZhGZ4qi7pSb3sUYU651",
"/dns/boot.gatotech.network/tcp/33110/p2p/12D3KooWKgwQfAeDoJARdtxFNNWfbYmcu6s4yUuSifnNoDgzHZgm",
"/dns/boot.gatotech.network/tcp/35110/wss/p2p/12D3KooWKgwQfAeDoJARdtxFNNWfbYmcu6s4yUuSifnNoDgzHZgm",
"/dns/statemint-bootnode.turboflakes.io/tcp/30315/p2p/12D3KooWL8CyLww3m3pRySQGGYGNJhWDMqko3j5xi67ckP7hDUvo",
"/dns/statemint-bootnode.turboflakes.io/tcp/30415/wss/p2p/12D3KooWL8CyLww3m3pRySQGGYGNJhWDMqko3j5xi67ckP7hDUvo",
"/dns/boot-node.helikon.io/tcp/10220/p2p/12D3KooW9uybhguhDjVJc3U3kgZC3i8rWmAnSpbnJkmuR7C6ZsRW",
"/dns/boot-node.helikon.io/tcp/10222/wss/p2p/12D3KooW9uybhguhDjVJc3U3kgZC3i8rWmAnSpbnJkmuR7C6ZsRW",
"/dns/asset-hub-polkadot.bootnode.amforc.com/tcp/30007/p2p/12D3KooWDLxPXYnSHjNwq9ibqgxuzRni5VViuGNSjNe3ueqVgqE3",
"/dns/asset-hub-polkadot.bootnode.amforc.com/tcp/29999/wss/p2p/12D3KooWDLxPXYnSHjNwq9ibqgxuzRni5VViuGNSjNe3ueqVgqE3",
"/dns/statemint-boot-ng.dwellir.com/tcp/30344/p2p/12D3KooWEFrNuNk8fPdQS2hf34Gmqi6dGSvrETshGJUrqrvfRDZr",
"/dns/statemint-boot-ng.dwellir.com/tcp/443/wss/p2p/12D3KooWEFrNuNk8fPdQS2hf34Gmqi6dGSvrETshGJUrqrvfRDZr",
"/dns/mint14.rotko.net/tcp/33514/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW",
"/dns/mint14.rotko.net/tcp/34514/ws/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW",
"/dns/mint14.rotko.net/tcp/35514/wss/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW",
"/dns/asset-hub-polkadot.bootnodes.polkadotters.com/tcp/30508/p2p/12D3KooWKbfY9a9oywxMJKiALmt7yhrdQkjXMtvxhhDDN23vG93R",
"/dns/boot-polkadot-assethub.luckyfriday.io/tcp/443/wss/p2p/12D3KooWDR9M7CjV1xdjCRbRwkFn1E7sjMaL4oYxGyDWxuLrFc2J"
],
"properties": {
"ss58Format": 0,
"tokenDecimals": 10,
"tokenSymbol": "DOT"
},
"relay_chain": "polkadot",
"para_id": 1000,
"consensusEngine": null,
"codeSubstitutes": {},
"genesis": {
"stateRootHash": "0xc1ef26b567de07159e4ecd415fbbb0340c56a09c4d72c82516d0f3bc2b782c80"
}
}
Loading
Loading