From 4395fc8b870f524b57b39f975ae87553ca85b7c9 Mon Sep 17 00:00:00 2001 From: moul <94029+moul@users.noreply.github.com> Date: Thu, 18 Apr 2024 08:43:49 +0000 Subject: [PATCH 1/3] chore: rename r/system -> r/sys Signed-off-by: moul <94029+moul@users.noreply.github.com> --- .github/workflows/examples.yml | 4 ++- docs/concepts/proof-of-contribution.md | 26 +++++++++---------- examples/Makefile | 3 ++- examples/gno.land/r/gnoland/home/home.gno | 8 +++--- .../gno.land/r/gnoland/home/home_filetest.gno | 8 +++--- examples/gno.land/r/sys/README.md | 5 ++++ .../r/{system => sys}/names/genesis.gno | 3 ++- .../gno.land/r/{system => sys}/names/gno.mod | 2 +- .../r/{system => sys}/names/names.gno | 4 +-- examples/gno.land/r/sys/rewards/gno.mod | 1 + .../r/{system => sys}/rewards/rewards.gno | 0 examples/gno.land/r/sys/validators/gno.mod | 1 + .../{system => sys}/validators/validators.gno | 0 examples/gno.land/r/system/rewards/gno.mod | 1 - examples/gno.land/r/system/validators/gno.mod | 1 - 15 files changed, 38 insertions(+), 29 deletions(-) create mode 100644 examples/gno.land/r/sys/README.md rename examples/gno.land/r/{system => sys}/names/genesis.gno (88%) rename examples/gno.land/r/{system => sys}/names/gno.mod (58%) rename examples/gno.land/r/{system => sys}/names/names.gno (90%) create mode 100644 examples/gno.land/r/sys/rewards/gno.mod rename examples/gno.land/r/{system => sys}/rewards/rewards.gno (100%) create mode 100644 examples/gno.land/r/sys/validators/gno.mod rename examples/gno.land/r/{system => sys}/validators/validators.gno (100%) delete mode 100644 examples/gno.land/r/system/rewards/gno.mod delete mode 100644 examples/gno.land/r/system/validators/gno.mod diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 29af2700b81..d74f85e2ee3 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -78,7 +78,9 @@ jobs: - run: go run ./gnovm/cmd/gno lint -v ./examples/gno.land/p - run: go run ./gnovm/cmd/gno lint -v ./examples/gno.land/r/demo - run: go run ./gnovm/cmd/gno lint -v ./examples/gno.land/r/gnoland - - run: go run ./gnovm/cmd/gno lint -v ./examples/gno.land/r/system + - run: go run ./gnovm/cmd/gno lint -v ./examples/gno.land/r/sys + - run: go run ./gnovm/cmd/gno lint -v ./examples/gno.land/r/gov + # TODO: consider running lint on every other directories, maybe in "warning" mode? # TODO: track coverage mod-tidy: strategy: diff --git a/docs/concepts/proof-of-contribution.md b/docs/concepts/proof-of-contribution.md index 364a5eb254d..5446fa83a69 100644 --- a/docs/concepts/proof-of-contribution.md +++ b/docs/concepts/proof-of-contribution.md @@ -34,22 +34,22 @@ Presentation: https://github.com/gnolang/workshops/tree/main/presentations/2023- | gno.land/{p,r} contracts | | gno.land | | | | | | +-----------------------------+ +---------------------+ | | | - | | | | r/system/valset | | | | + | | | | r/sys/validators | | | | | | | +->| |--+------+ | +-------------+ | | | worxDAO | | | validator set | | | | | | | | | |--+ +---------------------+ | +-------+->| Gno SDK |----------+ | - | | the "Contributors DAO" | | | r/system/chaincfg | | | | | | | | + | | the "Contributors DAO" | | | r/sys/config | | | | | | | | | | | +->| |--+------+ | +-------------+ | | | | | | chain configuration | | | | | | | +-----------------------------+ +---------------------+ | | | | | | | +---------------------+ | | v v | - | v | r/system/rewards | | | +-------------+ +-------------+ | - | +--------------------+ | | | | | | | | | - | | Evaluation DAO | |distribute rewards to| | | | TM2 |-->| GnoVM | | - | | | | contributors and | | | | | | | | - | |Qualification system| | validators | | | +-------------+ +-------------+ | - | |to distribute ^worx | | +------+ | | | | | | - | +--------------------+ | |Bucket|<- - -|- + -chain fees -|- - - - - | | + | v | r/sys/rewards | | | +-------------+ +-------------+ | + | +----------------------+ | | | | | | | | | + | | Evaluation DAO | | distribute rewards | | | | TM2 |-->| GnoVM | | + | | | | to contributors and | | | | | | | | + | | Qualification system | | validators | | | +-------------+ +-------------+ | + | | to distribute ^worx | | +------+ | | | | | | + | +----------------------+ | |Bucket|<- - -|- + -chain fees -|- - - - - | | | +-------+------+------+ | | | | +---------------------------------------------------------------+ +---------------------------+--------+ ^ | @@ -67,11 +67,11 @@ contracts with the `GnoVM` and can self-configure from contracts using the ### `worxDAO` The governance entity consisting of contributors, responsible for governing the -`r/system` realms, including `valset` and `chaincfg`. +`r/sys` realms, including `validators` and `config`. Meta issue: [#872](https://github.com/gnolang/gno/issues/872). -### `r/system/valset` +### `r/sys/validators` A realm (smart contract) that enables the `worxDAO` to update the validator set. Similar to a PoA system, the authority is decentralized in a DAO. @@ -79,7 +79,7 @@ Similar to a PoA system, the authority is decentralized in a DAO. Additionally, this contract is queried by `gno.land` to configure `TM2` when changes are made to the validator set. -### `r/system/chaincfg` +### `r/sys/config` A governance-backed smart contract that allows for chain configuration through governance. @@ -88,7 +88,7 @@ It helps prevent unnecessary upgrade campaigns for minor updates. ### Evaluation DAO -The system employed by the `worxDAO` to incentivize contributions with `^worx` tokens. +The system employed by the `worxDAO` to incentivize contributions with `^worx` points. +---------------1. propose a contribution-------------+ | v diff --git a/examples/Makefile b/examples/Makefile index 5d7c94b2409..4894e28a1bb 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -26,7 +26,8 @@ GOTEST_FLAGS ?= -v -p 1 -timeout=30m OFFICIAL_PACKAGES = ./gno.land/p OFFICIAL_PACKAGES += ./gno.land/r/demo OFFICIAL_PACKAGES += ./gno.land/r/gnoland -OFFICIAL_PACKAGES += ./gno.land/r/system +OFFICIAL_PACKAGES += ./gno.land/r/sys +OFFICIAL_PACKAGES += ./gno.land/r/gov ######################################## # Dev tools diff --git a/examples/gno.land/r/gnoland/home/home.gno b/examples/gno.land/r/gnoland/home/home.gno index 737c811c062..d8bec8242c2 100644 --- a/examples/gno.land/r/gnoland/home/home.gno +++ b/examples/gno.land/r/gnoland/home/home.gno @@ -177,11 +177,11 @@ func packageStaffPicks() ui.Element { ui.Link{URL: "r/gnoland/home"}, ui.Link{URL: "r/gnoland/pages"}, }, - ui.H4("[r/system](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/system)"), + ui.H4("[r/sys](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/sys)"), ui.BulletList{ - ui.Link{URL: "r/system/names"}, - ui.Link{URL: "r/system/rewards"}, - ui.Link{URL: "r/system/validators"}, + ui.Link{URL: "r/sys/names"}, + ui.Link{URL: "r/sys/rewards"}, + ui.Link{URL: "r/sys/validators"}, }, }, { ui.H4("[r/demo](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/demo)"), diff --git a/examples/gno.land/r/gnoland/home/home_filetest.gno b/examples/gno.land/r/gnoland/home/home_filetest.gno index 0304ad641f6..fa6fbe4e2a1 100644 --- a/examples/gno.land/r/gnoland/home/home_filetest.gno +++ b/examples/gno.land/r/gnoland/home/home_filetest.gno @@ -111,11 +111,11 @@ func main() { //- [r/gnoland/home](r/gnoland/home) //- [r/gnoland/pages](r/gnoland/pages) // -//#### [r/system](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/system) +//#### [r/sys](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/sys) // -//- [r/system/names](r/system/names) -//- [r/system/rewards](r/system/rewards) -//- [r/system/validators](r/system/validators) +//- [r/sys/names](r/sys/names) +//- [r/sys/rewards](r/sys/rewards) +//- [r/sys/validators](r/sys/validators) // // //