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

refactor: Move to x/tx package #14634

Merged
merged 9 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ updates:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/tx"
directory: "/x/tx"
schedule:
interval: weekly
labels:
Expand Down
2 changes: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
- x/consensus/**/*
"C:x/circuit":
- x/circuit/**/*
"C:x/tx":
- x/tx/**/*
"C:collections":
- collections/**/*
"C:Cosmovisor":
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -559,26 +559,26 @@ jobs:
# NOTE: The following jobs are used to test the Cosmos SDK Go submodules present under x/{module}.
# They run when there is a diff in their respective directories.

test-tx:
test-x-tx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19.4
cache: true
cache-dependency-path: tx/go.sum
cache-dependency-path: x/tx/go.sum
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
PATTERNS: |
tx/**/*.go
tx/go.mod
tx/go.sum
x/tx/**/*.go
x/tx/go.mod
x/tx/go.sum
- name: tests
if: env.GIT_DIFF
run: |
cd tx
cd x/tx
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./...
- name: sonarcloud
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft }}
Expand All @@ -587,7 +587,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: tx/
projectBaseDir: x/tx/

test-x-nft:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### API Breaking Changes

* (tx) [#14634](https://github.com/cosmos/cosmos-sdk/pull/14634) Move the `tx` go module to `x/tx`.
* (snapshots) [#14597](https://github.com/cosmos/cosmos-sdk/pull/14597) Move `snapshots` to `store/snapshots`, rename and bump proto package to v1.
* (crypto/keyring) [#14151](https://github.com/cosmos/cosmos-sdk/pull/14151) Move keys presentation from `crypto/keyring` to `client/keys`
* (modules) [#13850](https://github.com/cosmos/cosmos-sdk/pull/13850) and [#14046](https://github.com/cosmos/cosmos-sdk/pull/14046) Remove gogoproto stringer annotations. This removes the custom `String()` methods on all types that were using the annotations.
Expand Down
4 changes: 0 additions & 4 deletions simapp/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w
cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE=
cosmossdk.io/math v1.0.0-beta.4 h1:JtKedVLGzA0vv84xjYmZ75RKG35Kf2WwcFu8IjRkIIw=
cosmossdk.io/math v1.0.0-beta.4/go.mod h1:An0MllWJY6PxibUpnwGk8jOm+a/qIxlKmL5Zyp9NnaM=
cosmossdk.io/tools/confix v0.0.0-20230110102841-9742029158ad h1:pKd9i/hHfUDZ4KCxIqXYHMIm9iJ3M6TGCQPpdC3bo3s=
cosmossdk.io/tools/confix v0.0.0-20230110102841-9742029158ad/go.mod h1:2Nh3ruqssRMhsrsCv404hW6fqSJGFfl2fWp6RDJbRAw=
cosmossdk.io/tools/rosetta v0.2.0 h1:Ae499UiZ9yPNCXvjOBO/R9I1pksCJfxoqWauEZgA/gs=
cosmossdk.io/tools/rosetta v0.2.0/go.mod h1:3mn8QuE2wLUdTi77/gbDXdFqXZdBdiBJhgAWUTSXPv8=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
Expand Down Expand Up @@ -197,8 +195,6 @@ github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32 h1:zlCp9n3uwQieEL
github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32/go.mod h1:kwMlEC4wWvB48zAShGKVqboJL6w4zCLesaNQ3YLU2BQ=
github.com/cosmos/cosmos-proto v1.0.0-beta.1 h1:iDL5qh++NoXxG8hSy93FdYJut4XfgbShIocllGaXx/0=
github.com/cosmos/cosmos-proto v1.0.0-beta.1/go.mod h1:8k2GNZghi5sDRFw/scPL8gMSowT1vDA+5ouxL8GjaUE=
github.com/cosmos/cosmos-sdk/x/nft v0.0.0-20230113085233-fae3332d62fc h1:sWSnxj3Yb4suTbO2mveJoJTQznW23d9/fIulZ3VIdnM=
github.com/cosmos/cosmos-sdk/x/nft v0.0.0-20230113085233-fae3332d62fc/go.mod h1:1sllUQ6kHXQoYNIkvHcyTElmOfNWsYqJUVLMsZhjJOI=
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=
Expand Down
2 changes: 0 additions & 2 deletions tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32 h1:zlCp9n3uwQieEL
github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32/go.mod h1:kwMlEC4wWvB48zAShGKVqboJL6w4zCLesaNQ3YLU2BQ=
github.com/cosmos/cosmos-proto v1.0.0-beta.1 h1:iDL5qh++NoXxG8hSy93FdYJut4XfgbShIocllGaXx/0=
github.com/cosmos/cosmos-proto v1.0.0-beta.1/go.mod h1:8k2GNZghi5sDRFw/scPL8gMSowT1vDA+5ouxL8GjaUE=
github.com/cosmos/cosmos-sdk/x/nft v0.0.0-20230113085233-fae3332d62fc h1:sWSnxj3Yb4suTbO2mveJoJTQznW23d9/fIulZ3VIdnM=
github.com/cosmos/cosmos-sdk/x/nft v0.0.0-20230113085233-fae3332d62fc/go.mod h1:1sllUQ6kHXQoYNIkvHcyTElmOfNWsYqJUVLMsZhjJOI=
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=
Expand Down
7 changes: 7 additions & 0 deletions x/tx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# CHANGELOG

## Unreleased

### Features

### Improvements
2 changes: 1 addition & 1 deletion tx/go.mod → x/tx/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module cosmossdk.io/tx
module cosmossdk.io/x/tx
amaury1093 marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

@julienrbrt julienrbrt Jan 16, 2023

Choose a reason for hiding this comment

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

A PR adding a new vanity url must be created here: https://github.com/cosmos/vanity.
We should possibly bundle the addition of x/nft and x/circuit there too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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


go 1.19

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sonar.projectKey=cosmos-sdk-tx
sonar.projectKey=cosmos-sdk-x/tx
amaury1093 marked this conversation as resolved.
Show resolved Hide resolved
sonar.organization=cosmos

sonar.projectName=Cosmos SDK - Tx
sonar.projectName=Cosmos SDK - x/tx
sonar.project.monorepo.enabled=true

sonar.sources=.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tx/textual/any_test.go → x/tx/textual/any_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"testing"

"cosmossdk.io/tx/textual"
"cosmossdk.io/x/tx/textual"
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/require"

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tx/textual/bytes_test.go → x/tx/textual/bytes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

"cosmossdk.io/tx/textual"
"cosmossdk.io/x/tx/textual"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/reflect/protoreflect"
)
Expand Down
2 changes: 1 addition & 1 deletion tx/textual/coin_test.go → x/tx/textual/coin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
"cosmossdk.io/tx/textual"
"cosmossdk.io/x/tx/textual"
)

// mockCoinMetadataKey is used in the mock coin metadata querier.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tx/textual/coins_test.go → x/tx/textual/coins_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
"cosmossdk.io/math"
"cosmossdk.io/tx/textual"
"cosmossdk.io/x/tx/textual"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/reflect/protoreflect"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tx/textual/dec_test.go → x/tx/textual/dec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"cosmossdk.io/tx/textual"
"cosmossdk.io/x/tx/textual"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/reflect/protoreflect"
)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"testing"

"cosmossdk.io/tx/textual"
"cosmossdk.io/x/tx/textual"
"github.com/stretchr/testify/require"

"google.golang.org/protobuf/proto"
Expand Down
4 changes: 2 additions & 2 deletions tx/textual/e2e_test.go → x/tx/textual/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
_ "cosmossdk.io/api/cosmos/crypto/multisig"
_ "cosmossdk.io/api/cosmos/crypto/secp256k1"
_ "cosmossdk.io/api/cosmos/gov/v1"
"cosmossdk.io/tx/textual"
"cosmossdk.io/tx/textual/internal/textualpb"
"cosmossdk.io/x/tx/textual"
"cosmossdk.io/x/tx/textual/internal/textualpb"
)

type e2eJsonTest struct {
Expand Down
2 changes: 1 addition & 1 deletion tx/textual/encode.go → x/tx/textual/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package textual
import (
"io"

"cosmossdk.io/tx/textual/internal/cbor"
"cosmossdk.io/x/tx/textual/internal/cbor"
)

var (
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tx/textual/enum_test.go → x/tx/textual/enum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"testing"

"cosmossdk.io/tx/textual"
"cosmossdk.io/tx/textual/internal/testpb"
"cosmossdk.io/x/tx/textual"
"cosmossdk.io/x/tx/textual/internal/testpb"
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/encoding/protojson"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tx/textual/int_test.go → x/tx/textual/int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"

"cosmossdk.io/math"
"cosmossdk.io/tx/textual"
"cosmossdk.io/x/tx/textual"
)

func TestIntJsonTestcases(t *testing.T) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"testing"

"cosmossdk.io/tx/textual/internal/cbor"
"cosmossdk.io/x/tx/textual/internal/cbor"
"github.com/stretchr/testify/require"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "google/protobuf/descriptor.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

option go_package = "cosmossdk.io/tx/textual/internal/testpb";
option go_package = "cosmossdk.io/x/tx/textual/internal/testpb";

// A is used for testing value renderers.
message A {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: v1
managed:
enabled: true
go_package_prefix:
default: cosmossdk.io/tx/textual/internal/testpb
default: cosmossdk.io/x/tx/textual/internal/testpb
except:
- buf.build/googleapis/googleapis
- buf.build/cosmos/gogo-proto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: v1
managed:
enabled: true
go_package_prefix:
default: cosmossdk.io/tx/textual/internal/textualpb
default: cosmossdk.io/x/tx/textual/internal/textualpb
except:
- buf.build/googleapis/googleapis
- buf.build/cosmos/gogo-proto
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tx/textual/message_test.go → x/tx/textual/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/stretchr/testify/require"

bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
"cosmossdk.io/tx/textual"
"cosmossdk.io/tx/textual/internal/testpb"
"cosmossdk.io/x/tx/textual"
"cosmossdk.io/x/tx/textual/internal/testpb"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/stretchr/testify/require"

"cosmossdk.io/tx/textual"
"cosmossdk.io/tx/textual/internal/testpb"
"cosmossdk.io/x/tx/textual"
"cosmossdk.io/x/tx/textual/internal/testpb"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"testing"

"cosmossdk.io/tx/textual"
"cosmossdk.io/x/tx/textual"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/reflect/protoreflect"
)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"time"

"cosmossdk.io/tx/textual"
"cosmossdk.io/x/tx/textual"
"github.com/stretchr/testify/require"

"google.golang.org/protobuf/proto"
Expand Down
2 changes: 1 addition & 1 deletion tx/textual/tx.go → x/tx/textual/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
msg "cosmossdk.io/api/cosmos/msg/v1"
signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1"
txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1"
"cosmossdk.io/tx/textual/internal/textualpb"
"cosmossdk.io/x/tx/textual/internal/textualpb"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions tx/textual/tx_test.go → x/tx/textual/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
_ "cosmossdk.io/api/cosmos/crypto/secp256k1"
_ "cosmossdk.io/api/cosmos/gov/v1"
txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1"
"cosmossdk.io/tx/signing"
"cosmossdk.io/tx/textual"
"cosmossdk.io/tx/textual/internal/textualpb"
"cosmossdk.io/x/tx/signing"
"cosmossdk.io/x/tx/textual"
"cosmossdk.io/x/tx/textual/internal/textualpb"
)

// txJsonTestTx represents the type that in the JSON test
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
"cosmossdk.io/tx/signing"
"cosmossdk.io/tx/textual/internal/textualpb"
"cosmossdk.io/x/tx/signing"
"cosmossdk.io/x/tx/textual/internal/textualpb"
cosmos_proto "github.com/cosmos/cosmos-proto"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/reflect/protoreflect"

"cosmossdk.io/tx/textual"
"cosmossdk.io/tx/textual/internal/testpb"
"cosmossdk.io/x/tx/textual"
"cosmossdk.io/x/tx/textual/internal/testpb"
)

func TestDispatcher(t *testing.T) {
Expand Down