From c92f4f907b1bf8fe1e5e96452337e976a70c4c22 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Mon, 22 Apr 2024 13:40:01 -0500 Subject: [PATCH 1/2] docs: Add note in the circuit ante with authz info --- x/circuit/ante/circuit.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x/circuit/ante/circuit.go b/x/circuit/ante/circuit.go index 80ed8ce5f231..85f054fb26f8 100644 --- a/x/circuit/ante/circuit.go +++ b/x/circuit/ante/circuit.go @@ -24,6 +24,10 @@ func NewCircuitBreakerDecorator(ck CircuitBreaker) CircuitBreakerDecorator { } } +// If you copy this as reference and your app has the authz module enabled, you must either: +// - recessively check for nested authz.Exec messages in this function. +// - or error early if a nested authz grant is found. +// The circuit AnteHandler handles this with baseapp's service router: https://github.com/cosmos/cosmos-sdk/issues/18632. func (cbd CircuitBreakerDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { // loop through all the messages and check if the message type is allowed for _, msg := range tx.GetMsgs() { From a6ce4f08dd0fb4b72174c505fca87a7d8a2779c6 Mon Sep 17 00:00:00 2001 From: Reece Williams <31943163+Reecepbcups@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:53:37 -0500 Subject: [PATCH 2/2] Update x/circuit/ante/circuit.go Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- x/circuit/ante/circuit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/circuit/ante/circuit.go b/x/circuit/ante/circuit.go index 85f054fb26f8..ab1876242b28 100644 --- a/x/circuit/ante/circuit.go +++ b/x/circuit/ante/circuit.go @@ -25,7 +25,7 @@ func NewCircuitBreakerDecorator(ck CircuitBreaker) CircuitBreakerDecorator { } // If you copy this as reference and your app has the authz module enabled, you must either: -// - recessively check for nested authz.Exec messages in this function. +// - recursively check for nested authz.Exec messages in this function. // - or error early if a nested authz grant is found. // The circuit AnteHandler handles this with baseapp's service router: https://github.com/cosmos/cosmos-sdk/issues/18632. func (cbd CircuitBreakerDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) {