The First Modular AI Chain
Go to file
Nick DeLuca ab3cf7c994
feat!(precompile): Add registry and genesis tests (#1999)
* feat!(precompile): Add registry and genesis tests

Based on evgeniy-scherbina's work, this adds a new precompile module
which defines a contract moudule with an example noop contract that
will be will be used for implementing test functions.  In addition,
it defines a registry module that instantiates stateful precompile
contracts and associates them with an address in a global registry
defined in kava-labs/go-ethereum. See precompile/README.md for more
information.

The kava-labs/go-ethereum and kava-labs/etheremint replace statements
are updated to support these changes as well as an update to kvtool
which includes genesis state for the registry.NoopContractAddress and
initializes the contract's EthAccount with a non-zero sequence and
codehash set to keccak256(0x01), and sets the contract code to 0x01.
See tests/e2e/e2e_precompile_genesis_test.go for an overview of the
expected genesis state for an enabled precompile.

Co-authored-by: evgeniy-scherbina <evgeniy.shcherbina.es@gmail.com>

* chore: Precompile readme improvements

This fixes a typo (import -> important) and uses package terminology
instead of unclear module terminology.  This aligns best with golang
terminology were modules and packages are distinctly different and
modules are defined using go.mod.

* chore: Improve noop contract godoc

Add a more meaningful godoc where the noop contract is constructed.

* chore(e2e): Improve comments around query checks

Improve the clarity of comments around where the error is checked for
accounts and why it is not checked directly.

In addition, improve comment on why both grpc and rpc code is fetched
and where they are used.

---------

Co-authored-by: evgeniy-scherbina <evgeniy.shcherbina.es@gmail.com>
2024-08-09 09:55:31 -07:00
.github chore(prs): add codeowners (#1995) 2024-08-07 15:50:24 -04:00
app feat!(precompile): Add registry and genesis tests (#1999) 2024-08-09 09:55:31 -07:00
build chore(lint): Update local make lint to match CI (#1991) 2024-08-05 10:13:17 -07:00
ci/env bump deploy version for internal-testnet (#1952) 2024-06-24 11:33:37 -06:00
cli_test Update cosmos-sdk to v0.47.7 (#1811) 2024-02-06 17:54:10 -05:00
client feat(x/precisebank): Add query service with TotalFractionalBalances (#1970) 2024-07-19 10:24:23 -07:00
cmd/kava Replace opendb package from kava with generic opendb repo (#1959) 2024-07-11 09:23:31 -04:00
contracts chore(deps-dev): bump undici from 5.22.1 to 5.28.4 in /contracts (#1925) 2024-07-31 17:24:20 -07:00
contrib chore: fix some typos (#1913) 2024-05-16 13:27:48 -07:00
docs feat: Add gRPC query for remainder and account fractional balance (#1971) 2024-07-25 13:36:36 -07:00
migrate formatting fixes (#1783) 2023-11-21 14:08:07 -05:00
networks/local Use OS specific build directories (#600) 2020-06-24 14:21:01 -04:00
precompile feat!(precompile): Add registry and genesis tests (#1999) 2024-08-09 09:55:31 -07:00
proto feat: Add gRPC query for remainder and account fractional balance (#1971) 2024-07-25 13:36:36 -07:00
tests feat!(precompile): Add registry and genesis tests (#1999) 2024-08-09 09:55:31 -07:00
third_party/proto Replace opendb package from kava with generic opendb repo (#1959) 2024-07-11 09:23:31 -04:00
x chore: fix some function names (#1998) 2024-08-08 06:38:35 -07:00
.dockerignore fix(docker): Ignore local build and lint cache (#1994) 2024-08-07 11:20:17 -07:00
.gitignore chore(lint): Update local make lint to match CI (#1991) 2024-08-05 10:13:17 -07:00
.gitmodules Add IBC chain to E2E test suite (#1486) 2023-03-07 14:37:45 -08:00
.golangci-version chore(linter): update Golang linter configuration (#1977) 2024-07-31 16:23:44 -04:00
.golangci.yml chore(lint): Disable funlen for test functions (#1993) 2024-08-07 13:25:18 -07:00
.mockery.yaml feat(x/precisebank): Implement GetBalance (#1916) 2024-05-21 14:11:13 -07:00
.tool-versions test: add packet-forwarding middleware e2e test (#1883) 2024-04-19 12:35:13 -07:00
buf.work.yaml Upgrade to sdk v0.44.5 and add IBC (#1106) 2022-01-07 17:39:27 -07:00
CHANGELOG.md chore(deps): Bump cometbft to v0.37.9-kava.1 (#1988) 2024-08-02 09:27:28 -07:00
docker-compose.yml Fix fail local testnet docker-compose up 2021-11-04 12:06:11 +09:00
Dockerfile Bump cosmos-sdk to v0.47.10-kava.2 with iavl v1 support (#1846) 2024-03-22 09:40:18 -04:00
Dockerfile-rocksdb ci: extract separate rocksdb base image (#1898) 2024-05-02 10:36:49 -07:00
Dockerfile-rocksdb-base ci: extract separate rocksdb base image (#1898) 2024-05-02 10:36:49 -07:00
go.mod feat!(precompile): Add registry and genesis tests (#1999) 2024-08-09 09:55:31 -07:00
go.sum feat!(precompile): Add registry and genesis tests (#1999) 2024-08-09 09:55:31 -07:00
hard.svg add token logos (#1185) 2022-03-10 13:24:21 -07:00
kava-logo.svg Update README to new logo (#410) 2020-03-31 11:20:31 -04:00
LICENSE.md [R4R] Basic docs tidying (#534) 2020-05-29 15:53:57 -07:00
Makefile chore(lint): Update local make lint to match CI (#1991) 2024-08-05 10:13:17 -07:00
prometheus.docker-compose.yml feat(x/cdp): update begin bloocker to run liquidations every X blocks based off params (#1818) 2024-02-02 13:21:11 -05:00
prometheus.yml feat(x/cdp): update begin bloocker to run liquidations every X blocks based off params (#1818) 2024-02-02 13:21:11 -05:00
README.md chore(docs): update security contact (#1921) 2024-05-24 09:38:36 -07:00
swp.svg add token logos (#1185) 2022-03-10 13:24:21 -07:00

version CircleCI Go Report Card API Reference GitHub Twitter Follow Discord Chat

Reference implementation of Kava, a blockchain for cross-chain DeFi. Built using the cosmos-sdk.

Mainnet

The current recommended version of the software for mainnet is v0.26.0 The master branch of this repository often contains considerable development work since the last mainnet release and is not runnable on mainnet.

Installation and Setup

For detailed instructions see the Kava docs.

git checkout v0.26.0
make install

End-to-end tests of Kava use a tool for generating networks with different configurations: kvtool. This is included as a git submodule at tests/e2e/kvtool. When first cloning the repository, if you intend to run the e2e integration tests, you must also clone the submodules:

git clone --recurse-submodules https://github.com/Kava-Labs/kava.git

Or, if you have already cloned the repo: git submodule update --init

Testnet

For further information on joining the testnet, head over to the testnet repo.

Docs

Kava protocol and client documentation can be found in the Kava docs.

If you have technical questions or concerns, ask a developer or community member in the Kava discord.

Security

If you find a security issue, please report it to security [at] kavalabs.io. Depending on the verification and severity, a bug bounty may be available.

License

Copyright © Kava Labs, Inc. All rights reserved.

Licensed under the Apache v2 License.