Skip to content

Commit

Permalink
Merge branch 'main' into recursion-check
Browse files Browse the repository at this point in the history
  • Loading branch information
haiyizxx authored Jan 3, 2025
2 parents d6e7a27 + 07d5168 commit bbf4379
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
### Bug Fixes

* (query) [23002](https://github.com/cosmos/cosmos-sdk/pull/23002) Fix collection filtered pagination.
* (x/auth/tx) [#23148](https://github.com/cosmos/cosmos-sdk/pull/23148) Avoid panic from intoAnyV2 when v1.PublicKey is optional.

### API Breaking Changes

Expand Down
2 changes: 1 addition & 1 deletion docs/rfc/rfc-003-crosslang.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ These bytes can be used by the **state handler** to determine what type of state

A **state token** is an opaque array of 32-bytes that is passed in each message request.
The hypervisor has no knowledge of what this token represents or how it is created,
but it is expected that modules that mange state do understand this token and use it to manage all state changes
but it is expected that modules that manage state do understand this token and use it to manage all state changes
in consistent transactions.
All side effects regarding state, events, etc. are expected to coordinate around the usage of this token.
It is possible that state modules expose methods for creating new **state tokens**
Expand Down
2 changes: 1 addition & 1 deletion schema/testing/statesim/module_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func DiffModuleStates(expected, actual view.ModuleState) string {
continue
}
if actualColl == nil {
res += fmt.Sprintf("Object Collection %s: actuall collection NOT FOUND\n", objTypeName)
res += fmt.Sprintf("Object Collection %s: actual collection NOT FOUND\n", objTypeName)
continue
}

Expand Down
2 changes: 1 addition & 1 deletion simapp/v2/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

// ExportAppStateAndValidators exports the state of the application for a genesis
// file.
// This is a demonstation of how to export a genesis file. Export may need extended at
// This is a demonstration of how to export a genesis file. Export may need extended at
// the user discretion for cleaning the genesis state at the end provided with jailAllowedAddrs
// Same applies for forZeroHeight preprocessing.
func (app *SimApp[T]) ExportAppStateAndValidators(
Expand Down
2 changes: 1 addition & 1 deletion x/auth/ante/unordered.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var _ sdk.AnteDecorator = (*UnorderedTxDecorator)(nil)
// The UnorderedTxDecorator should be placed as early as possible in the AnteHandler
// chain to ensure that during DeliverTx, the transaction is added to the UnorderedTxManager.
type UnorderedTxDecorator struct {
// maxUnOrderedTTL defines the maximum TTL a transaction can define.
// maxTimeoutDuration defines the maximum TTL a transaction can define.
maxTimeoutDuration time.Duration
txManager *unorderedtx.Manager
env appmodulev2.Environment
Expand Down
8 changes: 5 additions & 3 deletions x/auth/tx/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,11 @@ func intoV2SignerInfo(v1s []*tx.SignerInfo) []*txv1beta1.SignerInfo {
modeInfoV2 := new(txv1beta1.ModeInfo)
intoV2ModeInfo(v1.ModeInfo, modeInfoV2)
v2 := &txv1beta1.SignerInfo{
PublicKey: intoAnyV2([]*codectypes.Any{v1.PublicKey})[0],
ModeInfo: modeInfoV2,
Sequence: v1.Sequence,
ModeInfo: modeInfoV2,
Sequence: v1.Sequence,
}
if v1.PublicKey != nil {
v2.PublicKey = intoAnyV2([]*codectypes.Any{v1.PublicKey})[0]
}
v2s[i] = v2
}
Expand Down
15 changes: 15 additions & 0 deletions x/auth/tx/builder_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package tx

import (
"testing"

any "github.com/cosmos/gogoproto/types/any"
"github.com/stretchr/testify/require"

"github.com/cosmos/cosmos-sdk/types/tx"
)

func TestIntoV2SignerInfo(t *testing.T) {
require.NotNil(t, intoV2SignerInfo([]*tx.SignerInfo{{}}))
require.NotNil(t, intoV2SignerInfo([]*tx.SignerInfo{{PublicKey: &any.Any{}}}))
}
2 changes: 1 addition & 1 deletion x/tx/decode/unknown.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func doRejectUnknownFields(
}
// if a message descriptor is a placeholder resolve it using the injected resolver.
// this can happen when a descriptor has been registered in the
// "google.golang.org/protobuf" resgistry but not in "github.com/cosmos/gogoproto".
// "google.golang.org/protobuf" registry but not in "github.com/cosmos/gogoproto".
// fixes: https://github.com/cosmos/cosmos-sdk/issues/22574
if fieldMessage.IsPlaceholder() {
gogoDesc, err := resolver.FindDescriptorByName(fieldMessage.FullName())
Expand Down

0 comments on commit bbf4379

Please sign in to comment.