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!: use x/tx/signing in client.TxConfig #15822

Merged
merged 66 commits into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
db53c1d
Hard break client.TxConfig
kocubinski Apr 12, 2023
0019cb9
incorporate changes from #15713
kocubinski Apr 12, 2023
f44fee6
Hard fixing
kocubinski Apr 12, 2023
49c18df
Merge branch 'main' into kocubinski/tx-config-break
kocubinski Apr 12, 2023
14539c4
go mod tidy
kocubinski Apr 12, 2023
5f2b4de
fix breakage in codec from latest main
kocubinski Apr 12, 2023
02c2340
Merge branch 'main' of github.com:cosmos/cosmos-sdk into kocubinski/t…
kocubinski Apr 13, 2023
147cbdf
remove replace for x/tx
kocubinski Apr 13, 2023
55e1d36
revert codec/ compat for x/tx 0.6.0
kocubinski Apr 13, 2023
55acfe3
x/tx v0.5.1
kocubinski Apr 13, 2023
bedd4b9
add err handling
kocubinski Apr 13, 2023
21927ef
checkpoint, proto gen
kocubinski Apr 13, 2023
623bacf
adjust lots of tests
kocubinski Apr 13, 2023
43ea1b4
fixed ante tests
kocubinski Apr 13, 2023
e32f007
Merge branch 'main' of github.com:cosmos/cosmos-sdk into kocubinski/t…
kocubinski Apr 13, 2023
bff8090
merged fix
kocubinski Apr 13, 2023
0a25910
revert (temporarily) x/tx to 0.5.1
kocubinski Apr 13, 2023
3f0a4f2
rm files
kocubinski Apr 13, 2023
d24dbc2
fix tx_test
kocubinski Apr 13, 2023
2e62758
revert x/tx
kocubinski Apr 13, 2023
2c9bd78
comment
kocubinski Apr 14, 2023
863c869
Merge branch 'main' of github.com:cosmos/cosmos-sdk into kocubinski/t…
kocubinski Apr 14, 2023
e0cecb1
maybe some fixes
kocubinski Apr 14, 2023
d0317b3
fix more test/build failures
kocubinski Apr 14, 2023
8365099
use x/tx 0.5.3
kocubinski Apr 14, 2023
ec82685
Merge branch 'main' into kocubinski/tx-config-break
kocubinski Apr 14, 2023
dc0d717
update rosetta go.mod
kocubinski Apr 14, 2023
c4c4cdd
Merge branch 'kocubinski/tx-config-break' of github.com:cosmos/cosmos…
kocubinski Apr 14, 2023
6e691fc
liniting
kocubinski Apr 14, 2023
0010ceb
linting fixes
kocubinski Apr 14, 2023
0b9eb03
lint fix
kocubinski Apr 14, 2023
4843d63
Merge branch 'main' of github.com:cosmos/cosmos-sdk into kocubinski/t…
kocubinski Apr 17, 2023
caf6987
clean up config
kocubinski Apr 17, 2023
a246afc
go mod tidy
kocubinski Apr 17, 2023
c6f2033
tidy rosetta
kocubinski Apr 17, 2023
978f4f4
rwmutex
kocubinski Apr 17, 2023
a8069dc
lint fix
kocubinski Apr 17, 2023
3851398
proper lazy init with sync.once
kocubinski Apr 17, 2023
6c363f5
clean up todos
kocubinski Apr 18, 2023
c66aefd
Merge branch 'main' of github.com:cosmos/cosmos-sdk into kocubinski/t…
kocubinski Apr 18, 2023
8fc3108
clean up, comments
kocubinski Apr 18, 2023
7364f41
attempt remove redundant arg
kocubinski Apr 18, 2023
a0acb58
move lazy registry
kocubinski Apr 18, 2023
f04a10c
store init error
kocubinski Apr 18, 2023
59ab3ce
test fixes
kocubinski Apr 18, 2023
ae3fe65
Merge branch 'main' of github.com:cosmos/cosmos-sdk into kocubinski/t…
kocubinski Apr 18, 2023
79c0f89
Merge branch 'main' of github.com:cosmos/cosmos-sdk into kocubinski/t…
kocubinski Apr 18, 2023
d4bb593
handle default sign mode todos
kocubinski Apr 18, 2023
96a693d
x/tx 0.5.5
kocubinski Apr 18, 2023
0796a6c
go mod tidy
kocubinski Apr 18, 2023
ad658b5
rm more todos
kocubinski Apr 18, 2023
c270393
lint fix
kocubinski Apr 18, 2023
4ad00c5
clean up handler creation API
kocubinski Apr 18, 2023
8e516b2
fix more test bugs
kocubinski Apr 18, 2023
f138251
finish simd/root command
kocubinski Apr 18, 2023
8973802
Merge branch 'main' of github.com:cosmos/cosmos-sdk into kocubinski/t…
kocubinski Apr 18, 2023
76c6363
a little clean up
kocubinski Apr 19, 2023
dd3cd93
Merge branch 'main' of github.com:cosmos/cosmos-sdk into kocubinski/t…
kocubinski Apr 19, 2023
05d52af
Add CHANGELOG entries for API breaks
kocubinski Apr 19, 2023
f3211b8
Add UPGRADING entries
kocubinski Apr 19, 2023
147dc83
Merge branch 'main' into kocubinski/tx-config-break
kocubinski Apr 19, 2023
d1af44c
PR fixes
kocubinski Apr 19, 2023
e8398d2
Merge branch 'main' of github.com:cosmos/cosmos-sdk into kocubinski/t…
kocubinski Apr 19, 2023
cd4f11f
lint fix
kocubinski Apr 19, 2023
2bb6750
Refactor NewTxConfig
kocubinski Apr 20, 2023
3bcaa98
lazy loading won't work in InterfaceRegistry ctr won't work yet.
kocubinski Apr 20, 2023
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
Prev Previous commit
Next Next commit
adjust lots of tests
  • Loading branch information
kocubinski committed Apr 13, 2023
commit 623bacf96bda96e17544c55f891333d8916d592d
51 changes: 27 additions & 24 deletions baseapp/testutil/messages.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions testutil/testdata/testpb/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ message MsgCreateDogResponse {
// https://github.com/cosmos/cosmos-sdk/issues/6213.
message TestMsg {
option (gogoproto.goproto_getters) = false;
option (cosmos.msg.v1.signer) = "signers";
repeated string signers = 1;
}
33 changes: 17 additions & 16 deletions testutil/testdata/testpb/tx.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions testutil/testdata/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions x/auth/ante/feegrant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,18 @@ func TestDeductFeesNoDelegation(t *testing.T) {

var defaultGenTxGas uint64 = 10000000
tx, err := genTxWithFeeGranter(protoTxCfg, msgs, fee, defaultGenTxGas, suite.ctx.ChainID(), accNums, seqs, feeAcc, privs...)
txBytes, err := protoTxCfg.TxEncoder()(tx)
require.NoError(t, err)
_, err = feeAnteHandler(suite.ctx, tx, false) // tests only feegrant ante
bytesCtx := suite.ctx.WithTxBytes(txBytes)
require.NoError(t, err)
_, err = feeAnteHandler(bytesCtx, tx, false) // tests only feegrant ante
if tc.valid {
require.NoError(t, err)
} else {
testutil.AssertError(t, err, tc.err, tc.errMsg)
}

_, err = anteHandlerStack(suite.ctx, tx, false) // tests while stack
_, err = anteHandlerStack(bytesCtx, tx, false) // tests while stack
kocubinski marked this conversation as resolved.
Show resolved Hide resolved
if tc.valid {
require.NoError(t, err)
} else {
Expand Down
2 changes: 1 addition & 1 deletion x/auth/ante/sigverify.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func (svd SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simul
Value: anyPk.Value,
},
}
decodeCtx, err := decode.NewDecoder(decode.Options{})
decodeCtx, err := decode.NewDecoder(decode.Options{ProtoFiles: sdk.MergedProtoRegistry()})
if err != nil {
return ctx, err
}
Expand Down
10 changes: 8 additions & 2 deletions x/auth/ante/testutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ func (suite *AnteTestSuite) DeliverMsgs(t *testing.T, privs []cryptotypes.PrivKe

tx, txErr := suite.CreateTestTx(suite.ctx, privs, accNums, accSeqs, chainID, signing.SignMode_SIGN_MODE_DIRECT)
require.NoError(t, txErr)
return suite.anteHandler(suite.ctx, tx, simulate)
txBytes, err := suite.clientCtx.TxConfig.TxEncoder()(tx)
bytesCtx := suite.ctx.WithTxBytes(txBytes)
require.NoError(t, err)
return suite.anteHandler(bytesCtx, tx, simulate)
}

func (suite *AnteTestSuite) RunTestCase(t *testing.T, tc TestCase, args TestCaseArgs) {
Expand All @@ -165,7 +168,10 @@ func (suite *AnteTestSuite) RunTestCase(t *testing.T, tc TestCase, args TestCase
// ante handlers, but here we sometimes also test the tx creation
// process.
tx, txErr := suite.CreateTestTx(suite.ctx, args.privs, args.accNums, args.accSeqs, args.chainID, signing.SignMode_SIGN_MODE_DIRECT)
newCtx, anteErr := suite.anteHandler(suite.ctx, tx, tc.simulate)
txBytes, err := suite.clientCtx.TxConfig.TxEncoder()(tx)
require.NoError(t, err)
bytesCtx := suite.ctx.WithTxBytes(txBytes)
newCtx, anteErr := suite.anteHandler(bytesCtx, tx, tc.simulate)

if tc.expPass {
require.NoError(t, txErr)
Expand Down