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

chore: add Contributing.md #204

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Changes from all commits
Commits
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
53 changes: 53 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Contributing


mbreithecker marked this conversation as resolved.
Show resolved Hide resolved
Thank you for considering to contribute to this project. KYVE is an L1 based
on Cosmos SDK and CometBFT. We mostly follow their principles and design
architectures.

## Overview

- The latest state of development is on `main`.
- `main` must always pass `make all ENV=mainnet`.
- Releases can be found in `/release/*`.
- Everything must be covered by tests. We have a very extensive test-suite
and use triple-A testing (Arrange, Act, Assert).

## Creating a Pull Request

- Check out the latest state from main and always keep the PR in sync with main.
- Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#specification).
- Only one feature per pull request.
- Write an entry for the Changelog.
- Write tests covering 100% of your modified code.
- The command `make all ENV=mainnet` must pass.
mbreithecker marked this conversation as resolved.
Show resolved Hide resolved

## Coding Guidelines

- Write readable and maintainable code. `Premature Optimization Is the Root of All Evil`.
Concentrate on clean interfaces first and only optimize for performance if it is needed.
- The keeper directory is structured the following:
- `getters_*`-files only interact with the KV-Store. All methods always succeed
and do not return errors. This is the only place where methods are allowed to
mbreithecker marked this conversation as resolved.
Show resolved Hide resolved
write to the KV-Store. Also, all aggregation variables are updated here.
- `logic_*`-files handle complex tasks and are encouraged to emit events and
call the getters functions.
mbreithecker marked this conversation as resolved.
Show resolved Hide resolved
- `msg_server_*`-files are the entry point for message handling. This file
should be very clean to read and outsource most of the part to the logic files.
One should immediately understand the flow by just reading the function names
which are called while handling the message.

## Chain Upgrade

If a major chain upgrade is planned, the additional checks must be done:
- Check if the AnteHandler (app/ante.go:L45) is still up-to-date.
mbreithecker marked this conversation as resolved.
Show resolved Hide resolved
- Check ABCI++ Proposal Handler extensions
- Carefully read the upgrade guides for CosmosSDK and IBC as well as CometBFT
- Get in contact with block explorer maintainers and notify them about upcoming changes.
- Test if Ledger is still working
- Update the [docs](https://docs.kyve.network).

## Legal

You agree that your contribution is licenced under the MIT Licence and all
ownership is handed over the authors named in [LICENSE](https://github.com/KYVENetwork/chain/blob/main/LICENSE).
Loading