diff --git a/proto/oracle/oracle.proto b/proto/oracle/oracle.proto index fb77e53af2..342c1e93e9 100644 --- a/proto/oracle/oracle.proto +++ b/proto/oracle/oracle.proto @@ -95,6 +95,9 @@ message OracleExchangeRate { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; + int64 last_update_timestamp = 3 [ + (gogoproto.moretags) = "yaml:\"last_update_timestamp\"" + ]; } message PriceSnapshotItem { @@ -103,7 +106,7 @@ message PriceSnapshotItem { } message PriceSnapshot { - int64 snapshotTimestamp = 1 [ + int64 snapshot_timestamp = 1 [ (gogoproto.moretags) = "yaml:\"snapshot_timestamp\"" ]; repeated PriceSnapshotItem price_snapshot_items = 2 [ diff --git a/wasmbinding/test/query_test.go b/wasmbinding/test/query_test.go index 57e15f5a6b..5973cece96 100644 --- a/wasmbinding/test/query_test.go +++ b/wasmbinding/test/query_test.go @@ -111,7 +111,7 @@ func TestWasmGetOracleExchangeRates(t *testing.T) { var parsedRes2 oracletypes.QueryExchangeRatesResponse err = json.Unmarshal(res, &parsedRes2) require.NoError(t, err) - require.Equal(t, oracletypes.QueryExchangeRatesResponse{DenomOracleExchangeRatePairs: oracletypes.DenomOracleExchangeRatePairs{oracletypes.NewDenomOracleExchangeRatePair(oracleutils.MicroAtomDenom, sdk.NewDec(12), sdk.NewInt(11))}}, parsedRes2) + require.Equal(t, oracletypes.QueryExchangeRatesResponse{DenomOracleExchangeRatePairs: oracletypes.DenomOracleExchangeRatePairs{oracletypes.NewDenomOracleExchangeRatePair(oracleutils.MicroAtomDenom, sdk.NewDec(12), sdk.NewInt(11), testWrapper.Ctx.BlockTime().UnixMilli())}}, parsedRes2) } func TestWasmGetOracleTwaps(t *testing.T) { diff --git a/x/oracle/abci_test.go b/x/oracle/abci_test.go index 2e82a83edc..119cb4d8a3 100755 --- a/x/oracle/abci_test.go +++ b/x/oracle/abci_test.go @@ -31,7 +31,7 @@ func TestOracleThreshold(t *testing.T) { oracle.MidBlocker(input.Ctx.WithBlockHeight(1), input.OracleKeeper) oracle.EndBlocker(input.Ctx.WithBlockHeight(1), input.OracleKeeper) - _, _, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx.WithBlockHeight(1), utils.MicroAtomDenom) + _, _, _, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx.WithBlockHeight(1), utils.MicroAtomDenom) require.Error(t, err) // Case 2. @@ -53,7 +53,7 @@ func TestOracleThreshold(t *testing.T) { oracle.MidBlocker(input.Ctx.WithBlockHeight(1), input.OracleKeeper) oracle.EndBlocker(input.Ctx.WithBlockHeight(1), input.OracleKeeper) - rate, lastUpdate, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx.WithBlockHeight(1), utils.MicroAtomDenom) + rate, lastUpdate, _, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx.WithBlockHeight(1), utils.MicroAtomDenom) require.NoError(t, err) require.Equal(t, randomExchangeRate, rate) require.Equal(t, int64(1), lastUpdate.Int64()) @@ -74,7 +74,7 @@ func TestOracleThreshold(t *testing.T) { oracle.MidBlocker(input.Ctx.WithBlockHeight(3), input.OracleKeeper) oracle.EndBlocker(input.Ctx.WithBlockHeight(3), input.OracleKeeper) - rate, lastUpdate, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx.WithBlockHeight(3), utils.MicroAtomDenom) + rate, lastUpdate, _, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx.WithBlockHeight(3), utils.MicroAtomDenom) require.NoError(t, err) require.Equal(t, randomExchangeRate, rate) // This should still be an older value due to staleness @@ -93,7 +93,7 @@ func TestOracleDrop(t *testing.T) { oracle.MidBlocker(input.Ctx, input.OracleKeeper) oracle.EndBlocker(input.Ctx, input.OracleKeeper) - rate, lastUpdate, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) + rate, lastUpdate, _, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) require.NoError(t, err) require.Equal(t, randomExchangeRate, rate) // The value should have a stale height @@ -194,14 +194,14 @@ func TestOracleTallyTiming(t *testing.T) { oracle.MidBlocker(input.Ctx, input.OracleKeeper) oracle.EndBlocker(input.Ctx, input.OracleKeeper) - _, _, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) + _, _, _, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) require.Error(t, err) input.Ctx = input.Ctx.WithBlockHeight(int64(params.VotePeriod - 1)) oracle.MidBlocker(input.Ctx, input.OracleKeeper) oracle.EndBlocker(input.Ctx, input.OracleKeeper) - _, _, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) + _, _, _, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) require.NoError(t, err) } @@ -398,12 +398,12 @@ func TestInvalidVoteOnAssetUnderThresholdMisses(t *testing.T) { input.Ctx = input.Ctx.WithBlockHeight(input.Ctx.BlockHeight() + 1) - rate, lastUpdate, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) + rate, lastUpdate, _, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) require.NoError(t, err) require.Equal(t, randomExchangeRate, rate) require.Equal(t, endBlockerHeight, lastUpdate.Int64()) - rate, lastUpdate, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroEthDenom) + rate, lastUpdate, _, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroEthDenom) require.NoError(t, err) require.Equal(t, randomExchangeRate, rate) require.Equal(t, endBlockerHeight, lastUpdate.Int64()) @@ -439,13 +439,13 @@ func TestInvalidVoteOnAssetUnderThresholdMisses(t *testing.T) { input.Ctx = input.Ctx.WithBlockHeight(input.Ctx.BlockHeight() + 1) - rate, lastUpdate, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) + rate, lastUpdate, _, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) require.NoError(t, err) require.Equal(t, anotherRandomExchangeRate, rate) require.Equal(t, newEndBlockerHeight, lastUpdate.Int64()) // the old value should be persisted because asset didnt meet ballot threshold - rate, lastUpdate, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroEthDenom) + rate, lastUpdate, _, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroEthDenom) require.NoError(t, err) require.Equal(t, randomExchangeRate, rate) // block height should be old @@ -571,7 +571,7 @@ func TestAbstainWithSmallStakingPower(t *testing.T) { oracle.MidBlocker(input.Ctx, input.OracleKeeper) oracle.EndBlocker(input.Ctx, input.OracleKeeper) - _, _, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) + _, _, _, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) require.Error(t, err) } @@ -591,11 +591,12 @@ func TestOraclePriceSnapshot(t *testing.T) { oracle.MidBlocker(input.Ctx, input.OracleKeeper) oracle.EndBlocker(input.Ctx, input.OracleKeeper) - rate, lastUpdate, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) + rate, lastUpdate, _, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) require.NoError(t, err) require.Equal(t, randomExchangeRate, rate) // The value should have a stale height require.Equal(t, sdk.ZeroInt(), lastUpdate) + ts := input.Ctx.BlockTime().UnixMilli() snapshot := input.OracleKeeper.GetPriceSnapshot(input.Ctx, 100) require.NoError(t, err) @@ -605,8 +606,9 @@ func TestOraclePriceSnapshot(t *testing.T) { { Denom: utils.MicroAtomDenom, OracleExchangeRate: types.OracleExchangeRate{ - ExchangeRate: randomExchangeRate, - LastUpdate: sdk.NewInt(input.Ctx.BlockHeight()), + ExchangeRate: randomExchangeRate, + LastUpdate: sdk.NewInt(input.Ctx.BlockHeight()), + LastUpdateTimestamp: ts, }, }, }, @@ -622,8 +624,9 @@ func TestOraclePriceSnapshot(t *testing.T) { { Denom: utils.MicroAtomDenom, OracleExchangeRate: types.OracleExchangeRate{ - ExchangeRate: randomExchangeRate, - LastUpdate: sdk.NewInt(input.Ctx.BlockHeight()), + ExchangeRate: randomExchangeRate, + LastUpdate: sdk.NewInt(input.Ctx.BlockHeight()), + LastUpdateTimestamp: ts, }, }, }, diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 9cde47f304..f13bb30c82 100755 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -68,22 +68,23 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { //----------------------------------- // ExchangeRate logic -func (k Keeper) GetBaseExchangeRate(ctx sdk.Context, denom string) (sdk.Dec, sdk.Int, error) { +func (k Keeper) GetBaseExchangeRate(ctx sdk.Context, denom string) (sdk.Dec, sdk.Int, int64, error) { store := ctx.KVStore(k.storeKey) b := store.Get(types.GetExchangeRateKey(denom)) if b == nil { - return sdk.ZeroDec(), sdk.ZeroInt(), sdkerrors.Wrap(types.ErrUnknownDenom, denom) + return sdk.ZeroDec(), sdk.ZeroInt(), 0, sdkerrors.Wrap(types.ErrUnknownDenom, denom) } exchangeRate := types.OracleExchangeRate{} k.cdc.MustUnmarshal(b, &exchangeRate) - return exchangeRate.ExchangeRate, exchangeRate.LastUpdate, nil + return exchangeRate.ExchangeRate, exchangeRate.LastUpdate, exchangeRate.LastUpdateTimestamp, nil } func (k Keeper) SetBaseExchangeRate(ctx sdk.Context, denom string, exchangeRate sdk.Dec) { store := ctx.KVStore(k.storeKey) currHeight := sdk.NewInt(ctx.BlockHeight()) - rate := types.OracleExchangeRate{ExchangeRate: exchangeRate, LastUpdate: currHeight} + blockTimestamp := ctx.BlockTime().UnixMilli() + rate := types.OracleExchangeRate{ExchangeRate: exchangeRate, LastUpdate: currHeight, LastUpdateTimestamp: blockTimestamp} bz := k.cdc.MustMarshal(&rate) store.Set(types.GetExchangeRateKey(denom), bz) } diff --git a/x/oracle/keeper/keeper_test.go b/x/oracle/keeper/keeper_test.go index eed3830594..dbab4dda09 100755 --- a/x/oracle/keeper/keeper_test.go +++ b/x/oracle/keeper/keeper_test.go @@ -25,27 +25,33 @@ func TestExchangeRate(t *testing.T) { // Set & get rates input.OracleKeeper.SetBaseExchangeRate(input.Ctx, utils.MicroSeiDenom, cnyExchangeRate) - rate, lastUpdate, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroSeiDenom) + rate, lastUpdate, _, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroSeiDenom) require.NoError(t, err) require.Equal(t, cnyExchangeRate, rate) require.Equal(t, sdk.ZeroInt(), lastUpdate) input.Ctx = input.Ctx.WithBlockHeight(3) + ts := time.Now() + input.Ctx = input.Ctx.WithBlockTime(ts) input.OracleKeeper.SetBaseExchangeRate(input.Ctx, utils.MicroEthDenom, gbpExchangeRate) - rate, lastUpdate, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroEthDenom) + rate, lastUpdate, lastUpdateTimestamp, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroEthDenom) require.NoError(t, err) require.Equal(t, gbpExchangeRate, rate) require.Equal(t, sdk.NewInt(3), lastUpdate) + require.Equal(t, ts.UnixMilli(), lastUpdateTimestamp) input.Ctx = input.Ctx.WithBlockHeight(15) + laterTS := ts.Add(time.Hour) + input.Ctx = input.Ctx.WithBlockTime(laterTS) // verify behavior works with event too input.OracleKeeper.SetBaseExchangeRateWithEvent(input.Ctx, utils.MicroAtomDenom, krwExchangeRate) - rate, lastUpdate, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) + rate, lastUpdate, lastUpdateTimestamp, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) require.NoError(t, err) require.Equal(t, krwExchangeRate, rate) require.Equal(t, sdk.NewInt(15), lastUpdate) + require.Equal(t, laterTS.UnixMilli(), lastUpdateTimestamp) require.True(t, func() bool { expectedEvent := sdk.NewEvent(types.EventTypeExchangeRateUpdate, sdk.NewAttribute(types.AttributeKeyDenom, utils.MicroAtomDenom), @@ -67,7 +73,7 @@ func TestExchangeRate(t *testing.T) { }()) input.OracleKeeper.DeleteBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) - _, _, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) + _, _, _, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) require.Error(t, err) numExchangeRates := 0 diff --git a/x/oracle/keeper/migrations_test.go b/x/oracle/keeper/migrations_test.go index a6e151705d..625e909850 100644 --- a/x/oracle/keeper/migrations_test.go +++ b/x/oracle/keeper/migrations_test.go @@ -34,13 +34,14 @@ func TestMigrate2to3(t *testing.T) { m.Migrate2to3(input.Ctx) // Get rate - rate, lastUpdate, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroSeiDenom) + rate, lastUpdate, lastUpdateTimestamp, err := input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroSeiDenom) require.NoError(t, err) require.Equal(t, exchangeRate, rate) require.Equal(t, sdk.ZeroInt(), lastUpdate) + require.Equal(t, int64(0), lastUpdateTimestamp) input.OracleKeeper.DeleteBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) - _, _, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) + _, _, _, err = input.OracleKeeper.GetBaseExchangeRate(input.Ctx, utils.MicroAtomDenom) require.Error(t, err) numExchangeRates := 0 @@ -83,7 +84,6 @@ func TestMigrate3to4(t *testing.T) { require.Equal(t, types.VotePenaltyCounter{MissCount: missCounter, AbstainCount: 0}, votePenaltyCounter) input.OracleKeeper.DeleteVotePenaltyCounter(input.Ctx, addr) - votePenaltyCounter = input.OracleKeeper.GetVotePenaltyCounter(input.Ctx, addr) //nolint:staticcheck // no need to use this. numPenaltyCounters := 0 handler := func(operators sdk.ValAddress, votePenaltyCounter types.VotePenaltyCounter) (stop bool) { diff --git a/x/oracle/keeper/querier.go b/x/oracle/keeper/querier.go index af309ed650..bb795653f7 100755 --- a/x/oracle/keeper/querier.go +++ b/x/oracle/keeper/querier.go @@ -44,12 +44,14 @@ func (q querier) ExchangeRate(c context.Context, req *types.QueryExchangeRateReq } ctx := sdk.UnwrapSDKContext(c) - exchangeRate, lastUpdate, err := q.GetBaseExchangeRate(ctx, req.Denom) + exchangeRate, lastUpdate, lastUpdateTimestamp, err := q.GetBaseExchangeRate(ctx, req.Denom) if err != nil { return nil, err } - return &types.QueryExchangeRateResponse{OracleExchangeRate: types.OracleExchangeRate{ExchangeRate: exchangeRate, LastUpdate: lastUpdate}}, nil + return &types.QueryExchangeRateResponse{OracleExchangeRate: types.OracleExchangeRate{ + ExchangeRate: exchangeRate, LastUpdate: lastUpdate, LastUpdateTimestamp: lastUpdateTimestamp, + }}, nil } // ExchangeRates queries exchange rates of all denoms diff --git a/x/oracle/keeper/querier_test.go b/x/oracle/keeper/querier_test.go index 070ae27093..36e6607170 100755 --- a/x/oracle/keeper/querier_test.go +++ b/x/oracle/keeper/querier_test.go @@ -63,8 +63,8 @@ func TestQueryExchangeRates(t *testing.T) { require.NoError(t, err) require.Equal(t, types.DenomOracleExchangeRatePairs{ - types.NewDenomOracleExchangeRatePair(utils.MicroAtomDenom, rate, sdk.ZeroInt()), - types.NewDenomOracleExchangeRatePair(utils.MicroSeiDenom, rate, sdk.ZeroInt()), + types.NewDenomOracleExchangeRatePair(utils.MicroAtomDenom, rate, sdk.ZeroInt(), input.Ctx.BlockTime().UnixMilli()), + types.NewDenomOracleExchangeRatePair(utils.MicroSeiDenom, rate, sdk.ZeroInt(), input.Ctx.BlockTime().UnixMilli()), }, res.DenomOracleExchangeRatePairs) } diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go index 00db538987..f718d3b966 100644 --- a/x/oracle/types/oracle.pb.go +++ b/x/oracle/types/oracle.pb.go @@ -210,8 +210,9 @@ func (m *ExchangeRateTuple) XXX_DiscardUnknown() { var xxx_messageInfo_ExchangeRateTuple proto.InternalMessageInfo type OracleExchangeRate struct { - ExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=exchange_rate,json=exchangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"exchange_rate" yaml:"exchange_rate"` - LastUpdate github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=last_update,json=lastUpdate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"last_update" yaml:"last_update"` + ExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=exchange_rate,json=exchangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"exchange_rate" yaml:"exchange_rate"` + LastUpdate github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=last_update,json=lastUpdate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"last_update" yaml:"last_update"` + LastUpdateTimestamp int64 `protobuf:"varint,3,opt,name=last_update_timestamp,json=lastUpdateTimestamp,proto3" json:"last_update_timestamp,omitempty" yaml:"last_update_timestamp"` } func (m *OracleExchangeRate) Reset() { *m = OracleExchangeRate{} } @@ -299,7 +300,7 @@ func (m *PriceSnapshotItem) GetOracleExchangeRate() OracleExchangeRate { } type PriceSnapshot struct { - SnapshotTimestamp int64 `protobuf:"varint,1,opt,name=snapshotTimestamp,proto3" json:"snapshotTimestamp,omitempty" yaml:"snapshot_timestamp"` + SnapshotTimestamp int64 `protobuf:"varint,1,opt,name=snapshot_timestamp,json=snapshotTimestamp,proto3" json:"snapshot_timestamp,omitempty" yaml:"snapshot_timestamp"` PriceSnapshotItems PriceSnapshotItems `protobuf:"bytes,2,rep,name=price_snapshot_items,json=priceSnapshotItems,proto3,castrepeated=PriceSnapshotItems" json:"price_snapshot_items" yaml:"price_snapshot_items"` } @@ -478,68 +479,69 @@ func init() { func init() { proto.RegisterFile("oracle/oracle.proto", fileDescriptor_dc470b50b143d488) } var fileDescriptor_dc470b50b143d488 = []byte{ - // 968 bytes of a gzipped FileDescriptorProto + // 992 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xbd, 0x6f, 0x23, 0x45, - 0x14, 0xf7, 0x26, 0x4e, 0xc0, 0x63, 0x9b, 0x8b, 0xe7, 0x0c, 0xf8, 0xee, 0x38, 0x6f, 0x34, 0x27, - 0x4e, 0xa1, 0x38, 0x9b, 0x3b, 0x0a, 0x84, 0x25, 0x0a, 0x4c, 0x38, 0x14, 0x3e, 0x44, 0x98, 0x0b, - 0x41, 0xa2, 0x59, 0x8d, 0x77, 0x87, 0xf5, 0x28, 0xbb, 0x3b, 0xab, 0x9d, 0x71, 0x7c, 0x29, 0xa0, - 0xa0, 0xa2, 0x44, 0x54, 0x48, 0x34, 0xa9, 0xf9, 0x03, 0xf8, 0x1b, 0xae, 0xbc, 0x12, 0x51, 0x2c, - 0x28, 0x69, 0xe8, 0x90, 0x5c, 0x50, 0x50, 0xa1, 0xf9, 0xb0, 0xb3, 0xc9, 0x86, 0x08, 0x0b, 0x5d, - 0xb5, 0xfb, 0x7e, 0xef, 0xbd, 0xdf, 0xbc, 0xcf, 0xd9, 0x05, 0xd7, 0x79, 0x46, 0xfc, 0x88, 0xf6, - 0xcd, 0xa3, 0x97, 0x66, 0x5c, 0x72, 0x78, 0x4b, 0x50, 0xa6, 0xdf, 0x7c, 0x1e, 0xf5, 0x04, 0x65, - 0xfe, 0x98, 0xb0, 0xa4, 0x67, 0x4c, 0x6e, 0xb6, 0x43, 0x1e, 0x72, 0xad, 0xed, 0xab, 0x37, 0xe3, - 0x72, 0xb3, 0xeb, 0x73, 0x11, 0x73, 0xd1, 0x1f, 0x11, 0x41, 0xfb, 0x87, 0xf7, 0x47, 0x54, 0x92, - 0xfb, 0x7d, 0x9f, 0xb3, 0xc4, 0xe8, 0xd1, 0x37, 0xeb, 0x60, 0x7d, 0x97, 0x64, 0x24, 0x16, 0xf0, - 0x4d, 0x50, 0x3f, 0xe4, 0x92, 0x7a, 0x29, 0xcd, 0x18, 0x0f, 0x3a, 0xce, 0xa6, 0xb3, 0x55, 0x1d, - 0xbe, 0x34, 0xcb, 0x5d, 0x78, 0x44, 0xe2, 0x68, 0x80, 0x0a, 0x4a, 0x84, 0x81, 0x92, 0x76, 0xb5, - 0x00, 0x13, 0xf0, 0x82, 0xd6, 0xc9, 0x71, 0x46, 0xc5, 0x98, 0x47, 0x41, 0x67, 0x65, 0xd3, 0xd9, - 0xaa, 0x0d, 0xdf, 0x7f, 0x92, 0xbb, 0x95, 0x5f, 0x73, 0xf7, 0x6e, 0xc8, 0xe4, 0x78, 0x32, 0xea, - 0xf9, 0x3c, 0xee, 0xdb, 0x70, 0xcc, 0xe3, 0x9e, 0x08, 0x0e, 0xfa, 0xf2, 0x28, 0xa5, 0xa2, 0xb7, - 0x4d, 0xfd, 0x59, 0xee, 0xbe, 0x58, 0x38, 0x69, 0xc1, 0x86, 0x70, 0x53, 0x01, 0x7b, 0x73, 0x19, - 0x52, 0x50, 0xcf, 0xe8, 0x94, 0x64, 0x81, 0x37, 0x22, 0x49, 0xd0, 0x59, 0xd5, 0x87, 0x6d, 0x2f, - 0x7d, 0x98, 0x4d, 0xab, 0x40, 0x85, 0x30, 0x30, 0xd2, 0x90, 0x24, 0x01, 0x0c, 0x41, 0x6d, 0x3a, - 0x66, 0x92, 0x46, 0x4c, 0xc8, 0x4e, 0x75, 0x73, 0x75, 0xab, 0xfe, 0x00, 0xf5, 0xae, 0xe8, 0x40, - 0x6f, 0x9b, 0x26, 0x3c, 0x1e, 0xbe, 0xaa, 0x02, 0x99, 0xe5, 0xee, 0x86, 0xa1, 0x5f, 0x50, 0xa0, - 0x9f, 0x7e, 0x73, 0x6b, 0xda, 0xe4, 0x23, 0x26,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xb8, 0x30, 0x12, 0x13, 0xdf, 0xa7, - 0x0b, 0x9a, 0x55, 0x63, 0x64, 0x41, 0x6d, 0x34, 0xfc, 0xe0, 0xc9, 0x49, 0xd7, 0x79, 0x7a, 0xd2, - 0x75, 0x7e, 0x3f, 0xe9, 0x3a, 0xdf, 0x9d, 0x76, 0x2b, 0x4f, 0x4f, 0xbb, 0x95, 0x5f, 0x4e, 0xbb, - 0x95, 0x2f, 0x5e, 0x2f, 0x14, 0x40, 0x50, 0x76, 0x6f, 0xde, 0x45, 0x2d, 0xe8, 0x36, 0xf6, 0x1f, - 0xdb, 0xff, 0x26, 0x53, 0x8e, 0xd1, 0xba, 0x36, 0x79, 0xe3, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x75, 0xce, 0x92, 0xb6, 0x55, 0x09, 0x00, 0x00, + 0x14, 0xf7, 0xe6, 0x0b, 0x3c, 0xb6, 0xb9, 0x78, 0xe2, 0x03, 0xdf, 0x97, 0x37, 0x9a, 0x13, 0xa7, + 0x50, 0x9c, 0xcd, 0x1d, 0x05, 0xc2, 0x12, 0x05, 0x26, 0x1c, 0x0a, 0x3a, 0x44, 0x98, 0x33, 0x41, + 0xa2, 0x59, 0x8d, 0x77, 0x07, 0x7b, 0x94, 0xdd, 0x9d, 0xd5, 0xce, 0x38, 0xbe, 0x14, 0x50, 0x50, + 0x51, 0x22, 0x2a, 0x24, 0x9a, 0xd4, 0xfc, 0x01, 0xfc, 0x0d, 0x57, 0x50, 0x5c, 0x89, 0x28, 0x16, + 0x94, 0x34, 0x74, 0x48, 0x6e, 0x69, 0xd0, 0x7c, 0xd8, 0xde, 0x64, 0x43, 0x84, 0x85, 0xae, 0xda, + 0x7d, 0xbf, 0xf7, 0xe6, 0x37, 0x6f, 0x7e, 0xef, 0xbd, 0xd1, 0x80, 0x2d, 0x9e, 0x12, 0x3f, 0xa4, + 0x1d, 0xf3, 0x69, 0x27, 0x29, 0x97, 0x1c, 0xde, 0x12, 0x94, 0xe9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e, 0xbd, 0x7a, 0x82, 0xfa, 0x3c, 0x0e, 0x84, 0xe9, 0x34, + 0x7c, 0x6d, 0x86, 0x3f, 0x31, 0x30, 0xfa, 0x0a, 0xc0, 0x03, 0xfd, 0x74, 0x88, 0x49, 0x28, 0x8f, + 0xdf, 0xe7, 0xe3, 0x58, 0xd2, 0x14, 0xde, 0x01, 0x20, 0x62, 0x42, 0x78, 0xbe, 0xb2, 0xcd, 0xd3, + 0x03, 0x97, 0x15, 0xa2, 0x03, 0xe0, 0x5d, 0x50, 0x23, 0x03, 0x21, 0x09, 0x8b, 0x6d, 0xc4, 0x8a, + 0x8e, 0xa8, 0x5a, 0x70, 0x1e, 0x24, 0xc6, 0xbe, 0x4f, 0xe7, 0x34, 0xab, 0x26, 0xc8, 0x82, 0x3a, + 0xa8, 0xf7, 0xd1, 0xb3, 0xd3, 0x96, 0xf3, 0xfc, 0xb4, 0xe5, 0xfc, 0x71, 0xda, 0x72, 0xbe, 0x3b, + 0x6b, 0x95, 0x9e, 0x9f, 0xb5, 0x4a, 0xbf, 0x9e, 0xb5, 0x4a, 0x5f, 0xbc, 0x99, 0x13, 0x40, 0x50, + 0x76, 0x7f, 0x56, 0x45, 0x6d, 0xe8, 0x32, 0x76, 0x9e, 0xda, 0xe7, 0x98, 0x91, 0x63, 0xb0, 0xa1, + 0x43, 0xde, 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x10, 0x21, 0xd7, 0xac, 0x09, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -818,6 +820,11 @@ func (m *OracleExchangeRate) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.LastUpdateTimestamp != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.LastUpdateTimestamp)) + i-- + dAtA[i] = 0x18 + } { size := m.LastUpdate.Size() i -= size @@ -1106,6 +1113,9 @@ func (m *OracleExchangeRate) Size() (n int) { n += 1 + l + sovOracle(uint64(l)) l = m.LastUpdate.Size() n += 1 + l + sovOracle(uint64(l)) + if m.LastUpdateTimestamp != 0 { + n += 1 + sovOracle(uint64(m.LastUpdateTimestamp)) + } return n } @@ -1872,6 +1882,25 @@ func (m *OracleExchangeRate) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTimestamp", wireType) + } + m.LastUpdateTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastUpdateTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipOracle(dAtA[iNdEx:]) diff --git a/x/oracle/types/vote.go b/x/oracle/types/vote.go index ddc1754949..ed8c728b59 100755 --- a/x/oracle/types/vote.go +++ b/x/oracle/types/vote.go @@ -92,12 +92,13 @@ func (rates DenomOracleExchangeRatePairs) String() string { return string(out) } -func NewDenomOracleExchangeRatePair(denom string, exchangeRate sdk.Dec, lastUpdate sdk.Int) DenomOracleExchangeRatePair { +func NewDenomOracleExchangeRatePair(denom string, exchangeRate sdk.Dec, lastUpdate sdk.Int, lastUpdateTimestamp int64) DenomOracleExchangeRatePair { return DenomOracleExchangeRatePair{ Denom: denom, OracleExchangeRate: OracleExchangeRate{ - ExchangeRate: exchangeRate, - LastUpdate: lastUpdate, + ExchangeRate: exchangeRate, + LastUpdate: lastUpdate, + LastUpdateTimestamp: lastUpdateTimestamp, }, } }