Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: constitution #14373

Closed
wants to merge 22 commits into from
Closed

Conversation

faddat
Copy link
Contributor

@faddat faddat commented Dec 20, 2022

Description

Closes: #14065

I think the original way, is the right way to go about with constitutions.

For a live chain, it may be desirable to make constitutions that are based on metadata.

For a new chain, the constitution should be a part of gov's genesis.

Amendments are in my opinion a fork but I see no reason why communities cannot use governance to make constitutional changes.

With that said, amendments are outside of the scope I'd like to address here.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@faddat faddat requested a review from a team as a code owner December 20, 2022 20:14
@faddat faddat changed the title notional/constitution constitution Dec 20, 2022
@faddat faddat changed the title constitution feat: constitution Dec 20, 2022
@tac0turtle
Copy link
Member

amazing, thank you for the PR. we will work this into our review cycle!!

@faddat
Copy link
Contributor Author

faddat commented Dec 24, 2022

Cool, please note, I'm definitely open to ideas on this.

My feeling is that laying out the base rights and responsibilities of different groups will prove to be important. (or maybe already is, viz: juno prop 4, 16)

Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK, could we get come docs added on this feature, could be in the spec of governance

@faddat
Copy link
Contributor Author

faddat commented Dec 25, 2022

totally! I'll get that rolling now. I think they'll be kinda weird docs, as I'll aim them at being more social (how to use the constitution field in governance) than technical (since this really is not a huge technical feat at all)

@faddat
Copy link
Contributor Author

faddat commented Dec 25, 2022

@@ -268,6 +268,40 @@ Validators and full nodes can use an automation tool, such as [Cosmovisor](https

## State

### Constitution
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should set guideline on how is formatted a constitution.
If chains use an IPFS link or set it directly in the field, it might be annoying for explorers to parse and display it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great idea, I am hoping for Markdown stored directly in genesis, to enhance the durability of the document.

@@ -54,13 +54,13 @@ message SoftwareUpgradeProposal {
option (gogoproto.equal) = true;

// title of the proposal
string title = 1;
string title = 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has it been formatted?


func (keeper Keeper) GetConstitution(ctx sdk.Context) (constitution string) {
store := ctx.KVStore(keeper.storeKey)
bz := store.Get([]byte("constitution"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we create a key for this under x/gov/types/keys.go

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this only meant to be in the genesis file, or do we also want to store it to state? It seems unnecessary to store such a big text on chain.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My impression is that it must in exist in state, no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it needs to be in state. not all nodes have the genesis file meaning that if you don't have it you wont be able to query it

Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments. I think it may be nice to add a CLI for it.

@faddat
Copy link
Contributor Author

faddat commented Dec 27, 2022

back to this one in ~24h

-- the reason I'm thinking no cli for this, is that I don't (personally) think it's something that should change over time.

I think that the "default settings" shouldn't include anything that supports amendments or the like, and the "default use case" would allow amendments to actually be forks with their own constitution and goals.

@julienrbrt
Copy link
Member

I meant a query CLI. Like simd q gov constitution. :)

@faddat
Copy link
Contributor Author

faddat commented Dec 27, 2022

the query is a great idea :)

@amaury1093
Copy link
Contributor

@faddat Could you address the pending review comments so that we can get this PR merged?

@julienrbrt
Copy link
Member

If you want to give me access to your branch, I can push it to the finish line @faddat

@faddat
Copy link
Contributor Author

faddat commented Jan 17, 2023

Hey guys it's going to be a couple of more days before I can write that CLI tool so I'm just going to move this to draft for now, but I wanted to let you know that I do intend to complete it.

@julienrbrt julienrbrt marked this pull request as draft February 1, 2023 14:45
@samricotta samricotta self-assigned this Feb 2, 2023
@samricotta samricotta mentioned this pull request Feb 22, 2023
19 tasks
@tac0turtle
Copy link
Member

closing as sam picked it up here #15125

@tac0turtle tac0turtle closed this Feb 22, 2023
@tac0turtle tac0turtle deleted the notional/constitution branch February 22, 2023 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Constitution
6 participants