Remove provider-initiated checkpoints#311
Open
bkontur wants to merge 2 commits into
Open
Conversation
Implements Option B of #306: the provider-initiated checkpoint design (#7, #92) was added without review and does not hold up — the uploading client can submit the checkpoint in the same session, client-held signed commitments already provide enforceable protection, and the provider-to-provider coordination overlaps what replica nodes do. Removed across all layers: - pallet-storage-provider: extrinsics 32-36 (provider_checkpoint, configure_checkpoint_window, report_missed_checkpoint, claim_checkpoint_rewards, fund_checkpoint_pool), storage items (CheckpointConfigs, LastCheckpointWindow, CheckpointRewards, CheckpointPool), their events and errors, the window/leader helpers, the complete_deregister reward drain, and the matching benchmarks, weights and unit tests - storage-primitives: CheckpointProposal, CheckpointWindowConfig - both runtimes: DefaultCheckpointInterval, DefaultCheckpointGrace, CheckpointReward, CheckpointMissPenalty - provider-node: the checkpoint_coordinator module, the /checkpoint/sign, /checkpoint/duty and /checkpoint/trigger endpoints, the --enable-checkpoint-coordinator flag, the CheckpointChainClient impl, and the coordinator/API/auth tests - JS/TS: layer0/layer1 SDK wrappers, e2e tests 5.4/5.5/5.7, the checkpoint-missed example + just recipe, and the provider/drive/s3 UI checkpoint-config/duty/trigger surfaces - docs (EXTRINSICS_REFERENCE, CLAUDE.md, smart-contracts draft), justfile, CI workflows Client-initiated checkpoint / extend_checkpoint / challenge_checkpoint and the /checkpoint-signature endpoint are untouched. The design and the full removed implementation are archived verbatim in docs/drafts/provider-initiated-checkpoints.md for later re-evaluation. Regenerated from the new runtimes: subxt bindings + metadata (crates/storage-subxt) and PAPI metadata (packages/papi), which also picks up runtime-API drift the stale bindings were missing. Follow-up: re-benchmark pallet-storage-provider weights — the complete_deregister weight still includes the removed drain cost (a safe overestimate).
…kpoints The original design in the draft drifted from what was actually built. Add a normative specification of the shipped implementation (window/leader math, exact extrinsic semantics and validation order, storage layouts, coordinator behavior, HTTP contracts, client surface), a list of known defects to fix on re-implementation (unsound pool funds handling via reserve + deposit_creating, leader-only miss penalty, skeleton coordinator, dead errors), and an ordered re-implementation plan against the current crate layout with the artifact-regeneration steps.
bkontur
requested review from
danielbui12,
ilchu and
mudigal
and removed request for
ilchu
July 23, 2026 13:51
2 tasks
bkontur
enabled auto-merge
July 23, 2026 14:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #306 as Option B — remove entirely: provider-initiated checkpoints were designed (#7) and implemented (#92) without review, and the rationale does not hold up — the uploading client is the sole data holder and can submit the checkpoint on-chain in the same session, a client that retains the providers' signed commitments can already enforce/challenge that state, and the provider-to-provider coordination overlaps what replica nodes do. #305 already pulled the design out of the review-gated docs; this PR deletes the implementation.
What is removed
pallet-storage-providerprovider_checkpoint,configure_checkpoint_window,report_missed_checkpoint,claim_checkpoint_rewards,fund_checkpoint_pool), storage (CheckpointConfigs,LastCheckpointWindow,CheckpointRewards,CheckpointPool), their 5 events and 9 errors, the window/leader helpers, thecomplete_deregisterreward drain, and the matching benchmarks, weights and ~20 unit testsstorage-primitivesCheckpointProposal,CheckpointWindowConfigDefaultCheckpointInterval,DefaultCheckpointGrace,CheckpointReward,CheckpointMissPenalty+ Config wiringcheckpoint_coordinator.rs(whole module),/checkpoint/sign+/checkpoint/duty+/checkpoint/triggerendpoints,--enable-checkpoint-coordinatorflag,CheckpointChainClientimpl insubxt_client.rs,ProviderState::checkpoint_cmd_tx, and the coordinator/API/auth testsconfigureCheckpointWindow,fundCheckpointPool,submitProviderCheckpoint,claimCheckpointRewards,reportMissedCheckpoint,fetchCheckpointDuty,signCheckpointProposal; layer-1getCheckpointDuty/triggerCheckpoint+CheckpointDutytypeexamples/papi/checkpoint-missed.ts+just papi-checkpoint-missed, e2e tests 5.4/5.5/5.7, the coordinator flag injust start-providerand 4 CI workflow jobsEXTRINSICS_REFERENCE.md, the runtime params inCLAUDE.md, mentions in the smart-contracts draftNot touched: the client-initiated
checkpoint/extend_checkpoint/challenge_checkpointextrinsics, the/checkpoint-signatureendpoint, and everything readingbucket.snapshot(e.g. the UIs' checkpoint-info displays) — that mechanism is canonical and unrelated.Archive
The design and the full removed implementation (verbatim) are archived in
docs/drafts/provider-initiated-checkpoints.md: pallet code, primitives, coordinator, HTTP handlers, chain-client impl, SDK wrappers, UI surfaces, the deleted example, and a behavior table for every removed test — enough to re-implement without archaeology if a validated rationale ever emerges.Regenerated artifacts
Both runtime wasms were rebuilt and the metadata re-dumped, so:
crates/storage-subxt:storage_paseo_runtime.scale+ regenerated bindings (just subxt-codegenpipeline). The diff also picks up runtime-API drift the stale bindings were missing (current_anchor_block,anchor_block_time_millis).packages/papi/.papi/metadata/parachain.scale: descriptors regenerate from it onpnpm install.Follow-up