⚖️

Evaluation of Measurements

Evaluation of Measurements

Spark-Evaluate checks the validity of all measurements. Result are then made available through Spark API and on chain

Spark-Evaluate is the Spark service that evaluates each measurement to decide whether or not it is valid. It listens out for on-chain events that indicate that the Spark Publish logic has posted a commitment on chain. It then takes the CID of the on chain commitment and fetches the corresponding measurements from Storacha.

Once Spark-Evaluate retrieves the measurements, it does “fraud detection” to remove all unwanted Measurements as summarized below:

Measurements which are removedWhy removed?
Those for Eligible Deals not in the roundTo prevent checkers from checking any Eligible Deal of their choosing either to inflate or tarnish an SP’s stats.
Those which are for Retrieval Tasks that are not within the kk-closest for a checkerSame principle as above. It’s not good enough to pick any Retrieval Task from the Retrieval Round Task List.
Those which are submitted after the first kk measurements from a given IPV4 /24 subnet.
(i.e, The first kk Measurements within a IPv4 /24 subnet are accepted. Others are rejected.)
Prevent a malicious actor from creating tons of station ids that are then used to “stuff the ballot box” from one node. IPV4 /24 subnets are being used here as a scarce resource.

With these Measurements that passed fraud detection, Spark Evaluate then performs the honest majority consensus. For each task, it calculates the honest majority result from the task’s committee, and it stores this aggregated result in Spark’s DB. These aggregate results are called Provider Retrieval Result Stats. They are packaged into a CAR which will is stored with Storacha, and the CID of this CAR is stored on chain.

On this page