You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Moderators warn users: on-chain warning record (moderation teams D) #4879
Part of #4865 (decentralized moderation teams). Item D of the PR split. Wave 1, in progress.
Summary
Moderators can warn a user: an on-chain record with no consensus effect and no expiry, like a document removal record. In scope for protocol version 14.
ContractUserModerationAction in packages/rs-dpp/src/state_transition/state_transitions/contract/contract_user_moderation_transition/v0/mod.rs has ban, unban, suspend and unsuspend. Nothing records a warning.
Scope
A Warn action on the user moderation transition, carrying the target identity and a ContractModerationReason (text plus optional code), so the reason-code check (E) and the action counters (H3b) can plug in later.
A warnings record under the contract, keyed by identity, holding every warning with its reason, the moderator and the block time. Warnings never expire and are never removed.
A query and proof for the warnings of an identity in a contract, through DAPI, the proof verifier and rs-sdk, like the banlist queries.
Fees and the actor gate exactly as for the other actions.
Coordination
Pick the key in the contract's "other" tree (packages/rs-drive/src/drive/contract/paths.rs, keys 16, 32, 64, 96, 128 and 192 are taken) now; H1 takes the next free one.
Error codes stay in the 411xx moderation band; StateError variants are append-only.
H3a (membership) and G (co-signing) add to the same action enum; merge this first.
Activity
QuantumExplorer commentedon Sep 21, 2026
Done by #4872 (warning list on moderated contracts, key 224, warn and clearWarnings, merged c1e577b). Follow-up #4884 adds
documentson the reason.