-
Notifications
You must be signed in to change notification settings - Fork 0
feat(avalanche): NETWORK_META + event_type labels for AVAX #28
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,15 +7,16 @@ export interface NetworkMeta { | |
| } | ||
|
|
||
| export const NETWORK_META: Record<NetworkSlug, NetworkMeta> = { | ||
| solana: { ticker: 'SOL', color: '#14F195', name: 'Solana' }, | ||
| ethereum: { ticker: 'ETH', color: '#849DFF', name: 'Ethereum' }, | ||
| cosmos: { ticker: 'ATOM', color: '#A5A7C4', name: 'Cosmos Hub' }, | ||
| sui: { ticker: 'SUI', color: '#4DA2FF', name: 'Sui' }, | ||
| polkadot: { ticker: 'DOT', color: '#E6007A', name: 'Polkadot' }, | ||
| celestia: { ticker: 'TIA', color: '#7B2BF9', name: 'Celestia' }, | ||
| solana: { ticker: 'SOL', color: '#14F195', name: 'Solana' }, | ||
| ethereum: { ticker: 'ETH', color: '#849DFF', name: 'Ethereum' }, | ||
| cosmos: { ticker: 'ATOM', color: '#A5A7C4', name: 'Cosmos Hub' }, | ||
| sui: { ticker: 'SUI', color: '#4DA2FF', name: 'Sui' }, | ||
| polkadot: { ticker: 'DOT', color: '#E6007A', name: 'Polkadot' }, | ||
| celestia: { ticker: 'TIA', color: '#7B2BF9', name: 'Celestia' }, | ||
| avalanche: { ticker: 'AVAX', color: '#E84142', name: 'Avalanche' }, | ||
| }; | ||
|
|
||
| export const NETWORK_ORDER: readonly NetworkSlug[] = ['solana', 'ethereum', 'cosmos', 'sui', 'polkadot', 'celestia']; | ||
| export const NETWORK_ORDER: readonly NetworkSlug[] = ['solana', 'ethereum', 'cosmos', 'sui', 'polkadot', 'celestia', 'avalanche']; | ||
|
|
||
| export const EVENT_TYPE_LABELS: Record<EventType, string> = { | ||
| delinquent: 'Went dark. Missed votes.', | ||
|
|
@@ -33,6 +34,7 @@ export const EVENT_TYPE_LABELS: Record<EventType, string> = { | |
| jito_opted_in: 'Opted back into Jito-Solana — delegators earn MEV tips again.', | ||
| tia_slashed_downtime: 'Offline too long on Celestia. Jailed.', | ||
| tia_slashed_double_sign: 'Signed conflicting blocks at the same height on Celestia. Tombstoned.', | ||
| avax_uptime_below_threshold: 'Uptime fell below the Avalanche reward threshold. Stakers earn nothing this period.', | ||
| }; | ||
|
|
||
| export const EVENT_TYPE_DESCRIPTIONS: Record<EventType, string> = { | ||
|
|
@@ -51,6 +53,7 @@ export const EVENT_TYPE_DESCRIPTIONS: Record<EventType, string> = { | |
| jito_opted_in: 'Validator resumed running jito-solana after a prior opt-out. MEV tip revenue flows to delegators again.', | ||
| tia_slashed_downtime: 'Validator missed too many blocks on Celestia and was jailed. Stake receives a minor slash; validator must manually unjail before they can rejoin consensus. Delegators earn no rewards while jailed.', | ||
| tia_slashed_double_sign: 'Validator signed two different blocks at the same height on Celestia. A slashing penalty is applied to all bonded stake — the validator\'s and all delegators\' proportionally. The validator is permanently tombstoned and cannot rejoin the active set.', | ||
| avax_uptime_below_threshold: 'Validator\'s uptime over its current validation period dropped below the threshold (Avalanche convention is 80%). Validators below the threshold at the end of the period forfeit ALL rewards — for themselves and their delegators — even if their stake remains untouched. Recovers if uptime climbs back above the threshold before the period ends.', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }; | ||
|
|
||
| export function getEventLabel(eventType: string, penaltyAmount: number | null, penaltyToken: string | null): string { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The addition of
avax_uptime_below_thresholdbreaks the vertical alignment of values in theEVENT_TYPE_LABELSobject. While the new entry follows the pattern of having at least one space after the colon, the existing entries are aligned to a shorter column (previously determined bytia_slashed_double_sign). To maintain the clean formatting style established in this file (and applied toNETWORK_METAin this same PR), you should consider re-aligning the entire block to the new longest key.