vegaprotocol / vegatools

A go command line utility providing a bunch of tools to use with a Vega network
MIT License
3 stars 4 forks source link

Diff tool to compare core snapshot with datanode API #236

Closed ze97286 closed 2 years ago

ze97286 commented 2 years ago

A new tool is required for comparing a core snapshot with datanode API. The tool takes the following parameters:

  1. snapshot DB path - a path to the core snapshot database
  2. datanode connection string - a connection string to a running data node

e.g. vegatools difftool -s ./snapshot-tmp -d 127.0.0.1:3027

The above assumes that no blocks are being produced after the last snapshot in the database such that we can expect that the snapshot state represents the current state that should be returned by datanode.

The tool currently compares the following datasets:

  1. account balances
  2. diffOrders,
  3. markets
  4. parties
  5. network limits
  6. assets
  7. delegations
  8. epoch
  9. vegatime
  10. validator nodes data
  11. network parameters
  12. governance proposals
  13. active deposits
  14. active withdrawals
  15. liquidity provisions
  16. stake linking
  17. banking transfers

TODO: positions

Need to consider porting to vega repo as vega tool.