Pileks/met 715 make mini instructions opt in - #493
Draft
metapileks wants to merge 10 commits into
Draft
Conversation
…typed proposal opt-in status
…n for unlaunched proposals
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.
Typed proposals (the mini-instructions catalog) become a per-DAO switch instead of applying to every DAO the moment the program upgrades. New DAOs start with the switch on. Migrated DAOs start with it off and keep running under their own configuration until they pass an
update_daoproposal that turns it on. The switch is one-way.Alongside that,
launch_proposalnow writes a proposal's duration, pass threshold and TWAP start delay from the configuration in force at launch rather than at create. A draft only carries a preview, so a draft created before the opt-in launches under the catalog after it. Admin-tuned values are the one exception and survive launch.Instruction changes
initialize_daotyped_proposals_enabled = true.update_daotyped_proposals_enabled: Option<bool>.Some(true)opts in,Noneleaves it alone,Some(false)is refused withTypedProposalsCannotBeDisabled.resize_daomin_quote_futarchic_liquidityormin_base_futarchic_liquidityis lifted to 1, since zero failsDao::invariantand would block the opt-in for the live DAOs configured that way.initialize_proposalparams_for: the DAO's own terms while off, the catalog once on.typed_initialize(all typed kinds)TypedProposalsDisabledwhile the DAO has typed proposals off.launch_proposalTypedProposalsDisabledwhile off. Writes duration, threshold and TWAP start delay fromProposal::launch_params, which resolves the terms in force at launch and keeps admin-tuned values whenparams_overriddenis set. The duration-vs-warm-up check runs against those terms.admin_update_proposal_paramsparams_overriddenso launch preserves the tuned duration and threshold. Its duration check uses the same per-DAO warm-up as launch.resize_proposalparams_for, including the team-sponsored threshold where it applies. Launched proposals keep the rules they launched under.initialize_hostile_takeover_proposalupdate_daopayload leaves the new flag untouched.State, events and errors
Dao.typed_proposals_enabled: boolandProposal.params_overridden: bool, one byte each. Theresize_daoandresize_proposalpre-migration size constants move by one accordingly.ProposalAction::params_for(dao, is_team_sponsored)returns the DAO's own duration, threshold and warm-up for plain proposals of a DAO with typed proposals off, and the catalog otherwise.Proposal::launch_params(dao)layers the admin override on top.InitializeDaoEventandUpdateDaoEventgaintyped_proposals_enabled;LaunchProposalEventgains the writtenduration_in_secondsandpass_threshold_bps.TypedProposalsDisabled,TypedProposalsCannotBeDisabled.SDK and scripts
Regenerated futarchy v0.6 types (
UpdateDaoParams.typedProposalsEnabled), andscripts/utils/daoActions.tsswaps a staleisOptimisticGovernanceEnabledfortypedProposalsEnabledin its empty-params constant.