Sovereign-Labs / sovereign-sdk

A framework for building seamlessly scalable and interoperable rollups that can run on any blockchain
https://sovereign.xyz
Apache License 2.0
381 stars 107 forks source link

GenesisConfig should implement `Display` #488

Open citizen-stig opened 1 year ago

citizen-stig commented 1 year ago

Is your feature request related to a problem? Please describe. When demo-rollup starts it is hard to figure out what config it has been started with.

Ideally demo-rollup, demo-prover should print genesis config at start. Or even genesis function of Runtime logs it, so it is not forgotten.

Describe the solution you'd like Genesis config has Display trait bound.

Describe alternatives you've considered Debug is more flexible, but not that pretty, for example addresses will be arrays

citizen-stig commented 1 year ago

and demo-rollup should print it at start up

citizen-stig commented 11 months ago

(!) It does not mean, that GenesisConfig should derive it, because then Display will spread to many other types.

But module developer can implement it manually, with greater control. For example by not printing secrets.

Another solution might be serializing it to JSON and print serialized version.