Status

NOT STARTED IN PROGRESS DECIDED

Stakeholders
Outcome
Due date
Owner

Background

There is a set of requirements for test stand, one of which is the ability to change local configuration of node at its runtime.

https://soramitsu.atlassian.net/wiki/spaces/DOPS/pages/1938194493/Project+acceptance+checklist

Problem

Current problem is that there are a plenty of actors which have its own state which don't contain (and therefore don't check) configuration, but rather copy it on initialization.

Solution

Decisions

Alternatives

There are several solutions to this problem.

Arc<RwLock<Configuration>>

It involves putting everything inside Arc<RwLock<Configuration>>. Current iroha_config crate knows about it and allows reading and writing to asynchronous locks. We can also add some caching for reading configuration (f.e. update it every minute). Also it won't involve much refactoring.

Configuration View

This solution is modification of Arc<RwLock<Configuration>>, it involves creation of structure which hides reference for easier future design changes. It can in future have some id of current configuration (like hash) and if something changes we can recache new config and give it back to actor.

Event propagation (diffs)

Main motivation for this solution is that besides general local configuration there is also consensus configuration which should be updated only at the end of the round. This solution involves using channels and probably requires rework for iroha_config.

Concerns

Assumptions

Risks

Additional Information

There is an interesting design idea to remove consensus and other critical to change configuration to new structure.

  • No labels