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

fix: duplicate value of the name field in plan #144

Closed
4 tasks
jaybxyz opened this issue Sep 28, 2021 · 1 comment · Fixed by #150
Closed
4 tasks

fix: duplicate value of the name field in plan #144

jaybxyz opened this issue Sep 28, 2021 · 1 comment · Fixed by #150
Assignees
Labels
bug Something isn't working

Comments

@jaybxyz
Copy link
Contributor

jaybxyz commented Sep 28, 2021

Summary of Bug

Currently, farming module validates duplicate value of the name field in plan. This allows an edge case where an outsider creates a private plan with the same value of the name field as public farming plan's name which is about to be passed during governance process.

Version

master branch

Steps to Reproduce

  1. Send a governance proposal to create public farming plan with the name value of "testPlan"
  2. Vote for the proposal to pass
  3. When the proposal is about to be passed, create private farming plan with the same name
  4. This results in public plan proposal to fail

Proposals

  1. Remove validation for duplicate value of the name field in plan
  2. Add gov keeper in farming module to keep in track of the existing proposals and validate the name value

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@jaybxyz jaybxyz added the bug Something isn't working label Sep 28, 2021
@jaybxyz jaybxyz self-assigned this Sep 30, 2021
@jaybxyz
Copy link
Contributor Author

jaybxyz commented Sep 30, 2021

Decision

As we've discussed through a video call, we decide to remove the duplicate validation logic and rename name field to title since name field somehow provides developers a sense of feeling that it can't be duplicate.

Tasks

  • Rename name field to title for clarity and build new proto file to make sure it is generated (This brings more confusion since public plan proposal needs to have title field for governance proposal Content interface)
  • Remove validation logic for duplicate value of the name in plan
  • Update swagger version and generate swagger docs
  • Update related documentation

@dongsam dongsam added this to the Farming F1 v1.0 milestone Sep 30, 2021
@jaybxyz jaybxyz changed the title Fix duplicate value of the name field in plan fix: duplicate value of the name field in plan Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants