AleoNet / snarkOS

A Decentralized Operating System for ZK Applications
http://snarkos.org
Apache License 2.0
4.24k stars 2.59k forks source link

[Fix] Add aborted transmission IDs to storage service. #3217

Closed raychu86 closed 3 months ago

raychu86 commented 3 months ago

Motivation

This PR adds support for tracking aborted transmission IDs in storage. This solves an edge case in syncing via BFT when there are aborted transmissions in certificates:

  1. We can’t find a transmission in block X because it was aborted in block X-1
  2. BFT block sync requires certificates from block X in order to commit block X-1
  3. We have not added Block X-1 into our ledger and started tracking that the transmission was indeed aborted
  4. When we process certificates in block X, we don’t know where the transmission is and that it was supposed to be aborted in block X-1, which causes an error.

The sister PR is here - https://github.com/AleoHQ/snarkVM/pull/2433

Test Plan

The tests have been updated to check that we properly track aborted transmissions in storage.