Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade avalanchego dependency #1901

Merged
merged 53 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a68de91
update
tsachiherman Dec 19, 2024
6670ef4
Merge branch 'main' into tsachi/configurable-chunk-rate-limiter
tsachiherman Jan 10, 2025
4a125fa
update
tsachiherman Jan 10, 2025
d4d799f
update comments
tsachiherman Jan 10, 2025
d4e7b78
update
tsachiherman Jan 10, 2025
e295065
Merge branch 'main' into tsachi/configurable-chunk-rate-limiter
tsachiherman Jan 10, 2025
858fd9c
Merge branch 'main' into tsachi/configurable-chunk-rate-limiter
tsachiherman Jan 13, 2025
5eba267
remove the NoVerifier
tsachiherman Jan 13, 2025
c0725c0
Merge branch 'tsachi/configurable-chunk-rate-limiter' of github.com:a…
tsachiherman Jan 13, 2025
88c0a29
update
tsachiherman Jan 13, 2025
b7e0dc8
update per review feedback
tsachiherman Jan 14, 2025
6f1ad99
Merge branch 'main' into tsachi/configurable-chunk-rate-limiter
tsachiherman Jan 14, 2025
412398d
update per CR
tsachiherman Jan 14, 2025
13cadf7
Merge branch 'main' into tsachi/configurable-chunk-rate-limiter2
tsachiherman Jan 15, 2025
1599942
update
tsachiherman Jan 15, 2025
e41a8af
update
tsachiherman Jan 15, 2025
d272577
lint
tsachiherman Jan 15, 2025
f579de1
Merge branch 'main' into tsachi/configurable-chunk-rate-limiter2
tsachiherman Jan 15, 2025
5a84dbe
update
tsachiherman Jan 15, 2025
371756e
Merge branch 'tsachi/configurable-chunk-rate-limiter2' of github.com:…
tsachiherman Jan 15, 2025
10c897f
Merge branch 'main' into tsachi/configurable-chunk-rate-limiter2
tsachiherman Jan 16, 2025
a1a9f75
Merge branch 'main' into tsachi/configurable-chunk-rate-limiter2
tsachiherman Jan 17, 2025
0a2f0b0
Merge branch 'main' into tsachi/configurable-chunk-rate-limiter2
tsachiherman Jan 22, 2025
f9420f8
Merge branch 'main' into tsachi/configurable-chunk-rate-limiter2
tsachiherman Jan 23, 2025
ab4b0e7
Merge branch 'tsachi/configurable-chunk-rate-limiter2' of github.com:…
tsachiherman Jan 23, 2025
778ffec
update
tsachiherman Jan 23, 2025
6307fd8
update per PR review
tsachiherman Jan 23, 2025
3cc2f3c
update
tsachiherman Jan 23, 2025
8e5558f
temp;
tsachiherman Jan 24, 2025
82ae745
Merge branch 'main' into tsachi/chainstate
tsachiherman Jan 27, 2025
0f72946
undo
tsachiherman Jan 27, 2025
118f89f
update
tsachiherman Jan 27, 2025
0bb8bee
update
tsachiherman Jan 29, 2025
6c9f6f7
update
tsachiherman Jan 29, 2025
c03f2b2
update
tsachiherman Jan 29, 2025
0f01c2d
update
tsachiherman Jan 29, 2025
7e6e941
update
tsachiherman Jan 29, 2025
51ac5e9
update per review feedback.,
tsachiherman Jan 30, 2025
2c25b8b
add some nit
tsachiherman Jan 30, 2025
d9d8829
Merge branch 'main' into tsachi/chainstate
tsachiherman Jan 30, 2025
baa3316
update
tsachiherman Jan 30, 2025
875c279
attempt to work around missing SaveAPIPort()
tsachiherman Jan 30, 2025
d628f15
rollback changes
tsachiherman Jan 30, 2025
6545a05
update
tsachiherman Jan 30, 2025
12d65f5
update hash
tsachiherman Jan 30, 2025
bb56ec7
add debuging for gh
tsachiherman Jan 31, 2025
e805c61
after test
tsachiherman Jan 31, 2025
8a267f2
update
tsachiherman Feb 3, 2025
b1a6db6
Merge branch 'main' into tsachi/testupgrade
tsachiherman Feb 3, 2025
5fa9894
avoid storing uris; update uris on restart
tsachiherman Feb 3, 2025
4468297
update
tsachiherman Feb 3, 2025
76607c2
update per feedback.
tsachiherman Feb 3, 2025
8a050f7
update per review
tsachiherman Feb 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions crypto/bls/private.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,37 @@ package bls
import (
"errors"

"github.com/ava-labs/avalanchego/utils/crypto/bls"
"github.com/ava-labs/avalanchego/utils/crypto/bls/signer/localsigner"

blst "github.com/supranational/blst/bindings/go"
)

const PrivateKeyLen = bls.SecretKeyLen
const PrivateKeyLen = blst.BLST_SCALAR_BYTES

var errFailedPrivateKeyDeserialize = errors.New("couldn't deserialize secret key")

type PrivateKey = bls.SecretKey
type PrivateKey = localsigner.LocalSigner

func GeneratePrivateKey() (*PrivateKey, error) {
return bls.NewSecretKey()
return localsigner.New()
}

func PrivateKeyToBytes(pk *PrivateKey) []byte {
return bls.SecretKeyToBytes(pk)
return pk.ToBytes()
}

func PrivateKeyFromBytes(pkBytes []byte) (*PrivateKey, error) {
pk, err := bls.SecretKeyFromBytes(pkBytes)
pk, err := localsigner.FromBytes(pkBytes)
if err != nil {
return nil, errFailedPrivateKeyDeserialize
}
return pk, nil
}

func PublicFromPrivateKey(pk *PrivateKey) *PublicKey {
return bls.PublicFromSecretKey(pk)
return pk.PublicKey()
}

func Sign(msg []byte, pk *PrivateKey) *Signature {
return bls.Sign(pk, msg)
return pk.Sign(msg)
}
40 changes: 11 additions & 29 deletions examples/morpheusvm/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/ava-labs/hypersdk/examples/morpheusvm
go 1.22.8

require (
github.com/ava-labs/avalanchego v1.11.13-0.20241230212828-6dea1b366756
github.com/ava-labs/hypersdk v0.0.1
github.com/ava-labs/avalanchego v1.12.3-warp-verify6.0.20250203152522-13c08681c17d
github.com/ava-labs/hypersdk v0.0.0-00010101000000-000000000000
github.com/fatih/color v1.13.0
github.com/onsi/ginkgo/v2 v2.13.1
github.com/spf13/cobra v1.7.0
Expand All @@ -17,7 +17,7 @@ require (
github.com/DataDog/zstd v1.5.2 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/ava-labs/coreth v0.13.8 // indirect
github.com/ava-labs/coreth v0.14.2-verify-interface6 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
Expand All @@ -32,19 +32,15 @@ require (
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/dlclark/regexp2 v1.7.0 // indirect
github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/ethereum/go-ethereum v1.13.14 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
Expand All @@ -53,7 +49,6 @@ require (
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
Expand All @@ -69,17 +64,11 @@ require (
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/hashicorp/go-bexpr v0.1.10 // indirect
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hdevalence/ed25519consensus v0.2.0 // indirect
github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackpal/gateway v1.0.6 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.15.15 // indirect
Expand All @@ -93,15 +82,13 @@ require (
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/pointerstructure v1.2.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d // indirect
github.com/neilotoole/errgroup v0.1.6 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
Expand All @@ -117,22 +104,17 @@ require (
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rs/cors v1.7.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.12.0 // indirect
github.com/status-im/keycard-go v0.2.0 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
github.com/supranational/blst v0.3.13 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/urfave/cli/v2 v2.25.7 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 // indirect
Expand All @@ -143,18 +125,18 @@ require (
go.opentelemetry.io/otel/trace v1.22.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/mock v0.4.0 // indirect
go.uber.org/mock v0.5.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
golang.org/x/tools v0.22.0 // indirect
gonum.org/v1/gonum v0.11.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // indirect
Expand Down
Loading
Loading