feat(prot): hold network values in memory [AC-1588]
Closes AC-1588. Holds global network values in-memory in a variable.
- Creates
internal/core.GlobalValues
type that is responsible for loading and storing network global value accounts. - Changes marshalling for network global value accounts from JSON to binary.
- Adds an active and pending global values variable to the executor to track the current, active global values and pending changes.
- Adds logic to
internal/block.Executor.ProcessTransaction
to update the pending global values when the relevant account is changed. - Adds additional validation to ensure it is impossible to update a network global value account to an invalid state.
- Enforces write-to-state for network global value account.
- Removes oracle from the ledger (use global values instead).
- Removes oracle from the directory anchor (updated via Updates instead).
- Updates executors to use the active global values instead of parsing data entries.
- Adds global values to API
describe
method
Review Checklist
If any item is not complete, the merge request is not ready to be reviewed and must be marked Draft:
.
-
The merge request title is in the format <change type>(<change scope>): <short description> [<task id>]
- For example,
feat(cli): add QR code generation [AC-123]
- For details, see CONTRIBUTING.md
- For example,
-
The description includes Closes <jira task ID>
(or rarelyUpdates <jira task ID>
) -
The change is fully validated by tests that are run during CI - In most cases this means a test in "validate.sh"
- In some cases, a Go test may be acceptable
- Validation is not applicable to things like documentation updates
- Purely UI/UX changes can be manually validated, such as changes to human-readable output
- For all other changes, automated validation tests are an absolute requirement unless a maintainer specifically explains why they are not in a comment on this merge request
-
The change is marked with one of the validation labels - validationci/cd for changes validated by CI tests
- validationmanual for changes validated by hand
- validationdeferred for changes validated by a follow up merge request
- validationnot applicable for changes where validation is not applicable
Merge Checklist
-
CI is passing -
Merge conflicts are resolved -
All discussions are resolved
Related to AC-1588