From 7163480581b8e526eddd2435f47cc1bfeb2fd0d3 Mon Sep 17 00:00:00 2001 From: Luke Miller <millerluke1364@gmail.com> Date: Tue, 28 Sep 2021 19:01:59 -0400 Subject: [PATCH] prototyping for new consent system --- modpol/orgs/process.lua | 55 ++++++++++++++++++++++++++++++++++++++++ modpol/orgs/requests.lua | 3 +++ 2 files changed, 58 insertions(+) create mode 100644 modpol/orgs/process.lua diff --git a/modpol/orgs/process.lua b/modpol/orgs/process.lua new file mode 100644 index 0000000..4babcf4 --- /dev/null +++ b/modpol/orgs/process.lua @@ -0,0 +1,55 @@ +old_request_format = { + user=user, -- requesting user + type="add_member", -- action + params={user} -- action params +} + +old_process_format = { + type = "consent", -- delete + id = nil, + org_id = nil, + request_id = nil, -- delete + + -- consent config + majority_to_pass = 0.51, -- voting threshold + votes_needed = nil, + + -- consent data + total_votes = 0, + votes_yes = {}, + votes_no = {} +} + +new_process_format = { + initiator = "user", + org_id = 12314, + module = "create_child_org", -- policy table lookup + process_id = 8347, + -- used to freeze voter eligibility + timestamp = 1632850133, -- look into supporting other formats, overrides (turn based, etc.) + + + data = { + child_org_name = "oligarchy" + } + +} + +--[[ +voting configuration: +<quorum> +minimum voters (ratio or const) +maximum voters (ratio or const) + +<temporal quorum> +minimum duration +maximum duration +--]] + +policy_table_format = { + "create_child_org": { + consent_threshold = 0.51, + max_duration = 89324, -- seconds until vote closes if threshold not reached, or nil for no limit + defer = nil, -- org id to defer to, or nil + } +} \ No newline at end of file diff --git a/modpol/orgs/requests.lua b/modpol/orgs/requests.lua index 4d8b545..bcebab5 100644 --- a/modpol/orgs/requests.lua +++ b/modpol/orgs/requests.lua @@ -1,3 +1,6 @@ +-- THIS IS NOW DEPRECATED, TO MERGE INTO PROCESS + + -- REQUESTS -- Provides request functionality to org