Skip to content

Commit 3ba6f05

Browse files
committed
Update supernova to use latest gno version
1 parent 9191ab3 commit 3ba6f05

24 files changed

+204
-279
lines changed

cmd/root.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,10 @@ func execMain(cfg *internal.Config) error {
106106
}
107107

108108
// Create and run the pipeline
109-
return internal.NewPipeline(cfg).Execute()
109+
pipeline, err := internal.NewPipeline(cfg)
110+
if err != nil {
111+
return fmt.Errorf("unable to create pipeline, %w", err)
112+
}
113+
114+
return pipeline.Execute()
110115
}

go.mod

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,42 @@ require (
99
)
1010

1111
require (
12-
github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c // indirect
13-
github.com/btcsuite/btcd/btcutil v1.1.1 // indirect
14-
github.com/cespare/xxhash v1.1.0 // indirect
15-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
16-
github.com/cockroachdb/apd v1.1.0 // indirect
12+
dario.cat/mergo v1.0.0 // indirect
13+
github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect
14+
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
15+
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
16+
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
17+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
18+
github.com/go-logr/logr v1.4.1 // indirect
19+
github.com/go-logr/stdr v1.2.2 // indirect
20+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
21+
github.com/rs/cors v1.10.1 // indirect
22+
github.com/rs/xid v1.5.0 // indirect
23+
github.com/zondax/hid v0.9.2 // indirect
24+
github.com/zondax/ledger-go v0.14.3 // indirect
25+
go.opentelemetry.io/otel v1.25.0 // indirect
26+
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect
27+
go.opentelemetry.io/otel/metric v1.25.0 // indirect
28+
go.opentelemetry.io/otel/sdk v1.25.0 // indirect
29+
go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect
30+
go.opentelemetry.io/otel/trace v1.25.0 // indirect
31+
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
32+
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
33+
golang.org/x/text v0.14.0 // indirect
34+
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
35+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
36+
google.golang.org/grpc v1.63.0 // indirect
37+
)
38+
39+
require (
40+
github.com/btcsuite/btcd/btcutil v1.1.5 // indirect
1741
github.com/davecgh/go-spew v1.1.1 // indirect
18-
github.com/dgraph-io/badger/v3 v3.2103.4 // indirect
19-
github.com/dgraph-io/ristretto v0.1.1 // indirect
20-
github.com/dustin/go-humanize v1.0.0 // indirect
2142
github.com/fsnotify/fsnotify v1.5.4 // indirect
22-
github.com/gnolang/cors v1.8.1 // indirect
23-
github.com/gnolang/gno v0.0.0-20230330135006-28c1984fb1cd
43+
github.com/gnolang/gno v0.0.0-20240509142750-711f4d03a167
2444
github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216 // indirect
25-
github.com/gogo/protobuf v1.3.2 // indirect
26-
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
27-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
28-
github.com/golang/protobuf v1.5.3 // indirect
29-
github.com/golang/snappy v0.0.3 // indirect
30-
github.com/google/flatbuffers v1.12.1 // indirect
31-
github.com/google/go-cmp v0.6.0 // indirect
32-
github.com/gorilla/websocket v1.5.0 // indirect
33-
github.com/jmhodges/levigo v1.0.0 // indirect
34-
github.com/klauspost/compress v1.12.3 // indirect
35-
github.com/kr/pretty v0.3.1 // indirect
45+
github.com/golang/protobuf v1.5.4 // indirect
46+
github.com/golang/snappy v0.0.4 // indirect
47+
github.com/gorilla/websocket v1.5.1 // indirect
3648
github.com/lib/pq v1.10.9 // indirect
3749
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
3850
github.com/linxGnu/grocksdb v1.7.15 // indirect
@@ -42,15 +54,11 @@ require (
4254
github.com/pkg/errors v0.9.1 // indirect
4355
github.com/pmezard/go-difflib v1.0.0 // indirect
4456
github.com/rivo/uniseg v0.4.7 // indirect
45-
github.com/rogpeppe/go-internal v1.12.0 // indirect
46-
github.com/syndtr/goleveldb v1.0.0 // indirect
47-
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
48-
go.etcd.io/bbolt v1.3.7 // indirect
49-
go.opencensus.io v0.24.0 // indirect
50-
go.uber.org/multierr v1.10.0 // indirect
57+
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
58+
go.uber.org/multierr v1.11.0 // indirect
5159
golang.org/x/crypto v0.21.0 // indirect
5260
golang.org/x/mod v0.16.0 // indirect
53-
golang.org/x/net v0.22.0 // indirect
61+
golang.org/x/net v0.23.0 // indirect
5462
golang.org/x/sys v0.18.0 // indirect
5563
golang.org/x/term v0.18.0 // indirect
5664
golang.org/x/tools v0.19.0 // indirect

go.sum

Lines changed: 82 additions & 186 deletions
Large diffs are not rendered by default.

internal/batcher/batcher.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"fmt"
66
"math"
77

8-
"github.com/gnolang/gno/pkgs/amino"
9-
core_types "github.com/gnolang/gno/pkgs/bft/rpc/core/types"
10-
"github.com/gnolang/gno/pkgs/std"
8+
"github.com/gnolang/gno/tm2/pkg/amino"
9+
core_types "github.com/gnolang/gno/tm2/pkg/bft/rpc/core/types"
10+
"github.com/gnolang/gno/tm2/pkg/std"
1111
"github.com/gnolang/supernova/internal/common"
1212
"github.com/schollz/progressbar/v3"
1313
)

internal/batcher/batcher_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"fmt"
77
"testing"
88

9-
core_types "github.com/gnolang/gno/pkgs/bft/rpc/core/types"
10-
"github.com/gnolang/gno/pkgs/std"
9+
core_types "github.com/gnolang/gno/tm2/pkg/bft/rpc/core/types"
10+
"github.com/gnolang/gno/tm2/pkg/std"
1111
"github.com/gnolang/supernova/internal/common"
1212
"github.com/stretchr/testify/assert"
1313
)

internal/client/http_client.go

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,47 @@
11
package client
22

33
import (
4+
"context"
45
"fmt"
56

6-
"github.com/gnolang/gno/gnoland"
7-
"github.com/gnolang/gno/pkgs/amino"
8-
"github.com/gnolang/gno/pkgs/bft/rpc/client"
9-
core_types "github.com/gnolang/gno/pkgs/bft/rpc/core/types"
10-
"github.com/gnolang/gno/pkgs/std"
7+
"github.com/gnolang/gno/gno.land/pkg/gnoland"
8+
"github.com/gnolang/gno/tm2/pkg/amino"
9+
"github.com/gnolang/gno/tm2/pkg/bft/rpc/client"
10+
core_types "github.com/gnolang/gno/tm2/pkg/bft/rpc/core/types"
11+
"github.com/gnolang/gno/tm2/pkg/std"
1112
"github.com/gnolang/supernova/internal/common"
1213
)
1314

1415
type Batch struct {
15-
batch *client.BatchHTTP
16+
batch *client.RPCBatch
1617
}
1718

1819
func (b *Batch) AddTxBroadcast(tx []byte) error {
19-
if _, err := b.batch.BroadcastTxSync(tx); err != nil {
20+
if err := b.batch.BroadcastTxSync(tx); err != nil {
2021
return fmt.Errorf("unable to prepare transaction, %w", err)
2122
}
2223

2324
return nil
2425
}
2526

2627
func (b *Batch) Execute() ([]interface{}, error) {
27-
return b.batch.Send()
28+
return b.batch.Send(context.Background())
2829
}
2930

3031
type HTTPClient struct {
31-
conn *client.HTTP
32+
conn *client.RPCClient
3233
}
3334

3435
// NewHTTPClient creates a new instance of the HTTP client
35-
func NewHTTPClient(url string) *HTTPClient {
36-
return &HTTPClient{
37-
conn: client.NewHTTP(url, ""),
36+
func NewHTTPClient(url string) (*HTTPClient, error) {
37+
cli, err := client.NewHTTPClient(url)
38+
if err != nil {
39+
return nil, fmt.Errorf("unable to create http client, %w", err)
3840
}
41+
42+
return &HTTPClient{
43+
conn: cli,
44+
}, nil
3945
}
4046

4147
func (h *HTTPClient) CreateBatch() common.Batch {

internal/collector/collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"math"
77
"time"
88

9-
"github.com/gnolang/gno/pkgs/bft/types"
9+
"github.com/gnolang/gno/tm2/pkg/bft/types"
1010
"github.com/schollz/progressbar/v3"
1111
)
1212

internal/collector/collector_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"testing"
66
"time"
77

8-
core_types "github.com/gnolang/gno/pkgs/bft/rpc/core/types"
9-
"github.com/gnolang/gno/pkgs/bft/types"
10-
"github.com/gnolang/gno/pkgs/crypto/tmhash"
8+
core_types "github.com/gnolang/gno/tm2/pkg/bft/rpc/core/types"
9+
"github.com/gnolang/gno/tm2/pkg/bft/types"
10+
"github.com/gnolang/gno/tm2/pkg/crypto/tmhash"
1111
"github.com/stretchr/testify/assert"
1212
)
1313

internal/collector/mock_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package collector
22

3-
import core_types "github.com/gnolang/gno/pkgs/bft/rpc/core/types"
3+
import core_types "github.com/gnolang/gno/tm2/pkg/bft/rpc/core/types"
44

55
type (
66
getBlockDelegate func(height *int64) (*core_types.ResultBlock, error)

internal/collector/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package collector
33
import (
44
"time"
55

6-
core_types "github.com/gnolang/gno/pkgs/bft/rpc/core/types"
6+
core_types "github.com/gnolang/gno/tm2/pkg/bft/rpc/core/types"
77
)
88

99
type Client interface {

0 commit comments

Comments
 (0)