Skip to content

Conversation

@Davphla
Copy link
Contributor

@Davphla Davphla commented Dec 7, 2025

Close: #2520

I set an arbitrary fee of 1_000_000 ugnot for a non member proposal.
Coins are stored in GovDAO implementation, and can be use by the DAO.
I've removed invitation point on NewMemberProposalRequest, as it doesn't really make sense anymore. Though it is still necessary in AddMember.

Outside of the test files, it is not testable.
See #4866

@Davphla Davphla marked this pull request as draft December 7, 2025 13:31
@github-actions github-actions bot added 🧾 package/realm Tag used for new Realms or Packages. 📦 🤖 gnovm Issues or PRs gnovm related labels Dec 7, 2025
@Gno2D2
Copy link
Collaborator

Gno2D2 commented Dec 7, 2025

🛠 PR Checks Summary

🔴 Pending initial approval by a review team member, or review from tech-staff

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
  • The pull request description provides enough details
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

🟢 Maintainers must be able to edit this pull request (more info)
🔴 Pending initial approval by a review team member, or review from tech-staff

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 The pull request was created from a fork (head branch repo: Davphla/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

Pending initial approval by a review team member, or review from tech-staff

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 Not (🔴 Pull request author is a member of the team: tech-staff)

Then

🔴 Requirement not satisfied
└── 🔴 If
    ├── 🔴 Condition
    │   └── 🔴 Or
    │       ├── 🔴 At least one of these user(s) reviewed the pull request: [jefft0 leohhhn n0izn0iz notJoon omarsy x1unix] (with state "APPROVED")
    │       ├── 🔴 At least 1 user(s) of the team tech-staff reviewed pull request
    │       └── 🔴 This pull request is a draft
    └── 🔴 Else
        └── 🔴 And
            ├── 🟢 This label is applied to pull request: review/triage-pending
            └── 🔴 On no pull request

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission
The pull request description provides enough details

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 Not (🔴 Pull request author is a member of the team: core-contributors)
    └── 🟢 Not (🔴 Pull request author is user: dependabot[bot])

Can be checked by

  • team core-contributors

@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Dec 7, 2025
@Davphla Davphla marked this pull request as ready for review December 7, 2025 16:41
@Gno2D2 Gno2D2 added the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Dec 7, 2025
@Davphla Davphla moved this to NEED PEER REVIEW (INTERNAL) in FlashorgSprint: Gnocore Minicrew 🥷 Dec 7, 2025
@Kouteki Kouteki moved this from Triage to In Review in 🧙‍♂️Gno.land development Dec 9, 2025

// Test: Non-member with insufficient fee should also fail with realm validation error
testing.SetOriginSend(chain.Coins{chain.Coin{Denom: "ugnot", Amount: 500000}}) // 0.5 GNOT - insufficient
uassert.AbortsContains(t, "proposal creation must be done directly by a user or through the r/gov/dao proxy", func(cur realm) {
Copy link
Member

Choose a reason for hiding this comment

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

why the error here should say "proposal creation must be done directly by a user or through the r/gov/dao proxy", i would expect the test to ensure there is a "insufficient fee, user must send 1_000_000 gnot" or smth like this, same for all your test in this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix: 856c91e

Comment on lines -74 to -76
if member.InvitationPoints <= 0 {
panic("proposer does not have enough invitation points for inviting new people to the board")
}
Copy link
Member

Choose a reason for hiding this comment

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

for me this line should never have been there, invitations point should be only for the T3 AddMember function but since it was here it makes me wondering if we should keep it in case the proposal is coming from a member ?

Copy link
Contributor Author

@Davphla Davphla Dec 11, 2025

Choose a reason for hiding this comment

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

I agree, in the end this is just a helper function to create a ProposalRequest object, any non-member could bypass this condition by creating their own ProposalRequest object.
But I don't think we should keep it as it is not protective, or we should rethink how invitationPoint work in GovDAO.

var ErrMemberNotFound = errors.New("member not found")

// ProposalFeeAmount is the fee required for non-members to create proposals (in ugnot)
const ProposalFeeAmount int64 = 1000000 // 1 GNOT
Copy link
Member

Choose a reason for hiding this comment

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

should we create a new helper function to create a proposal request containing the executor callback to update this number ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix: 856c91e

Comment on lines +192 to +199
func NewProposalFeeAmountRequest(newAmount int64, reason string) dao.ProposalRequest {
if newAmount < 0 {
panic("proposal fee amount must be non-negative")
}

if reason == "" {
panic("proposal fee amount change requires a reason")
}
Copy link
Member

@MikaelVallenet MikaelVallenet Dec 11, 2025

Choose a reason for hiding this comment

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

i think we should add a txtar test flow of changing the proposal fee else the PR looks good to me i will approve once this done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related 🧾 package/realm Tag used for new Realms or Packages. review/triage-pending PRs opened by external contributors that are waiting for the 1st review

Projects

Status: No status
Status: In Review

Development

Successfully merging this pull request may close these issues.

[govdao] Make r/gov/dao proposals fee-based for non-members

3 participants