-
Notifications
You must be signed in to change notification settings - Fork 12
feat(dash-spv): hardcoded masternode seed files + weekly auto-refresh #678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
02c19a5
4706af6
ec672bc
c1f937d
ef7595f
f8a09d9
52a1353
ac9f1a1
50f41f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| name: Update masternode seeds | ||
|
|
||
| # Refreshes the hardcoded masternode IP lists shipped in `dash-network-seeds` | ||
| # by connecting to the Dash P2P network, discovering a recent chain tip via a | ||
| # new-block announcement, issuing a `getmnlistd` request, and writing the | ||
| # resulting masternode IP list (differentiated by regular/evo type). Opens a | ||
| # pull request if any seed file changed. | ||
| # | ||
| # Runs fully self-contained: no RPC credentials or repository secrets needed. | ||
| # The fetcher bootstraps peers from DNS seeds and the existing seed files. | ||
|
|
||
| on: | ||
| schedule: | ||
| # Every Monday at 06:00 UTC. | ||
| - cron: '0 6 * * 1' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| refresh: | ||
| name: Refresh masternode seed files | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| shared-key: "masternode-seeds-fetcher" | ||
|
|
||
| - name: Build fetcher | ||
| run: cargo build --release -p masternode-seeds-fetcher | ||
|
|
||
| - name: Refresh mainnet seeds (with probes) | ||
| env: | ||
| RUST_LOG: info | ||
| run: | | ||
| ./target/release/masternode-seeds-fetcher \ | ||
| --network mainnet \ | ||
| --out dash-network-seeds/seeds/mainnet.txt \ | ||
| --max-peers 16 \ | ||
| --probe-concurrency 100 | ||
|
|
||
| - name: Refresh testnet seeds (with probes) | ||
| env: | ||
| RUST_LOG: info | ||
| run: | | ||
| ./target/release/masternode-seeds-fetcher \ | ||
| --network testnet \ | ||
| --out dash-network-seeds/seeds/testnet.txt \ | ||
| --max-peers 16 \ | ||
| --probe-concurrency 64 | ||
|
|
||
| - name: Verify parsed seed files still build | ||
| run: cargo test -p dash-network-seeds --lib | ||
|
|
||
| - name: Open pull request on change | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| commit-message: "chore(dash-spv): refresh masternode seed files" | ||
| title: "chore(dash-spv): refresh masternode seed files" | ||
| body: | | ||
| Weekly automated refresh of the hardcoded masternode IP lists | ||
| embedded in `dash-spv` (`dash-network-seeds/seeds/mainnet.txt`, | ||
| `dash-network-seeds/seeds/testnet.txt`). | ||
|
|
||
| Generated by `.github/workflows/update-masternode-seeds.yml` | ||
| via the `masternode-seeds-fetcher` crate, which fetches the | ||
| current masternode list from the Dash P2P network using a | ||
| `getmnlistd` request against a peer discovered through DNS | ||
| seeds and the existing seed files. | ||
| branch: chore/refresh-masternode-seeds | ||
| delete-branch: true | ||
| add-paths: | | ||
| dash-network-seeds/seeds/mainnet.txt | ||
| dash-network-seeds/seeds/testnet.txt | ||
| labels: automated | ||
|
Comment on lines
+62
to
+82
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: find .github/workflows -name "*.yml" -o -name "*.yaml" | head -20Repository: dashpay/rust-dashcore Length of output: 373 🏁 Script executed: cat -n .github/workflows/update-masternode-seeds.ymlRepository: dashpay/rust-dashcore Length of output: 3471 🏁 Script executed: cat -n .github/workflows/rust.yml | head -100Repository: dashpay/rust-dashcore Length of output: 2986 🏁 Script executed: rg "spv" .github/workflows/ -A 3 -B 3Repository: dashpay/rust-dashcore Length of output: 5151 🏁 Script executed: rg "pull_request" .github/workflows/rust.ymlRepository: dashpay/rust-dashcore Length of output: 80 🏁 Script executed: rg "dash-network-seeds" .github/scripts/ -lRepository: dashpay/rust-dashcore Length of output: 47 🌐 Web query:
💡 Result: The primary limitation of the GITHUB_TOKEN in GitHub Actions workflows triggered by pull_request events is that actions performed with it (e.g., pushing commits to the base branch or creating pull requests) will not trigger new workflow runs for most events (except workflow_dispatch and repository_dispatch). This prevents recursive or infinite workflow loops. For pull_request workflows (not pull_request_target) from forked repositories, the GITHUB_TOKEN has read-only permissions by default (write permissions are downgraded to read-only unless the repository setting "Send write tokens to workflows from pull requests" is enabled by an admin). This limits what the workflow can do, such as preventing pushes or modifications. Additionally, GITHUB_TOKEN has a rate limit of 1,000 requests per hour per repository (15,000 for GitHub Enterprise Cloud resources). To trigger workflows from a pull_request workflow using GITHUB_TOKEN actions, use a Personal Access Token (PAT) or GitHub App token instead. Citations:
🏁 Script executed: cat -n .github/scripts/ci_config.py | head -200Repository: dashpay/rust-dashcore Length of output: 7152 🏁 Script executed: rg "dash-network-seeds|spv" .github/scripts/ci_config.py -A 2 -B 2Repository: dashpay/rust-dashcore Length of output: 47 🏁 Script executed: cat .github/ci-groups.ymlRepository: dashpay/rust-dashcore Length of output: 751 Auto-opened PRs won't trigger CI with the default
🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| [package] | ||
| name = "dash-network-seeds" | ||
| version = { workspace = true } | ||
| edition = "2024" | ||
| authors = ["Dash Core Team"] | ||
| description = "Hardcoded masternode IP seed lists for Dash mainnet and testnet, differentiated by regular/evo type. Refreshed weekly via CI from the live Dash P2P network." | ||
| license = "MIT" | ||
| repository = "https://github.com/dashpay/rust-dashcore" | ||
|
|
||
| [dependencies] | ||
| dash-network = { path = "../dash-network" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exclusion comment is stale.
Per the PR summary and the fetcher refactor,
masternode-seeds-fetcherno longer usesdashdRPC — it connects to the P2P network (getmnlistd/mnlistdiff) with no credentials. Update the comment so maintainers don't look for RPC plumbing that isn't there.📝 Committable suggestion
🤖 Prompt for AI Agents