Skip to main content

base-v1.10.0 to base-v2.0.0

danger

This major release is only compatible with bdjuno v2.0.0+

Changes

As a network continues to grow we have noticed major lags in bdjuno and the database growing unncessarily big. Since the release of bdjuno v2.0.0, they have introduced hasura actions in which they offloaded certain data to the node directly as opposed to keeping it in psql. Doing this has broken some unique UI we may have but it has strongly improved bdjuno's indexing performance.

As of base-v2.0.0, we have updated our graphql to use the necessary hasura actions.

Other changes include:

  • Add better handling of get denom return types (#735)
  • Updated market cap display (#698)
  • Optimised validator details and account details to prevent random polling behavior (#703)
  • Add hasura actions error handling in account details (#713)
  • Display accounts even if balance is 0 and does not exist (#692)
  • Update handling of 18 decimal places denoms (#724)
  • Changed NEXT_PUBLIC_WS_CHAIN_URL to NEXT_PUBLIC_RPC_WEBSOCKET for clarification with backwards compatibility
  • Changed NEXT_PUBLIC_CHAIN_STATUS to NEXT_PUBLIC_CHAIN_TYPE for clarification with backwards compatibility
  • Fixed Apr error if bonded tokens is 0 (#758)

You may read the release changelog here

Update BDJuno to v2.0.0

Follow the docs and setup hasura action and update the hasura metadata

Update your chain's base branch

$ git fetch --tags
$ git checkout <your chain base>
$ git checkout -b merge/v2.0.0
$ git merge base-v2.0.0
info

If src/graphql/types.tsx has merge conflicts, delete the file and edit codegen.yml to your graphql url and run npm run graphql:codegen, this will correctly regenerate the types file based on your hasura, and throw error if the hasura was not setup correctly.

overwrite: true
config:
# omitOperationSuffix: true
skipTypeNameForRoot: true
generates:
./src/graphql/types.tsx:
documents:
- './src/**/*.graphql'
- './src/**/*_actions.ts'
- '!./src/**/desmos_profile.graphql'
schema: <your graphql url>
plugins:
- "typescript"
- "typescript-operations"
- "typescript-react-apollo" # To generate custom hooks per query
./src/graphql/desmos_profile.ts:
schema: https://gql.mainnet.desmos.network/v1/graphql
documents:
- 'src/graphql/desmos_profile_graphql.ts'
plugins:
- "typescript"
- "typescript-operations"

Test the upgrade worked

You can test the new changes by going to any validator or account details page. The balance and staking information should now be returned directly from the node, showing live data as oppose to the previous delay.