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

Bring in SDK changes up to v0.50.7 and Mark v0.50.7-pio-1. #610

Merged
merged 63 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
b8659ae
fix(crypto): error if incorrect ledger public key (backport #19691) (…
mergify[bot] Mar 13, 2024
6977c22
build(deps): Bump github.com/cometbft/cometbft from 0.38.5 to 0.38.6 …
dependabot[bot] Mar 14, 2024
9a59234
fix: align signer extraction adapter for mempool remove (backport #19…
mergify[bot] Mar 18, 2024
0df2902
fix(x/upgrade): Stop treating inline JSON as a URL (backport #19706) …
mergify[bot] Mar 18, 2024
1ad7fad
fix(client/v2): fix comment parsing (backport #19377) (#19777)
mergify[bot] Mar 19, 2024
ff30f6e
build(deps): Bump github.com/cosmos/iavl from 1.0.1 to 1.1.1 in store…
dependabot[bot] Mar 20, 2024
a6c7aa5
chore(store): add release date (#19797)
tac0turtle Mar 20, 2024
87ad797
build(deps): Bump github.com/cosmos/gogoproto from 1.4.11 to 1.4.12 (…
dependabot[bot] Mar 21, 2024
a0faab3
feat(x/gov): emit proposer address in submit proposal event (backport…
mergify[bot] Mar 24, 2024
9c53142
feat(x/gov): emit depositor in `proposal_deposit` event (backport #19…
mergify[bot] Mar 25, 2024
d78edac
reuse fromAddrString (minor cleanup) (#19881)
yihuang Mar 27, 2024
8641cd2
feat(client): replace `event-query-tx-for` with `wait-tx` (backport #…
mergify[bot] Mar 27, 2024
7b35e36
feat(server): add custom start handler (backport #19854) (#19884)
mergify[bot] Mar 28, 2024
405471b
build(deps): Bump cosmossdk.io/store from 1.0.2 to 1.1.0 (#19810)
dependabot[bot] Mar 28, 2024
f63e5fd
docs(x/mint): Fix inconsistency in mint docs (backport #19915) (#19925)
mergify[bot] Apr 3, 2024
4b71767
build(deps): Bump github.com/cosmos/iavl from 1.1.1 to 1.1.2 (#19985)
dependabot[bot] Apr 10, 2024
525b720
fix(client/v2): add encoder for `cosmos.base.v1beta1.DecCoin` (backpo…
mergify[bot] Apr 10, 2024
f76c659
fix(mempool): use no-op mempool as default (backport #19970) (#20008)
mergify[bot] Apr 11, 2024
974a24c
feat: Conditionally emit metrics based on enablement (backport #19903…
mergify[bot] Apr 12, 2024
452632f
fix(x/bank): align query with multi denoms for send-enabled (backport…
mergify[bot] Apr 12, 2024
521ebe5
fix: Implement gogoproto customtype to secp256r1 keys (backport #2002…
mergify[bot] Apr 13, 2024
741b01c
fix(client/v2): respect output format from client ctx (backport #2003…
mergify[bot] Apr 15, 2024
d6a0fa1
build(deps): Bump cosmossdk.io/x/tx from 0.13.1 to 0.13.2 (#20042)
dependabot[bot] Apr 15, 2024
dafcc78
feat(x/bank): support depinject for send restrictions (backport #2001…
mergify[bot] Apr 15, 2024
9941498
fix(baseapp): don't share global gas meter in tx execution (backport …
mergify[bot] Apr 16, 2024
49c3ae6
fix: secp256r1 json missing quotes (backport #20060) (#20069)
mergify[bot] Apr 17, 2024
a2abf1a
build(deps): Bump github.com/cosmos/cosmos-proto from 1.0.0-beta.4 to…
dependabot[bot] Apr 19, 2024
2a32f42
feat(client/v2): implement version filtering using annotation (backpo…
mergify[bot] Apr 19, 2024
4bd0e02
chore: prepare v0.50.6 (#19998)
julienrbrt Apr 21, 2024
0a682f7
fix: use timestamp for sim log file name (backport #20108) (#20111)
mergify[bot] Apr 21, 2024
fcb9d84
fix(x/authz,x/feegrant): check blocked address (#20102)
julienrbrt Apr 21, 2024
c4d9a49
chore: update v0.50.6 release notes (#20124)
julienrbrt Apr 22, 2024
a42a85a
build(deps): bump sdk in modules (#20126)
julienrbrt Apr 22, 2024
3437fd5
docs(gas/fees): Update block gas documentation (backport #20128) (#20…
mergify[bot] Apr 22, 2024
7828a00
fix(baseapp): avoid header height overwrite block height (backport #2…
mergify[bot] Apr 22, 2024
ad8c205
docs: fix broken link (backport #20133) (#20138)
mergify[bot] Apr 22, 2024
bb9f451
build(deps): bump modules in simapp (#20137)
julienrbrt Apr 22, 2024
d4896c2
build(deps): Bump cosmossdk.io/x/tx from 0.13.2 to 0.13.3 (#20152)
dependabot[bot] Apr 23, 2024
016389c
docs: add authz reference info in the circuit antehandler (backport #…
mergify[bot] Apr 23, 2024
66ac784
fix(testsuite/sims): set all signatures (backport #20151) (#20185)
mergify[bot] Apr 25, 2024
f74c0e9
build(deps): Bump github.com/cometbft/cometbft from 0.38.6 to 0.38.7 …
dependabot[bot] Apr 29, 2024
a65c2f7
fix(server): bootstrap-state command can't parse latest genesis forma…
mergify[bot] Apr 29, 2024
8ffc807
fix: remove txs from mempool when antehandler fails in recheck (backp…
mergify[bot] May 2, 2024
bd886bb
feat(baseapp): expose grpc query router via depinject. (#20264)
julienrbrt May 3, 2024
a2d3b2a
feat(client/v2): override short description in generated command (bac…
mergify[bot] May 9, 2024
9f8e3a5
feat(runtime): Add missing NewTransientStoreService (backport #20261)…
mergify[bot] May 9, 2024
3904228
fix: allow tx decoding to fail in GetBlockWithTxs (backport #20323) (…
mergify[bot] May 9, 2024
5d5e2d0
fix(client/v2): correctly check subcommand short descriptions (backpo…
mergify[bot] May 10, 2024
b696f7a
build(deps): Bump cosmossdk.io/api from 0.7.4 to 0.7.5 (#20338)
dependabot[bot] May 10, 2024
5b6045c
style: Fix gov query proposals examples syntax (backport #20353) (#20…
mergify[bot] May 12, 2024
08fdfec
feat(client): add consensus address for debug cmd (backport #20328) (…
mergify[bot] May 13, 2024
83747c5
feat(client): overwrite client context instead of setting new one (ba…
mergify[bot] May 14, 2024
b99ca2c
fix: correctly assign `execModeSimulate` to context for `simulateTx` …
mergify[bot] May 17, 2024
2ca9873
docs: update diagram to be shown properly (backport #20454) (#20460)
mergify[bot] May 27, 2024
5545d45
docs: fix note blocks display failure (backport #20457) (#20459)
mergify[bot] May 27, 2024
443f153
docs: update link contents (backport #20437) (#20462)
mergify[bot] May 27, 2024
d180df8
fix(x/consensus): harden consensus params proposal (#20381)
tac0turtle May 28, 2024
9cfb349
docs: add docs on permissions (backport #20526) (#20527)
mergify[bot] Jun 3, 2024
9313b0f
chore(x/upgrade): bump vulnerable `go-getter` library (#20530)
julienrbrt Jun 3, 2024
62212df
chore: prepare v0.50.7 (#20475)
julienrbrt Jun 4, 2024
13c4370
Merge tag 'v0.50.7' into prov/dwedul/bump-to-v0.50.7
SpicyLemon Jun 5, 2024
6e96935
Add changelog entry and mark v0.50.7-pio-1 in the changelog.
SpicyLemon Jun 6, 2024
8c1f6cf
Fix the release date of v0.50.7-pio-1.
SpicyLemon Jun 10, 2024
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
docs: add docs on permissions (backport cosmos#20526) (cosmos#20527)
Co-authored-by: Marko <marko@baricevic.me>
  • Loading branch information
mergify[bot] and tac0turtle committed Jun 3, 2024
commit 9cfb3499d1d8b90262b2d5b443c97bfeacf409f9
9 changes: 9 additions & 0 deletions docs/docs/build/building-modules/00-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ Cosmos SDK modules can be seen as little state-machines within the state-machine

As a result of this architecture, building a Cosmos SDK application usually revolves around writing modules to implement the specialized logic of the application and composing them with existing modules to complete the application. Developers will generally work on modules that implement logic needed for their specific use case that do not exist yet, and will use existing modules for more generic functionalities like staking, accounts, or token management.


### Modules as Sudo

Modules have the ability to perform actions that are not available to regular users. This is because modules are given sudo permissions by the state machine. Modules can reject another modules desire to execute a function but this logic must be explicit. Examples of this can be seen when modules create functions to modify parameters:

```go reference
https://github.com/cosmos/cosmos-sdk/blob/61da5d1c29c16a1eb5bb5488719fde604ec07b10/x/bank/keeper/msg_server.go#L147-L149
```

## How to Approach Building Modules as a Developer

While there are no definitive guidelines for writing modules, here are some important design principles developers should keep in mind when building them:
Expand Down
5 changes: 5 additions & 0 deletions x/bank/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@ During `InputOutputCoins`, the send restriction is applied after the input coins

A send restriction function should make use of a custom value in the context to allow bypassing that specific restriction.

Send Restrictions are not placed on `ModuleToAccount` or `ModuleToModule` transfers. This is done due to modules needing to move funds to user accounts and other module accounts. This is a design decision to allow for more flexibility in the state machine. The state machine should be able to move funds between module accounts and user accounts without restrictions.

Secondly this limitation would limit the usage of the state machine even for itself. users would not be able to receive rewards, not be able to move funds between module accounts. In the case that a user sends funds from a user account to the community pool and then a governance proposal is used to get those tokens into the users account this would fall under the discretion of the app chain developer to what they would like to do here. We can not make strong assumptions here.
Thirdly, this issue could lead into a chain halt if a token is disabled and the token is moved in the begin/endblock. This is the last reason we see the current change and more damaging then beneficial for users.

For example, in your module's keeper package, you'd define the send restriction function:

```golang
Expand Down