Skip to content

Commit

Permalink
realio staking fork and proto rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
jiujiteiro committed Nov 23, 2022
1 parent 8339276 commit 772ff6f
Show file tree
Hide file tree
Showing 103 changed files with 1,196 additions and 970 deletions.
2 changes: 1 addition & 1 deletion client/grpc/tmservice/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/grpc/tmservice/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crypto/hd/hd.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crypto/keyring/record.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crypto/keys/ed25519/keys.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crypto/keys/multisig/keys.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crypto/keys/secp256k1/keys.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crypto/keys/secp256r1/keys.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crypto/types/multisig.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-alpha7
github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/gogoproto v1.4.2
github.com/cosmos/iavl v0.19.4
github.com/cosmos/ledger-cosmos-go v0.11.1
github.com/gogo/gateway v1.1.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1/go.mod h1:JUMM2MxF9wuwzRWZJjb8BjXs
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=
github.com/cosmos/gogoproto v1.4.2 h1:UeGRcmFW41l0G0MiefWhkPEVEwvu78SZsHBvI78dAYw=
github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU=
github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y=
github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw=
github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok=
Expand Down
4 changes: 2 additions & 2 deletions proto/buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ deps:
- remote: buf.build
owner: cosmos
repository: gogo-proto
commit: bee5511075b7499da6178d9e4aaa628b
commit: 34d970b699f84aa382f3c29773a60836
- remote: buf.build
owner: googleapis
repository: googleapis
commit: 8d7204855ec14631a499bd7393ce1970
commit: 5abafbf55b5c4c07ad5fb06d2599560f
2 changes: 1 addition & 1 deletion proto/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This module represents the "proto" root found in
# the previous configuration.
version: v1
name: buf.build/cosmos/cosmos-sdk
name: buf.build/realiotech/cosmos-sdk
deps:
- buf.build/cosmos/cosmos-proto
- buf.build/cosmos/gogo-proto
Expand Down
23 changes: 8 additions & 15 deletions proto/cosmos/staking/v1beta1/staking.proto
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ message Validator {
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
// bond_denom defines the bondable coin denomination.
string bond_denom = 12;
}

// BondStatus is the status of a validator.
Expand Down Expand Up @@ -229,17 +231,11 @@ message UnbondingDelegationEntry {
// completion_time is the unix time for unbonding completion.
google.protobuf.Timestamp completion_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
// initial_balance defines the tokens initially scheduled to receive at completion.
string initial_balance = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
cosmos.base.v1beta1.Coin initial_balance = 3
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", (gogoproto.nullable) = false];
// balance defines the tokens to receive at completion.
string balance = 4 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
cosmos.base.v1beta1.Coin balance = 4
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", (gogoproto.nullable) = false];
}

// RedelegationEntry defines a redelegation object with relevant metadata.
Expand All @@ -252,11 +248,8 @@ message RedelegationEntry {
// completion_time defines the unix time for redelegation completion.
google.protobuf.Timestamp completion_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
// initial_balance defines the initial balance when redelegation started.
string initial_balance = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
cosmos.base.v1beta1.Coin initial_balance = 3
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", (gogoproto.nullable) = false];
// shares_dst is the amount of destination-validator shares created by redelegation.
string shares_dst = 4 [
(cosmos_proto.scalar) = "cosmos.Dec",
Expand Down
4 changes: 3 additions & 1 deletion simapp/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ func Setup(t *testing.T, isCheckTx bool) *SimApp {
// generate genesis account
senderPrivKey := secp256k1.GenPrivKey()
acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0)
amount, _ := sdk.NewIntFromString("100000000000000000000000000")
balance := banktypes.Balance{
Address: acc.GetAddress().String(),
Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000000000))),
Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, amount)),
}

app := SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, balance)
Expand Down Expand Up @@ -175,6 +176,7 @@ func genesisStateWithValSet(t *testing.T,
UnbondingTime: time.Unix(0, 0).UTC(),
Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()),
MinSelfDelegation: sdk.ZeroInt(),
BondDenom: sdk.DefaultBondDenom,
}
validators = append(validators, validator)
delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec()))
Expand Down
2 changes: 1 addition & 1 deletion snapshots/types/snapshot.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion store/types/commit_info.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types/abci.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types/coin.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types/kv/kv.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types/tx/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x/auth/migrations/v043/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func getDelegatorUnbondingDelegationsSum(ctx sdk.Context, address, bondDenom str
res := sdk.NewCoins()
for _, i := range balance.UnbondingResponses {
for _, r := range i.Entries {
res = res.Add(sdk.NewCoin(bondDenom, r.Balance))
res = res.Add(sdk.NewCoin(bondDenom, r.Balance.Amount))
}
}

Expand Down
Loading

0 comments on commit 772ff6f

Please sign in to comment.