Skip to content

Decouple staging treasury from genesis - #694

Closed
n13 wants to merge 4 commits into
mainfrom
n13/staging-governance-genesis
Closed

Decouple staging treasury from genesis#694
n13 wants to merge 4 commits into
mainfrom
n13/staging-governance-genesis

Conversation

@n13

@n13 n13 commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • leave the staging-mainnet treasury unconfigured at genesis and seed only its tech collective
  • keep staging-mainnet genesis, accounts, and vesting schedules separate from the future mainnet preset/spec
  • let the tech collective configure or replace the staging treasury through a normal Root referendum
  • make vesting schedule administration Root-only while allowing retargeting before treasury setup
  • use tech-collective accounts as temporary staging vesting beneficiaries
  • start all staging vesting schedules on September 3, 2026 with cliffs capped at 24 hours and existing approximate durations preserved
  • update staging launch and runtime documentation

Tests

  • cargo test -p pallet-vesting (66 passed)
  • cargo test -p quantus-runtime --lib (75 passed)
  • cargo test -p quantus-runtime --test mod (64 passed, 1 pre-existing ignored)
  • cargo check -p quantus-runtime --features runtime-benchmarks
  • git diff --check

@n13 n13 added the bot-review label Sep 2, 2026

@n13 n13 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer model: GPT Sol

Verdict (advisory): Request changes

Blocking finding:

  • runtime/src/genesis_config_presets.rs:649-753, runtime/src/configs/mod.rs:651-653, runtime/src/governance/definitions.rs:104-122, docs/STAGING_MAINNET_LAUNCH.md:65-75: the fixed vesting dates make the documented post-launch retarget impossible through the only permitted admin path. The first three schedules use temporary tech-collective beneficiaries, start at 2026-09-03 00:00 UTC, and have either no cliff or a 24-hour cliff. Retargeting is Root-only, while the production Root track requires at least 2 hours of preparation, 24 hours of confirmation, and another 24 hours before enactment. At review time (2026-09-02 05:23 UTC), even an already-running chain with an immediately submitted, unanimously approved referendum could not enact the retarget before about 2026-09-04 07:23 UTC, after all three cliffs. Because claim is permissionless and pays the beneficiary stored at execution time, those placeholder accounts can receive vested payouts before governance can replace them. Move the start/cliffs far enough past the actual chain launch to cover the full governance delay plus operational margin, or put the final beneficiaries in genesis; please also add a regression test that relates the earliest placeholder cliff to the production Root-track latency.

No other blocking issue was found in the reviewed diff.

Validation on exact head 6f409f1a454e3b133f7dc4ff47c97c24ac3082d5:

  • git diff --check — passed
  • taplo format --check --config taplo.toml — passed
  • scripts/fmt.sh --all -- --check — passed
  • SKIP_WASM_BUILD=1 cargo test --locked -p pallet-vesting — 66 passed
  • SKIP_WASM_BUILD=1 cargo test --locked -p quantus-runtime --lib — 75 passed
  • SKIP_WASM_BUILD=1 cargo test --locked -p quantus-runtime --test mod --features quantus-runtime/fast-governance — 64 passed, 1 pre-existing ignored
  • SKIP_WASM_BUILD=1 cargo check --locked -p quantus-runtime --features runtime-benchmarks — passed

CI at review time: format, dependency-cooldown, and Clippy/doc jobs passed; Linux and macOS test-matrix jobs were still running.

@n13 n13 removed the bot-review label Sep 2, 2026
The three stand-in vesting beneficiaries started at launch with cliffs of at
most 24 hours. Retargeting them is Root-only and the Root track needs 2h
prepare + 24h confirm + 24h enactment, so the placeholders became claimable
about a day before governance could replace them. claim is permissionless and
pays whoever the schedule names at execution time.

Placeholder schedules now start 2026-09-17 UTC, two weeks after the chain.
Rehearsal accounts are unchanged on the launch-day clock.

Track periods are named constants (ROOT_TRACK_*) so the latency can be read
without the fast-governance override. A const assertion and a new preset test
tie the earliest placeholder cliff to that latency.
@n13 n13 added the bot-review label Sep 2, 2026

@n13 n13 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer model: GPT Sol

Verdict (advisory): Approve

No blocking findings.

The prior vesting-timing blocker is resolved on this head. The three temporary beneficiaries now use a September 17 epoch, leaving roughly 12 days of margin beyond the production Root track's 50-hour minimum enactment latency. The invariant is tied to the same named constants that configure the live Root track, with both a compile-time assertion and a preset regression test. The staging preset also leaves treasury unconfigured as intended, while retargeting remains available through Root and treasury setup succeeds through the real tech-collective referendum path.

Validation on exact head b24667e32bf3b0e00256f90d0280f3bb40a50508:

  • git diff --check - passed
  • taplo format --check --config taplo.toml - passed
  • scripts/fmt.sh --all -- --check - passed
  • cargo metadata --locked --no-deps --format-version 1 - passed
  • SKIP_WASM_BUILD=1 cargo test --locked -p pallet-vesting - 66 passed
  • SKIP_WASM_BUILD=1 cargo test --locked -p quantus-runtime --lib - 76 passed
  • SKIP_WASM_BUILD=1 cargo test --locked -p quantus-runtime --test mod --features quantus-runtime/fast-governance - 64 passed, 1 pre-existing ignored
  • cargo check --locked -p quantus-runtime --features runtime-benchmarks,try-runtime - passed, including the runtime WASM build
  • SKIP_WASM_BUILD=1 cargo clippy --locked -p quantus-runtime -- -D warnings - passed

CI at review time: format, dependency cooldown, and the full Clippy/doc job passed; Linux and macOS test-matrix jobs were still running.

@n13 n13 removed the bot-review label Sep 2, 2026
@n13

n13 commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

rethinking this, closing for now

@n13 n13 closed this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants