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

[DEC-2155] Set gov.params.min_initial_deposit_ratio to 0.2 to avoid spamming #670

Merged
merged 5 commits into from
Oct 20, 2023

Conversation

ttl33
Copy link
Contributor

@ttl33 ttl33 commented Oct 19, 2023

Changelist

  • Sets the gov.params.min_initial_deposit_ratio to 0.2 (=20%) to avoid gov proposal spamming.
  • Run make update-sample-pregenesis

Test Plan

N/A

Author/Reviewer Checklist

  • If this PR has changes that result in a different app state given the same prior state and transaction list, manually add the state-breaking label.
  • If this PR isn't state-breaking but has changes that modify behavior in PrepareProposal or ProcessProposal, manually add the label proposal-breaking.
  • If this PR is one of many that implement a specific feature, manually label them all feature:[feature-name].
  • If you wish to for mergify-bot to automatically create a PR to backport your change to a release branch, manually add the label backport/[branch-name].
  • Manually add any of the following labels: refactor, chore, bug.

@coderabbitai
Copy link

coderabbitai bot commented Oct 19, 2023

Walkthrough

The changes primarily involve the modification of genesis parameters across different environments (production, public testnet, and other testing environments). The dasel command-line tool is used to update JSON files, adjusting parameters such as min_initial_deposit_ratio, voting_period, and max_deposit_period.

Changes

File Path Summary
.../genesis/prod_pregenesis.sh A new line is added to overwrite_genesis_production(), setting min_initial_deposit_ratio to '0.20000' (20%).
.../testing/genesis.sh Changes in edit_genesis() function include setting voting_period to '300s' and min_initial_deposit_ratio to '0.20000' (20%).
.../testnet-external/pregenesis.sh A new line is added to overwrite_genesis_public_testnet(), setting min_initial_deposit_ratio to '0.20000' (20%).
.../testing/genesis.sh Three changes in edit_genesis(): max_deposit_period set to 300s, voting_period set to 300s, and min_initial_deposit_ratio set to '0.20000' (20%).

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • Mention @coderabbitai in any review comment for bot assistance.
  • Note: Review comments are made on code diffs or files, not on the PR overview.

Pause Incremental Reviews

  • Insert @coderabbitai: ignore in the PR description to halt the bot's ongoing reviews. Remove the line to resume.
  • Additionally, enter @coderabbitai pause to halt the bot's ongoing reviews as any issue or review comment. To
    resume reviews, enter @coderabbitai resume as any issue or review comment.

@linear
Copy link

linear bot commented Oct 19, 2023

DEC-2155

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between 79b327c and df86a3e.
Files selected for processing (2)
  • protocol/scripts/genesis/prod_pregenesis.sh (1 hunks)
  • protocol/testing/genesis.sh (1 hunks)
Files skipped from review due to trivial changes (1)
  • protocol/testing/genesis.sh
Additional comments (Suppressed): 1
protocol/scripts/genesis/prod_pregenesis.sh (1)
  • 110-110: The new line introduces a min_initial_deposit_ratio parameter set to 20%. This change is intended to mitigate the issue of government proposal spamming by requiring a minimum initial deposit ratio of 20% to create a government proposal. Ensure that this change aligns with the overall system design and does not inadvertently affect other parts of the system.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between df86a3e and 0cc97cc.
Files ignored due to filter (1)
  • protocol/scripts/genesis/sample_pregenesis.json
Files selected for processing (1)
  • protocol/testing/testnet-external/pregenesis.sh (1 hunks)
Additional comments (Suppressed): 1
protocol/testing/testnet-external/pregenesis.sh (1)
  • 161-164: The new hunk introduces a change to the min_initial_deposit_ratio parameter in the genesis file, setting it to 20%. This change is in line with the PR's goal of mitigating government proposal spamming. However, it's important to verify that this change doesn't negatively impact the proposal creation process, especially for legitimate proposals. Also, ensure that this change is communicated to all relevant stakeholders, as it may affect their interactions with the system.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between 0cc97cc and 04ac666.
Files selected for processing (1)
  • protocol/testing/genesis.sh (1 hunks)
Additional comments (Suppressed): 1
protocol/testing/genesis.sh (1)
  • 82-87: The changes made to the max_deposit_period, voting_period, and min_initial_deposit_ratio parameters are consistent with the PR summary. However, ensure that these changes are compatible with the rest of the system and that they do not negatively impact the user experience or the system's performance. Also, verify that the new min_initial_deposit_ratio of 0.2 (20%) is an appropriate value to prevent spamming without hindering legitimate users.

@ttl33 ttl33 merged commit 98464cb into main Oct 20, 2023
15 of 16 checks passed
@ttl33 ttl33 deleted the tl/gov-min-init-deposit-ratio branch October 20, 2023 14:31
@ttl33
Copy link
Contributor Author

ttl33 commented Oct 20, 2023

@Mergifyio backport release/protocol/v1.x

@mergify
Copy link

mergify bot commented Oct 20, 2023

backport release/protocol/v1.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 20, 2023
… spamming (#670)

* use 0.20 to avoid spam

* run make

* manually remove null values

* update testnet-external/pregenesis.sh

* apply to dev/staging genesis

(cherry picked from commit 98464cb)

# Conflicts:
#	protocol/testing/testnet-external/pregenesis.sh
ttl33 added a commit that referenced this pull request Oct 20, 2023
… spamming (backport #670) (#680)

* [DEC-2155] Set `gov.params.min_initial_deposit_ratio` to 0.2 to avoid spamming (#670)

* use 0.20 to avoid spam

* run make

* manually remove null values

* update testnet-external/pregenesis.sh

* apply to dev/staging genesis

(cherry picked from commit 98464cb)

# Conflicts:
#	protocol/testing/testnet-external/pregenesis.sh

* resolve merge conflict

---------

Co-authored-by: ttl33 <19664986+ttl33@users.noreply.github.com>
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.

None yet

2 participants