From 016389c7561711f349cdaba425bb8a3f03c9d891 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 23 Apr 2024 12:09:29 +0200 Subject: [PATCH] docs: add authz reference info in the circuit antehandler (backport #20146) (#20155) Co-authored-by: Reece Williams <31943163+Reecepbcups@users.noreply.github.com> --- 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..ab1876242b28 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: +// - 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) { // loop through all the messages and check if the message type is allowed for _, msg := range tx.GetMsgs() {