diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml new file mode 100644 index 0000000..6951728 --- /dev/null +++ b/.github/workflows/validate.yaml @@ -0,0 +1,17 @@ +name: Validate +on: + pull_request: + push: + branches: [main] +jobs: + static-code-analysis: + runs-on: minafoundation-default-runners + steps: + - name: 📥 Checkout + uses: actions/checkout@v4.1.1 + - name: 🐍 Set up Python + uses: actions/setup-python@v5.1.0 + with: + python-version: 3.10.12 + - name: 🔍 Run linting + uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..1a494d6 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,20 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: check-merge-conflict + - id: check-yaml + - id: end-of-file-fixer + - id: no-commit-to-branch + - id: trailing-whitespace + - id: file-contents-sorter + files: "networks/" + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.10.0.1 + hooks: + - id: shellcheck + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.1.0 + hooks: + - id: prettier + types_or: [markdown, yaml] diff --git a/README.md b/README.md new file mode 100644 index 0000000..a1ab62d --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# Mina Foundation Seed Lists + +This repository contains the seed lists published by Mina Foundation. + +The lists are accessible at `bootnodes.minaprotocol.com`, e.g.: + +- `mainnet`: https://bootnodes.minaprotocol.com/networks/mainnet.txt + +## How to Submit a New Seed + +Thank you for considering contributing to the Mina Foundation Seed Lists! Follow these steps to submit a new seed for the community: + +1. **Fork the Repository**: Click on the "Fork" button at the top-right corner of this repository's page. This will create a copy of the repository in your GitHub account. + +2. **Add Your Seed**: Edit the appropriate seed list file (e.g., `mainnet.txt`) in your forked repository. Add your seed to the list following the existing format. + +3. **Ensure Precommit Checks Pass**: Before submitting your pull request, make sure that all precommit checks are passing. These checks may include linting, formatting, and any other relevant tests. + +4. **Submit Your Pull Request**: Once you've added your seed and ensured that all checks pass, submit a pull request (PR) to the main repository. In your PR description, provide a brief explanation of the seed you're adding and any relevant details. + +5. **Review and Merge**: Your PR will be reviewed by the maintainers of the repository. They may request changes or provide feedback. Once everything looks good, your PR will be merged into the main branch, and your seed will be included in the Mina Foundation Seed Lists. + +Thank you for helping to grow the Mina Protocol community! + +--- diff --git a/mainnet/seeds.txt b/mainnet/seeds.txt deleted file mode 100644 index 8cb8953..0000000 --- a/mainnet/seeds.txt +++ /dev/null @@ -1,23 +0,0 @@ -/dns4/seed-1.mainnet.o1test.net/tcp/10000/p2p/12D3KooWCa1d7G3SkRxy846qTvdAFX69NnoYZ32orWVLqJcDVGHW -/dns4/seed-2.mainnet.o1test.net/tcp/10001/p2p/12D3KooWK4NfthViCTyLgVQa1WvqDC1NccVxGruCXCZUt3GqvFvn -/dns4/seed-3.mainnet.o1test.net/tcp/10002/p2p/12D3KooWNofeYVAJXA3WGg2qCDhs3GEe71kTmKpFQXRbZmCz1Vr7 -/dns4/mina-seed.bitcat365.com/tcp/10001/p2p/12D3KooWQzozNTDKL7MqUh6Nh11GMA4pQhRCAsNTRWxCAzAi4VbE -/dns4/mina-seed-1.zkvalidator.com/tcp/8302/p2p/12D3KooWSR7LMBSfEk3LQUudmsX27yuRHe9NUxwLumurGF5P1MNS -/dns4/mina-1.figment.io/tcp/8302/p2p/12D3KooWSkfwArLtqGMht1a9w3z3QiiqA2E6seBRAk378rvanGRZ -/dns4/mina-seed.staker.space/tcp/8302/p2p/12D3KooWCE97fGwuDCicVNK3ZWF8fVzfNezp3uGjmSc8VrRFem6a -/dns4/mina-seed.genesislab.net/tcp/8302/p2p/12D3KooWRcHiFQsbYgjPSxtMg4Y9ifrvmCFtJQ8Qztqd3z4L9buU -/dns4/mina-seed.hashquark.io/tcp/8302/p2p/12D3KooWRqdbJszoX6AB2E47KR45Kex1RptichA2MDkNSCqX5eb4 -/ip4/95.217.106.189/tcp/8302/p2p/12D3KooWSxxCtzRLfUzoxgRYW9fTKWPUujdvStuwCPSPUN3629mb -/dns4/mina.cloud.p2pvalidator.org/tcp/8302/p2p/12D3KooW9qa8CcihmpPbKjN1e8da1RsBS67bExgpVDD9sCjzbHfh -/dns4/mina-seed.dsrvlabs.net/tcp/8302/p2p/12D3KooWFTrtiuscobTsJwvShNzBWH56Jt6hWoZTtYqFFyQWFA7c -/dns4/mina-seed-1.nodeasy.com/tcp/10001/p2p/12D3KooWRMXtoYktAqkNFd9LkT1XpAJWryqje88owWf9v9SpaayN -/dns4/earth.mina.kelepool.pro/tcp/8302/p2p/12D3KooWSBRhKVd9r1JXkRTD4qc9SkNd9ACrRCeW9e6GcDakqHjh -/dns4/seed.minaprotocol.fish/tcp/8302/p2p/12D3KooWQHTEXCbS1xxEMFHdALBTA1uLbFPr3okXvUos57d5seHW -/ip4/159.89.96.164/tcp/8302/p2p/12D3KooWCCZkMjQxsBsSLPmAvFC9RGLz4XjKtdvpKmBdr5zpYz6x -/dns4/seed.mina-staked.cloud/tcp/8302/p2p/12D3KooWNbeghjwB9MKgVniTv4pqtCbtHxjWpidiaoRiMhow3Mr1 -/ip4/47.242.110.4/tcp/8302/p2p/12D3KooWKsgKQRNsptXF7MDJ37FzJ9sz6uACuzow6zTJkyog3bWq -/dns4/seed.minaexplorer.com/tcp/8302/p2p/12D3KooWR7coZtrMHvsgsfiWq2GESYypac3i29LFGp6EpbtjxBiJ -/ip4/135.181.63.89/tcp/8302/p2p/12D3KooWNtvMGAvzrDEPBAHhiB7YoSWjPgmLcMmEeLCeoomWT8bT -/dns4/mina-mainnet-seed.staketab.com/tcp/10003/p2p/12D3KooWSDTiXcdBVpN12ZqXJ49qCFp8zB1NnovuhZu6A28GLF1J -/dns4/seed.piconbello.com/tcp/10001/p2p/12D3KooWRFac2AztcTeen2DYNwnTrmVBvwNDsRiFpDVdTkwdFAHP -/dns4/mina-seed.w3m.one/tcp/10001/p2p/12D3KooWFVvahnR3ofaSNX5XZaUQJ1zbrySjNCJP8K1vjBhHWURB diff --git a/networks/mainnet.txt b/networks/mainnet.txt new file mode 100644 index 0000000..60006ea --- /dev/null +++ b/networks/mainnet.txt @@ -0,0 +1,9 @@ +/dns4/mina-mainnet-seed.staketab.com/tcp/10003/p2p/12D3KooWSDTiXcdBVpN12ZqXJ49qCFp8zB1NnovuhZu6A28GLF1J +/dns4/mina-seed-1.zkvalidator.com/tcp/8302/p2p/12D3KooWSR7LMBSfEk3LQUudmsX27yuRHe9NUxwLumurGF5P1MNS +/dns4/mina-seed.bitcat365.com/tcp/10001/p2p/12D3KooWQzozNTDKL7MqUh6Nh11GMA4pQhRCAsNTRWxCAzAi4VbE +/dns4/seed-0-production-mainnet.minaprotocol.network/tcp/10001/p2p/12D3KooWPywsM191KGGNVGiNqN35nyyJg4W2BhhYukF6hP9YBR8q +/dns4/seed-1-production-mainnet.minaprotocol.network/tcp/10001/p2p/12D3KooWGB6mJ9Ub9qRBDgHhedNXH4FawWjGQGGN2tQKaKa3gK2h +/dns4/seed-1.mainnet.o1test.net/tcp/10000/p2p/12D3KooWCa1d7G3SkRxy846qTvdAFX69NnoYZ32orWVLqJcDVGHW +/dns4/seed-2.mainnet.o1test.net/tcp/10001/p2p/12D3KooWK4NfthViCTyLgVQa1WvqDC1NccVxGruCXCZUt3GqvFvn +/dns4/seed-3.mainnet.o1test.net/tcp/10002/p2p/12D3KooWNofeYVAJXA3WGg2qCDhs3GEe71kTmKpFQXRbZmCz1Vr7 +/dns4/seed.minaexplorer.com/tcp/8302/p2p/12D3KooWR7coZtrMHvsgsfiWq2GESYypac3i29LFGp6EpbtjxBiJ diff --git a/scripts/check-seeds.sh b/scripts/check-seeds.sh new file mode 100755 index 0000000..b19eacc --- /dev/null +++ b/scripts/check-seeds.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +set -e +seed_list="${1:-seeds.txt}" +exit_code=0 + +check_seed () { + seed="$1" + host=$(echo "$seed" | cut -d '/' -f3) + port=$(echo "$seed" | cut -d '/' -f5) + + if timeout 1 nc -z "$host" "$port" 1>/dev/null 2>&1; then + echo "$seed: ONLINE" + else + echo "$seed: OFFLINE" + exit_code=1 + fi +} + +while read -r seed; do + check_seed "$seed" +done < "$seed_list" + +exit $exit_code