ghost-portal/packages/apps-config
RadiumBlock fec242c298
Update productionRelayPolkadot.ts (#9501)
Addressing https://github.com/polkadot-js/apps/issues/9480

We have switched to using the relay chain as external RPC rather than running a relay chain RPC along with asset chains - to take advantage of a feature in cumulus binary. We are having mixed success with this. Its particularly worse since the relay chain block constantly lags beyond what is usually considered acceptable (>10 blocks) ever since v0.39. We struggle with > v0.39 for validators too. We are seriously considering downgrading back to v0.39 rather than following the convention of using the latest binary. 
What makes this hard is that the timeouts and block delays are infrequent and only a service restart seems to fix it. We will revert the external RPC to make sure that is not adding on to the timeout. We request our RPC to be added back. 

Meanwhile any advice on the matter of binary version is much appreciated.
2023-05-25 17:20:05 +03:00
..
src Update productionRelayPolkadot.ts (#9501) 2023-05-25 17:20:05 +03:00
package.json [CI Skip] bump/beta 0.131.5-3-x 2023-05-25 08:20:42 +00:00
README.md Add ui: { color, logo } struct to endpoints (#8963) 2023-02-06 19:56:03 +02:00
tsconfig.build.json Switch on tsconfig composite (#9465) 2023-05-19 15:11:59 +03:00
tsconfig.spec.json Switch on tsconfig composite (#9465) 2023-05-19 15:11:59 +03:00

@polkadot/apps-config

General config for various services, including settings, external links & types. This is a central source of all the configuration settings that can be tweaked. This also means that it can be customized (via PR) to support any additional chains. The internals are split into a number of settings -

  • api - Here you can add any chain or node-type specific types configuration. When added, it means that when the UI connects to either a runtime with a spec name, or a chain with a specific name, the types will be automatically added to the API as used in the app.
  • endpoints - Configuration for specific per-type chain endpoints.

Customization for each of these are discussed next.

Api

The API config can be done in one of two ways -

  • chain - Here we are mapping to a specific chain name. Generally the next type would be preferred, however if you are supporting multiple chains with individual configs, you would probably want to add the chain-specific information in here.
  • spec - Here we are mapping from the runtime spec name of the chain to specific types. This means that when connected to a specific spec, these types will be injected.

The actual type definitions you should be familiar with, it is exactly the same as you would upload via the settings page in JSON, or as detailed in the API types pages.

Endpoints

  1. Add your chain logo (if available) to either ui/logos/chains or ui/logos/nodes (the second is generally used)
  2. Run the image build command to generate an inline version via yarn build:images
  3. Add your chain to endpoints/{production, productionRelay, testing, testingRelay*} as applicable for your deployment
  4. The ui.color specifies the chain color, the ui.logo (importted from generated), specifies the specific logo