Skip to content

Commit

Permalink
nit: add warning of ping api issues (#401)
Browse files Browse the repository at this point in the history
- The network is humming and seeing 0 to 1 slot latency for tx inclusion
but there is an issue with statistic reporting. Adding disclaimer until
the issue is resolved

---------

Co-authored-by: Noah Gundotra <[email protected]>
  • Loading branch information
pkxro and ngundotra authored Nov 10, 2024
1 parent c10c8ff commit 58019ed
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
18 changes: 17 additions & 1 deletion app/components/LiveTransactionStatsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,19 @@ export function LiveTransactionStatsCard() {
<div className="card-header">
<h4 className="card-header-title">Live Transaction Stats</h4>
</div>

<TpsCardBody series={series} setSeries={setSeries} />
<div className="alert alert-warning m-2" role="alert">
Note: We are aware of an issue with ping statistic reporting. Ping statistics may not reflect actual
network performance. Please see{' '}
<a
href="https://www.validators.app/ping-thing?locale=en&network=mainnet"
className="text-white text-decoration-underline"
>
validators.app
</a>{' '}
for more information.
</div>
<PingStatsCardBody series={series} setSeries={setSeries} />
</div>
);
Expand Down Expand Up @@ -273,7 +285,11 @@ function PingStatsCardBody({ series, setSeries }: { series: Series; setSeries: S
return <PingStatsNotReady error={pingInfo.status === PingStatus.Error} retry={pingInfo.retry} />;
}

return <PingBarChart pingInfo={pingInfo} series={series} setSeries={setSeries} />;
return (
<>
<PingBarChart pingInfo={pingInfo} series={series} setSeries={setSeries} />
</>
);
}

type StatsNotReadyProps = { error: boolean; retry?: () => void };
Expand Down
5 changes: 4 additions & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ function StakingComponent() {

const activeStake = React.useMemo(() => {
if (voteAccounts && delinquentStake) {
return voteAccounts.current.reduce((prev, current) => prev + current.activatedStake, BigInt(0)) + delinquentStake;
return (
voteAccounts.current.reduce((prev, current) => prev + current.activatedStake, BigInt(0)) +
delinquentStake
);
}
}, [voteAccounts, delinquentStake]);

Expand Down

0 comments on commit 58019ed

Please sign in to comment.