diff --git a/docs/architecture/0015-duplicate-veto.md b/docs/architecture/0015-duplicate-veto.md index 80e8e28d0..cdd55ab93 100644 --- a/docs/architecture/0015-duplicate-veto.md +++ b/docs/architecture/0015-duplicate-veto.md @@ -8,9 +8,12 @@ Accepted ## Context -See [here](https://github.com/threefoldtech/tfchain/issues/858) for more details. +See [here](https://github.com/threefoldtech/tfchain/issues/858) for more +details. ## Decision -Since we don't want a council member to veto a DAO proposal alone by being able to submit its veto more than once we need to prevent duplicate veto. -In `pallet-dao`, `veto()` extrinsic should return an appropriate error while this situation occures. +Since we don't want a council member to veto a DAO proposal alone by being able +to submit its veto more than once we need to prevent duplicate veto. In +`pallet-dao`, `veto()` extrinsic should return an appropriate error while this +situation occures. diff --git a/docs/architecture/0016-BurnTransaction-BurnTransactionExpired-changed.md b/docs/architecture/0016-BurnTransaction-BurnTransactionExpired-changed.md deleted file mode 100644 index f1a441016..000000000 --- a/docs/architecture/0016-BurnTransaction-BurnTransactionExpired-changed.md +++ /dev/null @@ -1,15 +0,0 @@ -# 16. Add Source account ID to BurnTransaction storage type and BurnTransactionExpired event - -Date: 2023-11-14 - -## Status - -Accepted - -## Context - -See [here](https://github.com/threefoldtech/tfchain/issues/883) for more details. - -## Decision - -Add `Source` account ID to `BurnTransaction` storage type and `BurnTransactionExpired` event and migrate previous `BurnTransactions` and `ExecutedBurnTransactions` storages diff --git a/docs/architecture/0016-rework-dao-voting.md b/docs/architecture/0016-rework-dao-voting.md new file mode 100644 index 000000000..fe62dbe68 --- /dev/null +++ b/docs/architecture/0016-rework-dao-voting.md @@ -0,0 +1,19 @@ +# 16. Add condition to DAO motion approval + +Date: 2023-11-07 + +## Status + +Accepted + +## Context + +See [here](https://github.com/threefoldtech/tfchain/issues/803) for more +details. + +## Decision + +Stick to specs initial idea by adding new condition +`number of votes >= threshold` for proposal to be approved. If by the end of the +vote the minimal amount of votes is not reached, the proposal fails due to +insufficient interest. diff --git a/docs/architecture/0017-BurnTransaction-BurnTransactionExpired-changed.md b/docs/architecture/0017-BurnTransaction-BurnTransactionExpired-changed.md new file mode 100644 index 000000000..c4c172bf0 --- /dev/null +++ b/docs/architecture/0017-BurnTransaction-BurnTransactionExpired-changed.md @@ -0,0 +1,18 @@ +# 17. Add Source account ID to BurnTransaction and BurnTransactionExpired + +Date: 2023-11-14 + +## Status + +Accepted + +## Context + +See [here](https://github.com/threefoldtech/tfchain/issues/883) for more +details. + +## Decision + +Add `Source` account ID to `BurnTransaction` storage type and +`BurnTransactionExpired` event and migrate previous `BurnTransactions` and +`ExecutedBurnTransactions` storages diff --git a/docs/architecture/0017-rework_cancel_contracts.md b/docs/architecture/0017-rework_cancel_contracts.md deleted file mode 100644 index 56693ea05..000000000 --- a/docs/architecture/0017-rework_cancel_contracts.md +++ /dev/null @@ -1,16 +0,0 @@ -# 17. Allow collective approval to cancel contracts - -Date: 2023-11-06 - -## Status - -Accepted - -## Context - -See [here](https://github.com/threefoldtech/tfchain/issues/884) for more details. - -## Decision - -In `pallet-smart-contract`, add `cancel_contract_collective()` extrinsic to allow a collective approval (council or farmers) to cancel a contract. -For this purpose we also add a new entry `CanceledByCollective` in `Cause` enum to better qualify the cancelation cause. diff --git a/docs/architecture/0018-allow-renting-standby-node.md b/docs/architecture/0018-allow-renting-standby-node.md deleted file mode 100644 index dd3e18b46..000000000 --- a/docs/architecture/0018-allow-renting-standby-node.md +++ /dev/null @@ -1,21 +0,0 @@ -# 18. Allow renting standby node - -Date: 2024-01-09 - -## Status - -Accepted - -## Context - -See [here](https://github.com/threefoldtech/tfchain/issues/923) for more details. - -## Decision - -We want to be able to create a rent contract on node even if it is in standby phase. -Moreover, user should be billed for this contract only during online periods. - -In `pallet-smart-contract`: - -* Remove the `node_power.is_down()` restriction when trying to create a rent contract in `create_rent_contract()` extrinsic. restriction -* Modify rent contract billing logic by allowing billing only if the node is online (`PowerState` = `Up`). To skip the billing during the standby period we update the contract lock when the node power state is switched to `Up`. diff --git a/docs/architecture/0018-rework_cancel_contracts.md b/docs/architecture/0018-rework_cancel_contracts.md new file mode 100644 index 000000000..bc090d87b --- /dev/null +++ b/docs/architecture/0018-rework_cancel_contracts.md @@ -0,0 +1,19 @@ +# 18. Allow collective approval to cancel contracts + +Date: 2023-11-06 + +## Status + +Accepted + +## Context + +See [here](https://github.com/threefoldtech/tfchain/issues/884) for more +details. + +## Decision + +In `pallet-smart-contract`, add `cancel_contract_collective()` extrinsic to +allow a collective approval (council or farmers) to cancel a contract. For this +purpose we also add a new entry `CanceledByCollective` in `Cause` enum to better +qualify the cancelation cause. diff --git a/docs/architecture/0019-allow-renting-standby-node.md b/docs/architecture/0019-allow-renting-standby-node.md new file mode 100644 index 000000000..450073be0 --- /dev/null +++ b/docs/architecture/0019-allow-renting-standby-node.md @@ -0,0 +1,27 @@ +# 19. Allow renting standby node + +Date: 2024-01-09 + +## Status + +Accepted + +## Context + +See [here](https://github.com/threefoldtech/tfchain/issues/923) for more +details. + +## Decision + +We want to be able to create a rent contract on node even if it is in standby +phase. Moreover, user should be billed for this contract only during online +periods. + +In `pallet-smart-contract`: + +- Remove the `node_power.is_down()` restriction when trying to create a rent + contract in `create_rent_contract()` extrinsic. restriction + +- Modify rent contract billing logic by allowing billing only if the node is + online (`PowerState` = `Up`). To skip the billing during the standby period we + update the contract lock when the node power state is switched to `Up`. diff --git a/docs/architecture/0019-rework_change_power_target.md b/docs/architecture/0020-rework_change_power_target.md similarity index 57% rename from docs/architecture/0019-rework_change_power_target.md rename to docs/architecture/0020-rework_change_power_target.md index d30252fe8..4a9390eea 100644 --- a/docs/architecture/0019-rework_change_power_target.md +++ b/docs/architecture/0020-rework_change_power_target.md @@ -1,4 +1,4 @@ -# 19. Rework change power target on node +# 20. Rework change power target on node Date: 2024-01-09 @@ -8,8 +8,10 @@ Accepted ## Context -See [here](https://github.com/threefoldtech/tfchain/issues/924) for more details. +See [here](https://github.com/threefoldtech/tfchain/issues/924) for more +details. ## Decision -Make sure that node has no active contracts on it to be able to change its `PowerTarget` to `Down` when calling `change_power_target()` extrinsic. +Make sure that node has no active contracts on it to be able to change its +`PowerTarget` to `Down` when calling `change_power_target()` extrinsic. diff --git a/docs/architecture/0020-rework-dao-voting.md b/docs/architecture/0021-rework-dao-voting.md similarity index 91% rename from docs/architecture/0020-rework-dao-voting.md rename to docs/architecture/0021-rework-dao-voting.md index af4b918c8..a58c755dc 100644 --- a/docs/architecture/0020-rework-dao-voting.md +++ b/docs/architecture/0021-rework-dao-voting.md @@ -1,4 +1,4 @@ -# 20. Harden closing of a DAO motion voting +# 21. Harden closing of a DAO motion voting Date: 2024-05-02 diff --git a/docs/architecture/0021-allow-hdd-only-nodes.md b/docs/architecture/0022-allow-hdd-only-nodes.md similarity index 87% rename from docs/architecture/0021-allow-hdd-only-nodes.md rename to docs/architecture/0022-allow-hdd-only-nodes.md index 74d36b2af..999c3e494 100644 --- a/docs/architecture/0021-allow-hdd-only-nodes.md +++ b/docs/architecture/0022-allow-hdd-only-nodes.md @@ -1,4 +1,4 @@ -# 21. Allow 'only hdd' nodes to register on chain +# 22. Allow 'only hdd' nodes to register on chain Date: 2024-05-22 diff --git a/substrate-node/pallets/pallet-dao/creating_proposal_farmers.md b/substrate-node/pallets/pallet-dao/creating_proposal_farmers.md index 3bffd229f..303b385e9 100644 --- a/substrate-node/pallets/pallet-dao/creating_proposal_farmers.md +++ b/substrate-node/pallets/pallet-dao/creating_proposal_farmers.md @@ -21,7 +21,7 @@ Open the Polkadot JS UI in your browser: The proposal must include the following arguments: -* `threshold`: minimal number of farmer votes required to be able to close proposal before its end. should be at least 5 or more. +* `threshold`: minimal number of farmer votes required to be able to close proposal before its end and to approve the proposal (should be set to at least 5 votes). * `action`: call/extrinsic to execute on chain. If there is no call to be executed (which is usually the case) then `system` -> `remark()` should be set. * `description`: a small description of what the proposal is about. * `link`: a link to a more elaborate explanation of the proposal. @@ -52,7 +52,7 @@ After the proposal ends or, before it, if number of votes reached `threshold`, i ## Approval Once closed the proposal is removed from list and the action, if any, is executed on chain in case of approval. -Since each farmer vote is weighted by the corresponding farm capacity (`weight = 2 * (sum of CU of all nodes) + (sum of SU of all nodes)`), approval is obtained when `Yes` votes quantity is strictly greater than `No` votes quantity. +Since each farmer vote is weighted by the corresponding farm capacity (`weight = 2 * (sum of CU of all nodes) + (sum of SU of all nodes)`), approval is obtained when `Yes` votes quantity is strictly greater than `No` votes quantity **and** total number of votes reached `threshold` value. ## Check proposal