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

Immutable configuration #4282

Open
mversic opened this issue Feb 14, 2024 · 4 comments
Open

Immutable configuration #4282

mversic opened this issue Feb 14, 2024 · 4 comments
Assignees
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST

Comments

@mversic
Copy link
Contributor

mversic commented Feb 14, 2024

I would prefer config to have private fields with constructors and getters for the following reasons:

  1. consistency - access to some fields has to be done through getters because the value has to be converted
  2. maintaining invariants - sometimes config params are interdependent,
  3. future proofing - we can change the underlying type without affecting the API

setters we can but don't even have to have. I wouldn't mind if the config structs were completely immutable. If we do decide to have setters we can put validation logic into them. But I would prefer to not have setters at least atm

@mversic mversic added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Feb 14, 2024
@mversic
Copy link
Contributor Author

mversic commented Feb 14, 2024

you can find more info in discussion here

@VAmuzing VAmuzing self-assigned this Apr 16, 2024
@0x009922
Copy link
Contributor

@VAmuzing, you might need to consider changes #4456

@mversic mversic added this to the 2.0.0-rc.1 milestone Apr 24, 2024
@mversic mversic removed this from the 2.0.0-rc.1.0 milestone May 6, 2024
@dmitrivenger dmitrivenger assigned 0x009922 and unassigned VAmuzing May 28, 2024
@0x009922
Copy link
Contributor

@mversic is it still relevant?

@mversic
Copy link
Contributor Author

mversic commented Jun 5, 2024

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

No branches or pull requests

5 participants