Skip to content

Moderators warn users: on-chain warning record (moderation teams D) #4879

Closed

Description

@QuantumExplorer

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.

Decisions implemented: D49 in #4865.

Current behaviour

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

  1. QuantumExplorer commented on Sep 21, 2026

    @QuantumExplorer
    MemberAuthor

    Done by #4872 (warning list on moderated contracts, key 224, warn and clearWarnings, merged c1e577b). Follow-up #4884 adds documents on the reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions