Skip to content

Commit

Permalink
fix: improve account and validator details page loading speed [web-de…
Browse files Browse the repository at this point in the history
…smos] (#1322)

## Description

Closes: #XXXX
[BDU-1158](https://forbole.atlassian.net/browse/BDU-1158)

<!-- Add a description of the changes that this PR introduces and the
files that
are the most critical to review. -->

---

### Author Checklist

_All items are required. Please add a note to the item if the item is
not applicable and
please add links to any relevant follow up issues._

I have...

- [x] ran linting via `yarn lint`
- [x] wrote tests where necessary
- [x] included the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [x] targeted the correct branch
- [x] provided a link to the relevant issue or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed
- [x] added a changeset via [`yarn && yarn
changeset`](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)


[BDU-1158]:
https://forbole.atlassian.net/browse/BDU-1158?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
  • Loading branch information
MonikaCat authored Jan 31, 2024
1 parent 229218c commit 10bfd25
Show file tree
Hide file tree
Showing 117 changed files with 17,696 additions and 14,084 deletions.
36 changes: 36 additions & 0 deletions .changeset/two-fireants-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
'web-assetmantle': major
'web-persistence': major
'web-quicksilver': major
'web-provenance': major
'web-crescent': major
'web-humansai': major
'web-likecoin': major
'web-wormhole': major
'web-archway': major
'web-bitsong': major
'web-gitopia': major
'web-osmosis': major
'web-agoric': major
'web-comdex': major
'web-coreum': major
'web-cosmos': major
'web-desmos': major
'web-emoney': major
'web-jackal': major
'web-quasar': major
'web-stride': major
'web-akash': major
'web-cheqd': major
'web-evmos': major
'web-nomic': major
'web-regen': major
'web-rizon': major
'web-band': major
'web-kyve': major
'web-nym': major
'ui': major
'web': major
---

improve account and validator details page loading speed
69 changes: 62 additions & 7 deletions apps/web-agoric/src/graphql/general/validator_details.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) {
}
}

query ValidatorDetails($address: String) {
stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) {
height
bonded: bonded_tokens
}
query ValidatorDescription($address: String) {
validator(where: {validator_info: {operator_address: {_eq: $address}}}) {
validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) {
details
website
}
}
}

query ValidatorStatuses($address: String) {
validator(where: {validator_info: {operator_address: {_eq: $address}}}) {
validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) {
status
jailed
height
}
}
slashingParams: slashing_params(order_by: {height: desc}, limit: 1) {
params
}
}

query ValidatorSigningInfos($address: String) {
validator(where: {validator_info: {operator_address: {_eq: $address}}}) {
validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) {
missedBlocksCounter: missed_blocks_counter
tombstoned
}
}
}

query ValidatorInfo($address: String) {
validator(where: {validator_info: {operator_address: {_eq: $address}}}) {
validatorInfo: validator_info {
operatorAddress: operator_address
selfDelegateAddress: self_delegate_address
maxRate: max_rate
}
validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) {
details
website
}
validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) {
status
jailed
height
}
validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) {
missedBlocksCounter: missed_blocks_counter
tombstoned
}
validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) {
commission
}
}
slashingParams: slashing_params(order_by: {height: desc}, limit: 1) {
params
}
}

query ValidatorCommission($address: String) {
validator(where: {validator_info: {operator_address: {_eq: $address}}}) {
validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) {
commission
}
}
}

query ValidatorVotingPowers($address: String) {
validator(where: {validator_info: {operator_address: {_eq: $address}}}) {
validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) {
height
votingPower: voting_power
}
validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) {
status
}
}
slashingParams: slashing_params(order_by: {height: desc}, limit: 1) {
params
stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) {
height
bonded: bonded_tokens
}
}

query ValidatorAddress($address: String) {
validator(where: {validator_info: {operator_address: {_eq: $address}}}) {
validatorInfo: validator_info {
operatorAddress: operator_address
selfDelegateAddress: self_delegate_address
}
}
}
Loading

0 comments on commit 10bfd25

Please sign in to comment.