Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve performance BTC reward distribution #306

Merged
merged 145 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 139 commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
f55ea69
chore: add todos
RafilxTenfen Nov 27, 2024
e338dbf
chore: add FinalityProviderRewards structure to help track BTC delega…
RafilxTenfen Nov 28, 2024
58d9451
chore: add BTC delegation rewards structure tracker
RafilxTenfen Nov 28, 2024
467b5a3
Merge branch 'main' of github.com:babylonlabs-io/babylon into rafilx/…
RafilxTenfen Nov 29, 2024
598608c
chore: add todos and descriptions for rewards tracker
RafilxTenfen Nov 29, 2024
530cd88
chore: adding shape to FP reward tracker periods
RafilxTenfen Dec 1, 2024
e79d0e1
chore: modified to use same structure to store the amt staked
RafilxTenfen Dec 2, 2024
0a08cce
chore: removed single value in store and used structure to keep the t…
RafilxTenfen Dec 2, 2024
3f33dba
chore: same structure to store the amount creates weird case where we…
RafilxTenfen Dec 2, 2024
9067255
Merge branch 'main' of github.com:babylonlabs-io/babylon into rafilx/…
RafilxTenfen Dec 4, 2024
a4bc644
fix: add #306 to changelog
RafilxTenfen Dec 4, 2024
8cc0400
fix: failing test
RafilxTenfen Dec 4, 2024
482b860
fix: lint errcheck
RafilxTenfen Dec 4, 2024
63f4b6d
fix: storage of fp current rewards and add test for AddDelegationSat
RafilxTenfen Dec 4, 2024
8fc5d9e
chore: add test for subtract delegation sats
RafilxTenfen Dec 4, 2024
b3120e7
chore: add test for initilize fp
RafilxTenfen Dec 4, 2024
ea15191
fix: precision points error and allowed 0.1% margin error in rewards …
RafilxTenfen Dec 5, 2024
013fc62
Merge branch 'main' of github.com:babylonlabs-io/babylon into rafilx/…
RafilxTenfen Dec 6, 2024
dcc06f3
chore: merge main
RafilxTenfen Dec 6, 2024
7ca2ceb
fix: lint add errcheck
RafilxTenfen Dec 6, 2024
454b200
Merge branch 'main' of github.com:babylonlabs-io/babylon into rafilx/…
RafilxTenfen Dec 6, 2024
48882e2
chore: add details for structures
RafilxTenfen Dec 7, 2024
92fffdc
chore: add implementation of unbond and slash fp
RafilxTenfen Dec 9, 2024
b9d9e09
chore: add slash handle and split store set/get/iterator into specifi…
RafilxTenfen Dec 9, 2024
d009991
chore: add rewards to gauge on reward withdraw and reward calculation…
RafilxTenfen Dec 9, 2024
f80d9f6
chore: add todo for init/export gen
RafilxTenfen Dec 9, 2024
513b73d
Merge branch 'main' of github.com:babylonlabs-io/babylon into rafilx/…
RafilxTenfen Dec 9, 2024
813a886
fix: unecessary coupling of signer PrivateSigner inside helpers
RafilxTenfen Dec 9, 2024
e1bac01
chore: add test for private func setBTCDelegatorToFP
RafilxTenfen Dec 9, 2024
bc55deb
chore: add test case for deleting the BTC delegator to FP
RafilxTenfen Dec 9, 2024
f6b13c6
chore: add test for Btc delegation reward tracker
RafilxTenfen Dec 9, 2024
a2eeede
chore: add test of delete btc delegation tracker
RafilxTenfen Dec 9, 2024
6fb3549
chore: add test for FinalityProviderCurrentRewards
RafilxTenfen Dec 9, 2024
64edb30
chore: finalized tests for simple store functions
RafilxTenfen Dec 9, 2024
3350ea8
chore: moved simple sum sub to store file
RafilxTenfen Dec 9, 2024
ab11cd0
chore: add test for sub fp staked
RafilxTenfen Dec 9, 2024
6ff4358
chore: add test for sub delegations sat
RafilxTenfen Dec 9, 2024
7e594ab
chore: tryfix test
RafilxTenfen Dec 10, 2024
c861835
tryfix: e2e test
RafilxTenfen Dec 10, 2024
2791f70
chore: add test for addFinalityProviderStaked
RafilxTenfen Dec 10, 2024
fc01c10
chore: add test to AddDelegationSat
RafilxTenfen Dec 10, 2024
d5cc280
fix: lint trailing space
RafilxTenfen Dec 10, 2024
9768030
chore: moved addDelegationSat to store tracker file
RafilxTenfen Dec 10, 2024
2e8363f
chore: modified to always use the node at idx 1
RafilxTenfen Dec 10, 2024
e33a176
chore: add test for add fp rewards
RafilxTenfen Dec 10, 2024
c3112c1
chore: reduce log lever
RafilxTenfen Dec 10, 2024
90cfc29
chore: add test for initializeFinalityProvider
RafilxTenfen Dec 10, 2024
5611405
chore: remove unnecessary command
RafilxTenfen Dec 10, 2024
bcfa5a9
chore: move add fp rwd
RafilxTenfen Dec 10, 2024
e446240
Merge branch 'main' of github.com:babylonlabs-io/babylon into rafilx/…
RafilxTenfen Dec 10, 2024
a8b453e
fix: lint signer
RafilxTenfen Dec 10, 2024
a660f76
chore: add test for initializeBTCDelegation
RafilxTenfen Dec 10, 2024
f3bf5c9
chore: add test for IncrementFinalityProviderPeriod
RafilxTenfen Dec 11, 2024
1266bce
chore: add test for calculateDelegationRewardsBetween
RafilxTenfen Dec 11, 2024
d9039df
chore: add godoc for calc btc rwd
RafilxTenfen Dec 11, 2024
11c086a
Merge branch 'main' of github.com:babylonlabs-io/babylon into rafilx/…
RafilxTenfen Dec 11, 2024
f505c55
chore: add initial test for CalculateBTCDelegationRewards and move de…
RafilxTenfen Dec 11, 2024
522f44b
chore: add tests for CalculateBTCDelegationRewards
RafilxTenfen Dec 11, 2024
f86922a
fix: test CalculateBTCDelegationRewards
RafilxTenfen Dec 11, 2024
f50d13c
chore: add test for CalculateBTCDelegationRewardsAndSendToGauge
RafilxTenfen Dec 11, 2024
6cdead4
chore: add test for btcDelegationModifiedWithPreInitDel
RafilxTenfen Dec 11, 2024
aafda52
chore: add test for sendAllBtcRewardsToGauge
RafilxTenfen Dec 12, 2024
9c548d2
chore: add test for FpSlashed
RafilxTenfen Dec 12, 2024
abeda1c
tryfix: e2e rollback changes
RafilxTenfen Dec 12, 2024
9deffc6
fix: lint
RafilxTenfen Dec 12, 2024
f671317
chore: add test for BtcDelegationUnbonded
RafilxTenfen Dec 12, 2024
1f9f835
chore: add test for BtcDelegationActivated
RafilxTenfen Dec 12, 2024
edc9b96
Merge branch 'main' of github.com:babylonlabs-io/babylon into rafilx/…
RafilxTenfen Dec 12, 2024
27d975e
chore: remove unnecessary comments and rename func
RafilxTenfen Dec 12, 2024
27b4ecc
fix: set unbond btc del stupid mistake
RafilxTenfen Dec 12, 2024
07fb951
tryfix: vp table update events at correct order
RafilxTenfen Dec 12, 2024
3d014f5
chore: add more time to e2e
RafilxTenfen Dec 12, 2024
b65ad7b
Merge branch 'main' of github.com:babylonlabs-io/babylon into rafilx/…
RafilxTenfen Dec 12, 2024
d189eac
chore: test btc del integration
RafilxTenfen Dec 13, 2024
787d121
Merge branch 'main' of github.com:babylonlabs-io/babylon into rafilx/…
RafilxTenfen Dec 13, 2024
85c94c1
chore: moved to use single point of gov account address
RafilxTenfen Dec 13, 2024
1f2aeb5
chore: moved to use single point of gov account address
RafilxTenfen Dec 13, 2024
1e97f58
chore: start of integration test
RafilxTenfen Dec 13, 2024
f99a36b
chore: created separated package for PrivSigner structure
RafilxTenfen Dec 16, 2024
21364ea
chore: move SetupTestPrivSigner to testutil and avoid circular depend…
RafilxTenfen Dec 16, 2024
3696a42
chore: moved constant used module accounts to appparams
RafilxTenfen Dec 16, 2024
1d53ecb
chore: add #348 to changelog
RafilxTenfen Dec 16, 2024
8192785
Merge branch 'rafilx/refactory' of github.com:babylonlabs-io/babylon …
RafilxTenfen Dec 16, 2024
96f5a1f
chore: add comment back
RafilxTenfen Dec 16, 2024
3f75d16
chore: remove commented line
RafilxTenfen Dec 16, 2024
8e46b0d
Merge branch 'main' of github.com:babylonlabs-io/babylon into rafilx/…
RafilxTenfen Dec 16, 2024
9ee3ba5
fix: process unbonded BTC delegations events only once
RafilxTenfen Dec 16, 2024
067232e
chore: add integration test for early unbond
RafilxTenfen Dec 16, 2024
a2a5c8e
chore: reach expire BTC staking tx
RafilxTenfen Dec 16, 2024
139781b
chore: add test to check early unbonding + expire event
RafilxTenfen Dec 16, 2024
01479f3
chore: add integration test for incentives and rewards
RafilxTenfen Dec 17, 2024
e6d1884
chore: rollback to private maccperms
RafilxTenfen Dec 17, 2024
3504b67
chore: address pr comments
RafilxTenfen Dec 17, 2024
b5f7794
chore: add e2e test to BTC rewards active btc delegations with covena…
RafilxTenfen Dec 17, 2024
e0cab3a
chore: stuck at e2e btc staking activation height
RafilxTenfen Dec 17, 2024
9d7fad6
chore: stuck at activated height
RafilxTenfen Dec 18, 2024
dcee28e
chore: add new status event BTCDelegationStatus_EXPIRED
RafilxTenfen Dec 18, 2024
b3decf7
chore: add new e2e test that currently fails to activate finality
RafilxTenfen Dec 18, 2024
27a13dd
Merge branch 'main' of github.com:babylonlabs-io/babylon into rafilx/…
RafilxTenfen Dec 18, 2024
bdf7c15
fix: set btc delegations to active prior to commit pub rand and check…
RafilxTenfen Dec 18, 2024
8d324dd
chore: add check for rewards amounts
RafilxTenfen Dec 18, 2024
e9c8050
fix: lint and test
RafilxTenfen Dec 18, 2024
318993b
chore: set wallet name for delegations const
RafilxTenfen Dec 18, 2024
2087c8a
fix: covenant sigs from correct node
RafilxTenfen Dec 18, 2024
c9e8f8a
chore: correct usage of nodes
RafilxTenfen Dec 18, 2024
99acf6c
chore: add finality vote to another block
RafilxTenfen Dec 18, 2024
beffe5e
chore: add sort of node by name on creation
RafilxTenfen Dec 18, 2024
3c97ab1
tryfix: check rewards seccond time
RafilxTenfen Dec 18, 2024
955c498
tryfix: add fp voting every now and then
RafilxTenfen Dec 18, 2024
5cd7bd7
tryfix: add fp voting every block, fails due to acc sequence
RafilxTenfen Dec 18, 2024
f670bd5
chore: add accounts query and option to add sequence and account numb…
RafilxTenfen Dec 19, 2024
6dd660c
chore: remove from val duplicated
RafilxTenfen Dec 19, 2024
4e7ce29
tryfix: add specific address for finality providers
RafilxTenfen Dec 19, 2024
531b406
fix: e2e test with checking rewards
RafilxTenfen Dec 19, 2024
c58ecf0
chore: update comments
RafilxTenfen Dec 19, 2024
802c066
fix: test name
RafilxTenfen Dec 19, 2024
e666be6
chore: rollback to 3 fi sig timeout
RafilxTenfen Dec 19, 2024
f99d86e
fix: coins check
RafilxTenfen Dec 19, 2024
f5b8bfc
tryfix: reward check on withdraw
RafilxTenfen Dec 19, 2024
b993b7c
chore: simplify reward check
RafilxTenfen Dec 19, 2024
7ff75de
tryfix: reward withdraw check
RafilxTenfen Dec 19, 2024
21fc606
fix: lint remove unused struct
RafilxTenfen Dec 19, 2024
3810f90
tryfix: add more time for activation
RafilxTenfen Dec 19, 2024
951a24c
tryfix: change order, query first
RafilxTenfen Dec 19, 2024
46a5156
tryfix: moved to check withdraw after block and withdraw
RafilxTenfen Dec 19, 2024
c0417f0
chore: removed BTC del distribution info structure
RafilxTenfen Dec 19, 2024
4cbdad9
tryfix: moved reward gauge query
RafilxTenfen Dec 19, 2024
4e23a91
fix: add gas fee of tx withdraw into calculation of balance
RafilxTenfen Dec 19, 2024
47a822f
fix: parse of tx resp auth data
RafilxTenfen Dec 19, 2024
bf840dc
chore: fix oreder, query first than withdraw
RafilxTenfen Dec 19, 2024
e974b8b
fix: add fee amt to the expected amt
RafilxTenfen Dec 19, 2024
629daa5
fix: subtract the fee used in the expected amount of balance after wi…
RafilxTenfen Dec 19, 2024
33f1b7f
chore: reduce structures of btc delegation in maps to amount of satos…
RafilxTenfen Dec 19, 2024
050b191
chore: update TODOs
RafilxTenfen Dec 19, 2024
da1a0f2
chore: update TODOs
RafilxTenfen Dec 19, 2024
20c1c08
chore: add test for newly unbond and active BTC staking tx being proc…
RafilxTenfen Dec 19, 2024
5ed4b1c
chore: add check for status and expired delegations
RafilxTenfen Dec 19, 2024
a0dfc3b
chore: removed signed block window
RafilxTenfen Dec 19, 2024
59488eb
chore: reduced duplicated code and update comments
RafilxTenfen Dec 19, 2024
a2fede3
chore: move BTCDelegationRewardTracker to collections
RafilxTenfen Dec 19, 2024
c9fd718
chore: move FinalityProviderHistoricalRewards to collections
RafilxTenfen Dec 20, 2024
a01359f
chore: move FinalityProviderCurrentRewards to collections
RafilxTenfen Dec 20, 2024
35374f7
chore: moved AddFinalityVoteUntilCurrentHeight for after checks
RafilxTenfen Dec 20, 2024
8f83257
chore: address PR comments
RafilxTenfen Dec 20, 2024
9bb8d5f
chore: rename btc dels to sats
RafilxTenfen Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,28 @@ jobs:
run: |
make test-e2e-cache-btc-staking

e2e-run-btc-rewards:
needs: [e2e-docker-build-babylon]
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download babylon artifact
uses: actions/download-artifact@v4
with:
name: babylond-${{ github.sha }}
path: /tmp
- name: Docker load babylond
run: |
docker load < /tmp/docker-babylond.tar.gz
- name: Cache Go
uses: actions/setup-go@v5
with:
go-version: 1.23
- name: Run e2e TestBTCRewardsDistribution
run: |
make test-e2e-cache-btc-rewards

e2e-run-btc-staking-pre-approval:
needs: [e2e-docker-build-babylon]
runs-on: ubuntu-22.04
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### Improvements

- [#306](https://github.com/babylonlabs-io/babylon/pull/306) feat: improve BTC reward distribution with
virtual block periods for each finality provider that has delegations and reward tracker structures.
- [#338](https://github.com/babylonlabs-io/babylon/pull/338) Add print BIP-340 in
`debug pubkey-raw` subcommand
- [#316](https://github.com/babylonlabs-io/babylon/pull/316) Add testnet upgrade data
Expand Down Expand Up @@ -95,6 +97,7 @@ to relay on UnbondingTime in delegation
## v0.17.2

### Improvements

- [#311](https://github.com/babylonlabs-io/babylon/pull/311) Enforce version 2
for unbonding transactions

Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ test-e2e-cache-btc-timestamping-phase-2-rly:
test-e2e-cache-btc-staking:
go test -run TestBTCStakingTestSuite -mod=readonly -timeout=60m -v $(PACKAGES_E2E) --tags=e2e

test-e2e-cache-btc-rewards:
go test -run TestBTCRewardsDistribution -mod=readonly -timeout=60m -v $(PACKAGES_E2E) --tags=e2e

test-e2e-cache-btc-staking-pre-approval:
go test -run TestBTCStakingPreApprovalTestSuite -mod=readonly -timeout=60m -v $(PACKAGES_E2E) --tags=e2e

Expand Down
14 changes: 8 additions & 6 deletions proto/babylon/btcstaking/v1/btcstaking.proto
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ message BTCDelegatorDelegationIndex {

// BTCDelegationStatus is the status of a delegation.
// There are two possible valid state transition paths for a BTC delegation:
// - PENDING -> ACTIVE -> UNBONDED
// - PENDING -> VERIFIED -> ACTIVE -> UNBONDED
// - PENDING -> ACTIVE -> UNBONDED -> EXPIRED
// - PENDING -> VERIFIED -> ACTIVE -> UNBONDED/EXPIRED
RafilxTenfen marked this conversation as resolved.
Show resolved Hide resolved
// and one invalid state transition path:
// - PENDING -> VERIFIED -> UNBONDED i.e the staker unbonded before
// activating delegation on Babylon chain.
Expand All @@ -183,12 +183,14 @@ enum BTCDelegationStatus {
VERIFIED = 1;
// ACTIVE defines a delegation that has voting power
ACTIVE = 2;
// UNBONDED defines a delegation no longer has voting power:
// - either reaching the end of staking transaction timelock
// - or receiving unbonding tx with signatures from staker and covenant committee
// UNBONDED defines a delegation no longer has voting power
// by receiving unbonding tx with signatures from staker and covenant committee
UNBONDED = 3;
// EXPIRED defines a delegation no longer has voting power
// for reaching the end of staking transaction timelock
EXPIRED = 4;
// ANY is any of the above status
ANY = 4;
ANY = 5;
}

// SignatureInfo is a BIP-340 signature together with its signer's BIP-340 PK
Expand Down
21 changes: 3 additions & 18 deletions proto/babylon/finality/v1/finality.proto
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,16 @@ message FinalityProviderDistInfo {
];
// total_bonded_sat is the total amount of bonded BTC stake (in Satoshi) of the finality provider
uint64 total_bonded_sat = 4;
// btc_dels is a list of BTC delegations' voting power information under this finality provider
repeated BTCDelDistInfo btc_dels = 5;
// is_timestamped indicates whether the finality provider
// has timestamped public randomness committed
// if no, it should not be assigned voting power
bool is_timestamped = 6;
bool is_timestamped = 5;
// is_jailed indicates whether the finality provider
// is jailed, if so, it should not be assigned voting power
bool is_jailed = 7;
bool is_jailed = 6;
// is_slashed indicates whether the finality provider
// is slashed, if so, it should not be assigned voting power
bool is_slashed = 8;
}

// BTCDelDistInfo contains the information related to voting power distribution for a BTC delegation
message BTCDelDistInfo {
// btc_pk is the Bitcoin secp256k1 PK of this BTC delegation
// the PK follows encoding in BIP-340 spec
bytes btc_pk = 1 [ (gogoproto.customtype) = "github.com/babylonlabs-io/babylon/types.BIP340PubKey" ];
// staker_addr is the address to receive rewards from BTC delegation.
string staker_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// staking_tx_hash is the staking tx hash of the BTC delegation
string staking_tx_hash = 3;
// total_sat is the amount of BTC stake (in Satoshi) of the BTC delegation
uint64 total_sat = 4;
bool is_slashed = 7;
}

// IndexedBlock is the necessary metadata and finalization status of a block
Expand Down
76 changes: 76 additions & 0 deletions proto/babylon/incentive/rewards.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
syntax = "proto3";
package babylon.incentive;

import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos_proto/cosmos.proto";

option go_package = "github.com/babylonlabs-io/babylon/x/incentive/types";

// FinalityProviderHistoricalRewards represents the cumulative rewards ratio of the
// finality provider per sat in that period.
// The period is ommited here and should be part of the key used to store this structure.
// Key: Prefix + Finality provider bech32 address + Period.
message FinalityProviderHistoricalRewards {
// The cumulative rewards of that finality provider per sat until that period
// This coins will aways increase the value, never be reduced due to keep acumulation
// and when the cumulative rewards will be used to distribute rewards, 2 periods will
// be loaded, calculate the difference and multiplied by the total sat amount delegated
// https://github.com/cosmos/cosmos-sdk/blob/e76102f885b71fd6e1c1efb692052173c4b3c3a3/x/distribution/keeper/delegation.go#L47
repeated cosmos.base.v1beta1.Coin cumulative_rewards_per_sat = 1 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
// TODO(rafilx): add reference count for state prunning
// https://github.com/cosmos/cosmos-sdk/blob/d9c53bfefc1e75a3c6b09065ea8b3a836cda0d18/x/distribution/types/distribution.pb.go#L98
}

// FinalityProviderCurrentRewards represents the current rewards of the pool of
// BTC delegations that delegated for this finality provider is entitled to.
// Note: This rewards are for the BTC delegators that delegated to this FP
// the FP itself is not the owner or can withdraw this rewards.
// If a slash event happens with this finality provider, all the delegations need
// to withdraw to the RewardGauge and the related scrutures should be deleted.
// Key: Prefix + Finality provider bech32 address.
message FinalityProviderCurrentRewards {
// CurrentRewards is the current rewards that the finality provider have and it was not
// yet stored inside the FinalityProviderHistoricalRewards. Once something happens that
// modifies the amount of satoshis delegated to this finality provider or the delegators
// starting period (activation, unbonding or btc rewards withdraw)
// a new period must be created, accumulate this rewards to FinalityProviderHistoricalRewards
// with a new period and zero out the Current Rewards.
repeated cosmos.base.v1beta1.Coin current_rewards = 1 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
// Period stores the current period that serves as a reference for
// creating new historical rewards and correlate with BTCDelegationRewardsTracker
// StartPeriodCumulativeReward.
uint64 period = 2;
// TotalActiveSat is the total amount of active satoshi delegated
// to this finality provider.
bytes total_active_sat = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
}

// BTCDelegationRewardsTracker represents the structure that holds information
// from the last time this BTC delegator withdraw the rewards or modified his
// active staked amount to one finality provider.
// The finality provider address is ommitted here but should be part of the
// key used to store this structure together with the BTC delegator address.
message BTCDelegationRewardsTracker {
RafilxTenfen marked this conversation as resolved.
Show resolved Hide resolved
// StartPeriodCumulativeReward the starting period the the BTC delegator
// made his last withdraw of rewards or modified his active staking amount
// of satoshis.
uint64 start_period_cumulative_reward = 1;
// TotalActiveSat is the total amount of active satoshi delegated
// to one specific finality provider.
bytes total_active_sat = 2 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
}
4 changes: 2 additions & 2 deletions proto/babylon/incentive/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ message MsgWithdrawRewardResponse {
// MsgUpdateParams defines a message for updating incentive module parameters.
message MsgUpdateParams {
option (cosmos.msg.v1.signer) = "authority";

// authority is the address of the governance account.
// just FYI: cosmos.AddressString marks that this field should use type alias
// for AddressString instead of string, but the functionality is not yet implemented
// in cosmos-proto
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// params defines the incentive parameters to update.
//
// NOTE: All parameters must be supplied.
Expand Down
Loading