Proto commits in tendermint/farming

These 66 commits are when the Protocol Buffers files have changed:

Commit:221f378
Author:dongsam
Committer:dongsam

feat: add max denoms

The documentation is generated from this commit.

Commit:8b618af
Author:Hanjun Kim

refactor!: rollback the change with TerminatedPlan Using distinct store key prefix for active plans and terminated plans was to prevent farming plan spamming, but that is now mitigated by limiting the number of private plans. Now, having distinct prefix for terminated/non-terminated plans causes query endpoints to be separated too, and also requires more work on CLI side. It'd be better to rollback the change.

Commit:2d1ffce
Author:Hanjun Kim

refactor!: separate PlanRecords and TerminatedPlanRecords also fix bug: counting public plans as private plans

Commit:3e09bf9
Author:Hanjun Kim
Committer:Hanjun Kim

feat: limit the number of private plans and implement RemovePlan terminating a plan doesn't transfer coins anymore. instead, `RemovePlan` removes a terminated plan and sends all remaining coins in the farming pool address to the termination address. see #238 for more details. also: - add `GlobalPlanId` field to the `GenesisState` and remove the check for sorted plan ids - add missing `AdvanceEpoch` msg handler - remove the buggy `Keeper.GetFarmingFeeCollectorAcc` - public plan is removed automatically - terminated plans and non-terminated plans are stored in different store key prefixes

Commit:7e509cf
Author:Hanjun Kim
Committer:Hanjun Kim

refactor: rename MaxPrivatePlanNum to MaxNumPrivatePlans also add `NumPrivatePlans` state

Commit:d2355d0
Author:Hanjun Kim

feat: add MaxPrivatePlanNum param

Commit:064f180
Author:dongsam
Committer:GitHub

fix: split staking reserve acc by staking denom (#229) * fix: WIP split reserve acc by staking denom * fix: refactor staking reserve acc genesis functionality * fix: refactor StakingReserveCoins for genesis * test: add test case for reserve, release staking * fix: update docs, add testcase, refactor * chore: refactor and tidy * fix: apply suggestions * fix: rename TotalStakingRecord to TotalStakingsRecord * fix: apply suggestions on PR

Commit:e50fbab
Author:Hanjun Kim
Committer:GitHub

test: add tests for gov proposal (#216) * test: add govHandler in KeeperTestSuite * test: add tests for gov proposal also make `KeeperTestSuite.Create*Plan` to actually use `Keeper.Create*Plan`, not `Keeper.SetPlan`. also fix some typos. * fix: fix typo in `testModifyPlanRequest` Co-authored-by: JayB <jaybkim2@gmail.com> * fix: fix typo in test * fix: use updated test helper functions * test: add test * fix: use concrete type instead of pointer for requests * docs: update spec document * test: add more tests * test: add more tests Co-authored-by: JayB <jaybkim2@gmail.com>

Commit:2691957
Author:Hanjun Kim

fix: use default String implementation also fix some typos

Commit:e0f36d9
Author:kogisin

docs: add missing comments

Commit:ef54ae6
Author:kogisin

Merge branch 'master' into kogisin/197-naming-consistency * master: fix: workflow target branch and description for main branch doc: fix to be broken links by renaming branch name move codeowners from contributing file to the CODEOWNERS file create CODEOWNERS file # Conflicts: # docs/Tutorials/demo/mvp_legacy.md

Commit:04fc501
Author:kogisin

feat: rename public plan proposal requests

Commit:d389374
Author:dongsam

fix: workflow target branch and description for main branch

Commit:0350389
Author:kogisin

feat: generate proto files

Commit:7b7c37e
Author:Barrie Byron
Committer:GitHub

edit farming.proto basic edits for grammar and consistnecy

Commit:7b81870
Author:Hanjun Kim
Committer:GitHub

feat: impose DelayedStakingGasFee when staking (#175) * feat: impose DelayedStakingGasFee when staking See #102 for details * chore: Update x/farming/types/params_test.go Co-authored-by: dongsam <dongsamb@gmail.com>

Commit:af09a02
Author:dongsam

docs: apply proto-all, fix typo

Commit:5389fe0
Author:kogisin

chore: apply suggestions from code review

Commit:26a4d43
Author:kogisin

chore: resolve #125 and fix proto lint issue

Commit:dee9c7e
Author:kogisin

chore: add detailed descriptions and responses for all queries and update Makefile

Commit:f59f270
Author:kogisin

feat: add third party proto files

Commit:0048b88
Author:kogisin

docs: add swager spec for params

Commit:d70949c
Author:JayB
Committer:GitHub

fix: duplicate value of the name field in plan (#150) * feat: remove name validation * feat: update comments * docs: add description about name field allows duplicate value * docs: add missing name field * refactor: delete lousy comments

Commit:4ef97db
Author:Hanjun Kim
Committer:GitHub

test: add CLI query tests Merge pull request #146 from hallazzang/120-cli-query-tests

Commit:783b942
Author:Hanjun Kim
Committer:GitHub

test: Add genesis tests (#132) * test: add genesis tests * test: add tests for ExportGenesis * test: add tests for InitGenesis also: - rename GetAllPlans to GetPlans, IterateAllPlans to IteratePlans for consistency - add k.ValidateOutstandingRewards * test: add testcase for invalid outstanding rewards * feat: add k.Rewards and k.AllRewards methods these methods are for convenient calculation of rewards, getting rid of the usage of cached context when calculating rewards also use Querier's Keeper field to prevent name conflict since Querier and Keeper both have Rewards method now * test: add tests for ValidateGenesis also fix a bug in UnpackAny that it accepts nil input or an Any with empty type url * fix: return plan after unpacking any * fix: remove deprecated Validate method call * feat: validate other fields of GenesisState * test: add test cases for ValidateGenesis also remove staking_reserve_coins field * feat: validate GenesisState inside InitGenesis When starting chain from an exported state, ValidateGenesis is not called automatically. To validate GenesisState in this case too, we call types.ValidateGenesis inside InitGenesis. * fix: generate correct CurrentEpochDays

Commit:6ed7eb2
Author:Hanjun Kim

fix: use correct package identifier

Commit:b1da34f
Author:dongsam

docs: update swagger, lint proto, fix link

Commit:e64f916
Author:dongsam
Committer:GitHub

feat: add budget module on simapp (#118) * feat: add global keys prefix for the current epoch days * test: add test for key store prefixes * chore: fix broken store prefix test, rename EpochDays to NextEpochDays * test: add more tests and update address to have 20 bytes * test: remove comments * test: update epoch days to next epoch days * test: add handler tests * refactor: add comment for global current epoch days * test: apply module testing suit * test: remove tests for deprecated PlansByFarmerIndex * feat: move mustParseRFC3339 function to utils #109 * docs: update spec docs * feat: adding test for end blocker * chore: rename GlobalCurrentEpochDays to CurrentEpochDays and refactor codes * test: improve code coverage * chore: apply code review feedbacks and suggestions * feat: add gRPC query and cli for current epoch days * feat: add budget module on simapp * fix: apply code review feedbacks and suggestions * fix: resolve conflicts * fix: gov simulation issue from budget * update: bump budget module version to latest * test: set no-race for cli_test * fix: refactor last_epoch_time Co-authored-by: kogisin <jaybkim2@gmail.com>

Commit:f03a6b8
Author:JayB
Committer:GitHub

feat: fix epoch params (#103) * feat: add global keys prefix for the current epoch days * test: add test for key store prefixes * chore: fix broken store prefix test, rename EpochDays to NextEpochDays * test: add more tests and update address to have 20 bytes * test: remove comments * test: update epoch days to next epoch days * test: add handler tests * refactor: add comment for global current epoch days * test: apply module testing suit * test: remove tests for deprecated PlansByFarmerIndex * feat: move mustParseRFC3339 function to utils #109 * docs: update spec docs * feat: adding test for end blocker * chore: rename GlobalCurrentEpochDays to CurrentEpochDays and refactor codes * test: improve code coverage * chore: apply code review feedbacks and suggestions * feat: add gRPC query and cli for current epoch days * fix: apply code review feedbacks and suggestions * fix: resolve conflicts * fix: panic when unstake due to total stakings is not set

Commit:1e6f946
Author:dongsam
Committer:GitHub

Merge pull request #112 from hallazzang/104-fix-genesis Fix genesis functionality after F1 adoption

Commit:686f3ba
Author:Hanjun Kim

chore: Merge branch 'master' of github.com:tendermint/farming into 104-fix-genesis

Commit:2b1f6e9
Author:Hanjun Kim

feat: add AdvanceEpoch message and tx cli endpoint it's useful to have AdvanceEpoch when testing, but it should be removed for real-world application. so only using special build flags can enable this feature.

Commit:736d3e8
Author:Hanjun Kim

test: write test for Rewards query endpoint also rename some fields and methods

Commit:1018cb1
Author:Hanjun Kim

feat: implement new query endpoints

Commit:7635195
Author:Hanjun Kim

fix: include OutstandingRewards in genesis

Commit:2e1fa16
Author:Hanjun Kim
Committer:Hanjun Kim

fix: use sdk.DecCoins for rewards this reduces decimal error when calculating outstanding rewards

Commit:566ef4a
Author:Hanjun Kim

feat: add OutstandingRewards

Commit:6ac5a7c
Author:Hanjun Kim

fix: fix InitGenesis also rename `global_last_epoch_time` to `last_epoch_time`

Commit:11e38d3
Author:Hanjun Kim
Committer:Hanjun Kim

refactor: change proto messages

Commit:2aa8d19
Author:dongsam

Merge commit '72748af46bc9c6c78c30751c7fce705c85baabcf' into 91-f1-distribution # Conflicts: # proto/tendermint/farming/v1beta1/genesis.proto # x/farming/keeper/genesis.go # x/farming/keeper/invariants.go # x/farming/types/genesis.go # x/farming/types/genesis.pb.go # x/farming/types/params.go # x/farming/types/params_test.go

Commit:59cb86a
Author:Hanjun Kim

refactor!: apply f1 distribution; WIP

Commit:6dea151
Author:dongsam
Committer:GitHub

feat: add genesis functionality (#87) * feat: add genesis functionality * fix: set staking index when initializing genesis * test: add test codes for genesis * fix: lint issue Co-authored-by: Hanjun Kim <hallazzang@gmail.com>

Commit:dbaac51
Author:Hanjun Kim

refactor!: remove unused fields

Commit:f1160a2
Author:dongsam

feat: Add independent private plan farming account

Commit:8f27157
Author:Hanjun Kim

refactor: remove RewardCoins from BasePlan and update docs

Commit:efdbf32
Author:Hanjun Kim

refactor!: update PlanI interface and fix some events

Commit:9914eb3
Author:Hanjun Kim

refactor: restructure BasePlan see #65 for the details - remove reward_pool_address - add last_distribution_time, distributed_coins, reward_coins

Commit:d494355
Author:Hanjun Kim

chore: Merge branch 'master' of github.com:tendermint/farming into local-testing

Commit:719ff4f
Author:Hanjun Kim
Committer:Hanjun Kim

feat!: add terminated field to BasePlan

Commit:be0aeb7
Author:Hanjun Kim
Committer:Hanjun Kim

fix: use string instead of bool query's terminated field

Commit:c1db412
Author:Hanjun Kim

chore: Merge branch 'master' into local-testing

Commit:e684084
Author:Hanjun Kim

feat: implement Staking query endpoint

Commit:6858d14
Author:Hanjun Kim

test: add testcases BREAKING CHANGE: use concrete type instead of pointer type in responses

Commit:c57b956
Author:Hanjun Kim

fix: add farmer query parameter for Stakings query also add missing validation checks

Commit:48f5fac
Author:Hanjun Kim
Committer:Hanjun Kim

feat: add advance-epoch cli command

Commit:b9ec23e
Author:Hanjun Kim
Committer:Hanjun Kim

feat: add AdvanceEpoch gRPC stub

Commit:21189ab
Author:Hanjun Kim

feat: add advance-epoch cli command

Commit:ab0c45f
Author:Hanjun Kim

feat: add AdvanceEpoch gRPC stub

Commit:3bb3264
Author:JayB
Committer:GitHub

Add public and private plan creation (#11) * add proposal proto for public proposal plan messages * update proto files * temp * change method name to prevent from duplicate * WIP: designing what args to accept for adding plan proposal... * change binary name to farmingd * change proposal design - update proposal proto messages * add private plans and public plans are work in progress * update cli commands for private plans * add tests for private farming plan command line interfaces * add public plan proposal * add nolint:errcheck for now * fix golint by adding return value for sdkerrors.Wrapf * add name filed in both create fixed amount plan and ratio plan messages * apply feedback * add validation and fix public ratio plan creation logic * remove empty name field and use the one from the passed argument * remove unused rest code * move the name field inside the AddRequestProposal * add description on PublicPlanProposal message * fix typo and add 09_proposal.md * add name field in update plan proposal * make indentation consistent and change variable name * reformat json * fix broken app * use three ifs instead of switch case and use else if to prevent from creating more than one plan type * add detailed validation logics for AddRequestProposal, UpdateRequestProposal, DeleteRequestProposal * re: add detailed validation logics for AddRequestProposal, UpdateRequestProposal, DeleteRequestProposal * add skeleton for docs #21 * add How-To farming_plans.md * update comment * add validation for duplicate plan name * update date time format to RFC3339 * feat: update public plan proposal * feat: adding validation logic for an epoch ratio must not exceed 1 with the same account * feat: add validation logic for overflow epoch ratio * fix: add another if statement to check when both epoch amount and ratio are provided * chore: update public plan proposal logics - add validation logic for ratio plans - add test codes for the validation - clean up error messages * docs: add command-line interfaces and update context

Commit:2f30dbc
Author:JayB
Committer:GitHub

Add farming fee collector (#22) * add farming fee collector * define farming fee collector module account * add param tests * add logic to send staking creation fee to fee collector unless balance is low * fix failed tests * update fee collector variable name * fix another failed test after the variable name changed * apply feedback - handle insufficient error to use sdkerrors - add bech32 account address validation - use params FarmingFeeCollector * remove set module account when initializing genesis until decision making is made * Update x/farming/types/keys.go Co-authored-by: dongsam <dongsamb@gmail.com> Co-authored-by: dongsam <dongsamb@gmail.com>

Commit:42305fb
Author:Hanjun Kim
Committer:GitHub

Fix core logic (#15) * replace NBSP with space * fix core logic - store only sdk.Coins when storing a reward in kvstore - fix store methods - delete a staking when all coins has been unstaked and no rewards left - emit events in keeper method rather than in msg handler * revert back parameter order of store methods * revert back old Reward struct * rename and simplify Denoms method * drop legacy amino dependency and replace simd with farmingd * implement Stakings query endpoint and minor fixes - rename key getter methods - unify variable/parameter namings * fix Unstake logic * make tx commands work * change time format * move plan-related logics into plan.go * fix Rewards endpoint logic and minor bugs

Commit:a227ac5
Author:Hanjun Kim
Committer:Hanjun Kim

update querier and msg server logic - update query endpoints - implement core logic - disable gogoproto stringer options - minor fixes

Commit:fa9dfcc
Author:Hanjun Kim
Committer:Hanjun Kim

fix scripts and update query.proto close #5

Commit:ae59a1e
Author:kogisin

updated farming module with the newly designed spec

Commit:0b3fa00
Author:kogisin

add missing proto files and update proto related make targets

Commit:8fffab9
Author:kogisin

add skeleton and move farming module from the legacy repo