DAL/Node: Better handling of the DAL config
Context
Problem
The Config_file.t currently contains a dal field. This field provides an option to override the default DAL configuration, which is to be used in testnets such as dailynet/mondaynet. We need such overrides so we can use a mock SRS instead of loading the production SRS from a file.
However, this current setup has two probelms:
- Nodes in the same network can use have different values for the
dalfield, which may lead to a split in the network (because two nodes that use different SRS will disagree on the validity of DAL operations). This is possible becausedalfield is outside of the network config (blockchain_network). - The octez-node and the dal-node can use different SRS. This is because the SRS for the dal-node is managed independently of the octez-node via a
--use-unsafe-srs-for-testsflag.
Solution
- Move the
dalfield into theblockchain_network(and rename todal_config). This way, nodes in the same network will agree on thedal_configfield. - Have octez-node expose the
blockchain_network.dal_configvalue via RPC. Then, have the dal-node call this RPC to use the same dal configuration as the octez-node.
Manually testing the MR
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Lin Oshitani