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: module circuit breaker #14521

Merged
merged 120 commits into from
May 15, 2023
Merged

feat: module circuit breaker #14521

merged 120 commits into from
May 15, 2023

Conversation

tac0turtle
Copy link
Member

Description

add circuit breaker module


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)

Base automatically changed from marko/circuit_spec to main January 6, 2023 14:54
x/circuit/keeper/keeper.go Fixed Show fixed Hide fixed
x/circuit/keeper/keeper.go Fixed Show fixed Hide fixed
x/circuit/keeper/keeper.go Fixed Show fixed Hide fixed
x/circuit/keeper/keeper.go Fixed Show fixed Hide fixed
x/circuit/keeper/keeper.go Fixed Show fixed Hide fixed
x/circuit/keeper/keeper.go Fixed Show fixed Hide fixed
x/circuit/go.mod Outdated Show resolved Hide resolved
@julienrbrt
Copy link
Member

julienrbrt commented Apr 11, 2023

We need an extra message that can be only called by an authority (so for gov) for allowing to define admins (SetPermissions).
I wanted to use it on an existing simapp chain, but turns out we can only set admins on genesis.

@julienrbrt julienrbrt mentioned this pull request Apr 13, 2023
19 tasks
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

LGTM. I'd document somewhere on why both the Msg Router and AnteHandler chain both need access to the circuit breaker. Otherwise, LGTM.

x/circuit/keeper/genesis.go Outdated Show resolved Hide resolved
x/circuit/types/codec.go Outdated Show resolved Hide resolved
x/circuit/types/msgs.go Outdated Show resolved Hide resolved
@github-actions github-actions bot added the C:Rosetta Issues and PR related to Rosetta label May 1, 2023
@@ -87,7 +87,6 @@ https://github.com/cosmos/cosmos-sdk/blob/main/proto/cosmos/circuit/v1/tx.proto#
This message is expected to fail if:

* the granter is not an account with permission level `LEVEL_SUPER_ADMIN` or the module authority
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to precise the granter can be governance as well and that gov is considered as LEVEL_SUPER_ADMIN as well.

@julienrbrt
Copy link
Member

julienrbrt commented May 1, 2023

We need an extra message that can be only called by an authority (so for gov) for allowing to define admins (SetPermissions). I wanted to use it on an existing simapp chain, but turns out we can only set admins on genesis.

You were right Marko, never mind this comment. I do think a precision in the docs would, however, be useful: #14521 (comment)

@tac0turtle tac0turtle enabled auto-merge May 15, 2023 11:31
@tac0turtle tac0turtle added this pull request to the merge queue May 15, 2023
Merged via the queue into main with commit b8e15a7 May 15, 2023
@tac0turtle tac0turtle deleted the pair/circuit_module branch May 15, 2023 14:48
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Sam Ricotta <samanthalricotta@gmail.com>
Co-authored-by: samricotta <37125168+samricotta@users.noreply.github.com>
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:CLI C:Rosetta Issues and PR related to Rosetta C:x/auth C:x/circuit
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

9 participants