-
Notifications
You must be signed in to change notification settings - Fork 38
Add validator_weight and delegation_fee to P-Chain staking operation metadata #249
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
Add validator_weight and delegation_fee to P-Chain staking operation metadata #249
Conversation
rajranjan0608
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Updated .golangci.yml to be compatible with golangci-lint v1.62+: - Removed deprecated skip-dirs-use-default field - Updated forbidigo config to use new structured format (p/msg) - Changed exclude_godoc_examples to exclude-godoc-examples (hyphenated) This fixes the CI linting failures without changing any linting rules.
|
@rajranjan0608 sorry, I missed updating the construction_test.go in my initial pass. I've also updated the golangci-lint config for v1.62+ compatibility by removing the deprecated |
|
Note on linting failures: The lint check is now properly running (thanks to the The files modified in this PR ( Happy to fix those in this PR if helpful, or they could be addressed separately. |
|
@rajranjan0608 Update: I can now reproduce the typecheck errors locally with golangci-lint v1.62.2. After investigation, I've confirmed these are pre-existing issues on The files modified in this PR ( Happy to rebase on #250 once it's merged, or merge this as-is if that works better for your workflow! |
Signed-off-by: Raj Ranjan <rranjan01234@gmail.com>
What /Why
This PR adds two new metadata fields to P-Chain staking operations to enable historical tracking of validator/delegator stake amounts and commission rates.
Changes
Added two new optional metadata fields to P-Chain staking operations:
validator_weight- The staked amount in nAVAX (1 AVAX = 1,000,000,000 nAVAX)-- Exposed on:
ADD_VALIDATOR,ADD_PERMISSIONLESS_VALIDATOR,ADD_DELEGATOR,ADD_PERMISSIONLESS_DELEGATOR,REWARD_VALIDATOR-- Type:
uint64-- Source:
validator.Weight()/delegator.Weight()delegation_fee- The validator's commission rate (parts per million)-- Exposed on:
ADD_VALIDATOR,ADD_PERMISSIONLESS_VALIDATOR,REWARD_VALIDATOR-- Type:
uint32-- Source:
DelegationSharesfield from validator transactions-- Format: Parts per million (e.g.,
20000= 2%,50000= 5%)-- Only included for validator operations (not delegator operations)