casper-network / casper-network/casper-node

Do not validate data on retrieval from storage

Open
#3,022 1 comment 0 reactions 0 assignees View on GitHub
triage
Dominant language
Rust
Stars
399
Forks
224
Avg merge
15h 44m
Merged PRs (30d)
2

Description

The invariant we want to rely on is that once data is stored it's always correct - i.e. as long as it can be deserialized then it must be correct according to business rules. It means it's not necessary to perform any data validation after retrieval and before sending.
Inspect Storage component and look for examples that break this rule (and do validate data after retrieval).
Example: https://github.com/casper-network/casper-node/blob/dev/node/src/components/storage.rs#L1481=
If so, make sure data is validated before storing and remove the validation that happens upon retrieval.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.