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

Sync prod with main #789

Merged
merged 59 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
5ec52e6
add withdrawals and deposits
marc-aurele-besner Jul 24, 2024
f5b8676
update migrations
marc-aurele-besner Jul 24, 2024
4b51d93
fix processBundleStoredEvent
marc-aurele-besner Jul 24, 2024
c7acf36
add stats logic
marc-aurele-besner Jul 24, 2024
e3094fe
update migration
marc-aurele-besner Jul 24, 2024
ad46384
fix and improve cleanliness of stats
marc-aurele-besner Jul 24, 2024
7d0a4af
Merge branch 'main' into 762-add-processing-logic-to-save-new-withdraw
marc-aurele-besner Jul 24, 2024
a4efee5
remove all counts
marc-aurele-besner Jul 27, 2024
724219e
add caching
marc-aurele-besner Jul 27, 2024
7df0342
change processing to use batching and caching
marc-aurele-besner Jul 27, 2024
78a8a19
add accounts and improve logic
marc-aurele-besner Jul 27, 2024
ed49420
improve logic
marc-aurele-besner Jul 27, 2024
25ae67f
bump to v3
marc-aurele-besner Jul 27, 2024
85dffe9
change operator id scheme
marc-aurele-besner Jul 28, 2024
4b35d42
save deposit and nominator
marc-aurele-besner Jul 28, 2024
d81e018
fix logic error
marc-aurele-besner Jul 28, 2024
6e4d4e2
remove disconnect due to the error it throw
marc-aurele-besner Jul 28, 2024
25d4650
fix some small bugs
marc-aurele-besner Jul 28, 2024
d23dc53
v8
marc-aurele-besner Jul 29, 2024
3d490b0
remove bundle event since I assume it generate a lot of events
marc-aurele-besner Jul 30, 2024
b756a27
remove the double relations
marc-aurele-besner Jul 30, 2024
7f3e6a0
add dedicated ressources and hasura
marc-aurele-besner Jul 30, 2024
daa1c13
change indexer name for testing
marc-aurele-besner Jul 30, 2024
5316ab4
increase processor profile size
marc-aurele-besner Jul 31, 2024
fa9d223
add console and comment buggy relation
marc-aurele-besner Jul 31, 2024
630c79a
remove the -v2
marc-aurele-besner Jul 31, 2024
bf2e1dc
remove relation and count
marc-aurele-besner Jul 31, 2024
740e1e3
fix statsPerOperator and statsPerDomain
marc-aurele-besner Jul 31, 2024
86aa84e
fix pollution from failed extrinsics
marc-aurele-besner Jul 31, 2024
34f40af
keep changing more subspace.network -> autonomys.xyz as we keep movin…
marc-aurele-besner Jul 31, 2024
3110c5a
change autonomys.net -> .xyz
marc-aurele-besner Jul 31, 2024
f235c90
Merge branch 'main' into 762-add-processing-logic-to-save-new-withdraw
marc-aurele-besner Jul 31, 2024
4e1e690
fix bad logic skipping some events&extrinsics
marc-aurele-besner Aug 1, 2024
cf5ec64
fix bad logic looking for params that don't exist
marc-aurele-besner Aug 1, 2024
09ce23f
bump version
marc-aurele-besner Aug 1, 2024
98edae6
fix processWithdrewStakeEvent shares parsing
marc-aurele-besner Aug 1, 2024
b6a97dd
update auto-sdk to 0.2.0 in staking squid
marc-aurele-besner Aug 1, 2024
5be2d6b
change to v1
marc-aurele-besner Aug 1, 2024
f126eb3
fix rpc data following domains states changes
marc-aurele-besner Aug 1, 2024
24bfd9b
Merge pull request #787 from autonomys/bug/fixRpcData
marc-aurele-besner Aug 1, 2024
9dec48b
improve performance
marc-aurele-besner Aug 1, 2024
1c5cd52
scale postgres
marc-aurele-besner Aug 2, 2024
63bb467
use createConnection for api instead
marc-aurele-besner Aug 2, 2024
d60c608
change StatusIcon for fail status to be a red X
marc-aurele-besner Aug 2, 2024
3028b2c
keep pending extrinsic with the orange clock
marc-aurele-besner Aug 2, 2024
9175459
fix pending logic
marc-aurele-besner Aug 2, 2024
80eece1
fix misspelled
marc-aurele-besner Aug 2, 2024
55c48d0
Merge branch 'main' into feat/changeSomeMoreSubspaceLinks
marc-aurele-besner Aug 2, 2024
c3e70c1
Merge pull request #785 from autonomys/feat/changeSomeMoreSubspaceLinks
marc-aurele-besner Aug 2, 2024
d70b71a
process bundle and op rewards
marc-aurele-besner Aug 2, 2024
07f7c1e
simplify loop logic
marc-aurele-besner Aug 2, 2024
fa22cc8
switch op status if unlock ready
marc-aurele-besner Aug 2, 2024
bd24a2e
fix missing default values
marc-aurele-besner Aug 2, 2024
d1b5a08
switch pending state on epoch change
marc-aurele-besner Aug 2, 2024
d8950ec
enable bundle and reward event and bump version
marc-aurele-besner Aug 2, 2024
19b0cc6
Merge branch 'main' into feat/changeTxIconStatus
marc-aurele-besner Aug 2, 2024
c76405a
Merge pull request #788 from autonomys/feat/changeTxIconStatus
marc-aurele-besner Aug 2, 2024
e00b303
Merge branch 'main' into 762-add-processing-logic-to-save-new-withdraw
marc-aurele-besner Aug 2, 2024
e8a6164
Merge pull request #768 from autonomys/762-add-processing-logic-to-sa…
marc-aurele-besner Aug 2, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Astral

- [Astral Block Explorer](https://explorer.subspace.network/) Astral Block Explorer
- [Astral Block Explorer](https://explorer.autonomys.xyz/) Astral Block Explorer
- [Astral Subsquid Playground](https://squid.gemini-3g.subspace.network/graphql) Astral Subspace SubSquid
- [Health Check](https://uptime.subspace.network/status/network) Subspace Network Status Page

Expand Down
2 changes: 1 addition & 1 deletion explorer/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const nextConfig = {
remotePatterns: [
{
protocol: 'https',
hostname: 'docs.subspace.network',
hostname: 'docs.autonomys.xyz',
port: '',
pathname: '**',
},
Expand Down
4 changes: 1 addition & 3 deletions explorer/src/components/Farming/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export const DownloadPage: FC = () => {
alt='Space Acres Screenshot Installation'
width={800}
height={400}
src='https://docs.subspace.network/assets/images/space-acres-setup-7-3490cba2e75635efdea0006d06da9936.png'
src='https://docs.autonomys.xyz/assets/images/space-acres-setup-7-3490cba2e75635efdea0006d06da9936.png'
className='mx-auto'
/>
</div>
Expand All @@ -198,8 +198,6 @@ export const DownloadPage: FC = () => {
By contributing storage and compute to the network, you play a crucial role in securing
it, while also earning rewards.
</h3>


</div>

<div className='mb-4 w-full rounded-[20px] border border-slate-100 bg-white px-3 py-4 shadow dark:border-none dark:bg-gradient-to-r dark:from-gradientTwilight dark:via-gradientDusk dark:to-gradientSunset sm:p-6'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ export const PendingTransactions: FC<PendingTransactionsProps> = ({
</span>
</div>
<div className='m-2 p-2'>
<StatusIcon status={tx.status !== TransactionStatus.Pending} />
<StatusIcon
status={tx.status === TransactionStatus.Success}
isPending={tx.status === TransactionStatus.Pending}
/>
</div>
<div className='m-2 p-2'>
<TrashIcon className='size-5' stroke='red' onClick={() => handleRemove(tx)} />
Expand Down
8 changes: 5 additions & 3 deletions explorer/src/components/common/StatusIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { CheckCircleIcon, ClockIcon } from '@heroicons/react/24/outline'
import { CheckCircleIcon, ClockIcon, XCircleIcon } from '@heroicons/react/24/outline'
import { FC } from 'react'

type Props = {
status: boolean
isPending?: boolean
}

export const StatusIcon: FC<Props> = ({ status }) => {
export const StatusIcon: FC<Props> = ({ status, isPending }) => {
if (isPending) return <ClockIcon className='size-5' stroke='orange' />
return status ? (
<CheckCircleIcon className='size-5' stroke='#37D058' />
) : (
<ClockIcon className='size-5' stroke='orange' />
<XCircleIcon className='size-5' stroke='#D70040' />
)
}
2 changes: 1 addition & 1 deletion explorer/src/constants/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const organization = 'Subspace Labs'
const description = 'Subspace Labs Gemini Block Explorer'
const keywords =
'Subspace, Subspace Network, Subspace Explorer, Subspace Labs, Subspace Labs Gemini, Subspace Labs Gemini Block Explorer'
export const url = process.env.NEXTAUTH_URL || 'https://explorer.subspace.network'
export const url = process.env.NEXTAUTH_URL || 'https://explorer.autonomys.xyz'
const twitter = '@SubspaceLabs'
const images = {
url: url + '/images/share.png',
Expand Down
4 changes: 2 additions & 2 deletions explorer/src/constants/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ export const EXTERNAL_ROUTES = {
forum: 'https://forum.autonomys.xyz/',
gemini2guide:
'https://forum.autonomys.xyz/t/how-to-check-your-balance-for-gemini-ii-incentivized-testnet/1081',
docs: 'https://docs.subspace.network/',
docs: 'https://docs.autonomys.xyz/',
operatorDocs:
'https://docs.subspace.network/docs/farming-&-staking/staking/operators/register-operator',
'https://docs.autonomys.xyz/docs/farming-&-staking/staking/operators/register-operator',
social: {
twitter: 'https://x.com/AutonomysNet',
discord: 'https://discord.gg/subspace-network',
Expand Down
15 changes: 8 additions & 7 deletions explorer/src/hooks/useConsensusData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import useWallet from 'hooks/useWallet'
import { useCallback } from 'react'
import { useConsensusStates } from 'states/consensus'
import {
ConfirmedDomainBlock,
ConfirmedDomainExecutionReceipt,
DomainRegistry,
DomainStakingSummary,
PendingStakingOperationCount,
Expand All @@ -17,7 +17,7 @@ export const useConsensusData = () => {
setSystem,
setDomainRegistry,
setDomainStakingSummary,
setLatestConfirmedDomainBlock,
setLatestConfirmedDomainExecutionReceipt,
setNominatorCount,
setOperatorIdOwner,
setOperators,
Expand All @@ -41,7 +41,7 @@ export const useConsensusData = () => {
// domains
domainRegistry,
domainStakingSummary,
latestConfirmedDomainBlock,
latestConfirmedDomainExecutionReceipt,
nominatorCount,
operatorIdOwner,
operators,
Expand All @@ -53,9 +53,10 @@ export const useConsensusData = () => {
// system
api.rpc.system.chain(),
api.rpc.system.name(),
// domains
api.query.domains.domainRegistry.entries(),
api.query.domains.domainStakingSummary.entries(),
api.query.domains.latestConfirmedDomainBlock.entries(),
api.query.domains.latestConfirmedDomainExecutionReceipt.entries(),
api.query.domains.nominatorCount.entries(),
api.query.domains.operatorIdOwner.entries(),
api.query.domains.operators.entries(),
Expand Down Expand Up @@ -106,10 +107,10 @@ export const useConsensusData = () => {
setDomainStakingSummary(
domainStakingSummary.map((domain) => domain[1].toJSON() as DomainStakingSummary),
)
setLatestConfirmedDomainBlock(
latestConfirmedDomainBlock.map((domainBlock) => ({
setLatestConfirmedDomainExecutionReceipt(
latestConfirmedDomainExecutionReceipt.map((domainBlock) => ({
id: parseInt((domainBlock[0].toHuman() as string[])[0]),
...(domainBlock[1].toJSON() as Omit<ConfirmedDomainBlock, 'id'>),
...(domainBlock[1].toJSON() as Omit<ConfirmedDomainExecutionReceipt, 'id'>),
})),
)
setNominatorCount(
Expand Down
14 changes: 8 additions & 6 deletions explorer/src/states/consensus.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Deposit, Withdrawal } from '@autonomys/auto-consensus'
import {
ConfirmedDomainBlock,
ConfirmedDomainExecutionReceipt,
Domain,
DomainRegistry,
DomainStakingSummary,
Expand Down Expand Up @@ -28,7 +28,7 @@ export interface ConsensusDefaultState {
// domains
domainRegistry: DomainRegistry[]
domainStakingSummary: DomainStakingSummary[]
latestConfirmedDomainBlock: ConfirmedDomainBlock[]
latestConfirmedDomainExecutionReceipt: ConfirmedDomainExecutionReceipt[]
// latestSubmittedER: LatestSubmittedER[]
nominatorCount: NominatorCount[]
operatorIdOwner: OperatorIdOwner[]
Expand All @@ -51,7 +51,9 @@ interface ConsensusState extends ConsensusDefaultState {
setSystem: (params: { chain: string; name: string }) => void
setDomainRegistry: (domainRegistry: DomainRegistry[]) => void
setDomainStakingSummary: (domainStakingSummary: DomainStakingSummary[]) => void
setLatestConfirmedDomainBlock: (latestConfirmedDomainBlock: ConfirmedDomainBlock[]) => void
setLatestConfirmedDomainExecutionReceipt: (
latestConfirmedDomainExecutionReceipt: ConfirmedDomainExecutionReceipt[],
) => void
setNominatorCount: (nominatorCount: NominatorCount[]) => void
setOperatorIdOwner: (operatorIdOwner: OperatorIdOwner[]) => void
setOperators: (operators: Operators[]) => void
Expand All @@ -77,7 +79,7 @@ const initialState: ConsensusDefaultState = {
// domains
domainRegistry: [],
domainStakingSummary: [],
latestConfirmedDomainBlock: [],
latestConfirmedDomainExecutionReceipt: [],
// latestSubmittedER: [],
nominatorCount: [],
operatorIdOwner: [],
Expand All @@ -104,8 +106,8 @@ export const useConsensusStates = create<ConsensusState>()(
setSystem: (params) => set(() => ({ chain: params.chain, name: params.name })),
setDomainRegistry: (domainRegistry) => set(() => ({ domainRegistry })),
setDomainStakingSummary: (domainStakingSummary) => set(() => ({ domainStakingSummary })),
setLatestConfirmedDomainBlock: (latestConfirmedDomainBlock) =>
set(() => ({ latestConfirmedDomainBlock })),
setLatestConfirmedDomainExecutionReceipt: (latestConfirmedDomainExecutionReceipt) =>
set(() => ({ latestConfirmedDomainExecutionReceipt })),
setNominatorCount: (nominatorCount) => set(() => ({ nominatorCount })),
setOperatorIdOwner: (operatorIdOwner) => set(() => ({ operatorIdOwner })),
setOperators: (operators) => set(() => ({ operators })),
Expand Down
8 changes: 2 additions & 6 deletions explorer/src/types/consensus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,9 @@ export type DomainStakingSummary = {
}
}

export type ConfirmedDomainBlock = {
export type ConfirmedDomainExecutionReceipt = {
id: number
blockNumber: number
blockHash: string
parentBlockReceiptHash: string
stateRoot: string
extrinsicsRoot: string
domainBlockNumber: number
}

export type NominatorCount = {
Expand Down
2 changes: 1 addition & 1 deletion explorer/src/utils/auth/providers/nova.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const Nova = () => {

const verifyParams: VerifyParams = {
signature,
domain: 'subspace.network',
domain: 'autonomys.xyz',
nonce: await getCsrfToken({ req }),
}

Expand Down
2 changes: 1 addition & 1 deletion indexers/staking-squid/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Staking squid

Our Staking Indexer using [Squid](https://subsquid.io).
It is in use at [Astral - Staking](https://explorer.subspace.network/gemini-3h/staking) Autonomus Explorer, Staking section.
It is in use at [Astral - Staking](https://explorer.autonomys.xyz/gemini-3h/staking) Autonomys Explorer, Staking section.

## Summary

Expand Down
Loading
Loading