Commit Graph

301 Commits

Author SHA1 Message Date
pezkuwichain d2375b0e04 chore: ignore chainspecs directory (simulation-generated) 2026-02-19 22:56:01 +03:00
pezkuwichain 6e835151c7 fix(ah-staking): stall detection grace period, MinerPages fix, and simulation tools
- Add 3-session grace period to stall detection to allow RC XCM round-trip
  before triggering era recovery (StallDetectionCount storage added)
- Fix plan_new_era() to always increment CurrentEra regardless of
  ElectionProvider::start() result, preventing infinite retry loops
- Fix MinerPages from 2 to 32 to match Pages config (was causing
  incomplete OCW solutions and election failures)
- Bump AH spec_version to 1_020_007
- Add subxt example scripts for simulation and mainnet operations
- Remove obsolete fix_force_era.rs (replaced by sim_reset_election.rs)
2026-02-19 17:16:43 +03:00
pezkuwichain 44d12fcba2 test(governance): add OpenGov track configuration unit tests
Verify all 18 tracks (15 standard + 3 welati) have correct production
periods, unique IDs/names, proper origin mappings, and no leftover
test values.
2026-02-19 00:10:21 +03:00
pezkuwichain 3881557470 feat(governance): activate OpenGov production periods and add Welati tracks
Upgrade all 15 OpenGov track periods from Westend test values (minutes)
to Polkadot production values (hours/days). Add 3 new Welati governance
tracks (welati_election, welati_admin, citizenship_admin) with origins
and XCM routing for RC → People Chain governance via OpenGov referenda.

Bump spec_version: 1_020_007 → 1_020_008
2026-02-18 23:36:31 +03:00
pezkuwichain 0948c93fcd docs: update TYR unit precision and AH staking status
- Fix TYR documentation: 1 HEZ = 10^12 TYR (was incorrectly 10^18)
- Record AH ActiveEra 1→2 transition success (block 28805)
2026-02-18 21:24:01 +03:00
pezkuwichain f99b3fe1cd fix(ah): set force_era=ForceNone in genesis to prevent premature elections
Prevents automatic election before validators are staked on AH.
After staking setup, trigger manually with force_new_era().
2026-02-18 21:23:51 +03:00
pezkuwichain 3ae41c0fd5 feat(ah): treasury integration and production staking parameters
- Route RewardRemainder and Slash to Treasury via ResolveTo (previously burned)
- Route DelegatedStaking OnSlash to Treasury
- MaxExposurePageSize: 64 → 512 (Polkadot production value)
- Use prod_or_fast for session Period and SessionLength
- Bump spec_version to 1_020_006
2026-02-18 21:23:23 +03:00
pezkuwichain cedf51fcde feat(rc): update BEEFY keys from mainnet keystore and add mainnet simulation preset
- Replace placeholder BEEFY public keys with actual mainnet keystore-derived keys for all 21 validators
- Add mainnet-sim chain spec (2 validators + real sudo key) for local upgrade testing
2026-02-18 21:23:09 +03:00
pezkuwichain 80c0da071b fix(staking-async): add stalled era recovery for zombie pending eras
When an election completes with 0 winners and RC never sends
activation_timestamp, the pending era becomes a zombie blocking all
future era transitions. Detect this condition (election idle + not
fetching) and revert the planned era to break the deadlock.
2026-02-18 21:22:56 +03:00
pezkuwichain 0f9be4aa03 feat(rc): integrate StakingAhClient pallet and upgrade staking to production parameters
- Add pezpallet-staking-async-ah-client and rc-client dependencies
- Wire StakingAhClient as SessionManager and EventHandler (replacing ValidatorManager for session routing)
- Replace FullIdentificationOf with ExposureOfOrDefault for proper historical session tracking
- Route parachain reward_points through RewardValidatorsWithEraPoints
- EraPayout: switch from dynamic total_issuance to fixed 200M HEZ baseline (prevents compound inflation)
- MaxExposurePageSize: 64 → 512 (Polkadot production value)
- MaxSessionReportRetries: 5 → 64 (~6min retry window for AH reliability)
- Bump spec_version to 1_020_007
2026-02-18 21:22:45 +03:00
pezkuwichain 6dcbfe2638 fix(ah-staking): correct fixed_total_issuance to 200M HEZ baseline
The EraPayout fixed_total_issuance was ~5,216 HEZ (copied from
Polkadot's 10-decimal DOT value). Corrected to 200M HEZ (12 decimals)
to match actual chain total issuance. This fixes staking rewards
being ~40x lower than intended on Asset Hub.
2026-02-18 20:19:40 +03:00
pezkuwichain 880fac0bd1 fix: lower MinTrust thresholds for welati elections, fix CI fmt
Welati MinTrust changes (People Chain 1_020_008 prep):
- Presidential: 600→250, Parliamentary: 300→100
- SpeakerElection: 400→200, ConstitutionalCourt: 750→275
- OfficialRole: 250→75, Endorser: 100→40

Also fix grant_noter_tiki.rs formatting for CI quick-checks.
2026-02-17 04:01:26 +03:00
pezkuwichain eb9e62e8e1 sec: remove hardcoded mnemonics, add mainnet tools and subxt examples
- Add grant_noter_tiki.rs: XCM batch to grant Noter tiki to 21 validators
- Add check_noter_tiki.rs: verify UserTikis storage on People Chain
- Update CRITICAL_STATE: People Chain 1_020_007, noter grant completed,
  relay chain staking-score removal noted
2026-02-16 23:52:08 +03:00
pezkuwichain 657a6c38d9 fix: clippy dead_code and manual_flatten in remaining subxt examples 2026-02-16 21:08:40 +03:00
pezkuwichain 50aed7a9ae fix: clippy manual_flatten and dead_code in subxt examples 2026-02-16 20:49:53 +03:00
pezkuwichain dc8ed697fb fix: taplo formatting and umbrella version for CI quick-checks 2026-02-16 20:00:52 +03:00
pezkuwichain 6bbbd683ab fix: remove staking-score from relay chain, fix CI quick-checks
- Remove pezpallet_staking_score from relay chain runtime (noter model
  lives on People Chain only)
- Update welati mock to current staking-score Config trait
- Fix staking-score feature propagation (zepter: std, runtime-benchmarks)
- Format vendor subxt example files (rustfmt)
- Regenerate umbrella crate
- Update CRITICAL_STATE.md with noter delegation status
2026-02-16 19:50:13 +03:00
pezkuwichain 643c482611 feat: noter delegation for staking score system
- Add NoterCheck trait: accounts with Noter tiki can submit
  receive_staking_details without root origin
- Remove stake requirement from start_score_tracking (opt-in only,
  bot + noter submit data after event detection)
- Add zero-stake cleanup: sending staked_amount=0 removes cached
  entry, cleans up StakingStartBlock when no stake remains
- Add NotAuthorized error for non-noter signed callers
- Configure TikiNoterChecker in people-pezkuwichain runtime
- Update weights with detailed DB operation analysis
- Bump People Chain spec_version to 1_020_007
- 49 unit tests (17 new E2E + edge cases), fmt/clippy clean
2026-02-16 19:01:18 +03:00
pezkuwichain 0a917d330b sec: remove hardcoded mnemonics, add mainnet tools and subxt examples
- Replace all hardcoded wallet mnemonics with env variable reads
- Add comprehensive e2e test suite (tools/e2e-test/)
- Add zagros validator management tools
- Add subxt examples for mainnet operations
- Update CRITICAL_STATE with zagros testnet and mainnet status
- Fix people chain spec ID and chainspec build script
2026-02-16 08:18:26 +03:00
pezkuwichain 90c5a7f6b1 feat: dual-chain staking score with XCM data pipeline
- Rewrite pezpallet-staking-score: StorageDoubleMap (AccountId x StakingSource),
  remove StakingInfoProvider trait, all data via receive_staking_details()
- Add StakingSource enum (RelayChain / AssetHub) for multi-source aggregation
- Add OnStakingDataUpdate callback trait for trust pallet integration
- Trust pallet: on_initialize hook for periodic batch updates,
  OnStakingDataUpdate impl triggers immediate score recalculation
- People Chain runtime: remove noop StakingInfoProvider, wire OnStakingUpdate = Trust
- Update weights for both pallets (conservative estimates incl. callback cost)
- spec_version 1_020_005 -> 1_020_006
- 57 tests passing (25 staking-score + 32 trust)
2026-02-16 07:49:13 +03:00
pezkuwichain 1a51562b5e feat: add mainnet chain spec builder script
Generates relay + teyrchain chain specs with embedded genesis data.
2026-02-15 01:12:21 +03:00
pezkuwichain fe7319182d fix: validator stash balance must exceed bond amount + existential deposit
STASH*2 ensures validators have enough balance to cover both the
staking bond and the existential deposit at genesis.
2026-02-15 00:48:18 +03:00
pezkuwichain 1ca42c3912 feat: add mainnet deployment script with session key injection
Automates: stop nodes, archive old chain data, deploy binaries,
inject session keys from MAINNET_WALLETS.json, start nodes sequentially.
2026-02-14 23:43:57 +03:00
pezkuwichain dd78f55ba8 bump: spec_version 1_020_003 → 1_020_004 for fresh mainnet launch 2026-02-14 23:40:18 +03:00
pezkuwichain e15fb3db11 fix: connect authorship EventHandler to Staking for reward point distribution
Without this, block authors are never reported to the staking pallet,
resulting in zero reward points and no era payouts.
2026-02-14 20:31:30 +03:00
pezkuwichain b5f1864d85 ci: retrigger workflows after VPS2 cache cleanup 2026-02-14 12:15:17 +03:00
pezkuwichain 9ae71a1295 fix: add version field to umbrella crate for CI check-umbrella 2026-02-14 11:48:44 +03:00
pezkuwichain 70cd8639dd style: taplo formatting and umbrella regeneration 2026-02-14 11:02:01 +03:00
pezkuwichain d2e722dd14 feat: add NominationPoolsApi and StakingApi to Asset Hub runtime
- Implement NominationPoolsApi (pending_rewards, points_to_balance, etc.)
- Implement StakingApi (nominations_quota, eras_stakers_page_count, pending_rewards)
- Fix ss58-registry doc-test crate name (pezkuwi → pezsp)
- Update CRITICAL_STATE.md with current network status and pending tasks
2026-02-14 10:53:06 +03:00
pezkuwichain 7537c1703d fix: zepter feature propagation, umbrella regeneration, taplo formatting
- Propagate runtime-benchmarks feature to pezsp-test-primitives in pezsp-api
- Regenerate umbrella crate after pezsp-api dev-dependency addition
- Apply taplo formatting to all changed Cargo.toml files
2026-02-14 09:38:10 +03:00
pezkuwichain d19e78969b fix: resolve CI failures in pezkuwi-subxt-metadata no_std and pezsp-api doc-tests
- Replace thiserror::Error derive with manual Display + core::error::Error
  impl in pezkuwi-subxt-metadata TryFromError, fixing no_std compilation
  (thiserror v1 does not support no_std)
- Add pezsp-test-primitives as dev-dependency to pezsp-api, fixing 3
  failing doc-tests that import pezsp_test_primitives::Block
- Revert unnecessary features=["std"] on workspace pezkuwi-subxt-metadata dep
- Apply taplo formatting to changed Cargo.toml files
2026-02-14 06:00:17 +03:00
pezkuwichain 09b1a53450 chore: remove sensitive files from tracking and update .gitignore
- Remove comprehensive_test.rs and create_nft_collection.rs from git
  (contain hardcoded VPS IPs and test wallet mnemonic)
- Add chain spec JSON files to .gitignore
- Add local tools and mainnet operation scripts to .gitignore
2026-02-14 04:48:48 +03:00
pezkuwichain e41c280c8f feat: add Tiki GenesisConfig for Collection 0 bootstrap and XCM creation tools
- Add GenesisConfig to pezpallet-tiki that creates NFT Collection 0 and mints
  NFT #0 for the founding citizen at genesis, solving the chicken-egg problem
  where Collection 0 must exist before any citizenship NFTs can be minted
- Wire founding_citizen parameter through all People Chain genesis presets
  (genesis, local_testnet, dev)
- Add create_nft_collection.rs XCM script for creating Collection 0 on live
  chain via sudo XCM Transact from Relay Chain
- Add comprehensive_test.rs for post-upgrade chain testing
- Fix clippy warnings (map().flatten() -> and_then()) and apply taplo formatting
2026-02-14 04:41:21 +03:00
pezkuwichain c6b854209e chore: bump spec_version to 1_020_003 for runtime upgrade
Bump all three runtime spec_versions from 1_020_002 to 1_020_003
to prepare for on-chain runtime upgrade deploying trust score
system changes to the live chain.
2026-02-13 23:47:48 +03:00
pezkuwichain cc568f5560 style: fix taplo TOML formatting in subxt vendor crates 2026-02-13 21:35:04 +03:00
pezkuwichain e9930bf10f fix: propagate std feature to pezkuwi-subxt-core in subxt and rpcs crates 2026-02-13 21:17:38 +03:00
pezkuwichain 685cac4016 fix: add TrustScoreUpdater type to welati mock Config implementations 2026-02-13 21:02:56 +03:00
pezkuwichain 1333f84968 feat: wire trust score system with cross-chain staking data and component triggers
- Add CachedStakingDetails storage and receive_staking_details extrinsic
  to staking-score pallet for Asset Hub XCM data reception
- Add TrustScoreUpdater triggers to referral, tiki, and perwerde pallets
  so component score changes propagate to trust pallet
- Wire runtime hooks (OnKycApproved, OnCitizenshipRevoked) to Referral
  and CitizenNftProvider to Tiki in people.rs
- Fix PerwerdeScoreSource and ReferralScoreSource to read actual pallet data
- Fix EnsureOrigin trait feature unification issue by removing cfg gate
  from try_successful_origin and adding default Err(()) implementation
- Fix workspace Cargo.toml default-features for pezkuwi-subxt dependencies
2026-02-13 20:13:50 +03:00
pezkuwichain 3556aa74fa style: fix formatting in StakingSessionManager 2026-02-13 00:37:51 +03:00
pezkuwichain ad77ae61b5 feat: forward session events to staking pallet for era progression on Asset Hub
Asset Hub's pallet_staking_async era never advances because it expects
SessionReport messages from the relay chain's ah_client pallet, which is
not yet active. This adds a StakingSessionManager wrapper that intercepts
local session rotation events and generates SessionReport messages to drive
era transitions directly on Asset Hub.

Changes:
- Add StakingSessionManager in staking.rs that delegates to both
  CollatorSelection and Staking via on_relay_session_report()
- Switch SessionManager from CollatorSelection to StakingSessionManager
- Add FixActiveEraStart migration to correct ActiveEra.start=0 from genesis
- Bump spec_version to 1_020_002
2026-02-12 23:58:58 +03:00
pezkuwichain ebefa0b244 fix: add cache cleanup step to prevent disk exhaustion in CI 2026-02-12 06:18:45 +03:00
pezkuwichain 88730fe470 fix: exclude revive-eth-rpc from clippy and stop VPS2 runner-8
subxt proc-macro in pezpallet-revive-eth-rpc fails to generate
subxt_client module without cached artifacts. Also reduced VPS2 to
single runner to prevent concurrent disk exhaustion.
2026-02-12 05:25:25 +03:00
pezkuwichain 594c7a674e fix: increase CI timeouts to 90m and exclude wasm-dependent doc-test
Cold cache builds exceed 45m limit. Also exclude pezsc-basic-authorship
from doc-tests as it requires wasm binary (incompatible with SKIP_WASM_BUILD).
2026-02-12 04:29:02 +03:00
pezkuwichain 3a7ceaa528 fix: serialize CI jobs to prevent concurrent disk exhaustion
Run check-try-runtime after cargo-clippy (not in parallel) and
build-rustdoc after test-doc. Jobs on the same VPS share a single
disk, so parallel builds exhaust available space.
Both Checks jobs share one cache volume; both Docs jobs share another.
2026-02-12 02:47:40 +03:00
pezkuwichain 6700a35699 fix: separate CI cache volumes to prevent concurrent disk exhaustion
Each workflow job now uses its own cache directory to avoid multiple
runners on the same VPS writing to the same target dir simultaneously.
2026-02-12 02:03:19 +03:00
pezkuwichain 6e5d9ade17 fix: mark zombienet doc-tests as ignore to fix doc-test compilation
Doc-tests use full crate names (pezkuwi_zombienet_provider etc.) which
are not available as extern crates in the doc-test compilation context.
These examples require a running network and cannot be executed anyway.
2026-02-11 23:59:23 +03:00
pezkuwichain 8961c76736 fix: restore provider crate alias in zombienet test module 2026-02-11 12:53:54 +03:00
pezkuwichain 5af1d08538 style: cargo fmt on zombienet-sdk import ordering 2026-02-11 10:04:22 +03:00
pezkuwichain 0c21aaee3e fix: remove needless borrows in tiki migration tests (clippy) 2026-02-11 07:56:13 +03:00
pezkuwichain 7e94916beb fix: rename old crate references in zombienet-sdk doc-tests 2026-02-11 07:06:33 +03:00