vegaprotocol / vega

A Go implementation of the Vega Protocol, a protocol for creating and trading derivatives on a fully decentralised network.
https://vega.xyz
GNU Affero General Public License v3.0
37 stars 19 forks source link

Banking engine doesn't produce consistent snapshot on withdrawals #8843

Open ValentinTrinque opened 11 months ago

ValentinTrinque commented 11 months ago

The withdrawal count inside the engine is not restored by the snapshot, which leads to a non-deterministic generation of the withdrawal Ref after restoring the state from a snapshot.

Instead of starting at the count from the previous engine, it restarts at 0. So the next withdrawal will generate a different Ref between the peer and the restored node.

jeremyletang commented 2 months ago

I doubt that this is still the case / an actual problem seeing that there are pipeline testing snapshot at all time and this issue never raised? Can you confirm it's a problem @ValentinTrinque ?