Skip to content

Commit ec40e16

Browse files
AvalancheGo@v1.10.15 (#227)
* update version * remove factory * remove factory from postman
1 parent c6a1695 commit ec40e16

File tree

10 files changed

+21
-27
lines changed

10 files changed

+21
-27
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DOCKER_ORG ?= avaplatform
1111
DOCKER_IMAGE ?= ${DOCKER_ORG}/${PROJECT}
1212
DOCKER_LABEL ?= latest
1313
DOCKER_TAG ?= ${DOCKER_IMAGE}:${DOCKER_LABEL}
14-
AVALANCHE_VERSION ?= v1.10.13
14+
AVALANCHE_VERSION ?= v1.10.15
1515

1616
build:
1717
export CGO_CFLAGS="-O -D__BLST_PORTABLE__" && go build -o ./rosetta-server ./cmd/server

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ module github.com/ava-labs/avalanche-rosetta
33
go 1.20
44

55
require (
6-
github.com/ava-labs/avalanchego v1.10.13
7-
github.com/ava-labs/coreth v0.12.6-rc.2
6+
github.com/ava-labs/avalanchego v1.10.15
7+
github.com/ava-labs/coreth v0.12.8-rc.1
88
github.com/coinbase/rosetta-sdk-go v0.6.5
99
github.com/ethereum/go-ethereum v1.12.0
1010
github.com/stretchr/testify v1.8.1
1111
golang.org/x/crypto v0.14.0
12-
golang.org/x/exp v0.0.0-20230206171751-46f607a40771
12+
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df
1313
golang.org/x/sync v0.3.0
1414
)
1515

@@ -78,7 +78,7 @@ require (
7878
github.com/prometheus/client_model v0.3.0 // indirect
7979
github.com/prometheus/common v0.39.0 // indirect
8080
github.com/prometheus/procfs v0.9.0 // indirect
81-
github.com/rogpeppe/go-internal v1.9.0 // indirect
81+
github.com/rogpeppe/go-internal v1.10.0 // indirect
8282
github.com/rs/cors v1.7.0 // indirect
8383
github.com/russross/blackfriday/v2 v2.1.0 // indirect
8484
github.com/segmentio/fasthash v1.0.3 // indirect

go.sum

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN
4646
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
4747
github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
4848
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
49-
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
49+
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
5050
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
5151
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno=
5252
github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo=
@@ -73,10 +73,10 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax
7373
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
7474
github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ=
7575
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
76-
github.com/ava-labs/avalanchego v1.10.13 h1:LJQoV20Rw1/D/anP7RTTTmzgvwzx3DKEfe1BZp3Szxg=
77-
github.com/ava-labs/avalanchego v1.10.13/go.mod h1:tbPGmDognRVE/6xqqal/fszBZlr0jyll3KXXO/7cuqo=
78-
github.com/ava-labs/coreth v0.12.6-rc.2 h1:5P9/i3h6g2uUYf6BVhG8YrV6iqhov6vRxph6cvuKpvU=
79-
github.com/ava-labs/coreth v0.12.6-rc.2/go.mod h1:sNbwitXv4AhLvWpSqy6V8yzkhGFeWBQFD31/xiRDJ5M=
76+
github.com/ava-labs/avalanchego v1.10.15 h1:GQ1bkwgKnv5D/yUwXUjWPFqx1cWrf35WOaHSykHUXyE=
77+
github.com/ava-labs/avalanchego v1.10.15/go.mod h1:fHTzxKZOMdM0n4EEXDDR0V3Ieb/Jnz7PM8zAsJRsh2U=
78+
github.com/ava-labs/coreth v0.12.8-rc.1 h1:tvJcxQTQzxIQqx8TnrxdyMhZYbdsMaiy6AEiOyjvaa4=
79+
github.com/ava-labs/coreth v0.12.8-rc.1/go.mod h1:GBH5SxHZdScSp95IijDs9+Gxw/QDIWvfoLKiJMNYLsE=
8080
github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
8181
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
8282
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
@@ -218,7 +218,7 @@ github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga
218218
github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
219219
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c=
220220
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
221-
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
221+
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
222222
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
223223
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
224224
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
@@ -544,8 +544,9 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
544544
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
545545
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
546546
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
547-
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
548547
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
548+
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
549+
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
549550
github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
550551
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
551552
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
@@ -713,8 +714,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
713714
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
714715
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
715716
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
716-
golang.org/x/exp v0.0.0-20230206171751-46f607a40771 h1:xP7rWLUr1e1n2xkK5YB4LI0hPEy3LJC6Wk+D4pGlOJg=
717-
golang.org/x/exp v0.0.0-20230206171751-46f607a40771/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
717+
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME=
718+
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
718719
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
719720
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
720721
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=

postman/test_signing_server.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ func parsePrivateKeyString(keyStr string) (*secp256k1.PrivateKey, *secp256k1.Pub
103103
if err != nil {
104104
return nil, nil, err
105105
}
106-
factory := secp256k1.Factory{}
107-
key, err := factory.ToPrivateKey(pkBytes)
106+
key, err := secp256k1.ToPrivateKey(pkBytes)
108107
if err != nil {
109108
return nil, nil, err
110109
}

service/backend/cchainatomictx/backend.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package cchainatomictx
33
import (
44
"github.com/ava-labs/avalanchego/codec"
55
"github.com/ava-labs/avalanchego/ids"
6-
"github.com/ava-labs/avalanchego/utils/crypto/secp256k1"
76
"github.com/ava-labs/coreth/plugin/evm"
87
"github.com/coinbase/rosetta-sdk-go/types"
98

@@ -19,7 +18,6 @@ var (
1918
)
2019

2120
type Backend struct {
22-
fac *secp256k1.Factory
2321
avalancheNetworkID uint32
2422
cClient client.Client
2523
getUTXOsPageSize uint32
@@ -31,7 +29,6 @@ type Backend struct {
3129
// NewBackend creates a C-chain atomic transaction service backend
3230
func NewBackend(cClient client.Client, avaxAssetID ids.ID, avalancheNetworkID uint32) *Backend {
3331
return &Backend{
34-
fac: &secp256k1.Factory{},
3532
avalancheNetworkID: avalancheNetworkID,
3633
cClient: cClient,
3734
getUTXOsPageSize: 1024,

service/backend/cchainatomictx/construction.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var (
2929

3030
// ConstructionDerive implements /construction/derive endpoint for C-chain atomic transactions
3131
func (b *Backend) ConstructionDerive(_ context.Context, req *types.ConstructionDeriveRequest) (*types.ConstructionDeriveResponse, *types.Error) {
32-
return common.DeriveBech32Address(b.fac, constants.CChain, req)
32+
return common.DeriveBech32Address(constants.CChain, req)
3333
}
3434

3535
// ConstructionPreprocess implements /construction/preprocess endpoint for C-chain atomic transactions

service/backend/common/construction.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ var (
3030
)
3131

3232
// DeriveBech32Address derives Bech32 addresses for the given chain using public key and hrp provided in the request
33-
func DeriveBech32Address(fac *secp256k1.Factory, chainIDAlias constants.ChainIDAlias, req *types.ConstructionDeriveRequest) (*types.ConstructionDeriveResponse, *types.Error) {
34-
pub, err := fac.ToPublicKey(req.PublicKey.Bytes)
33+
func DeriveBech32Address(chainIDAlias constants.ChainIDAlias, req *types.ConstructionDeriveRequest) (*types.ConstructionDeriveResponse, *types.Error) {
34+
pub, err := secp256k1.ToPublicKey(req.PublicKey.Bytes)
3535
if err != nil {
3636
return nil, service.WrapError(service.ErrInvalidInput, err)
3737
}

service/backend/pchain/backend.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package pchain
33
import (
44
"github.com/ava-labs/avalanchego/codec"
55
"github.com/ava-labs/avalanchego/ids"
6-
"github.com/ava-labs/avalanchego/utils/crypto/secp256k1"
76
"github.com/ava-labs/avalanchego/vms/platformvm/block"
87
"github.com/coinbase/rosetta-sdk-go/types"
98

@@ -25,7 +24,6 @@ var (
2524

2625
type Backend struct {
2726
genesisHandler
28-
fac *secp256k1.Factory
2927
networkID *types.NetworkIdentifier
3028
networkHRP string
3129
avalancheNetworkID uint32
@@ -54,7 +52,6 @@ func NewBackend(
5452

5553
b := &Backend{
5654
genesisHandler: genHandler,
57-
fac: &secp256k1.Factory{},
5855
networkID: networkIdentifier,
5956
pClient: pClient,
6057
getUTXOsPageSize: 1024,

service/backend/pchain/construction.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var (
2727

2828
// ConstructionDerive implements /construction/derive endpoint for P-chain
2929
func (b *Backend) ConstructionDerive(_ context.Context, req *types.ConstructionDeriveRequest) (*types.ConstructionDeriveResponse, *types.Error) {
30-
return common.DeriveBech32Address(b.fac, constants.PChain, req)
30+
return common.DeriveBech32Address(constants.PChain, req)
3131
}
3232

3333
// ConstructionPreprocess implements /construction/preprocess endpoint for P-chain

service/rosetta.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ var NodeVersion = fmt.Sprintf(
1414
)
1515

1616
const (
17-
MiddlewareVersion = "0.1.36"
17+
MiddlewareVersion = "0.1.37"
1818
BlockchainName = "Avalanche"
1919
)

0 commit comments

Comments
 (0)