Skip to content

feat!: upstream expedited proposals#14720

Merged
tac0turtle merged 11 commits into
mainfrom
julien/expedited-proposal-upstream
Feb 2, 2023
Merged

feat!: upstream expedited proposals#14720
tac0turtle merged 11 commits into
mainfrom
julien/expedited-proposal-upstream

Conversation

@julienrbrt
Copy link
Copy Markdown
Contributor

@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
Comment thread x/gov/abci.go
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
Comment thread x/gov/abci.go
} 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
Comment thread x/gov/abci.go Fixed
Comment thread x/gov/abci.go
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
Comment thread x/gov/abci.go
keeper.InsertActiveProposalQueue(ctx, proposal.Id, *proposal.VotingEndTime)

tagValue = types.AttributeValueExpeditedProposalRejected
logMsg = "expedited proposal converted to regular"

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
Comment thread x/gov/types/v1/proposal.go
@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
Copy Markdown
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 January 31, 2023 10:05
@ghost ghost requested review from a team, alexanderbez and facundomedica and removed request for a team 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
Comment thread x/gov/abci_test.go Outdated
@@ -1,3 +1,5 @@
// TODO update this file
Copy link
Copy Markdown
Contributor 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.

Comment thread x/gov/abci.go
if passes {
keeper.RemoveFromActiveProposalQueue(ctx, proposal.Id, *proposal.VotingEndTime)

switch {

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
Copy Markdown
Contributor

@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

Comment thread x/gov/README.md Outdated
Comment thread x/gov/README.md Outdated
@julienrbrt julienrbrt requested a review from amaury1093 February 2, 2023 20:52
@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
Co-authored-by: Julien Robert <julien@rbrt.fr>
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

7 participants