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

Create single config.json for both relayers and UI app #130

Open
isSerge opened this issue May 26, 2022 · 7 comments
Open

Create single config.json for both relayers and UI app #130

isSerge opened this issue May 26, 2022 · 7 comments
Assignees

Comments

@isSerge
Copy link
Contributor

isSerge commented May 26, 2022

Currently, we have three configs:

  • config.json for Kusama and parachains
  • config.json for Polkadot and parachains
  • The UI app config in config/AvailableParachain.ts

Problems:

  • Every time we add a new parachain we have to manually update two of these
  • Due to feed ownership we have to maintain feedId sequence within each config.json. Otherwise, one account will create a feed with a different feedId and won't be able to submit blocks in the original feed

Possible solution: create a single config.json that will have all chains and be used by both relayers and the UI app. This way we only need to do updates in one place. Feeds creation script can be updated to create all feeds in one go (no need to manually update feedId for each chain every time we deploy a new relaynet)

@isSerge isSerge self-assigned this May 26, 2022
@nazar-pc
Copy link
Member

This only works if everything is run by the same entity (us). As long as UI needs to show feeds submitted by someone else (ideally there would be per-feed keypair that isn't derived from the same seed) this approach will stop working.

@isSerge
Copy link
Contributor Author

isSerge commented May 26, 2022

UI requires one entity anyway - someone has to add chain logo and other data to config

@nazar-pc
Copy link
Member

I mean we have Polkadot.js apps as an example where it is technically controlled by Parity, but it doesn't mean that they also controls all the RPC endpoints of all chains in there.

I guess it boils down to how generic and decoupled we want frontend and backend to be.

@isSerge
Copy link
Contributor Author

isSerge commented May 26, 2022

It can work the same way: anybody can create a feed and submit data, but in order to be displayed on relayer UI - one has to submit PR

@nazar-pc
Copy link
Member

Right, but if the config is one for everything, how would that work?

@isSerge
Copy link
Contributor Author

isSerge commented May 26, 2022

We can start with one config, in case we have independent feeds, we can create a separate config for UI only, which can be updated separately and also generated by script based on the changes in the relayer config. Currently I just want to minimize manual work to update configs and reduce possible errors

@nazar-pc
Copy link
Member

I don't have strong opinion here, feel free to send a PR to show how it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants