-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
refactor(x/auth): use transaction service #19967
Conversation
WalkthroughWalkthroughThe update focuses on streamlining transaction processing and authentication within the SDK by centralizing execution mode logic using the Changes
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (6)
Files skipped from review as they are similar to previous changes (4)
Additional comments not posted (7)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
Review Status
Configuration used: .coderabbit.yml
Files selected for processing (17)
- core/transaction/service.go (1 hunks)
- types/context.go (1 hunks)
- x/auth/CHANGELOG.md (1 hunks)
- x/auth/ante/ante.go (1 hunks)
- x/auth/ante/basic.go (7 hunks)
- x/auth/ante/basic_test.go (1 hunks)
- x/auth/ante/expected_keepers.go (1 hunks)
- x/auth/ante/export_test.go (1 hunks)
- x/auth/ante/ext.go (1 hunks)
- x/auth/ante/fee.go (4 hunks)
- x/auth/ante/setup.go (1 hunks)
- x/auth/ante/sigverify.go (6 hunks)
- x/auth/ante/sigverify_internal_test.go (2 hunks)
- x/auth/ante/unordered.go (4 hunks)
- x/auth/ante/unordered_test.go (6 hunks)
- x/auth/ante/validator_tx_fee.go (1 hunks)
- x/auth/keeper/keeper.go (2 hunks)
Additional Context Used
Path-based Instructions (17)
x/auth/ante/export_test.go (2)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Pattern
**/*_test.go
: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"core/transaction/service.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/ante/expected_keepers.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/ante/ext.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/ante/ante.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/ante/validator_tx_fee.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/ante/sigverify_internal_test.go (2)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Pattern
**/*_test.go
: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"x/auth/ante/unordered.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/ante/setup.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/CHANGELOG.md (1)
Pattern
**/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"x/auth/ante/fee.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/ante/unordered_test.go (2)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Pattern
**/*_test.go
: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"x/auth/ante/basic.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/ante/basic_test.go (2)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Pattern
**/*_test.go
: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"x/auth/keeper/keeper.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.types/context.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/ante/sigverify.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Additional comments not posted (24)
x/auth/ante/export_test.go (2)
8-8
: Consider renamingSimSecp256k1PubkeyInternal
to follow Go's naming conventions for exported variables, which typically do not include the word "Internal".
10-11
: Ensure proper error handling in tests when usingSetSVDPubKey
. It's crucial to check for errors to avoid false positives in test results.x/auth/ante/expected_keepers.go (2)
13-15
: Introducing theHasEnvironment
interface is a good practice for decoupling and enhancing modularity. Ensure that all relevant components implement this interface as needed.
25-26
: Adding theEnvironment()
method to theAccountKeeper
interface aligns with the objective of accessing the new transaction service. Verify that all implementations ofAccountKeeper
are updated accordingly.x/auth/ante/ext.go (1)
52-52
: Modifying theAnteHandle
function to always passfalse
for the simulation flag may impact the behavior of subsequent decorators. Ensure this change aligns with the intended logic and does not inadvertently affect transaction processing.x/auth/ante/ante.go (1)
45-45
: Includingoptions.AccountKeeper
in theNewValidateBasicDecorator
call is a significant change that enhances the decorator's functionality. Ensure that theValidateBasicDecorator
is properly updated to utilize theAccountKeeper
for its intended purpose.x/auth/ante/validator_tx_fee.go (1)
27-27
: Modifying the conditional statement to usectx.ExecMode()
directly addresses the issue mentioned. However, ensure that this change does not introduce any unintended side effects, especially in contexts where the execution mode might differ from expectations.x/auth/ante/sigverify_internal_test.go (2)
38-38
: Refactoring to useante.NewSigVerificationDecorator
with a mockAccountKeeper
is a good practice for isolating test cases. Ensure that all test cases are updated to reflect this new setup.
53-53
: Ensure that all new test cases introduced properly handle errors and validate the expected outcomes. This is crucial for maintaining the reliability and accuracy of the test suite.Also applies to: 60-62, 68-68, 76-76, 84-84
x/auth/ante/unordered.go (2)
32-32
: Adding anAccountKeeper
field to theUnorderedTxDecorator
and including it as a parameter in theNewUnorderedTxDecorator
function is a significant change that enhances the decorator's functionality. Ensure that theAccountKeeper
is utilized effectively within theAnteHandle
method for execution mode checks.Also applies to: 35-39
71-71
: Using theAccountKeeper
to determine the execution mode within theAnteHandle
method aligns with the PR's objective of centralizing execution mode checks. Verify that this approach is consistently applied across all relevant ante handlers.x/auth/ante/setup.go (2)
70-70
: Ensure the change in logic does not affect non-simulation execution paths.
77-77
: Update documentation and changelog to reflect the breaking change inSetGasMeter
function usage.x/auth/CHANGELOG.md (3)
36-36
: The changelog entry accurately describes the refactor of ante handlers. Ensure all related documentation is updated accordingly.
36-36
: The changelog entry about moving signature verification is clear and concise.
36-36
: Ensure the behavior change regardingBaseAccount
creation and the requirement to use account number 0 for non-existent accounts is well-documented in relevant sections beyond the changelog.x/auth/ante/fee.go (2)
7-7
: Ensure the new importcosmossdk.io/core/transaction
is used appropriately throughout the project.
58-64
: > 📝 NOTEThis review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [49-73]
Refactoring to use
txService
for execution mode checks improves modularity. Ensure comprehensive tests cover these changes, especially in different execution modes.Would you like assistance in creating additional tests for the new logic introduced in this refactor?
x/auth/ante/unordered_test.go (1)
26-28
: The addition ofsuite
setup before creating achain
in test functions enhances the test environment setup. Review the entire test suite to ensure consistency in test setup across all tests.x/auth/ante/basic.go (2)
4-4
: Ensure the new importcosmossdk.io/core/transaction
is used appropriately throughout the project.
19-38
: > 📝 NOTEThis review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [22-45]
Refactoring to include
ak AccountKeeper
inValidateBasicDecorator
and usingtxService.ExecMode(ctx)
for execution mode checks improves modularity. Ensure comprehensive tests cover these changes, especially in different execution modes.Would you like assistance in creating additional tests for the new logic introduced in this refactor?
x/auth/ante/basic_test.go (1)
39-39
: The update toNewValidateBasicDecorator
in the test function aligns with the changes in the implementation. Review the entire test suite to ensure consistency in handling new dependencies.x/auth/keeper/keeper.go (1)
56-58
: Adding theEnvironment()
method to theAccountKeeperI
interface and its implementation improves modularity. Review the module to ensure this new method is used consistently where access to the environment is needed.x/auth/ante/sigverify.go (1)
314-314
: Ensure that the check forExecModeSimulate
is consistent across the codebase.- if svd.ak.Environment().TransactionService.ExecMode(ctx) == transaction.ExecModeSimulate || ctx.IsReCheckTx() || !ctx.IsSigverifyTx() { + if svd.ak.Environment().TransactionService.ExecMode(ctx) == transaction.ExecModeSimulate || ctx.IsReCheckTx() || !ctx.IsSigVerifyTx() {This change corrects a potential inconsistency in method naming (
IsSigverifyTx
vs.IsSigVerifyTx
). Please verify the correct method name as per the Cosmos SDK's naming conventions and ensure consistency across the codebase.
@@ -10,6 +10,7 @@ import ( | |||
secp256k1dcrd "github.com/decred/dcrd/dcrec/secp256k1/v4" | |||
"google.golang.org/protobuf/types/known/anypb" | |||
|
|||
"cosmossdk.io/core/transaction" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider grouping the Cosmos SDK imports together for better readability.
import (
"context"
"encoding/base64"
"encoding/hex"
"errors"
"fmt"
secp256k1dcrd "github.com/decred/dcrd/dcrec/secp256k1/v4"
"google.golang.org/protobuf/types/known/anypb"
+ "cosmossdk.io/core/transaction"
errorsmod "cosmossdk.io/errors"
storetypes "cosmossdk.io/store/types"
aa_interface_v1 "cosmossdk.io/x/accounts/interfaces/account_abstraction/v1"
authsigning "cosmossdk.io/x/auth/signing"
"cosmossdk.io/x/auth/types"
txsigning "cosmossdk.io/x/tx/signing"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
"github.com/cosmos/cosmos-sdk/types/tx"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
"cosmossdk.io/core/transaction" | |
import ( | |
"context" | |
"encoding/base64" | |
"encoding/hex" | |
"errors" | |
"fmt" | |
secp256k1dcrd "github.com/decred/dcrd/dcrec/secp256k1/v4" | |
"google.golang.org/protobuf/types/known/anypb" | |
"cosmossdk.io/core/transaction" | |
errorsmod "cosmossdk.io/errors" | |
storetypes "cosmossdk.io/store/types" | |
aa_interface_v1 "cosmossdk.io/x/accounts/interfaces/account_abstraction/v1" | |
authsigning "cosmossdk.io/x/auth/signing" | |
"cosmossdk.io/x/auth/types" | |
txsigning "cosmossdk.io/x/tx/signing" | |
codectypes "github.com/cosmos/cosmos-sdk/codec/types" | |
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" | |
kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" | |
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" | |
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1" | |
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" | |
"github.com/cosmos/cosmos-sdk/types/tx" | |
"github.com/cosmos/cosmos-sdk/types/tx/signing" | |
sdk "github.com/cosmos/cosmos-sdk/types" | |
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" | |
) |
@@ -280,7 +281,7 @@ | |||
pubKey cryptotypes.PubKey, | |||
signature signing.SignatureV2, | |||
) error { | |||
if ctx.ExecMode() == sdk.ExecModeSimulate && pubKey == nil { | |||
if svd.ak.Environment().TransactionService.ExecMode(ctx) == transaction.ExecModeSimulate && pubKey == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace the direct comparison of pubKey
with nil
with a more idiomatic check for nil
interfaces in Go.
- if svd.ak.Environment().TransactionService.ExecMode(ctx) == transaction.ExecModeSimulate && pubKey == nil {
+ if svd.ak.Environment().TransactionService.ExecMode(ctx) == transaction.ExecModeSimulate && !reflect.ValueOf(pubKey).IsValid() {
This change ensures that the check for a nil
pubKey
correctly handles cases where pubKey
is a nil
interface, which is a common source of subtle bugs in Go code.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
if svd.ak.Environment().TransactionService.ExecMode(ctx) == transaction.ExecModeSimulate && pubKey == nil { | |
if svd.ak.Environment().TransactionService.ExecMode(ctx) == transaction.ExecModeSimulate && !reflect.ValueOf(pubKey).IsValid() { |
@@ -384,7 +385,7 @@ | |||
if txPubKey == nil { | |||
// if we're not in simulation mode, and we do not have a valid pubkey | |||
// for this signer, then we simply error. | |||
if ctx.ExecMode() != sdk.ExecModeSimulate { | |||
if svd.ak.Environment().TransactionService.ExecMode(ctx) != transaction.ExecModeSimulate { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider handling the error case when the execution mode is not ExecModeSimulate
more gracefully.
- if svd.ak.Environment().TransactionService.ExecMode(ctx) != transaction.ExecModeSimulate {
+ if execMode := svd.ak.Environment().TransactionService.ExecMode(ctx); execMode != transaction.ExecModeSimulate {
+ return fmt.Errorf("the account %s is without a pubkey and did not provide a pubkey in the tx to set it; execution mode: %s", acc.GetAddress().String(), execMode)
+ }
Including the execution mode in the error message provides more context for debugging and understanding why the operation failed, especially in environments where the execution mode might vary.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
if svd.ak.Environment().TransactionService.ExecMode(ctx) != transaction.ExecModeSimulate { | |
if execMode := svd.ak.Environment().TransactionService.ExecMode(ctx); execMode != transaction.ExecModeSimulate { | |
return fmt.Errorf("the account %s is without a pubkey and did not provide a pubkey in the tx to set it; execution mode: %s", acc.GetAddress().String(), execMode) | |
} |
@@ -9,7 +9,7 @@ type ExecMode uint8 | |||
// For backwards compatibility and easier casting, the exec mode values must be the same as in cosmos/cosmos-sdk/types package. | |||
const ( | |||
ExecModeCheck ExecMode = iota | |||
_ | |||
ExecModeReCheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
The verification process has identified that ExecModeReCheck
is not referenced in the codebase outside of its definition. This suggests that the integration of the new execution mode might not be complete, as there are no instances where it is being checked or set in the context of execution modes. It's advisable to review the implementation to ensure that ExecModeReCheck
is properly utilized where applicable.
Analysis chain
Adding ExecModeReCheck
enhances execution mode handling. Ensure that all references to execution modes are updated to include this new mode where applicable.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for missing references to ExecModeReCheck in the codebase.
rg 'ExecMode' --type go | rg -v 'ExecModeReCheck'
Length of output: 5035
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Actionable comments outside the diff hunks (3)
x/auth/CHANGELOG.md (3)
Line range hint
43-43
: Replace "take" with "takes" to match the subject-verb agreement.- `appd tx vesting create-vesting-account` take an amount of coin as last argument instead of second. + `appd tx vesting create-vesting-account` takes an amount of coin as last argument instead of second.
Line range hint
47-47
: Clarify the sentence by avoiding abbreviations and improving readability.- Address and validator address codecs are now arguments of `NewTxConfig`. + Address codecs and validator address codecs are now arguments of the `NewTxConfig` function.
Line range hint
52-52
: Consider adding an apostrophe to "accounts module" to indicate possession.- The accounts module is required for creating vesting accounts on a running chain. + The account's module is required for creating vesting accounts on a running chain.
Review Status
Configuration used: .coderabbit.yml
Files selected for processing (1)
- x/auth/CHANGELOG.md (1 hunks)
Additional Context Used
Path-based Instructions (1)
x/auth/CHANGELOG.md (1)
Pattern
**/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
// set custom ante handlers | ||
app.setCustomAnteHandler() | ||
|
||
if err := app.Load(loadLatest); err != nil { | ||
panic(err) | ||
} | ||
|
||
return app | ||
} | ||
|
||
// overwritte default ante handlers with custom ante handlers | ||
// set SkipAnteHandler to true in app config and set custom ante handler on baseapp | ||
func (app *SimApp) setCustomAnteHandler() { | ||
anteHandler, err := NewAnteHandler( | ||
HandlerOptions{ | ||
ante.HandlerOptions{ | ||
AccountKeeper: app.AuthKeeper, | ||
BankKeeper: app.BankKeeper, | ||
SignModeHandler: app.txConfig.SignModeHandler(), | ||
FeegrantKeeper: app.FeeGrantKeeper, | ||
SigGasConsumer: ante.DefaultSigVerificationGasConsumer, | ||
}, | ||
&app.CircuitBreakerKeeper, | ||
app.UnorderedTxManager, | ||
}, | ||
) | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
// Set the AnteHandler for the app | ||
app.SetAnteHandler(anteHandler) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review the implementation of setCustomAnteHandler
for error handling and modularity.
The setCustomAnteHandler
function directly panics if an error occurs while setting up the custom ante handler. Consider a more graceful error handling strategy that allows the application to recover or at least provide more context about the error. Additionally, this function could be made more modular by separating the creation of the HandlerOptions
struct and the actual setting of the ante handler into distinct steps or functions.
func (app *SimApp) setCustomAnteHandler() error {
- anteHandler, err := NewAnteHandler(
+ options := HandlerOptions{
+ ante.HandlerOptions{
+ AccountKeeper: app.AuthKeeper,
+ BankKeeper: app.BankKeeper,
+ SignModeHandler: app.txConfig.SignModeHandler(),
+ FeegrantKeeper: app.FeeGrantKeeper,
+ SigGasConsumer: ante.DefaultSigVerificationGasConsumer,
+ },
+ &app.CircuitBreakerKeeper,
+ app.UnorderedTxManager,
+ }
+ anteHandler, err := NewAnteHandler(options)
if err != nil {
- panic(err)
+ return fmt.Errorf("failed to set custom ante handler: %w", err)
}
app.SetAnteHandler(anteHandler)
+ return nil
}
- app.setCustomAnteHandler()
+ if err := app.setCustomAnteHandler(); err != nil {
+ panic(err)
+ }
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
// set custom ante handlers | |
app.setCustomAnteHandler() | |
if err := app.Load(loadLatest); err != nil { | |
panic(err) | |
} | |
return app | |
} | |
// overwritte default ante handlers with custom ante handlers | |
// set SkipAnteHandler to true in app config and set custom ante handler on baseapp | |
func (app *SimApp) setCustomAnteHandler() { | |
anteHandler, err := NewAnteHandler( | |
HandlerOptions{ | |
ante.HandlerOptions{ | |
AccountKeeper: app.AuthKeeper, | |
BankKeeper: app.BankKeeper, | |
SignModeHandler: app.txConfig.SignModeHandler(), | |
FeegrantKeeper: app.FeeGrantKeeper, | |
SigGasConsumer: ante.DefaultSigVerificationGasConsumer, | |
}, | |
&app.CircuitBreakerKeeper, | |
app.UnorderedTxManager, | |
}, | |
) | |
if err != nil { | |
panic(err) | |
} | |
// Set the AnteHandler for the app | |
app.SetAnteHandler(anteHandler) | |
} | |
// set custom ante handlers | |
if err := app.setCustomAnteHandler(); err != nil { | |
panic(err) | |
} | |
if err := app.Load(loadLatest); err != nil { | |
panic(err) | |
} | |
return app | |
} | |
// overwritte default ante handlers with custom ante handlers | |
// set SkipAnteHandler to true in app config and set custom ante handler on baseapp | |
func (app *SimApp) setCustomAnteHandler() error { | |
options := HandlerOptions{ | |
ante.HandlerOptions{ | |
AccountKeeper: app.AuthKeeper, | |
BankKeeper: app.BankKeeper, | |
SignModeHandler: app.txConfig.SignModeHandler(), | |
FeegrantKeeper: app.FeeGrantKeeper, | |
SigGasConsumer: ante.DefaultSigVerificationGasConsumer, | |
}, | |
&app.CircuitBreakerKeeper, | |
app.UnorderedTxManager, | |
} | |
anteHandler, err := NewAnteHandler(options) | |
if err != nil { | |
return fmt.Errorf("failed to set custom ante handler: %w", err) | |
} | |
app.SetAnteHandler(anteHandler) | |
return nil | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a question on the account keeper, it looks like we can pass in env instead of a module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes are looking good
but we need to figure out an alternative asap as mentioned in comment here (https://github.com/cosmos/cosmos-sdk/pull/19967/files#diff-2c78f871da4841d9e15ff6efa3d4dc04d882024d916b7f6d801b10e01b5a6b14R27)
as this is needed for other antehandler stuff too
ref: https://github.com/cosmos/cosmos-sdk/pull/19999/files#diff-2c78f871da4841d9e15ff6efa3d4dc04d882024d916b7f6d801b10e01b5a6b14R16
* main: (25 commits) fix: Implement gogoproto customtype to secp256r1 keys (cosmos#20027) fix(x/epochs): avoid invalid epoch duration in simulation (cosmos#20030) fix(x/bank): align query with multi denoms for send-enabled (cosmos#20028) refactor(x/slashing)!: remove Accounts String (cosmos#20026) refactor(x/evidence)!: remove Address.String() (cosmos#20016) chore: make telemetry consistent (cosmos#20025) chore: prepare x/tx changelog (cosmos#20015) build(deps): Bump actions/add-to-project from 1.0.0 to 1.0.1 (cosmos#20018) feat(x/bank): support depinject for send restrictions (cosmos#20014) feat: Conditionally emit metrics based on enablement (cosmos#19903) fix(store): fix the typo (cosmos#20011) docs(x/feegrant): fix allowance typo (cosmos#20000) chore(confix): update latest config value (cosmos#20012) refactor(x/auth): auth module can recognize x/accounts account (cosmos#20002) fix(mempool): use no-op mempool as default (cosmos#19970) fix(simapp): add epoch store to upgrade (cosmos#20007) test(kv): add unit tests for the helpers functions kv.AssertKeyAtLeas… (cosmos#19965) feat(x/tx): Rename custom Amino JSON encoder to "inline_json" (cosmos#19919) refactor(x/auth): use transaction service (cosmos#19967) fix(client/v2): add encoder for `cosmos.base.v1beta1.DecCoin` (cosmos#19976) ...
Description
Follow-up of #19953.
After this, I can continue: #19949
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...
!
in the type prefix if API or client breaking changeCHANGELOG.md
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...
Summary by CodeRabbit