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

feat(bank)!: Move the bank module SendEnabled info into state (from Params). #11977

Merged
merged 89 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
6ba7d5e
go mod tidy everything.
dwedul-figure May 11, 2022
8b7acf8
Add some third_party proto files that are imported but not included.
dwedul-figure May 11, 2022
bc7fe5e
[11859]: Add a new key for the SendEnabled flags and keeper methods f…
dwedul-figure May 11, 2022
0bd904c
[11859]: Remove the send_enabled field from the bank Params proto.
dwedul-figure May 11, 2022
80de698
Revert "Add some third_party proto files that are imported but not in…
dwedul-figure May 11, 2022
33d4652
[11859]: Regenerate the bank params stuff from the changed proto.
dwedul-figure May 11, 2022
505c5b6
[11859]: Add a send_enabled field to the bank genesis proto.
dwedul-figure May 12, 2022
174170a
Revert "[11859]: Remove the send_enabled field from the bank Params p…
dwedul-figure May 12, 2022
0cca158
Revert "[11859]: Regenerate the bank params stuff from the changed pr…
dwedul-figure May 12, 2022
0c70071
[11859]: Deprecate the bank Params send_enabled field.
dwedul-figure May 12, 2022
26aa8ac
[11859]: Regenerate the bank go code from the updated protos.
dwedul-figure May 12, 2022
e8992e2
[11859]: Reduce the number of times the store is recreated during IsS…
dwedul-figure May 12, 2022
6701d63
[11859]: Add the SendEnabled stuff to the genesis methods. Make a cou…
dwedul-figure May 13, 2022
ccdc316
[11859]: Update the bank sim genesis stuff to create random SendEnabl…
dwedul-figure May 14, 2022
ebeda16
Remove some of the bank params methods that are no longer meaningful.
dwedul-figure May 14, 2022
4d3a0b4
Add a comment about why we're calling a mutation method in a Validate…
dwedul-figure May 14, 2022
e418780
[11859]: Add some more TODO notes and make the SendEnabled.String() f…
dwedul-figure May 14, 2022
5327c95
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure May 14, 2022
3c76823
[11859]: Get rid of the SendEnabledParams type.
dwedul-figure May 14, 2022
1e86801
Fix up a few comments.
dwedul-figure May 14, 2022
4390747
[11859]: Update the bank keeper test due to recent changes.
dwedul-figure May 14, 2022
bcdaae3
[11859]: Tweak the bank Params and SendEnabled String funcs. Params n…
dwedul-figure May 14, 2022
b1dac5f
[11859]: Fix the params tests and add some new ones to it and key_test.
dwedul-figure May 14, 2022
9a70f78
[11859]: Create a 1-store method for updating several SendEnabled ent…
dwedul-figure May 16, 2022
d6df3fa
[11859]: Create a migration for both the module and genesis state.
dwedul-figure May 16, 2022
e3c3875
[11859]: Create a new MsgSetSendEnabled for governanance proposals to…
dwedul-figure May 16, 2022
8b594de
[11859]: Add SetAllSendEnabled to the SendKeeper interface.
dwedul-figure May 16, 2022
6222bac
[11859]: Add an authority to the bank keeper and create the handler f…
dwedul-figure May 16, 2022
88014ac
[11859]: Add an rpc endpoint for querying SendEnabled.
dwedul-figure May 16, 2022
004fd1e
[11859]: Implement the SendEnabled query.
dwedul-figure May 16, 2022
a1f6140
[11859]: Add a function for decoding a --page-key base64 value so tha…
dwedul-figure May 16, 2022
4f12acd
[11859]: Implement a CLI command for querying SendEnabled.
dwedul-figure May 16, 2022
39360f7
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure May 16, 2022
80ff7d0
[11859]: Move the v047 store migration stuff into Migrate3to4 directl…
dwedul-figure May 16, 2022
d94885e
[11869]: Implement the Msg interface for MsgSetSendEnabled.
dwedul-figure May 17, 2022
fc6cd8f
[11859]: Fix some unit tests that I broke along the way.
dwedul-figure May 17, 2022
d17912d
[11859]: Reorg the funcs added to the SendKeeper interface.
dwedul-figure May 17, 2022
522ef2d
[11859]: Fix the return values of a couple of the MsgSetSendEnabled L…
dwedul-figure May 17, 2022
22e9c2d
[11859]: Tweak MigrateSendEnabled to add stuff to the existing slice …
dwedul-figure May 17, 2022
6fb9796
[11859]: Don't set the Pagination field when looking up specific entr…
dwedul-figure May 17, 2022
95fc0be
[11859]: Put validateSendEnabledParams back to the way it was to allo…
dwedul-figure May 17, 2022
21f0aa6
[11859]: Write up a bunch of unit tests.
dwedul-figure May 17, 2022
4b7ac41
[11859]: Update the MsgSetSendEnabled.ValidateBasic() function with s…
dwedul-figure May 17, 2022
aeda4e9
Update a test I fixed then broke.
dwedul-figure May 17, 2022
7973090
[11859]: Have the run-tests make target exit with a non-zero status i…
dwedul-figure May 17, 2022
1902e4d
[11859]: Add changelog entries.
dwedul-figure May 17, 2022
df83e43
[11859]: Add a missing func comment.
dwedul-figure May 17, 2022
34a0ac3
[11859]: Only do a couple assertions if the elements exist to do so.
dwedul-figure May 17, 2022
7336147
[11859]: Add some more missing function comments.
dwedul-figure May 17, 2022
b133146
[11859]: Update the bank spec documentation.
dwedul-figure May 17, 2022
4b9a190
[11859]: Change name of WithPageKeyDecoded to FlagSetWithPageKeyDecod…
dwedul-figure May 17, 2022
7ce1e8d
[11859]: Update the documentation on the SendEnabled query.
dwedul-figure May 17, 2022
42b29fa
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure May 17, 2022
c7667ed
[11859]: Add final newline to query.proto.
dwedul-figure May 17, 2022
73b42c7
[11859]: Remove the SetSendEnabled msg and endpoint.
dwedul-figure May 17, 2022
6a993c0
[11859]: Use nil instead of an empty slice of SendEnabled for default…
dwedul-figure May 17, 2022
dc82fce
[11859]: Update SetParams to migrate entries too.
dwedul-figure May 17, 2022
e838d79
[11859]: Remove the spec doc info about the MsgSetSendEnabled that's …
dwedul-figure May 17, 2022
85052b8
[11859]: Update the changelog.
dwedul-figure May 17, 2022
2fded88
Revert "[11859]: Update the changelog."
dwedul-figure May 17, 2022
f6e72cd
[11859]: Rename the QuerySendEnabled message to QuerySendEnabledReque…
dwedul-figure May 18, 2022
93f4148
[11859]: Remove the authority field that is only needed for governanc…
dwedul-figure May 18, 2022
0abfc97
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure May 18, 2022
755cc62
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure May 19, 2022
980097a
[11859]: Add a version to the deprecation message.
dwedul-figure May 19, 2022
ec17e7c
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure May 19, 2022
e6e4f99
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure May 20, 2022
4db78bc
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure May 26, 2022
25caff7
[11859]: Update the comment on the now-deprecated SendEnabled params …
dwedul-figure May 26, 2022
c3bf200
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure May 26, 2022
6e0d296
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure May 31, 2022
2100403
Add some spacing to GetCmdQuerySendEnabled -> RunE.
dwedul-figure May 31, 2022
cde4083
[11859]: Create banktypes.GenesisState.GetAllSendEnabled() to house t…
dwedul-figure Jun 1, 2022
26ce722
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure Jun 1, 2022
7c8056f
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure Jun 1, 2022
4c853b7
[11859]: Update Bank's ConsensusVersion to 4.
dwedul-figure Jun 2, 2022
fdee48a
[11859]: Add 'Since' comments to the new proto stuff.
dwedul-figure Jun 2, 2022
d98ac06
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure Jun 2, 2022
4db6361
[11859]: Fix a unit test that broke because it assumed the bank modul…
dwedul-figure Jun 2, 2022
b67ede8
Merge branch 'main' into dwedul/11859-send-disabled-change
alexanderbez Jun 3, 2022
3b8282c
[11859]: Remove an empty line.
dwedul-figure Jun 3, 2022
2e93ced
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure Jun 3, 2022
05ac9d5
[11859]: Remove movement of SendEnabled from the `ExportGenesis` func…
dwedul-figure Jun 3, 2022
db32905
[11859]: Add a function for getting an entry so that users can differ…
dwedul-figure Jun 6, 2022
142ef2f
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure Jun 6, 2022
596d7c9
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure Jun 8, 2022
3a12a53
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure Jun 9, 2022
87498fc
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure Jun 10, 2022
859eff0
Merge branch 'main' into dwedul/11859-send-disabled-change
dwedul-figure Jun 10, 2022
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [\#11334](https://github.com/cosmos/cosmos-sdk/pull/11334) Move `x/gov/types/v1beta2` to `x/gov/types/v1`.
* (x/auth/middleware) [#11413](https://github.com/cosmos/cosmos-sdk/pull/11413) Refactor tx middleware to be extensible on tx fee logic. Merged `MempoolFeeMiddleware` and `TxPriorityMiddleware` functionalities into `DeductFeeMiddleware`, make the logic extensible using the `TxFeeChecker` option, the current fee logic is preserved by the default `checkTxFeeWithValidatorMinGasPrices` implementation. Change `RejectExtensionOptionsMiddleware` to `NewExtensionOptionsMiddleware` which is extensible with the `ExtensionOptionChecker` option. Unpack the tx extension options `Any`s to interface `TxExtensionOptionI`.
* (migrations) [#11556](https://github.com/cosmos/cosmos-sdk/pull/11556#issuecomment-1091385011) Remove migration code from 0.42 and below. To use previous migrations, checkout previous versions of the cosmos-sdk.
* (x/bank) [\#11859](https://github.com/cosmos/cosmos-sdk/pull/11859) Move the SendEnabled information out of the Params and into the state store directly.
The information can now be accessed using the BankKeeper.
Setting can be done using MsgSetSendEnabled as a governance proposal.
A SendEnabled query has been added to both GRPC and CLI.


### Client Breaking Changes

Expand Down Expand Up @@ -337,11 +342,16 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (x/authz,x/feegrant) [\#11214](https://github.com/cosmos/cosmos-sdk/pull/11214) Fix Amino JSON encoding of authz and feegrant Msgs to be consistent with other modules.
* (authz)[\#11060](https://github.com/cosmos/cosmos-sdk/pull/11060) Support grant with no expire time.
* (x/gov) [\#10868](https://github.com/cosmos/cosmos-sdk/pull/10868) Bump gov to v1.
* (x/bank) [\#11859](https://github.com/cosmos/cosmos-sdk/pull/11859) Move the SendEnabled information out of the Params and into the state store directly.

### Deprecated

* (x/upgrade) [\#9906](https://github.com/cosmos/cosmos-sdk/pull/9906) Deprecate `UpgradeConsensusState` gRPC query since this functionality is only used for IBC, which now has its own [IBC replacement](https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)
* (types) [\#10948](https://github.com/cosmos/cosmos-sdk/issues/10948) Deprecate the types.DBBackend variable and types.NewLevelDB function. They are replaced by a new entry in `app.toml`: `app-db-backend` and `tendermint/tm-db`s `NewDB` function. If `app-db-backend` is defined, then it is used. Otherwise, if `types.DBBackend` is defined, it is used (until removed: [\#11241](https://github.com/cosmos/cosmos-sdk/issues/11241)). Otherwise, Tendermint config's `db-backend` is used.
* (x/bank) [\#11859](https://github.com/cosmos/cosmos-sdk/pull/11859) The Params.SendEnabled field is deprecated and unusable.
The information can now be accessed using the BankKeeper.
Setting can be done using MsgSetSendEnabled as a governance proposal.
A SendEnabled query has been added to both GRPC and CLI.

## [v0.45.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.3) - 2022-04-12

Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -244,18 +244,26 @@ CURRENT_DIR = $(shell pwd)
run-tests:
ifneq (,$(shell which tparse 2>/dev/null))
@echo "Starting unit tests"; \
alexanderbez marked this conversation as resolved.
Show resolved Hide resolved
finalec=0; \
for module in $(SUB_MODULES); do \
cd ${CURRENT_DIR}/$$module; \
echo "Running unit tests for module $$module"; \
go test -mod=readonly -json $(ARGS) $(TEST_PACKAGES) ./... | tparse; \
done
ec=$$?; \
if [ "$$ec" -ne '0' ]; then finalec=$$ec; fi; \
done; \
exit $$finalec
else
@echo "Starting unit tests"; \
finalec=0; \
for module in $(SUB_MODULES); do \
cd ${CURRENT_DIR}/$$module; \
echo "Running unit tests for module $$module"; \
go test -mod=readonly $(ARGS) $(TEST_PACKAGES) ./... ; \
done
ec=$$?; \
if [ "$$ec" -ne '0' ]; then finalec=$$ec; fi; \
done; \
exit $$finalec
endif

.PHONY: run-tests test test-all $(TEST_TARGETS)
Expand Down
166 changes: 87 additions & 79 deletions api/cosmos/bank/v1beta1/bank.pulsar.go

Large diffs are not rendered by default.

223 changes: 189 additions & 34 deletions api/cosmos/bank/v1beta1/genesis.pulsar.go

Large diffs are not rendered by default.

Loading