Skip to content

Commit

Permalink
Merge pull request #387 from QOSGroup/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
TokenxyWZY authored Dec 13, 2019
2 parents 73d7c8b + 07a8ccb commit 1d8ae2c
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 32 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## v0.1.0
2019.12.13

**DOWNLOAD**

[下载链接](https://github.com/QOSGroup/qos/blob/master/DOWNLOAD.md)

**IMPROVEMENTS**
* [module] 增加txs,events查询API
* [module] 修改TX默认GAS费用
* [module] 修改GAS释放策略


## v0.0.9
2019.12.03

Expand Down
13 changes: 13 additions & 0 deletions DOWNLOAD.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@

## Download

### v0.1.0

|Platform| qosd | qoscli |
|:--|:----| :-------|
|Linux-x64|[qosd-v0.1.0-linux-x64](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qosd-v0.1.0-linux-x64)|[qoscli-v0.1.0-linux-x64](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qoscli-v0.1.0-linux-x64)|
|Linux-i386|[qosd-v0.1.0-linux-i386](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qosd-v0.1.0-linux-i386)|[qoscli-v0.1.0-linux-i386](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qoscli-v0.1.0-linux-i386)|
|Linux-arm|[qosd-v0.1.0-linux-arm](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qosd-v0.1.0-linux-arm)|[qoscli-v0.1.0-linux-arm](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qoscli-v0.1.0-linux-arm)|
|Macos-x64|[qosd-v0.1.0-macos-x64](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qosd-v0.1.0-macos-x64)|[qoscli-v0.1.0-macos-x64](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qoscli-v0.1.0-macos-x64)|
|Macos-i386|[qosd-v0.1.0-macos-i386](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qosd-v0.1.0-macos-i386)|[qoscli-v0.1.0-macos-i386](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qoscli-v0.1.0-macos-i386)|
|Windows-x64|[qosd-v0.1.0-windows-x64.exe](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qosd-v0.1.0-windows-x64.exe)|[qoscli-v0.1.0-windows-x64.exe](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qoscli-v0.1.0-windows-x64.exe)|
|Windows-i386|[qosd-v0.1.0-windows-i386.exe](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qosd-v0.1.0-windows-i386.exe)|[qoscli-v0.1.0-windows-i386.exe](http://aoe-qos.oss-cn-beijing.aliyuncs.com/public/qos-testnet/v0.1.0/qoscli-v0.1.0-windows-i386.exe)|


### v0.0.9

|Platform| qosd | qoscli |
Expand Down
1 change: 0 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ func (app *QOSApp) GasHandler(ctx context.Context, payer btypes.AccAddress) (gas
gasFeeUsed := btypes.NewInt(int64(gasUsed) / perGas)
gasUsed = gasUsed / uint64(perGas) * uint64(perGas)


if gasFeeUsed.GT(btypes.ZeroInt()) {
accountMapper := ctx.Mapper(account.AccountMapperName).(*account.AccountMapper)
account := accountMapper.GetAccount(payer).(*types.QOSAccount)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module github.com/QOSGroup/qos

require (
github.com/QOSGroup/kepler v0.6.0
github.com/QOSGroup/qbase v0.2.4
github.com/QOSGroup/qbase v0.2.5
github.com/go-kit/kit v0.9.0
github.com/gorilla/mux v1.7.3
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
Expand Down
6 changes: 5 additions & 1 deletion module/bank/client/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package client

import (
bctypes "github.com/QOSGroup/qbase/client/types"
"github.com/QOSGroup/qos/module/bank/txs"
"github.com/spf13/cobra"
"github.com/tendermint/go-amino"
)
Expand All @@ -13,5 +14,8 @@ func QueryCommands(cdc *amino.Codec) []*cobra.Command {
}

func TxCommands(cdc *amino.Codec) []*cobra.Command {
return bctypes.PostCommands(TransferCmd(cdc), InvariantCheckCmd(cdc))
return bctypes.PostCustomMaxGasCommands([]*cobra.Command{TransferCmd(cdc), InvariantCheckCmd(cdc)}, []int64{
txs.GasForTransfer + bctypes.DefaultMaxGas,
txs.GasForInvariantCheck + bctypes.DefaultMaxGas,
})
}
2 changes: 1 addition & 1 deletion module/gov/client/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func getProposal(cliContext context.CLIContext, pid int64) (result types.Proposa
res, err := cliContext.Query(path, []byte{})

if err != nil {
return types.Proposal{}, nil
return types.Proposal{}, err
}

if len(res) == 0 {
Expand Down
38 changes: 22 additions & 16 deletions module/gov/types/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type ProposalContent interface {
GetDeposit() btypes.BigInt
GetProposalType() ProposalType
GetProposalLevel() ProposalLevel
GetProposer() btypes.AccAddress
}

type ProposalResult string
Expand Down Expand Up @@ -282,6 +283,7 @@ func (tp TextProposal) GetDescription() string { return tp.Description
func (tp TextProposal) GetDeposit() btypes.BigInt { return tp.Deposit }
func (tp TextProposal) GetProposalType() ProposalType { return ProposalTypeText }
func (tp TextProposal) GetProposalLevel() ProposalLevel { return tp.GetProposalType().Level() }
func (tp TextProposal) GetProposer() btypes.AccAddress { return tp.Proposer }

// TaxUsage Proposal
type TaxUsageProposal struct {
Expand All @@ -307,10 +309,11 @@ func NewTaxUsageProposal(proposer btypes.AccAddress, title, description string,
var _ ProposalContent = TaxUsageProposal{}

// nolint
func (tp TaxUsageProposal) GetTitle() string { return tp.Title }
func (tp TaxUsageProposal) GetDescription() string { return tp.Description }
func (tp TaxUsageProposal) GetDeposit() btypes.BigInt { return tp.Deposit }
func (tp TaxUsageProposal) GetProposalType() ProposalType { return ProposalTypeTaxUsage }
func (tp TaxUsageProposal) GetTitle() string { return tp.Title }
func (tp TaxUsageProposal) GetDescription() string { return tp.Description }
func (tp TaxUsageProposal) GetDeposit() btypes.BigInt { return tp.Deposit }
func (tp TaxUsageProposal) GetProposalType() ProposalType { return ProposalTypeTaxUsage }
func (tp TaxUsageProposal) GetProposer() btypes.AccAddress { return tp.Proposer }

// Parameters change Proposal
type ParameterProposal struct {
Expand All @@ -334,10 +337,11 @@ func NewParameterProposal(proposer btypes.AccAddress, title, description string,
var _ ProposalContent = ParameterProposal{}

// nolint
func (tp ParameterProposal) GetTitle() string { return tp.Title }
func (tp ParameterProposal) GetDescription() string { return tp.Description }
func (tp ParameterProposal) GetDeposit() btypes.BigInt { return tp.Deposit }
func (tp ParameterProposal) GetProposalType() ProposalType { return ProposalTypeParameterChange }
func (tp ParameterProposal) GetTitle() string { return tp.Title }
func (tp ParameterProposal) GetDescription() string { return tp.Description }
func (tp ParameterProposal) GetDeposit() btypes.BigInt { return tp.Deposit }
func (tp ParameterProposal) GetProposalType() ProposalType { return ProposalTypeParameterChange }
func (tp ParameterProposal) GetProposer() btypes.AccAddress { return tp.Proposer }

// Modify Inflation Phrases Proposal
type ModifyInflationProposal struct {
Expand All @@ -363,10 +367,11 @@ func NewAddInflationPhrase(proposer btypes.AccAddress, title, description string
var _ ProposalContent = ModifyInflationProposal{}

// nolint
func (tp ModifyInflationProposal) GetTitle() string { return tp.Title }
func (tp ModifyInflationProposal) GetDescription() string { return tp.Description }
func (tp ModifyInflationProposal) GetDeposit() btypes.BigInt { return tp.Deposit }
func (tp ModifyInflationProposal) GetProposalType() ProposalType { return ProposalTypeModifyInflation }
func (tp ModifyInflationProposal) GetTitle() string { return tp.Title }
func (tp ModifyInflationProposal) GetDescription() string { return tp.Description }
func (tp ModifyInflationProposal) GetDeposit() btypes.BigInt { return tp.Deposit }
func (tp ModifyInflationProposal) GetProposalType() ProposalType { return ProposalTypeModifyInflation }
func (tp ModifyInflationProposal) GetProposer() btypes.AccAddress { return tp.Proposer }

type Param struct {
Module string `json:"module"`
Expand Down Expand Up @@ -420,7 +425,8 @@ func NewSoftwareUpgradeProposal(proposer btypes.AccAddress, title, description s
var _ ProposalContent = SoftwareUpgradeProposal{}

// nolint
func (tp SoftwareUpgradeProposal) GetTitle() string { return tp.Title }
func (tp SoftwareUpgradeProposal) GetDescription() string { return tp.Description }
func (tp SoftwareUpgradeProposal) GetDeposit() btypes.BigInt { return tp.Deposit }
func (tp SoftwareUpgradeProposal) GetProposalType() ProposalType { return ProposalTypeSoftwareUpgrade }
func (tp SoftwareUpgradeProposal) GetTitle() string { return tp.Title }
func (tp SoftwareUpgradeProposal) GetDescription() string { return tp.Description }
func (tp SoftwareUpgradeProposal) GetDeposit() btypes.BigInt { return tp.Deposit }
func (tp SoftwareUpgradeProposal) GetProposalType() ProposalType { return ProposalTypeSoftwareUpgrade }
func (tp SoftwareUpgradeProposal) GetProposer() btypes.AccAddress { return tp.Proposer }
1 change: 0 additions & 1 deletion module/params/mapper/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ type Mapper struct {
paramSets map[string]qtypes.ParamSet

Metrics *Metrics

}

func (mapper *Mapper) Copy() mapper.IMapper {
Expand Down
7 changes: 5 additions & 2 deletions module/qcp/client/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ package client

import (
bctypes "github.com/QOSGroup/qbase/client/types"
"github.com/QOSGroup/qos/module/qcp/txs"
"github.com/spf13/cobra"
"github.com/tendermint/go-amino"
)

func TxCommands(cdc *amino.Codec) []*cobra.Command {
return bctypes.PostCommands(
return bctypes.PostCustomMaxGasCommands([]*cobra.Command{
InitQCPCmd(cdc),
)
}, []int64{
txs.GasForCreateQCP + bctypes.DefaultMaxGas,
})
}

func QueryCommands(cdc *amino.Codec) []*cobra.Command {
Expand Down
9 changes: 7 additions & 2 deletions module/qsc/client/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package client

import (
bctypes "github.com/QOSGroup/qbase/client/types"
"github.com/QOSGroup/qos/module/qsc/txs"
"github.com/spf13/cobra"
"github.com/tendermint/go-amino"
)
Expand All @@ -14,8 +15,12 @@ func QueryCommands(cdc *amino.Codec) []*cobra.Command {
}

func TxCommands(cdc *amino.Codec) []*cobra.Command {
return bctypes.PostCommands(
return bctypes.PostCustomMaxGasCommands([]*cobra.Command{
CreateQSCCmd(cdc),
IssueQSCCmd(cdc),
)
}, []int64{
txs.GasForCreateQSC + bctypes.DefaultMaxGas,
txs.GasForIssueQSC + bctypes.DefaultMaxGas,
})

}
16 changes: 14 additions & 2 deletions module/stake/client/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package client

import (
bctypes "github.com/QOSGroup/qbase/client/types"
"github.com/QOSGroup/qos/module/stake/txs"
"github.com/spf13/cobra"
"github.com/tendermint/go-amino"
)

func TxCommands(cdc *amino.Codec) []*cobra.Command {
return bctypes.PostCommands(
return bctypes.PostCustomMaxGasCommands([]*cobra.Command{
CreateValidatorCmd(cdc),
ModifyValidatorCmd(cdc),
RevokeValidatorCmd(cdc),
Expand All @@ -17,7 +18,18 @@ func TxCommands(cdc *amino.Codec) []*cobra.Command {
CreateModifyCompoundCommand(cdc),
CreateUnbondDelegationCommand(cdc),
CreateReDelegationCommand(cdc),
)
}, []int64{
txs.GasForCreateValidator + bctypes.DefaultMaxGas,
txs.GasForModifyValidator + bctypes.DefaultMaxGas,
txs.GasForRevokeValidator + bctypes.DefaultMaxGas,
bctypes.DefaultMaxGas,
bctypes.DefaultMaxGas,
bctypes.DefaultMaxGas,
bctypes.DefaultMaxGas,
txs.GasForUnbond + bctypes.DefaultMaxGas,
bctypes.DefaultMaxGas,
})

}

func QueryCommands(cdc *amino.Codec) []*cobra.Command {
Expand Down
2 changes: 1 addition & 1 deletion types/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const (
)

var (
UnitQOS = math.Pow(10, Decimal) // QOS unit
UnitQOS = math.Pow(10, Decimal) // QOS unit
DefaultTotalUnitQOSQuantity = int64(TotalQOSAmount * UnitQOS) // total QOS amount

DefaultBlockInterval = int64(5) // 5 seconds
Expand Down
1 change: 0 additions & 1 deletion types/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ type ParamsInitializer interface {
type MetricsMapper interface {
SetUpMetrics(cfg *config.InstrumentationConfig)
}

2 changes: 1 addition & 1 deletion types/param.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ type ParamSet interface {

// 设置单个参数
SetKeyValue(key string, value interface{}) btypes.Error
}
}
3 changes: 1 addition & 2 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import (
)

var (

Version = "0.0.9"
Version = "0.1.0"
Commit = ""
)

Expand Down

0 comments on commit 1d8ae2c

Please sign in to comment.