AleoNet / snarkVM

A Virtual Machine for Zero-Knowledge Executions
https://snarkvm.org
Apache License 2.0
1.06k stars 1.49k forks source link

Don't assume solution checksum consistency in check_subdag_transmissions #2524

Closed vicsn closed 2 months ago

vicsn commented 2 months ago

Motivation

This is a small improvement to https://github.com/AleoNet/snarkVM/pull/2521 . Due to the fixes introduced, honest validators may mutate a seemingly invalid solution to a valid one. As a result, there's a deviation between the checksum in the subdag and the block. If such an attack were to happen, it can be easily recovered from by implementing this PR.

The fix is to ignore the checksum. We're already guaranteed only unique solution id's enter the block.

Test Plan

Tested by simulating malicious validator. CI run here