cosmos-sdk/x
Emmanuel T Odeke abe3e0c6da
perf: all: remove unnecessary allocations from strings.Builder.WriteString(fmt.Sprintf(...)) (#13230)
This change removes a code pattern that I noticed while on a late night
audit of cosmovisor in which
strings.Builder.WriteString(fmt.Sprintf(...))
calls were being made, yet that's counterproductive to using fmt.Fprintf
which will check whether the writer implements .WriteString and then
avoids the need to firstly build a string using fmt.Sprintf.

The performance wins from this change transcend all dimensions as
exhibited below:

```shell
$ benchstat before.txt after.txt
name            old time/op    new time/op    delta
DetailString-8    5.48µs ±23%    4.40µs ±11%  -19.79%  (p=0.000 n=20+17)

name            old alloc/op   new alloc/op   delta
DetailString-8    2.63kB ± 0%    2.11kB ± 0%  -19.76%  (p=0.000 n=20+20)

name            old allocs/op  new allocs/op  delta
DetailString-8      63.0 ± 0%      50.0 ± 0%  -20.63%  (p=0.000 n=20+20)
```

Fixes #13229
2022-09-09 21:57:46 +00:00
..
auth refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
authz feat(bank): Create message for Setting SendEnabled settings (#11981) 2022-09-09 00:21:54 +00:00
bank fix: remove newly introduced simapp dependency (#13219) 2022-09-09 13:16:26 +02:00
capability refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
consensus refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
crisis refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
distribution perf: all: remove unnecessary allocations from strings.Builder.WriteString(fmt.Sprintf(...)) (#13230) 2022-09-09 21:57:46 +00:00
epoching chore: collapse module spec and readme (#13143) 2022-09-05 12:26:40 +00:00
evidence refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
feegrant refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
genutil refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
gov feat(bank): Create message for Setting SendEnabled settings (#11981) 2022-09-09 00:21:54 +00:00
group fix: Add withdraw proposal cmd to group's CLI tx cmds (#13214) 2022-09-09 09:18:36 +02:00
mint refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
nft refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
params perf: all: remove unnecessary allocations from strings.Builder.WriteString(fmt.Sprintf(...)) (#13230) 2022-09-09 21:57:46 +00:00
simulation docs: add module documentation testing (#12762) 2022-09-07 01:34:38 +02:00
slashing feat: add mocks for x/slashing cli tests (#13215) 2022-09-09 15:29:45 +00:00
staking refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
upgrade refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
README.md chore: collapse module spec and readme (#13143) 2022-09-05 12:26:40 +00:00

List of Modules

Here are some production-grade modules that can be used in Cosmos SDK applications, along with their respective documentation:

  • Auth - Authentication of accounts and transactions for Cosmos SDK applications.
  • Authz - Authorization for accounts to perform actions on behalf of other accounts.
  • Bank - Token transfer functionalities.
  • Capability - Object capability implementation.
  • Crisis - Halting the blockchain under certain circumstances (e.g. if an invariant is broken).
  • Distribution - Fee distribution, and staking token provision distribution.
  • Epoching - Allows modules to queue messages for execution at a certain block height.
  • Evidence - Evidence handling for double signing, misbehaviour, etc.
  • Feegrant - Grant fee allowances for executing transactions.
  • Governance - On-chain proposals and voting.
  • Mint - Creation of new units of staking token.
  • Params - Globally available parameter store.
  • Slashing - Validator punishment mechanisms.
  • Staking - Proof-of-Stake layer for public blockchains.
  • Upgrade - Software upgrades handling and coordination.
  • NFT - NFT module implemented based on ADR43.

To learn more about the process of building modules, visit the building modules reference documentation.

IBC

The IBC module for the SDK has moved to its own repository.

CosmWasm

The CosmWasm module enables smart contracts, and has its own repository and documentation site.