Skip to content

Commit

Permalink
fix: bump vega version and update datanode api usage
Browse files Browse the repository at this point in the history
  • Loading branch information
pscott31 committed Apr 19, 2023
1 parent 151d6dc commit 785a654
Show file tree
Hide file tree
Showing 7 changed files with 1,555 additions and 79 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
- [91](https://github.com/vegaprotocol/vegatools/pull/91) - Output of `snapshotdb` is now valid json
- [173](https://github.com/vegaprotocol/vegatools/issues/173) - Add `MarketTracker` to checkpoint parser
- [262](https://github.com/vegaprotocol/vegatools/issues/262) - Update vega dependency, ignore slippage factors in market and last block in epoch
- [279](https://github.com/vegaprotocol/vegatools/issues/279) - Update to work with new datanode API for querying live orders / liquidity provisions

## 0.41.1
*2021-08-31*
Expand Down
2 changes: 0 additions & 2 deletions difftool/diff/core_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ func (s *snap) getMarkets() []*vega.Market {
case *snapshot.Payload_ExecutionMarkets:
markets := []*vega.Market{}
for _, m := range c.GetExecutionMarkets().Markets {
m.Market.LinearSlippageFactor = ""
m.Market.QuadraticSlippageFactor = ""
markets = append(markets, m.Market)
}
return markets
Expand Down
8 changes: 6 additions & 2 deletions difftool/diff/datanode_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ func (dnc *dataNodeClient) listAccounts() ([]*dn.AccountBalance, error) {

func (dnc *dataNodeClient) listOrders() ([]*vega.Order, error) {
liveOnly := true
orderResp, err := dnc.datanode.ListOrders(context.Background(), &dn.ListOrdersRequest{LiveOnly: &liveOnly})
orderResp, err := dnc.datanode.ListOrders(context.Background(), &dn.ListOrdersRequest{
Filter: &dn.OrderFilter{
LiveOnly: &liveOnly},
})
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -411,7 +414,8 @@ func (dnc *dataNodeClient) listPositions() ([]*vega.Position, error) {
}

func (dnc *dataNodeClient) listLiquidityProvisions(market string) ([]*vega.LiquidityProvision, error) {
resp, err := dnc.datanode.ListLiquidityProvisions(context.Background(), &dn.ListLiquidityProvisionsRequest{MarketId: &market})
live := true
resp, err := dnc.datanode.ListLiquidityProvisions(context.Background(), &dn.ListLiquidityProvisionsRequest{MarketId: &market, Live: &live})
if err != nil {
return nil, err
}
Expand Down
2 changes: 2 additions & 0 deletions difftool/diff/diff_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ func diffOrders(coreSnapshot *Result, dn *Result) Status {

for i, a := range core {
d := datanode[i]
// core may increment UpdatedAt, but if nothing changes it doesn't send an event
d.UpdatedAt = a.UpdatedAt
if a.String() != d.String() {
return getValueMismatchStatus("orders", core, datanode)
}
Expand Down
42 changes: 21 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,73 +4,73 @@ go 1.19

require (
code.vegaprotocol.io/shared v0.0.0-20221010085458-55c50711135f
code.vegaprotocol.io/vega v0.67.3-0.20230214165643-b434c494e7f3
code.vegaprotocol.io/vega v0.70.1-0.20230419150238-cdfb016b9196
github.com/cosmos/iavl v0.19.4
github.com/ethereum/go-ethereum v1.10.21
github.com/ethereum/go-ethereum v1.11.2
github.com/gdamore/tcell/v2 v2.5.2
github.com/gogo/protobuf v1.3.2
github.com/prometheus-community/pro-bing v0.1.0
github.com/shopspring/decimal v1.3.1
github.com/spf13/cobra v1.6.0
github.com/stretchr/testify v1.8.0
github.com/spf13/cobra v1.6.1
github.com/stretchr/testify v1.8.1
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a
github.com/tendermint/tm-db v0.6.7
go.nanomsg.org/mangos/v3 v3.4.2
golang.org/x/crypto v0.4.0
google.golang.org/grpc v1.50.1
golang.org/x/crypto v0.5.0
google.golang.org/grpc v1.52.0
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8
)

require (
github.com/DataDog/zstd v1.4.1 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.1 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/confio/ics23/go v0.7.0 // indirect
github.com/cosmos/gorocksdb v1.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set v1.8.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/dgraph-io/badger/v2 v2.2007.2 // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de // indirect
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect
github.com/didip/tollbooth/v7 v7.0.1 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gdamore/encoding v1.0.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-pkgz/expirable-cache v0.1.0 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.0.0 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.9.0 // indirect
github.com/holiman/uint256 v1.2.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.15.15 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rjeczalik/notify v0.9.1 // indirect
github.com/satori/go.uuid v1.2.0 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tendermint/tendermint v0.34.24 // indirect
github.com/tendermint/tendermint v0.35.9 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.4.0 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.23.0 // indirect
golang.org/x/net v0.8.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Expand Down
Loading

0 comments on commit 785a654

Please sign in to comment.