Commit Graph
20 Commits
Author SHA1 Message Date
Satoshi Qazi Muhammed 01a4903337 Keep the light client out of the bot images
@pezkuwi/rpc-provider lists @bizinikiwi/connect as an optional dependency,
so npm installed it, with smoldot, into both images. Both are GPL-3.0, and
the bots never load them: they reach the chains over WsProvider. The images
now install with --omit=optional; with that install both bots load and read
the relay, Asset Hub and People chains.

The lockfiles still list the packages, so Dependency Review, which denies
GPL-3.0, flagged them on the new payout-bot lockfile (the noter's had them
before). It allows exactly those three packages, and the bots job fails if
an image contains @bizinikiwi or smoldot, so the allowance cannot outlive
the reason for it.
2026-10-08 22:45:54 +04:00
Satoshi Qazi Muhammed 2937263461 Run the noter and payout bots on the fixed crypto stack, from their lockfiles
Both images ran `npm install` with version ranges and ignored any lockfile,
so what production ran depended on the day the image was built. The live
containers, built on 2026-10-03, run @pezkuwi/wasm-crypto 7.5.17, whose
ed25519, ecdsa and mnemonic generation are stubs that throw. Both bots sign
with sr25519 only, which is why they kept working.

Each bot now has a package.json and package-lock.json (@pezkuwi/api 16.5.37,
keyring, util and util-crypto 14.0.26, wasm-crypto 7.5.20) and its image
installs exactly that with `npm ci`. Node 20 is past its end of life; the
images move to node:24-alpine.

CI gains a `bots` job that builds each image and runs inside it:
scripts/bot-smoke.mjs checks the installed versions against the lockfile and
signs and verifies with sr25519, ed25519 and ecdsa, and the bot itself must
load and stop at the mnemonic it is not given. Against the previous lockfile
the smoke check fails on mnemonic generation, ed25519 and ecdsa.
2026-10-08 22:45:54 +04:00
SatoshiQaziMuhammed 22f0a6a087 ci: drop the CodeQL job from security.yml (#18)
The organisation's code security configuration enables CodeQL default
setup, and GitHub refuses to apply it while a workflow runs CodeQL itself:
the configuration failed on this repository with "Code scanning conflict".

Default setup covers what this job did. The job ran the default query
suite with no config file, path filters or packs, and the languages it
analysed are among those default setup detects here. Default setup takes
over the scan; this workflow keeps its other jobs.

security-events: write served only the SARIF upload, so it goes with it.
contents: read is all the remaining jobs need.
2026-10-02 04:40:19 +04:00
Kurdistan Tech Ministry 7dac1598dc fix: deploy workflow stash local changes before git pull
git pull was silently failing when VPS had local modifications,
causing deploys to not actually update the code.
2026-03-10 00:53:05 +03:00
Kurdistan Tech Ministry 95e6e49d90 Fix auto-pr to not fail when branches are already in sync 2026-03-02 15:08:19 +03:00
Kurdistan Tech Ministry bc2ecb3a0e Replace force-push sync with PR-based auto-merge workflow 2026-03-02 14:22:23 +03:00
Kurdistan Tech Ministry 8a5681db33 fix: use GITHUB_TOKEN instead of PAT_TOKEN for branch sync 2026-02-19 06:21:26 +03:00
Kurdistan Tech Ministry ae0dac0a11 ci: add sync-branches workflow to keep main and master in sync 2026-02-19 05:55:42 +03:00
Kurdistan Tech Ministry fe95e137b3 fix: use explicit yaml path for codegen and build in deploy 2026-02-19 04:38:59 +03:00
Kurdistan Tech Ministry 37ee9ffd9f fix: add yarn build to deploy workflow
dist/ is gitignored so VPS needs to build TypeScript
handlers locally after git pull.
2026-02-19 04:34:16 +03:00
Kurdistan Tech Ministry d270504c9a fix: handle pruned RPC state in SubQuery node
Substrate nodes prune historical state by default (~256 blocks).
When SubQuery restarts and tries to fetch runtime version for old
blocks, it crashes with "State already discarded". This patch adds
a fallback to current runtime version when historical state is
unavailable, preventing crash loops on pruned RPC endpoints.

Also removes --pull from deploy workflow to avoid unnecessary
full rebuilds on every push.
2026-02-19 02:22:52 +03:00
Kurdistan Tech Ministry 43e4a5d939 Use custom Dockerfile.node with @pezkuwi API aliases instead of generic subql-node 2026-02-14 04:15:57 +03:00
Kurdistan Tech Ministry 076b54bdc9 Add multi-staking entities, APY calculation, Asset Hub indexer support
- Add StakingApy, ActiveStaker, Reward entities to schema.graphql
- Add APY calculation engine in NewEra.ts (inflation curve + validator commission)
- Add saveMultiStakingReward to Rewards.ts and PoolRewards.ts
- Add handleAssetTransfer for assets.Transferred events
- Add constants.ts with genesis hashes and inflation params
- Add docker-compose.prod.yml for production deployment (relay + assethub nodes)
- Add deploy-vps.yml GitHub Actions workflow for auto-deploy on push
2026-02-14 02:38:22 +03:00
Kurdistan Tech Ministry 0b0519bff8 Add codegen step to security workflow and fix prettier formatting 2026-02-13 01:51:37 +03:00
Kurdistan Tech Ministry 62550b442b Fix subql CLI syntax and remove non-existent validate command 2026-02-13 01:48:50 +03:00
Kurdistan Tech Ministry 15eeb16cd4 Fix subql commands: use correct CLI syntax for codegen and build 2026-02-13 01:46:08 +03:00
Kurdistan Tech Ministry 618cea47c6 Specify manifest file (-f pezkuwi.yaml) in CI workflows 2026-02-13 01:44:24 +03:00
Kurdistan Tech Ministry 4c3920ddae Fix CI workflows to use Yarn 4 (Berry) with corepack
- Add packageManager field to package.json for corepack
- Add .yarnrc.yml with node-modules linker
- Update all workflows to use corepack enable + yarn --immutable
- Remove yarn cache from actions/setup-node (incompatible with Yarn 4)
2026-02-13 01:42:00 +03:00
Kurdistan Tech Ministry 46ca19c22d Add security and code quality GitHub Actions workflows
Security workflow includes:
- CodeQL static analysis for TypeScript vulnerabilities
- npm audit for dependency vulnerabilities (fails on critical)
- Dependency review on PRs (blocks high severity, GPL licenses)
- TruffleHog secret scanning
- Weekly scheduled security scans

Code quality workflow includes:
- ESLint linting checks
- Prettier formatting validation
- TypeScript strict type checking
- Cyclomatic complexity analysis (warns on >15)
- Duplicate code detection with jscpd
2026-02-13 01:37:31 +03:00
Kurdistan Tech Ministry ea0ba21359 Add GitHub Actions workflows for CI and deploy 2026-02-12 23:55:56 +03:00