Noticed during an audit, we've got duplicated code that's unused. There were 2 type definitions: * type kvPair types.Pair * type KVPair types.Pair and each had a .bytes() and .Bytes() method respectively that then used some extra code. This change deletes the duplicated/unnecessary code but also while here improves the performance by removing the use of a bytes.Buffer which is unnecessary given that we are only length prefixed the key, length prefixing the value hence the various helpers are unnecessary. The added benchmarks shows the performance boost ```shell $ benchstat before after name old time/op new time/op delta KVPairBytes-8 146µs ± 1% 142µs ± 2% -3.05% (p=0.000 n=18+17) name old speed new speed delta KVPairBytes-8 6.84GB/s ± 1% 7.06GB/s ± 2% +3.15% (p=0.000 n=18+17) name old alloc/op new alloc/op delta KVPairBytes-8 1.01MB ± 0% 1.01MB ± 0% -0.04% (p=0.000 n=17+20) name old allocs/op new allocs/op delta KVPairBytes-8 6.00 ± 0% 1.00 ± 0% -83.33% (p=0.000 n=20+20) ``` Closes: #6688 |
||
|---|---|---|
| .circleci | ||
| .github | ||
| baseapp | ||
| client | ||
| codec | ||
| contrib | ||
| crypto | ||
| docs | ||
| networks/local | ||
| proto | ||
| scripts | ||
| server | ||
| simapp | ||
| std | ||
| store | ||
| telemetry | ||
| tests | ||
| testutil | ||
| third_party/proto | ||
| types | ||
| version | ||
| x | ||
| .codecov.yml | ||
| .dockerignore | ||
| .gitattributes | ||
| .gitignore | ||
| .golangci.yml | ||
| .goreleaser.yml | ||
| .mergify.yml | ||
| buf.yaml | ||
| CHANGELOG.md | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| SECURITY.md | ||
| snapcraft.yaml | ||
| snapcraft.yaml.in | ||
| Vagrantfile | ||
Cosmos SDK
The Cosmos-SDK is a framework for building blockchain applications in Golang.
It is being used to build Gaia, the first implementation of the Cosmos Hub.
WARNING: The SDK has mostly stabilized, but we are still making some breaking changes.
Note: Requires Go 1.14+
Quick Start
To learn how the SDK works from a high-level perspective, go to the SDK Intro.
If you want to get started quickly and learn how to build on top of the SDK, please follow the SDK Application Tutorial. You can also fork the tutorial's repository to get started building your own Cosmos SDK application.
For more, please go to the Cosmos SDK Docs.
Cosmos Hub Mainnet
The Cosmos Hub application, gaia, has moved to its own repository. Go there to join the Cosmos Hub mainnet and more.
Scaffolding
If you are starting a new app or a new module we provide a scaffolding tool to help you get started and speed up development. If you have any questions or find a bug, feel free to open an issue in the repo.
Disambiguation
This Cosmos-SDK project is not related to the React-Cosmos project (yet). Many thanks to Evan Coury and Ovidiu (@skidding) for this Github organization name. As per our agreement, this disambiguation notice will stay here.
