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
Vote polls: windows and fund read from a target contract, 0.5 Dash moderation fund (moderation teams A3) #4876
Part of #4865 (decentralized moderation teams). Item A3 of the PR split. Wave 2: depends on A1.
Summary
Let a contested-index poll take its join window, vote window and prefunded amount from a target data contract instead of platform constants, and add the moderation poll amounts to the versioned fund fee constants.
Decisions implemented: D8, D24, D54, D55, D57 in #4865.
Current behaviour
When a document create hits a contested unique index, document_create_transition_action/v0/transformer.rs opens a ContestedDocumentResourceVotePoll whose windows come from platform constants and whose fund is contested_document_vote_resolution_fund_required_amount in packages/rs-platform-version/src/version/fee/vote_resolution_fund_fees/ (0.1 Dash at PV14, 0.0001 Dash per vote, and a vote is refused once the balance is empty).
The moderation application (D57) is a charter document create on a contested unique index of the charter system contract, keyed by the target contract id. Each target contract sets its own windows (1 day to 4 weeks, default 1 week) and the poll must be the A1 contender poll, not the DPNS one.
Scope
New fields in VoteResolutionFundFees: the moderation poll fund, 0.5 Dash, shared by application, challenge and amendment polls (D54, D55). Update the equality test that pins the field list. New fee version selected only by PV14.
A hook in the contested-index poll opening: when the document type's contested index is marked as a moderation election (the charter contract, C1), read the join window and vote window from the target contract's elected-moderation declaration (B1) and open an A1 contender poll funded with the new amount. The prefunded specialized balance is keyed per target contract.
Clean-up releases the remainder as processing credits as today.
Bounds for the windows live in SystemLimits (B1 adds them; this PR reads them).
Depends on
A1 (the poll kind to open). Reads the B1 declaration and the C1 index marker; until those merge, test with a fixture contract.
Tests
A create on the marked index opens an A1 poll with the target's windows and a 0.5 Dash balance.
5,000 votes fit in the balance; the 5,001st is refused.
The DPNS path still opens the old poll with the old amounts.
Activity