Skip to content

Commit 8d2cc20

Browse files
authored
Merge pull request #1 from zhangyelong/develop
Merge develop into feature/docs
2 parents b21f6f6 + cde201f commit 8d2cc20

File tree

55 files changed

+513
-4693
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+513
-4693
lines changed

CHANGELOG.md

Lines changed: 75 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,58 @@
11
# Changelog
22

3+
4+
## 0.5.0-rc1
5+
6+
*September 27th, 2018*
7+
8+
BREAKING CHANGES:
9+
10+
- [cointype] Introduce the cointype of iris:
11+
- 1 iris = 10^18 iris-atto
12+
- 1 iris-milli = 10^15 iris-atto
13+
- 1 iris-micro = 10^12 iris-atto
14+
- 1 iris-nano = 10^9 iris-atto
15+
- 1 iris-pico = 10^6 iris-atto
16+
- 1 iris-femto = 10^3 iris-atto
17+
18+
FEATURES:
19+
20+
- [tendermint] Upgrade to Tendermint v0.23.1-rc0
21+
- [cosmos-sdk] Upgrade to cosmos-sdk v0.24.2
22+
- Move the previous irisnet changeset about cosmos-sdk into irishub
23+
- [irisdebug] Add irisdebug tool
24+
- [LCD/cli] Add the proof verification in the LCD and cli
25+
- [iparam] Support governance modify the complex struct type parameter and can be done through the Json parameter config file
26+
- [software-upgrade] Software upgrade solution of the irisnet
27+
28+
29+
## 0.4.2
30+
31+
*September 22th, 2018*
32+
33+
BUG FIXES
34+
35+
- Fix consensus failure due to the double sign evidence be broadcasted before the genesis block
36+
37+
## 0.4.1
38+
39+
*September 12th, 2018*
40+
41+
BUG FIXES
42+
43+
- Missing to set validator intraTxCount in stake genesis init
44+
45+
346
## 0.4.0
447

5-
*August 16th, 2018*
48+
*September 6th, 2018*
649

750
BREAKING CHANGES:
851

952
- [cosmos-sdk] Upgrade to cosmos-sdk v0.23.0
1053
- Change the address prefix format:
1154
- cosmosaccaddr --> faa
12-
- cosmosaccaddr --> fap
55+
- cosmosaccpub --> fap
1356
- cosmosvaladdr --> fva
1457
- cosmosvalpub --> fvp
1558
- Adjust the Route & rootMultiStore Commit for software upgrade
@@ -19,12 +62,40 @@ BREAKING CHANGES:
1962
FEATURES:
2063

2164
- [tendermint] Upgrade to Tendermint v0.22.6
22-
- Store the pre-state to support the replay function in software upgrade
65+
- Store the pre-state to support the replay function
2366
- [cosmos-sdk] Upgrade to cosmos-sdk v0.23.0
2467
- Add the paramProposal and softwareUpgradeProposal in gov module
2568
- Improve fee token mechanism to more reasonably deduct transaction fee and achieve more ability to defent DDOS attack.
2669
- Introduce the global parameter module
27-
- [irishub] Add the upgrade module and example apps for the async software upgrade
70+
71+
BUG FIXES
72+
73+
- Default account balance in genesis
74+
- Fix iris version issue
75+
- Fix the unit conflict issue in slashing
76+
- Check the voting power when create validator
77+
- Fix evidence amimo register issue
78+
79+
80+
## 0.4.0-rc2
81+
82+
*Sep 5th, 2018*
83+
84+
BUG FIXES
85+
86+
- Fix evidence amimo register issue
87+
88+
89+
## 0.4.0-rc1
90+
91+
*Aug 27th, 2018*
92+
93+
BUG FIXES
94+
95+
- Default account balance in genesis
96+
- iris version issue
97+
- Fix the unit conflict issue in slashing
98+
- Check the voting power when create validator
2899

29100

30101
## 0.3.0

Gopkg.lock

Lines changed: 9 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
[[constraint]]
3030
name = "github.com/cosmos/cosmos-sdk"
3131
source = "https://github.com/irisnet/cosmos-sdk.git"
32-
branch = "irisnet/develop"
32+
version = "=v0.24.2-iris1"
3333

3434
[[override]]
3535
name = "github.com/golang/protobuf"
@@ -49,14 +49,13 @@
4949

5050
[[override]]
5151
name = "github.com/tendermint/iavl"
52-
# version = "=v0.9.2"
53-
branch = "irisnet/feature_upgrade"
5452
source = "https://github.com/irisnet/iavl.git"
53+
version = "=v0.9.2-iris1"
5554

5655
[[override]]
5756
name = "github.com/tendermint/tendermint"
5857
source = "https://github.com/irisnet/tendermint.git"
59-
branch = "irisnet/develop"
58+
version = "=v0.23.1-rc0-iris1"
6059

6160
[[constraint]]
6261
name = "github.com/rakyll/statik"

Makefile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,24 +64,22 @@ build_cur: update_irislcd_swagger_docs
6464
go build -o build/iriscli ./cmd/iriscli && \
6565
go build -o build/irislcd ./cmd/irislcd
6666

67-
build_example: update_irislcd_swagger_docs
67+
build_examples: update_irislcd_swagger_docs
6868
go build -o build/iris1 ./examples/irishub1/cmd/iris1
6969
go build -o build/iriscli1 ./examples/irishub1/cmd/iriscli1
70-
go build -o build/iris2 ./examples/irishub2/cmd/iris2
71-
go build -o build/iriscli2 ./examples/irishub2/cmd/iriscli2
70+
go build -o build/iris-bugfix-2 ./examples/irishub-bugfix-2/cmd/iris-bugfix-2
71+
go build -o build/iriscli-bugfix-2 ./examples/irishub-bugfix-2/cmd/iriscli-bugfix-2
72+
7273

7374
install_examples: update_irislcd_swagger_docs
7475
go install ./examples/irishub1/cmd/iris1
7576
go install ./examples/irishub1/cmd/iriscli1
76-
go install ./examples/irishub2/cmd/iris2
77-
go install ./examples/irishub2/cmd/iriscli2
77+
go install ./examples/irishub-bugfix-2/cmd/iris-bugfix-2
78+
go install ./examples/irishub-bugfix-2/cmd/iriscli-bugfix-2
79+
7880

7981
build_example_linux: update_irislcd_swagger_docs
8082
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/iris1 ./examples/irishub1/cmd/iris1
8183
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/iriscli1 ./examples/irishub1/cmd/iriscli1
82-
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/iris2 ./examples/irishub2/cmd/iris2
83-
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/iriscli2 ./examples/irishub2/cmd/iriscli2
8484
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/iris2-bugfix ./examples/irishub-bugfix-2/cmd/iris-bugfix-2
8585
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/iriscli2-bugfix ./examples/irishub-bugfix-2/cmd/iriscli-bugfix-2
86-
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/iris3-bugfix ./examples/irishub-bugfix-3/cmd/iris-bugfix-3
87-
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/iriscli3-bugfix ./examples/irishub-bugfix-3/cmd/iriscli-bugfix-3

app/app.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ type IrisApp struct {
6060
keyGov *sdk.KVStoreKey
6161
keyFeeCollection *sdk.KVStoreKey
6262
keyParams *sdk.KVStoreKey
63-
keyIparams *sdk.KVStoreKey
6463
keyUpgrade *sdk.KVStoreKey
6564

6665
// Manage getting and setting accounts
@@ -96,7 +95,6 @@ func NewIrisApp(logger log.Logger, db dbm.DB, traceStore io.Writer, baseAppOptio
9695
keyGov: sdk.NewKVStoreKey("gov"),
9796
keyFeeCollection: sdk.NewKVStoreKey("fee"),
9897
keyParams: sdk.NewKVStoreKey("params"),
99-
keyIparams: sdk.NewKVStoreKey("iparams"),
10098
keyUpgrade: sdk.NewKVStoreKey("upgrade"),
10199
}
102100

@@ -129,7 +127,7 @@ func NewIrisApp(logger log.Logger, db dbm.DB, traceStore io.Writer, baseAppOptio
129127
AddRoute("ibc", []*sdk.KVStoreKey{app.keyIBC, app.keyAccount}, ibc.NewHandler(app.ibcMapper, app.coinKeeper)).
130128
AddRoute("stake", []*sdk.KVStoreKey{app.keyStake, app.keyAccount}, stake.NewHandler(app.stakeKeeper)).
131129
AddRoute("slashing", []*sdk.KVStoreKey{app.keySlashing, app.keyStake}, slashing.NewHandler(app.slashingKeeper)).
132-
AddRoute("gov", []*sdk.KVStoreKey{app.keyGov, app.keyAccount, app.keyStake, app.keyIparams, app.keyParams}, gov.NewHandler(app.govKeeper)).
130+
AddRoute("gov", []*sdk.KVStoreKey{app.keyGov, app.keyAccount, app.keyStake, app.keyParams}, gov.NewHandler(app.govKeeper)).
133131
AddRoute("upgrade", []*sdk.KVStoreKey{app.keyUpgrade, app.keyStake}, upgrade.NewHandler(app.upgradeKeeper))
134132

135133
app.feeManager = bam.NewFeeManager(app.paramsKeeper.Setter())
@@ -140,7 +138,7 @@ func NewIrisApp(logger log.Logger, db dbm.DB, traceStore io.Writer, baseAppOptio
140138
app.SetAnteHandler(auth.NewAnteHandler(app.accountMapper, app.feeCollectionKeeper))
141139
app.SetFeeRefundHandler(bam.NewFeeRefundHandler(app.accountMapper, app.feeCollectionKeeper, app.feeManager))
142140
app.SetFeePreprocessHandler(bam.NewFeePreprocessHandler(app.feeManager))
143-
app.MountStoresIAVL(app.keyMain, app.keyAccount, app.keyIBC, app.keyStake, app.keySlashing, app.keyGov, app.keyFeeCollection, app.keyParams, app.keyIparams, app.keyUpgrade)
141+
app.MountStoresIAVL(app.keyMain, app.keyAccount, app.keyIBC, app.keyStake, app.keySlashing, app.keyGov, app.keyFeeCollection, app.keyParams, app.keyUpgrade)
144142
app.SetRunMsg(app.runMsgs)
145143

146144
var err error
@@ -237,10 +235,10 @@ func (app *IrisApp) initChainer(ctx sdk.Context, req abci.RequestInitChain) abci
237235
StartingProposalID: 1,
238236
DepositProcedure: govparams.DepositProcedure{
239237
MinDeposit: sdk.Coins{minDeposit},
240-
MaxDepositPeriod: 10,
238+
MaxDepositPeriod: 30,
241239
},
242240
VotingProcedure: govparams.VotingProcedure{
243-
VotingPeriod: 10,
241+
VotingPeriod: 30,
244242
},
245243
TallyingProcedure: govparams.TallyingProcedure{
246244
Threshold: sdk.NewRat(1, 2),

client/upgrade/cli/query.go

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ package cli
22

33
import (
44
"fmt"
5+
sdk "github.com/cosmos/cosmos-sdk/types"
56
"github.com/cosmos/cosmos-sdk/wire"
67
authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli"
78
"github.com/irisnet/irishub/client/context"
89
"github.com/irisnet/irishub/modules/upgrade"
910
"github.com/irisnet/irishub/modules/upgrade/params"
11+
"github.com/pkg/errors"
1012
"github.com/spf13/cobra"
13+
"github.com/spf13/viper"
1114
"os"
1215
)
1316

@@ -22,8 +25,8 @@ func GetInfoCmd(storeName string, cdc *wire.Codec) *cobra.Command {
2225
WithLogger(os.Stdout).
2326
WithAccountDecoder(authcmd.GetAccountDecoder(cdc))
2427

25-
res_height, _ := cliCtx.QueryStore([]byte("gov/"+upgradeparams.ProposalAcceptHeightParameter.GetStoreKey()), "params")
26-
res_proposalID, _ := cliCtx.QueryStore([]byte("gov/"+upgradeparams.CurrentUpgradeProposalIdParameter.GetStoreKey()), "params")
28+
res_height, _ := cliCtx.QueryStore([]byte(upgradeparams.ProposalAcceptHeightParameter.GetStoreKey()), "params")
29+
res_proposalID, _ := cliCtx.QueryStore([]byte(upgradeparams.CurrentUpgradeProposalIdParameter.GetStoreKey()), "params")
2730
var height int64
2831
var proposalID int64
2932
cdc.MustUnmarshalBinary(res_height, &height)
@@ -49,3 +52,45 @@ func GetInfoCmd(storeName string, cdc *wire.Codec) *cobra.Command {
4952
}
5053
return cmd
5154
}
55+
56+
// Command to Get a Switch Information
57+
func GetCmdQuerySwitch(storeName string, cdc *wire.Codec) *cobra.Command {
58+
cmd := &cobra.Command{
59+
Use: "query-switch",
60+
Short: "query switch details",
61+
RunE: func(cmd *cobra.Command, args []string) error {
62+
proposalID := viper.GetInt64(flagProposalID)
63+
voterStr := viper.GetString(flagVoter)
64+
65+
voter, err := sdk.AccAddressFromBech32(voterStr)
66+
if err != nil {
67+
return err
68+
}
69+
70+
cliCtx := context.NewCLIContext().
71+
WithCodec(cdc).
72+
WithLogger(os.Stdout).
73+
WithAccountDecoder(authcmd.GetAccountDecoder(cdc))
74+
75+
res, err := cliCtx.QueryStore(upgrade.GetSwitchKey(proposalID, voter), storeName)
76+
if len(res) == 0 || err != nil {
77+
return errors.Errorf("proposalID [%d] is not existed", proposalID)
78+
}
79+
80+
var switchMsg upgrade.MsgSwitch
81+
cdc.MustUnmarshalBinary(res, &switchMsg)
82+
output, err := wire.MarshalJSONIndent(cdc, switchMsg)
83+
if err != nil {
84+
return err
85+
}
86+
87+
fmt.Println(string(output))
88+
return nil
89+
},
90+
}
91+
92+
cmd.Flags().String(flagProposalID, "", "proposalID of upgrade swtich being queried")
93+
cmd.Flags().String(flagVoter, "", "Address sign the switch msg")
94+
95+
return cmd
96+
}

0 commit comments

Comments
 (0)