diff

package
v0.73.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(snapshotFilePath, datanodeConnection string) error

Run takes a snapshot (proto serialised) file path and data node connection string and runs the diff tool. Returns nil if no error is found or the error report otherwise.

func SnapshotRun

func SnapshotRun(dbpath string, versionsOnly bool, outputPath string, heightToOutput int64, outputFormat string) error

SnapshotRun is the main entry point for this tool

Types

type MatchResult

type MatchResult int64

MatchResult represents the result of comparing core snapshot of an engine with data node api for the same.

const (
	// FullMatch means no discrepancies found.
	FullMatch MatchResult = iota
	// SizeMismatch means some expected entries are missing.
	SizeMismatch
	// ValuesMismatch means some values disagree between the core snapshot and the data node api.
	ValuesMismatch
)

type Report

type Report struct {
	DiffResult []Status
	Success    bool
	// contains filtered or unexported fields
}

Report is the top level diff result aggregating the results from all compared keys.

func (*Report) String

func (dr *Report) String() string

type Result

type Result struct {
	Accounts    []*dn.AccountBalance
	Orders      []*vega.Order
	Markets     []*vega.Market
	Parties     []*vega.Party
	Limits      *vega.NetworkLimits
	Assets      []*vega.Asset
	VegaTime    int64
	Delegations []*vega.Delegation
	Epoch       *vega.Epoch
	Nodes       []*vega.Node
	NetParams   []*vega.NetworkParameter
	Proposals   []*vega.Proposal
	Deposits    []*vega.Deposit
	Withdrawals []*vega.Withdrawal
	Transfers   []*v1.Transfer
	Positions   []*vega.Position
	Lps         []*vega.LiquidityProvision
	Stake       []*v1.StakeLinking
}

Result corresponds to a dataset representing data node state ot core snapshot state.

type SnapshotData

type SnapshotData struct {
	Version int64  `json:"version"`
	Height  uint64 `json:"height"`
	Size    int64  `json:"size"`
}

SnapshotData is a representation of the information we an scrape from the avl tree

type Status

type Status struct {
	Key         string
	MatchResult MatchResult
	DatanodeRes string
	CoreRes     string
	CoreResLen  int
	DataNodeLen int
}

Status is a diff summary report for a key.

func (Status) String

func (ds Status) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL