-
Notifications
You must be signed in to change notification settings - Fork 16
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
Design mosaic config #44
Comments
Think of multiple solutions and explain which ones you were thinking of and why you chose the chosen one. Possibly think about maps in solidity to have an extendable on-chain configuration. |
While designing config, the following use cases are considered.
Details
|
Proposal 2 Slightly different from proposal 1.
|
Nice thoughts! 🙌
Is this really true for mosaic users or would this be more appropriate for validators, market makers, and the likes. Anyways I think this is valuable information 👍
Should we really add the genesis to the config? We could, it doesn't have to be human readable 🤔 The bootnodes definitely help and don't need to go in a separate file 👍
Yeah, this is an important, difficult part... JSON comments:
Anchor, its organization, gateway libraries, and the OST gateway address would be different per auxiliary chain on the same origin chain. These fields should probably move to the auxiliary part 🤔
I like this proposal, because I can access a chain config for a known chain id without iterating over all auxiliary chains to find the one with my id. |
I have update the description, thanks 👍
We could keep genesis into a separate file. What is a good way of referencing genesis file into mosaic-config? As we know, it requires both bootnode and genesis to connect to a node.
True 👍
There can be more than 1 boot nodes that we may want to publish. 🤔 |
Draft 2Proposal 1
Proposal 2
|
Right, it would be a comma-separated list of bootnodes. |
Nice 🐨
LGTM 👍
Do we need to repeat this here? We could for convenience, however it could also lead to potential mismatches/errors...
Maybe a string (see above).
Addresses LGTM 👍
Ideas so far?
|
Maybe it helps to have a look at the ZeppelinOS configuration files as well: https://docs.zeppelinos.org/docs/configuration.html |
Sure, we can remove it 👍
For a good JSON structure , collection should be represented as array instead of string, right?
Unlock secret will be known after first stake and mint. Any bad actor can use this to steal bounty or reward for any next stake and mint.
|
See also new OpenST/facilitator#1 which could be the first consumer of this!
Yes, you are right 👍 Can be transformed when needed, depending on the context.
True for the "free facilitation". However, reward would be zero. So the bad actor would only steal the bounty, but do all the work. I can't tell right now if this is a real problem. How high do we expect the bounties to be in practice? Higher than the cost of facilitation?
True, can you please add your thoughts to OpenST/facilitator#1 so we can discuss there? I think it's out-of-scope for this ticket how the facilitation will be done. Maybe an abstract config that allows for all scenarios would be providing an address where to stake to and an optional hash lock secret (optional in the config)? 🤔 On another note, do you know JSON Schema? We should probably define the config in JSON Schema. What do you think? |
Yes, make sense 👍 |
I was wrong about the zero reward. @benjaminbollen noted that the initial stake should also carry a reward. |
@benjaminbollen Did you get chance to look into this? |
Draft 2, Proposal 2 looks fine to go ahead. Few comments:
|
Based on all the discussion, here is the final version.
JSON schema for above config
|
Good. Did we discuss where/how to store the config? We need one config per origin chain in this model. Or we support multiple origin chains in a single config. |
We can keep this config in the repository for now. It can be exposed in NPM package.
Single config per origin chain. |
Yes, but where? Or is that up to the implementer?
Just to be sure: one config per origin and not a single config for all chains. Right? |
Also regarding the where: how is it named? Basically: how to access based on knowing the origin? |
I also feel it can be exposed via npm package. Then it will matter less how we keep in the repository. Maybe a folder named I roughly imagine it being exposed like this but implementer can also come up with better design if needed.
What do you think? |
We can discuss this on call. I am not sure if I have understood your question correctly.
Yes, one config per origin.
@schemar, how you are imagining this? @sarvesh-ost has commented above, what do you think? |
LGTM 🐺 |
Mosaic configurations store data about mosaic chains: chain ids, contract addresses, etc.
The mosaic chains repository handles mosaic configs and writes the first mosaic config of a newly created auxiliary chain.
The layout of the mosaic configuration must be thought out well. It will be distributed to others to run and connect to mosaic chains.
ℹ️ Keep in mind that this configuration should later be registered in a smart contract on-chain.
Context
This is a research issue to find out what the configuration should look like.
Background:
Mosaic chains configurations should be separate from OpenST (or BrandedToken) configurations. Generally, they should be separate files and OpenST (and BrandedToken) should reference the Mosaic config where applicable.
This ticket is only about the mosaic config and not about any other configs like OpenST.
The text was updated successfully, but these errors were encountered: