[go: up one dir, main page]

[DAL] Simplify the handling of the SRS

At first, it seemed that the SRS needed to be loaded everytime there was a protocol change. But this is not true.

The reason for that is the following:

  1. The SRS is loaded from files
  2. An integrity check needs to be hard-coded for those specific files (all the nodes need to run the same SRS)
  3. The size of the files determine a maximum size for the slot
  4. The content of the SRS is stable by prefix. Hence, increasing/decreasing the slot size only require to adapt the bytes read
  5. Loading an SRS of a higher size than what is necessary is not a problem

Consequently:

  1. The shell can read and interpret the entire files once
  2. It is the responsibility of the environment and the protocol to provide files which are large enough for the values of the DAL decided by the protocol
  3. Only a single reference is used to store the content of those files

All the simplifications made in this MR are a result of those facts. I also provided some other refactorisation to clean up a bit the code.

Closes #3399 (closed)

Edited by François Thiré

Merge request reports

Loading