Skip to content

Commit

Permalink
Merge pull request #227 from dongsam/226-update-demo-docs
Browse files Browse the repository at this point in the history
build: release v1.0.0-rc1 with update docs
  • Loading branch information
dongsam committed Nov 12, 2021
2 parents fd562de + 1ad71d2 commit c4eb292
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 17 deletions.
93 changes: 93 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<!--
Guiding Principles:
Changelogs are for humans, not machines.
There should be an entry for every single version.
The same types of changes should be grouped.
Versions and sections should be linkable.
The latest version comes first.
The release date of each version is displayed.
Mention whether you follow Semantic Versioning.
Usage:
Change log entries are to be added to the Unreleased section under the
appropriate stanza (see below). Each entry should ideally include a tag and
the Github issue reference in the following format:
* (<tag>) \#<issue-number> message
The issue numbers will later be link-ified during the release process so you do
not have to worry about including a link manually, but you can if you wish.
Types of changes (Stanzas):
"Features" for new features.
"Improvements" for changes in existing functionality.
"Deprecated" for soon-to-be removed features.
"Bug Fixes" for any bug fixes.
"Client Breaking" for breaking Protobuf, gRPC and REST routes used by end-users.
"CLI Breaking" for breaking CLI commands.
"API Breaking" for breaking exported APIs used by developers building on SDK.
"State Machine Breaking" for any changes that result in a different AppState given same genesisState and txList.
Ref: https://keepachangelog.com/en/1.0.0/
-->
<!-- markdown-link-check-disable -->

# Changelog

## [Unreleased] v1.0.0 - 2021-11-26

* [\#64](https://github.com/tendermint/farming/pull/64) docs: improve documentation for audit release

* [\#187](https://github.com/tendermint/farming/pull/187) edit farming.proto
* [\#196](https://github.com/tendermint/farming/pull/196) doc: fix to be broken links by renaming branch name
* [\#189](https://github.com/tendermint/farming/pull/189) feat: Create CODEOWNERS file and update contributing.md
* [\#198](https://github.com/tendermint/farming/pull/198) feat: change naming for consistency in public proposals
* [\#191](https://github.com/tendermint/farming/pull/191) docs: edit farming spec to improve documentation quality
* [\#201](https://github.com/tendermint/farming/pull/201) build: bump liquidity to v1.4.1
* [\#186](https://github.com/tendermint/farming/pull/186) feat: add and refactor invariant checks
* [\#169](https://github.com/tendermint/farming/pull/169) tests: add detailed and randomized cases for public plan proposals simulation
* [\#205](https://github.com/tendermint/farming/pull/205) fix: change the initial epoch to 1
* [\#210](https://github.com/tendermint/farming/pull/210) docs: edit budget_with_farming.md demo text
* [\#214](https://github.com/tendermint/farming/pull/214) fix: use default String implementation for types
* [\#218](https://github.com/tendermint/farming/pull/218) test: implement test for PositiveTotalStakingsAmountInvariant
* [\#209](https://github.com/tendermint/farming/pull/209) fix: resolve TODO comments
* [\#202](https://github.com/tendermint/farming/pull/202) fix: apply suggestions from the audit review
* [\#223](https://github.com/tendermint/farming/pull/223) fix: remove PlanTerminationStatusInvariant
* [\#216](https://github.com/tendermint/farming/pull/216) test: add tests for gov proposal
* [\#225](https://github.com/tendermint/farming/pull/225) fix: add plan type validation for public plan proposal
* [\#206](https://github.com/tendermint/farming/pull/206) build: bump cosmos-sdk version to v0.44.3
* [\#228](https://github.com/tendermint/farming/pull/228) test: add test cases for reward allocation of ratio plan

## [v0.1.2](https://github.com/tendermint/farming/releases/tag/v0.1.2) - 2021-10-18

* [\#181](https://github.com/tendermint/farming/pull/181) fix: emit rewards_withdrawn only when positive amount is withdrawn
* [\#180](https://github.com/tendermint/farming/pull/180) fix: withdraw rewards only when staked amount changes
* [\#178](https://github.com/tendermint/farming/pull/178) docs: improve documentation for audit release
* [\#177](https://github.com/tendermint/farming/pull/177) feat: bump budget to v0.1.1

## [v0.1.1](https://github.com/tendermint/farming/releases/tag/v0.1.1) - 2021-10-15

* [\#135](https://github.com/tendermint/farming/pull/135) fix: Fix comparison bug when allocating all balances of the farming pool
* [\#133](https://github.com/tendermint/farming/pull/133) feat: fix update public plan proposal & disable codecov patch
* [\#140](https://github.com/tendermint/farming/pull/140) docs: add demo for budget with farming
* [\#141](https://github.com/tendermint/farming/pull/141) docs: update spec documentation and add events
* [\#145](https://github.com/tendermint/farming/pull/145) fix: remove minter perm and add liquidity module
* [\#143](https://github.com/tendermint/farming/pull/143) test: add tests for HistoricalRewards
* [\#132](https://github.com/tendermint/farming/pull/132) test: Add genesis tests
* [\#146](https://github.com/tendermint/farming/pull/146) test: add CLI query tests
* [\#154](https://github.com/tendermint/farming/pull/154) test: add import and export simulation
* [\#150](https://github.com/tendermint/farming/pull/150) fix: duplicate value of the name field in plan
* [\#157](https://github.com/tendermint/farming/pull/157) test: add tests for types
* [\#156](https://github.com/tendermint/farming/pull/156) feat: add examples of multiple coins for command-line interfaces
* [\#162](https://github.com/tendermint/farming/pull/162) fix: terminate plan when deleting public plan proposal
* [\#166](https://github.com/tendermint/farming/pull/166) fix: emit rewards_withdrawn event
* [\#160](https://github.com/tendermint/farming/pull/160) fix: do not allow empty plan name
* [\#168](https://github.com/tendermint/farming/pull/168) chore: bump Cosmos SDK version to v0.44.2
* [\#158](https://github.com/tendermint/farming/pull/158) docs: add more clear and description comments
* [\#167](https://github.com/tendermint/farming/pull/167) fix: refine sentinel errors
* [\#165](https://github.com/tendermint/farming/pull/165) docs: add detailed descriptions and examples to swagger specification
* [\#175](https://github.com/tendermint/farming/pull/175) feat: impose DelayedStakingGasFee when staking

## [v0.1.0](https://github.com/tendermint/farming/releases/tag/v0.1.0) - 2021-09-17
2 changes: 1 addition & 1 deletion client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Cosmos SDK Farming Module - REST and gRPC Gateway docs",
"description": "A REST interface for state queries, transactions",
"version": "0.1.3"
"version": "1.0.0"
},
"apis": [
{
Expand Down
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ swagger: '2.0'
info:
title: Cosmos SDK Farming Module - REST and gRPC Gateway docs
description: 'A REST interface for state queries, transactions'
version: 0.1.3
version: 1.0.0
paths:
/cosmos/farming/v1beta1/current_epoch_days:
get:
Expand Down
2 changes: 1 addition & 1 deletion docs/How-To/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Description: A high-level overview of gRPC-gateway REST routes in farming module

## Swagger Documentation

- Swagger Cosmos SDK Farming Module [REST and gRPC Gateway docs](https://app.swaggerhub.com/apis-docs/gravity-devs/farming/0.1.3)
- Swagger Cosmos SDK Farming Module [REST and gRPC Gateway docs](https://app.swaggerhub.com/apis-docs/gravity-devs/farming/1.0.0)

## gRPC-gateway REST Routes

Expand Down
25 changes: 13 additions & 12 deletions docs/Tutorials/demo/budget_with_farming.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

- 2021.09.27: initial document
- 2021.10.15: update farming, budget version

## Disclaimer

The [budget](https://github.com/tendermint/budget) and [farming](https://github.com/tendermint/farming) modules are in active development by the Gravity DEX team in Tendermint. This demo includes MVP versions of budget and farming modules meaning that it is not stable version. We are aware that there are a lot of rooms for improvements and there may be breaking changes along the way. We welcome any outside contributors to contribute to the modules and we are happy to receive any feedbacks or suggestions.
- 2021.11.12: update farming, budget version to v1.0.0-rc1

## What does budget module do?

Expand All @@ -29,23 +26,23 @@ One use case is to use the module to provide incentives for liquidity pool inves
- [x/budget spec docs](https://github.com/tendermint/budget/blob/main/x/budget/spec/01_concepts.md)
- Audit-ready [demo version](https://github.com/tendermint/budget/releases)
- Other useful resources are available in the [budget docs](https://github.com/tendermint/budget/blob/main/docs) folder
- Swagger Cosmos SDK Budget Module [REST and gRPC Gateway docs](https://app.swaggerhub.com/apis-docs/gravity-devs/budget/)
- Swagger Cosmos SDK Budget Module [REST and gRPC Gateway docs v1.0.0](https://app.swaggerhub.com/apis-docs/gravity-devs/budget/1.0.0)

**Farming module**

- [tendermint/farming GitHub repo](https://github.com/tendermint/farming)
- [x/farming spec docs](https://github.com/tendermint/farming/blob/main/x/farming/spec/01_concepts.md)
- Audit-ready [demo version](https://github.com/tendermint/farming/releases)
- Other useful resources are available in the [farming docs](https://github.com/tendermint/farming/blob/main/docs) folder
- Swagger Cosmos SDK Budget Module [REST and gRPC Gateway docs](https://app.swaggerhub.com/apis-docs/gravity-devs/farming/)
- Swagger Cosmos SDK Budget Module [REST and gRPC Gateway docs v1.0.0](https://app.swaggerhub.com/apis-docs/gravity-devs/farming/1.0.0)

## Demo

### Step 1. Build from source

```bash
# Clone the demo project and build `farmingd` for testing
git clone -b v0.1.2 https://github.com/tendermint/farming.git
git clone -b v1.0.0-rc1 https://github.com/tendermint/farming.git
cd farming
make install-testing
```
Expand Down Expand Up @@ -107,10 +104,14 @@ Create the `budget-proposal.json` file and copy the following JSON contents into

In this demo, you create a budget plan that distributes partial amount of coins from the [FeeCollector module account](https://github.com/cosmos/cosmos-sdk/blob/master/x/auth/types/keys.go#L15) that collects gas fees and ATOM inflation in Cosmos Hub. This budget plan will be used for Gravity DEX farming plan to `GravityDEXFarmingBudget` account.

The `GravityDEXFarmingBudget` account is created using the following code snippet.
The `GravityDEXFarmingBudget` account is derived using the following query or code snippet.
```bash
$BINARY query budget address GravityDEXFarmingBudget --module-name farming
# > address: cosmos1228ryjucdpdv3t87rxle0ew76a56ulvnfst0hq0sscd3nafgjpqqkcxcky
```

```go
// cosmos1228ryjucdpdv3t87rxle0ew76a56ulvnfst0hq0sscd3nafgjpqqkcxcky 
// cosmos1228ryjucdpdv3t87rxle0ew76a56ulvnfst0hq0sscd3nafgjpqqkcxcky
sdk.AccAddress(address.Module("farming", []byte("GravityDEXFarmingBudget")))
```

Expand Down Expand Up @@ -138,8 +139,8 @@ Use the following values for the fields:
{
"name": "gravity-dex-farming-20213Q-20313Q",
"rate": "0.500000000000000000",
"budget_source_address": "cosmos17xpfvakm2amg962yls6f84z3kell8c5lserqta",
"collection_address": "cosmos1228ryjucdpdv3t87rxle0ew76a56ulvnfst0hq0sscd3nafgjpqqkcxcky",
"source_address": "cosmos17xpfvakm2amg962yls6f84z3kell8c5lserqta",
"destination_address": "cosmos1228ryjucdpdv3t87rxle0ew76a56ulvnfst0hq0sscd3nafgjpqqkcxcky",
"start_time": "2021-09-01T00:00:00Z",
"end_time": "2031-09-30T00:00:00Z"
}
Expand Down Expand Up @@ -507,7 +508,7 @@ farmingd tx farming stake 5000000pool3036F43CB8131A1A63D2B3D3B11E9CF6FA2A2B6FEC1
farmingd q farming stakings cosmos185fflsvwrz0cx46w6qada7mdy92m6kx4gqx0ny \
--output json | jq

# Increase epoch by 1 again to distribute rewards
# Increase epoch by 2 again to distribute rewards
farmingd tx farming advance-epoch \
--chain-id localnet \
--from user2 \
Expand Down
13 changes: 12 additions & 1 deletion docs/Tutorials/demo/plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,20 @@ $BINARY start

# Public Farming Plan

The `cosmos1zaavvzxez0elundtn32qnk9lkm8kmcszzsv80v` address for `farming_pool_address` is derived using the following query or code snippet.
```bash
$BINARY query budget address GravityDEXFarmingBudget --module-name farming
# > address: cosmos1228ryjucdpdv3t87rxle0ew76a56ulvnfst0hq0sscd3nafgjpqqkcxcky
```

```go
// cosmos1228ryjucdpdv3t87rxle0ew76a56ulvnfst0hq0sscd3nafgjpqqkcxcky
sdk.AccAddress(address.Module("farming", []byte("GravityDEXFarmingBudget")))
```

## AddPublicFarmingFixedAmountPlan

Create `public-fixed-plan-proposal.json` file in your local directory and copy the below JSON into a file. To explain about what this public plan does is that i want to create a public fixed amount plan that provides `100000000uatom` as incentives for those who stake the denoms of `poolD35A0CC16EE598F90B044CE296A405BA9C381E38837599D96F2F70C2F02A23A4` and `uatom` defined in `staking_coin_weights`.
Create `public-fixed-plan-proposal.json` file in your local directory and copy the below JSON into a file. To explain about what this public plan does is that i want to create a public fixed amount plan that provides `100000000uatom` as incentives for those who stake the denoms of `poolD35A0CC16EE598F90B044CE296A405BA9C381E38837599D96F2F70C2F02A23A4` and `uatom` defined in `staking_coin_weights`.

```json
{
Expand Down

0 comments on commit c4eb292

Please sign in to comment.