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!: upstream expedited proposals #14720

Merged
merged 11 commits into from
Feb 2, 2023
Merged

Conversation

julienrbrt
Copy link
Member

@julienrbrt julienrbrt commented Jan 22, 2023

Description

Closes: #14694

As per #14720 (comment), up streaming osmosis-labs@8b021d2 as well


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)

@julienrbrt julienrbrt changed the title feat: upstream expedited proposals feat!: upstream expedited proposals Jan 22, 2023
// EXCEPT when an expedited proposal fails.
if !(proposal.Expedited && !passes) {
if burnDeposits {
keeper.DeleteAndBurnDeposits(ctx, proposal.Id)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
if burnDeposits {
keeper.DeleteAndBurnDeposits(ctx, proposal.Id)
} else {
keeper.RefundAndDeleteDeposits(ctx, proposal.Id)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
x/gov/abci.go Fixed Show fixed Hide fixed
// according to the regular proposal rules.
proposal.Expedited = false
params := keeper.GetParams(ctx)
endTime := proposal.VotingStartTime.Add(*params.VotingPeriod)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
endTime := proposal.VotingStartTime.Add(*params.VotingPeriod)
proposal.VotingEndTime = &endTime

keeper.InsertActiveProposalQueue(ctx, proposal.Id, *proposal.VotingEndTime)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
@julienrbrt julienrbrt changed the base branch from main to julien/simulation January 25, 2023 14:15
Base automatically changed from julien/simulation to main January 27, 2023 20:44
@johnletey
Copy link
Contributor

@julienrbrt One of the things Osmosis also implemented was a higher deposit amount for expedited proposals. This, paired with the minimum initial deposit ratio, would help remedy spam proposals. We (KYVE) would love to see this included 🙌🏻

@julienrbrt julienrbrt marked this pull request as ready for review January 31, 2023 10:05
@julienrbrt julienrbrt requested a review from a team as a code owner January 31, 2023 10:05
@julienrbrt julienrbrt force-pushed the julien/expedited-proposal-upstream branch from 6ea123b to d3dc533 Compare January 31, 2023 10:14
@@ -1,3 +1,5 @@
// TODO update this file
Copy link
Member Author

Choose a reason for hiding this comment

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

Upstreaming the tests here.

}

if passes {
keeper.RemoveFromActiveProposalQueue(ctx, proposal.Id, *proposal.VotingEndTime)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
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.

looks good, left one ask on the docs, its minor

x/gov/README.md Outdated Show resolved Hide resolved
x/gov/README.md Outdated Show resolved Hide resolved
@tac0turtle tac0turtle merged commit 4251905 into main Feb 2, 2023
@tac0turtle tac0turtle deleted the julien/expedited-proposal-upstream branch February 2, 2023 23:25
tsenart pushed a commit to meka-dev/cosmos-sdk that referenced this pull request Apr 12, 2023
johnletey added a commit to KYVENetwork/cosmos-sdk that referenced this pull request Jun 9, 2023
mpoke pushed a commit that referenced this pull request Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upstream expedited proposals
6 participants