Giter Site home page Giter Site logo

budget's Introduction

Tendermint

UPDATE: TendermintCore featureset is frozen for LTS, see issue #9972
This is the latest stable release used by cosmoshub-4, version 0.34.24
The previous main branch (v0.38.xx) can now be found under "main_backup"

banner

Byzantine-Fault Tolerant State Machine Replication. Or Blockchain, for short.

Version API Reference Go version Discord chat License Sourcegraph

Branch Tests Linting
main Tests Lint

Tendermint Core is a Byzantine Fault Tolerant (BFT) middleware that takes a state transition machine - written in any programming language - and securely replicates it on many machines.

For protocol details, refer to the Tendermint Specification.

For detailed analysis of the consensus protocol, including safety and liveness proofs, read our paper, "The latest gossip on BFT consensus".

Documentation

Complete documentation can be found on the website.

Releases

Please do not depend on main as your production branch. Use releases instead.

Tendermint has been in the production of private and public environments, most notably the blockchains of the Cosmos Network. we haven't released v1.0 yet since we are making breaking changes to the protocol and the APIs. See below for more details about versioning.

In any case, if you intend to run Tendermint in production, we're happy to help. You can contact us over email or join the chat.

More on how releases are conducted can be found here.

Security

To report a security vulnerability, see our bug bounty program. For examples of the kinds of bugs we're looking for, see our security policy.

We also maintain a dedicated mailing list for security updates. We will only ever use this mailing list to notify you of vulnerabilities and fixes in Tendermint Core. You can subscribe here.

Minimum requirements

Requirement Notes
Go version Go 1.18 or higher

Install

See the install instructions.

Quick Start

Contributing

Please abide by the Code of Conduct in all interactions.

Before contributing to the project, please take a look at the contributing guidelines and the style guide. You may also find it helpful to read the specifications, and familiarize yourself with our Architectural Decision Records (ADRs) and Request For Comments (RFCs).

Versioning

Semantic Versioning

Tendermint uses Semantic Versioning to determine when and how the version changes. According to SemVer, anything in the public API can change at any time before version 1.0.0

To provide some stability to users of 0.X.X versions of Tendermint, the MINOR version is used to signal breaking changes across Tendermint's API. This API includes all publicly exposed types, functions, and methods in non-internal Go packages as well as the types and methods accessible via the Tendermint RPC interface.

Breaking changes to these public APIs will be documented in the CHANGELOG.

Upgrades

In an effort to avoid accumulating technical debt prior to 1.0.0, we do not guarantee that breaking changes (ie. bumps in the MINOR version) will work with existing Tendermint blockchains. In these cases you will have to start a new blockchain, or write something custom to get the old data into the new chain. However, any bump in the PATCH version should be compatible with existing blockchain histories.

For more information on upgrading, see UPGRADING.md.

Supported Versions

Because we are a small core team, we only ship patch updates, including security updates, to the most recent minor release and the second-most recent minor release. Consequently, we strongly recommend keeping Tendermint up-to-date. Upgrading instructions can be found in UPGRADING.md.

Resources

Libraries

Applications

Research

Join us!

Tendermint Core is maintained by Interchain GmbH. If you'd like to work full-time on Tendermint Core, we're hiring!

Funding for Tendermint Core development comes primarily from the Interchain Foundation, a Swiss non-profit. The Tendermint trademark is owned by Tendermint Inc., the for-profit entity that also maintains tendermint.com.

budget's People

Contributors

clockworkgr avatar dongsam avatar hallazzang avatar jaybxyz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

budget's Issues

test: Add testcode the budget plan works as expected after modified

Currently, it is only checking whether the state value of the budget plan has changed as expected after the plan has been modified.

Add a test code to see if the operation of the plan is performed as expected after being modified to test the more realistic environment.

Release budget v1.0.0-rc1

Tasks

  • add changelog
  • release v1.0.0-rc1

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

rename default branch from master to main

Summary

This module will be adopted worldwide by a global community of blockchain developers and liquidity pool investors, so we decided to use inclusive language ( master -> main )

Tasks

  • Fix published links to main
  • Fix default branch from master to main

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Tax collection PoC logic on the Begin Block

  1. Get all the Taxes registered in params.Taxes and select only the valid taxes. If there is no valid tax, exit.
  2. Create a map by TaxSourceAddress to handle the taxes for the same TaxSourceAddress together based on the same balance when calculating rates for the same TaxSourceAddress.
  3. Collect taxes from TaxSourceAddress and send them to CollectionAddress according to the Rate of each Tax.

Avoid non-deterministic map iterations

Summary of Bug

Since iteration order of map types is not deterministic, modify to use the deterministic list when iterating

Tasks

  • BudgetsBySource

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

avoid nil slice on states

Summary

init to prevent nil slice, []types.Budget(nil) on genesis functions,
add test case

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

refactor CollectBudget logic

Summary

  • Fix logic that can be emitted event and increase total values only without send when an exception occurs.
  • Refactor logics
  • remove unused file

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

docs: add clear and more descriptive comments

Summary

Add clear and descriptive comments on all the functions and logics.

Problem Definition

Some of the methods are missing comments and some logics need an explanation about why they should be that way.

Proposal

Scan through all the files in budget module and add or update comments to have clear and descriptive comments.

Tasks

  • scan through client folder to improve comments
  • scan through keeper folder to improve comments
  • scan through simulation folder to improve comments
  • scan through types folder to improve comments

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Admin: Documentation Structure

Apply a better documentation structure by referring to cosmos-cash before the production level release.

But currently, the tax module spec is frequently changed, so we are prototyping to the PoC level, therefore we plan to write detailed documentation of How-To and Tutorials after the alpha version.

A basic document format or spec doc can be applied in advance, regardless of the direction of the code.

In addition, for quick decision-making and development, the initial Spec will be applied to the Spec without the ADR process, and major changes need to be discussed or decisions after the release will be subject to the ADR process.

/
├── README
├── CONTRIBUTING
├── TECHNICAL-SETUP
├── CODEOWNERS
├── x/
|   ├── module_a/
|       ├── README
|       ├── docs/
|           ├── state
|           ├── state_transitions
|           ├── messages
├── docs/
    ├── README
    ├── CODEOWNERS
    ├── Explanation/
    |   ├── README
    |   ├── ADR/
    |   |   ├── README
    |   |   ├── PROCESS
    |   |   ├── adr-template
    |   |   ├── adr-{number}-{desc}
    |   ├── articles/
    |   |   ├── regulation-litepaper/
    |   |       ├── ARTICLE
    |   ├── research/
    |       ├── README
    |       ├── research_topic/
    ├── How-To/
    |   ├── HowToDoSomething/
    |   ├── HowToDoSomethingElse/
    ├── Reference/
    |   ├── README
    |   ├── GLOSSARY
    |   ├── MODULES
    |   ├── use-cases/
    |   |   ├── use-case-A
    |   |   ├── use-case-B
    |   ├── architecture/
    ├── Tutorials/
        ├── Tutorial_1/
        ├── Tutorial_2/

Ref.

https://github.com/allinbits/cosmos-cash/blob/main/docs/Explanation/ADR/adr-002-docs-structure.md

Shadowed variables in the defer function for metrics

Summary of Bug

Currently, when printing is added to the metric part of CollectBudgets and the results are compared, a value budget.DestinationAddress different from expected is used by deferred func.

Version

Latest, 1.0.0-rc1

Steps to Reproduce

		for i, budget := range budgetsBySource.Budgets {
			// Capture the variables in a loop for the deferred func
			i := i
			collectionCoins := budgetsBySource.CollectionCoins
			defer func() {
				for _, coin := range collectionCoins[i] {
					if coin.Amount.IsInt64() {
						fmt.Println("defer metrics", []string{types.ModuleName},
							coin.Amount,
						float32(coin.Amount.Int64()),
							[]metrics.Label{
								telemetry.NewLabel("destination_address", budget.DestinationAddress),
								telemetry.NewLabel("denom", coin.Denom),
							})
						telemetry.SetGaugeWithLabels(
							[]string{types.ModuleName},
							float32(coin.Amount.Int64()),
							[]metrics.Label{
								telemetry.NewLabel("destination_address", budget.DestinationAddress),
								telemetry.NewLabel("denom", coin.Denom),
							},
						)
					}
				}
			}()
			fmt.Println(budget.Name, budget.DestinationAddress, collectionCoins[I])

Current results

=== RUN   TestKeeperTestSuite/TestBudgetChangeSituation/add_budget_2
gravity-dex-farming-1 cosmos1qceyjmnrl6hapntjq3z25vn38nh68u7yxvufs2thptxvqm7huxeqj7zyrq 1000000000denom1,1000000000denom2,1000000000denom3,1000000000stake
gravity-dex-farming-2 cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p 1000000000denom1,1000000000denom2,1000000000denom3,1000000000stake
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p} {denom denom1}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p} {denom denom2}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p} {denom denom3}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p} {denom stake}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p} {denom denom1}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p} {denom denom2}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p} {denom denom3}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p} {denom stake}]

It should be below results

=== RUN   TestKeeperTestSuite/TestBudgetChangeSituation/add_budget_2
gravity-dex-farming-1 cosmos1qceyjmnrl6hapntjq3z25vn38nh68u7yxvufs2thptxvqm7huxeqj7zyrq 1000000000denom1,1000000000denom2,1000000000denom3,1000000000stake
gravity-dex-farming-2 cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p 1000000000denom1,1000000000denom2,1000000000denom3,1000000000stake
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p} {denom denom1}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p} {denom denom2}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p} {denom denom3}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1czyx0dj2yd26gv3stpxzv23ddy8pld4j6p90a683mdcg8vzy72jqa8tm6p} {denom stake}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1qceyjmnrl6hapntjq3z25vn38nh68u7yxvufs2thptxvqm7huxeqj7zyrq} {denom denom1}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1qceyjmnrl6hapntjq3z25vn38nh68u7yxvufs2thptxvqm7huxeqj7zyrq} {denom denom2}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1qceyjmnrl6hapntjq3z25vn38nh68u7yxvufs2thptxvqm7huxeqj7zyrq} {denom denom3}]
defer metrics [budget] 1000000000 1e+09 [{destination_address cosmos1qceyjmnrl6hapntjq3z25vn38nh68u7yxvufs2thptxvqm7huxeqj7zyrq} {denom stake}]

Proposal

  • Using the defer function within the for statement has this uncertainty, even if It can be solved by capturing variables like destination := budget.DestinationAddress but the metric can be tracked through the event, so it would be better to revert it.

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Add TotalCollectedCoins for each tax

Summary

TotalCollectedCoins field is added to track the total amount of taxes collected from each tax, adding to it every collection occurs.

Problem Definition

Proposal

Bullet Points

  • spec
  • kv indexing logic
  • query, cli responses

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

test: randomize simulations for edge cases

Problem Definition

Simulation structure and simple simulation was added from #8, #33
However, the randomization of the bucket has not yet been applied at the parameter change or Genesis on simulation

Proposal

So randomization must be performed to discover and test edge cases.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

feat: bump Cosmos SDK to v0.44.2

Summary

Cosmos SDK v0.44.1, v0.44.2 were released, So the Budget module also needs to bump the SDK version and reviewing the breaking changes of the release, and checking if there is a problem with the version change, and update related codes.

Tasks

  • Checking breaking changes of the v0.44.1, v0.44.2
  • Bump SDK to v0.44.1
  • Bump SDK to v0.44.2

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Fix ConsensusVersion to 1

Problem Definition

Currently, version is 2, but It is the first version of the tax module

// ConsensusVersion implements AppModule/ConsensusVersion.
func (AppModule) ConsensusVersion() uint64 { return 2 }

Proposal

Fix to 1 from 2

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

feat: add Starport for better development environment

Summary

Right now, we use localnet.sh script to run local network when we test things out. This issue proposes to add Starport for better development environment so that just by running starport chain serve command, you can run local network with various different functionalities that Starport supports.

Tasks

  • Add config.yml to add Starport
  • Update README.mdand TECHNICAL_SETUP.md docs
  • Remove scripts/localnet.sh and update Makefile

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

build: bump cosmos-sdk version to v0.44.3

Summary

Bump cosmos-sdk version to v0.44.3
it contains tendermint v0.34.14.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

build: bump cosmos-sdk to v0.45.x

Summary

bump cosmos-sdk version from v0.44.x to v0.45.x


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Remove TaxSourceAccountName, CollectionAccountName, Add EpochBlocks

Summary

To minimize dependence on changes in address generation rules, We decided to remove TaxSourceAccountName, CollectionAccountName fields on Tax struct

And add EpochBlocks on params

The universal epoch length in number of blocks.
Every process for tax collecting is executed with this epoch_blocks frequency.

Bullet Points

Update

  • proto
  • description, comments
  • spec
  • swagger
  • relevant logics

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

V1: Query Cli and Endpoint API Implementation

Cli query and HTTP API specification implementation based on the specification of v1. This will include gRPC as well as HTTP API.

Cli Query Spec

  • get budget module params
    budgetd query budget params
  • get budgets
    budgetd query budget budgets
    • flags
      • budget_source_address
      • collection_address
      • name
  • derive address

Query Endpoint Spec

  • get budget module params
    /cosmos/budget/v1beta1/params

  • get budgets
    /cosmos/budget/v1beta1/budgets

    • query strings
      • budget_source_address
      • collection_address
      • name
  • derive address

required

  • Set swagger generate script
  • Publish Swagger Spec on web (swaggerHub or etc)
  • Add detailed description and example, error cases on proto, generated-swagger
  • Write Testcodes

fix: use panic instead of silently ignoring errors

When an error occurs, we should panic if the error is significant or rarely occurs, to prevent silently ignoring important errors.

Some of examples are:

budgetSourceAcc, err := sdk.AccAddressFromBech32(budgetSource)
if err != nil {
continue
}

collectionAcc, err := sdk.AccAddressFromBech32(budget.CollectionAddress)
if err != nil {
continue
}

if err := k.bankKeeper.InputOutputCoins(ctx, inputs, outputs); err != nil {
continue
}

Write essential documents for setting up, building, and executing

Bullet Points

  • add docs/Tutorials
    • init testnet with genesis setting for proposing budget(short voting period) and account balance for budget source accounts and collected budget accounts
    • Add some tax using ChangeParameterProposal
    • checking balance of a account of collected budget
  • update README.md
  • update TECHNICAL-SETUP.md

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Deprecate PlansByFarmer index and functions

Summary

PlanByFarmerAddrIndex: 0x12 | FarmerAddrLen (1 byte) | FarmerAddr -> Id -> nil(can be deprecated)

PlanByFarmerAddr and relevant functions currently not used, so remove the codes


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

feat: add metrics and telemetry

Summary

Add metrics and telemetry to provide relevant insights about the module. What metrics are necessary for client developers to gain insights about the module?

Tasks

  • Add metrics (For example, an amount of coins and address when budgets are collected every block)

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Renaming module from tax to budget

Problem Definition

There are worrying opinions. The word "tax" contains such negative feelings.

Proposal

So we decided to rename the module name from tax to budget

Bullet Points

  • [ ]

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Module Account generation rule for Collection, TaxSource Account

Summary

Problem Definition

The Module Account generation method used to create an address with a simple hash of String Byte for old 20-byte lengths, and the 32-length Module Account generation option extended in adr-028 requires the module name to be received together.

Therefore, it is necessary to define rules for Tax.TaxSourceAccountName, Tax.CollectionAccountName verification and the Module account generation.

Proposal

If / is not included, create and validate with old 20-byte rules, if included, The 32-byte generation rule is applied in accordance with the format of {moduleName}/{moduleAccountName}.

Bullet Points

  • [ ]

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

feat: modify some fields for naming convention in Budget object

Summary

This issue proposes to modify some fields suggested from #69 (comment) for readability and consistency.

Proposal

  • Use source_address instead of budget_source_address
  • Use destination_address instead of budget_collection_address
  • Update related docs

Tasks

  • Fix the above fields for readability and consistency

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Incorrect budget validation may reject valid overlapping budget plans

Summary of Bug

The implemented logic is too restrictive though since it aggregates all budgets that overlap at any time, even if they are sequential.
To illustrate this, imagine a budget A in date range 1-4, budget B in 1-2, and budget C in 3-4, all using the same source. The

current implementation sums up the rate for all those budgets, even though B and C never overlap.

This leads to rejection of budgets even if the overlaps would at no point cause the rate to go over 1.

Tasks

  • enhancing the logic to only consider overlapping budgets when calculating the total rate for each time slot.

References

  • No.5 of Audit Report Budget and Farming Cosmos SDK Modules v0.1

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

fix validation totalRate to check date overlapped budgets

Summary

Problem Definition

Currently, regardless of datetime range, we examine whether the total rate is more than 1 for all budgets with the same BudgetSourceAddr.
Then, in order to add new a budget, we need to erase the past budget even if the budget is ended.

Proposal

Therefore, We can consider modifying it to the sum of only overlapped budgets.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

fix: refine sentinel errors

Some of the sentinel errors are not used in the code, so we need to remove those.
And, if necessary, consider introducing new sentinel errors, too.

feat: add invariant checks

Summary

Add invariants for budget module.

Proposal

Let's first come up with what invariant checks the budget module needs and implement those afterwards.

Tasks

  • Add invariants in budget module
  • Add test cases to cover those invariants

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Improve code coverage to 80%

Currently, the tax module spec can be changed, so we are prototyping to the PoC level, so we plan to write detailed test codes properly after the spec is fixed.
However, the essential test code for checking functionality for the core logic must be written at this stage.

docs: improve Budget module documentation quality

Summary

Documentation has areas for improvement. These are some of the areas that I am concerned with:

  • Are there any typos or grammatical mistakes?
  • How smooth an explanation is written?
  • Is there consistency of documentation style?
  • Is there any area where it should provide more information?
  • ...

Proposal

Team Korea would be really grateful if @barriebyron could spare some time to review our documentation and help us to improve documentation quality.

Tasks

Reviewed and approved, no changes required, good job!:

Up for Review:


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Applying policies to minimize panic

Summary

Due to the nature of the blockchain, if there is a panic, the chain will stop. As such, panic should only be for non-recoverable errors, and if it is reversible like msg_server level or can fall into an exceptional case due to other module dependencies, I think it is better to process and errors with revert rather than panic.

It was also mentioned in the Cosmos-cash team's review, and all panic and error handling needs to be reconsidered.

Tasks

  • ...

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

feat: add address endpoint to derive

Summary

add address query endpoint and cli for query an address that can be used as source and destination is derived according to the given name, module name, and address type.

Problem Definition

The budget source address and destination address can be used after designating an address that does not yet exist. However, since it is difficult for users to derive the address as a code, it is necessary to provide an address endpoint that can be easily derived for this purpose.

Proposal

// AddressType enumerates the available types of a address.
enum AddressType {
  option (gogoproto.goproto_enum_prefix) = false;

  // ADDRESS_TYPE_32_BYTES defines the 32 bytes length address type of ADR 028.
  ADDRESS_TYPE_32_BYTES = 0 [(gogoproto.enumvalue_customname) = "AddressType32Bytes"];
  // ADDRESS_TYPE_20_BYTES defines the default 20 bytes length address type.
  ADDRESS_TYPE_20_BYTES = 1 [(gogoproto.enumvalue_customname) = "AddressType20Bytes"];
}

// QueryAddressesRequest is the request type for the Query/Addresses RPC method.
message QueryAddressesRequest {
  // The Address Type, default 0 for ADDRESS_TYPE_32_BYTES or 1 for ADDRESS_TYPE_20_BYTES
  AddressType type = 1;
  // The module name to be used for address derivation, default is budget.
  string module_name = 2;
  // The name to be used for address derivation.
  string name = 3;
}

// QueryAddressesResponse is the response type for the Query/Addresses RPC method.
message QueryAddressesResponse {
  string address = 1;
}

Tasks

  • add proto
  • add cli query address
  • add grpc_query /cosmos/budget/v1beta1/addresses
  • update swagger and publish
  • add testcases
  • add how-to docs for cli, query

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

docs: add Reference docs for signal proposals record

Summary

As there is going to be a signal proposal to adopt the budget and farming modules in Cosmos Hub in the near future, it is suggested to document a record of signal proposals in docs folder so that anyone can track of the history.

Proposal

Tasks

  • Add Reference folder and provide skeleton structure
  • Add signal proposal to adopt budget and farming modules

References


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.