mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
bump avago v1.11.3 (#1130)
* bump avago v1.11.3 * fix tests * use test validator state in test context * fix tmpnet path * Integrate stake weighted gossip selection (#511) * Integrate stake weighted gossip selection * nit * merged * add validity check * remove redeclaration * use compressed bytes --------- Co-authored-by: Stephen Buttolph <[email protected]>
This commit is contained in:
committed by
GitHub
co-authored by
Stephen Buttolph
parent
1b354cf8f4
commit
5a73dd477f
@@ -9,7 +9,7 @@ on:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
tmpnet_data_path: ~/.tmpnet/networks/1000
|
||||
tmpnet_data_path: ~/.tmpnet/networks
|
||||
min_go_version: '~1.21.7'
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -59,7 +59,7 @@ The Subnet EVM runs in a separate process from the main AvalancheGo process and
|
||||
[v0.6.0] [email protected] (Protocol Version: 33)
|
||||
[v0.6.1] [email protected] (Protocol Version: 33)
|
||||
[v0.6.2] [email protected] (Protocol Version: 34)
|
||||
[v0.6.3] [email protected].2 (Protocol Version: 34)
|
||||
[v0.6.3] [email protected].3 (Protocol Version: 35)
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"rpcChainVMProtocolVersion": {
|
||||
"v0.6.3": 34,
|
||||
"v0.6.3": 35,
|
||||
"v0.6.2": 34,
|
||||
"v0.6.1": 33,
|
||||
"v0.6.0": 33,
|
||||
|
||||
@@ -4,7 +4,7 @@ go 1.21
|
||||
|
||||
require (
|
||||
github.com/VictoriaMetrics/fastcache v1.10.0
|
||||
github.com/ava-labs/avalanchego v1.11.2
|
||||
github.com/ava-labs/avalanchego v1.11.3
|
||||
github.com/cespare/cp v0.1.0
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/deckarep/golang-set/v2 v2.1.0
|
||||
@@ -47,15 +47,14 @@ require (
|
||||
golang.org/x/sys v0.16.0
|
||||
golang.org/x/text v0.14.0
|
||||
golang.org/x/time v0.3.0
|
||||
google.golang.org/protobuf v1.32.0
|
||||
google.golang.org/protobuf v1.33.0
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v1.3.2 // indirect
|
||||
github.com/DataDog/zstd v1.5.2 // indirect
|
||||
github.com/NYTimes/gziphandler v1.1.1 // indirect
|
||||
github.com/ava-labs/coreth v0.13.2-0.20240304213436-8afbf2d68461 // indirect
|
||||
github.com/ava-labs/coreth v0.13.2-rc.2 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bits-and-blooms/bitset v1.7.0 // indirect
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
|
||||
|
||||
@@ -56,10 +56,10 @@ github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY
|
||||
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8=
|
||||
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
|
||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||
github.com/ava-labs/avalanchego v1.11.2 h1:8iodZ+RjqpRwHdiXPPtvaNt72qravge7voGzw3yPRzg=
|
||||
github.com/ava-labs/avalanchego v1.11.2/go.mod h1:oTVnF9idL57J4LM/6RByTmKhI4QvV6OCnF99ysyBljE=
|
||||
github.com/ava-labs/coreth v0.13.2-0.20240304213436-8afbf2d68461 h1:SIwGF3eVEwmexLm7is/MvG7W5sbmpGXaUT6RfUPP3jw=
|
||||
github.com/ava-labs/coreth v0.13.2-0.20240304213436-8afbf2d68461/go.mod h1:v24MTMbxFSvyM7YeQFyWiXjIzVo2+UVs7tgH7xrByew=
|
||||
github.com/ava-labs/avalanchego v1.11.3 h1:Fgf2R46SFsbe3dbaCu0vFPaA8F1zMqdf6Y/NYjG/wcA=
|
||||
github.com/ava-labs/avalanchego v1.11.3/go.mod h1:ruzSPKSH8GBFegvNsnKerD8+8oVnkJ5ejRAOUQ4pAZU=
|
||||
github.com/ava-labs/coreth v0.13.2-rc.2 h1:GmXSyDykDUuDyW7933T8lK7Fp6/4k/IcHhLJjkvjUYI=
|
||||
github.com/ava-labs/coreth v0.13.2-rc.2/go.mod h1:jOapwtgvroqZ2U8PJpoaq1PHrUFOrlgshUWQfM3nba0=
|
||||
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
@@ -989,8 +989,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
|
||||
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
||||
@@ -844,7 +844,7 @@ func TestNetworkRouting(t *testing.T) {
|
||||
|
||||
func buildCodec(t *testing.T, types ...interface{}) codec.Manager {
|
||||
codecManager := codec.NewDefaultManager()
|
||||
c := linearcodec.NewDefault(time.Time{})
|
||||
c := linearcodec.NewDefault()
|
||||
for _, typ := range types {
|
||||
assert.NoError(t, c.RegisterType(typ))
|
||||
}
|
||||
@@ -871,7 +871,7 @@ type testAppSender struct {
|
||||
sendCrossChainAppResponseFn func(ids.ID, uint32, []byte) error
|
||||
sendAppRequestFn func(context.Context, set.Set[ids.NodeID], uint32, []byte) error
|
||||
sendAppResponseFn func(ids.NodeID, uint32, []byte) error
|
||||
sendAppGossipFn func([]byte, int, int, int) error
|
||||
sendAppGossipFn func(common.SendConfig, []byte) error
|
||||
}
|
||||
|
||||
func (t testAppSender) SendCrossChainAppRequest(_ context.Context, chainID ids.ID, requestID uint32, appRequestBytes []byte) error {
|
||||
@@ -882,10 +882,6 @@ func (t testAppSender) SendCrossChainAppResponse(_ context.Context, chainID ids.
|
||||
return t.sendCrossChainAppResponseFn(chainID, requestID, appResponseBytes)
|
||||
}
|
||||
|
||||
func (t testAppSender) SendAppGossipSpecific(context.Context, set.Set[ids.NodeID], []byte) error {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (t testAppSender) SendAppRequest(ctx context.Context, nodeIDs set.Set[ids.NodeID], requestID uint32, message []byte) error {
|
||||
return t.sendAppRequestFn(ctx, nodeIDs, requestID, message)
|
||||
}
|
||||
@@ -894,8 +890,8 @@ func (t testAppSender) SendAppResponse(_ context.Context, nodeID ids.NodeID, req
|
||||
return t.sendAppResponseFn(nodeID, requestID, message)
|
||||
}
|
||||
|
||||
func (t testAppSender) SendAppGossip(_ context.Context, message []byte, numValidators int, numNonValidators int, numPeers int) error {
|
||||
return t.sendAppGossipFn(message, numValidators, numNonValidators, numPeers)
|
||||
func (t testAppSender) SendAppGossip(_ context.Context, config common.SendConfig, message []byte) error {
|
||||
return t.sendAppGossipFn(config, message)
|
||||
}
|
||||
|
||||
func (t testAppSender) SendAppError(ctx context.Context, nodeID ids.NodeID, requestID uint32, errorCode int32, errorMessage string) error {
|
||||
|
||||
@@ -35,6 +35,7 @@ const (
|
||||
defaultMaxBlocksPerRequest = 0 // Default to no maximum on the number of blocks per getLogs request
|
||||
defaultContinuousProfilerFrequency = 15 * time.Minute
|
||||
defaultContinuousProfilerMaxFiles = 5
|
||||
defaultPushGossipPercentStake = .9
|
||||
defaultPushGossipNumValidators = 100
|
||||
defaultPushGossipNumPeers = 0
|
||||
defaultPushRegossipNumValidators = 10
|
||||
@@ -154,6 +155,7 @@ type Config struct {
|
||||
KeystoreInsecureUnlockAllowed bool `json:"keystore-insecure-unlock-allowed"`
|
||||
|
||||
// Gossip Settings
|
||||
PushGossipPercentStake float64 `json:"push-gossip-percent-stake"`
|
||||
PushGossipNumValidators int `json:"push-gossip-num-validators"`
|
||||
PushGossipNumPeers int `json:"push-gossip-num-peers"`
|
||||
PushRegossipNumValidators int `json:"push-regossip-num-validators"`
|
||||
@@ -260,6 +262,7 @@ func (c *Config) SetDefaults() {
|
||||
c.AcceptorQueueLimit = defaultAcceptorQueueLimit
|
||||
c.CommitInterval = defaultCommitInterval
|
||||
c.SnapshotWait = defaultSnapshotWait
|
||||
c.PushGossipPercentStake = defaultPushGossipPercentStake
|
||||
c.PushGossipNumValidators = defaultPushGossipNumValidators
|
||||
c.PushGossipNumPeers = defaultPushGossipNumPeers
|
||||
c.PushRegossipNumValidators = defaultPushRegossipNumValidators
|
||||
@@ -317,5 +320,8 @@ func (c *Config) Validate() error {
|
||||
return fmt.Errorf("cannot use commit interval of 0 with pruning enabled")
|
||||
}
|
||||
|
||||
if c.PushGossipPercentStake < 0 || c.PushGossipPercentStake > 1 {
|
||||
return fmt.Errorf("push-gossip-percent-stake is %f but must be in the range [0, 1]", c.PushGossipPercentStake)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ import (
|
||||
"github.com/ava-labs/avalanchego/ids"
|
||||
"github.com/ava-labs/avalanchego/utils/set"
|
||||
|
||||
commonEng "github.com/ava-labs/avalanchego/snow/engine/common"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/rlp"
|
||||
@@ -105,7 +107,7 @@ func TestMempoolEthTxsAppGossipHandling(t *testing.T) {
|
||||
return nil
|
||||
}
|
||||
wg.Add(1)
|
||||
sender.SendAppGossipF = func(context.Context, []byte, int, int, int) error {
|
||||
sender.SendAppGossipF = func(context.Context, commonEng.SendConfig, []byte) error {
|
||||
wg.Done()
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
package message
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/ava-labs/avalanchego/codec"
|
||||
"github.com/ava-labs/avalanchego/codec/linearcodec"
|
||||
"github.com/ava-labs/avalanchego/utils/units"
|
||||
@@ -24,7 +22,7 @@ var (
|
||||
|
||||
func init() {
|
||||
Codec = codec.NewManager(maxMessageSize)
|
||||
c := linearcodec.NewDefault(time.Time{})
|
||||
c := linearcodec.NewDefault()
|
||||
|
||||
errs := wrappers.Errs{}
|
||||
errs.Add(
|
||||
@@ -55,7 +53,7 @@ func init() {
|
||||
}
|
||||
|
||||
CrossChainCodec = codec.NewManager(maxMessageSize)
|
||||
ccc := linearcodec.NewDefault(time.Time{})
|
||||
ccc := linearcodec.NewDefault()
|
||||
|
||||
errs = wrappers.Errs{}
|
||||
errs.Add(
|
||||
|
||||
@@ -113,7 +113,7 @@ func TestStateSyncToggleEnabledToDisabled(t *testing.T) {
|
||||
|
||||
syncDisabledVM := &VM{}
|
||||
appSender := &commonEng.SenderTest{T: t}
|
||||
appSender.SendAppGossipF = func(context.Context, []byte, int, int, int) error { return nil }
|
||||
appSender.SendAppGossipF = func(context.Context, commonEng.SendConfig, []byte) error { return nil }
|
||||
appSender.SendAppRequestF = func(ctx context.Context, nodeSet set.Set[ids.NodeID], requestID uint32, request []byte) error {
|
||||
nodeID, hasItem := nodeSet.Pop()
|
||||
if !hasItem {
|
||||
|
||||
@@ -79,7 +79,12 @@ func TestEthTxGossip(t *testing.T) {
|
||||
return 0, nil
|
||||
}
|
||||
validatorState.GetValidatorSetF = func(context.Context, uint64, ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error) {
|
||||
return map[ids.NodeID]*validators.GetValidatorOutput{requestingNodeID: nil}, nil
|
||||
return map[ids.NodeID]*validators.GetValidatorOutput{
|
||||
requestingNodeID: {
|
||||
NodeID: requestingNodeID,
|
||||
Weight: 1,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Ask the VM for any new transactions. We should get nothing at first.
|
||||
@@ -149,12 +154,19 @@ func TestEthTxPushGossipOutbound(t *testing.T) {
|
||||
require := require.New(t)
|
||||
ctx := context.Background()
|
||||
snowCtx := utils.TestSnowContext()
|
||||
snowCtx.ValidatorState = &validators.TestState{
|
||||
GetCurrentHeightF: func(context.Context) (uint64, error) {
|
||||
return 0, nil
|
||||
},
|
||||
GetValidatorSetF: func(context.Context, uint64, ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error) {
|
||||
return nil, nil
|
||||
},
|
||||
}
|
||||
sender := &common.FakeSender{
|
||||
SentAppGossip: make(chan []byte, 1),
|
||||
}
|
||||
|
||||
vm := &VM{
|
||||
p2pSender: sender,
|
||||
ethTxPullGossiper: gossip.NoOpGossiper{},
|
||||
}
|
||||
|
||||
@@ -167,7 +179,7 @@ func TestEthTxPushGossipOutbound(t *testing.T) {
|
||||
nil,
|
||||
make(chan common.Message),
|
||||
nil,
|
||||
&common.FakeSender{},
|
||||
sender,
|
||||
))
|
||||
require.NoError(vm.SetState(ctx, snow.NormalOp))
|
||||
|
||||
@@ -208,7 +220,6 @@ func TestEthTxPushGossipInbound(t *testing.T) {
|
||||
|
||||
sender := &common.SenderTest{}
|
||||
vm := &VM{
|
||||
p2pSender: sender,
|
||||
ethTxPullGossiper: gossip.NoOpGossiper{},
|
||||
}
|
||||
|
||||
@@ -221,7 +232,7 @@ func TestEthTxPushGossipInbound(t *testing.T) {
|
||||
nil,
|
||||
make(chan common.Message),
|
||||
nil,
|
||||
&common.FakeSender{},
|
||||
sender,
|
||||
))
|
||||
require.NoError(vm.SetState(ctx, snow.NormalOp))
|
||||
|
||||
|
||||
+4
-2
@@ -688,8 +688,9 @@ func (vm *VM) initBlockBuilding() error {
|
||||
}()
|
||||
|
||||
pushGossipParams := gossip.BranchingFactor{
|
||||
Validators: vm.config.PushGossipNumValidators,
|
||||
Peers: vm.config.PushGossipNumPeers,
|
||||
StakePercentage: vm.config.PushGossipPercentStake,
|
||||
Validators: vm.config.PushGossipNumValidators,
|
||||
Peers: vm.config.PushGossipNumPeers,
|
||||
}
|
||||
pushRegossipParams := gossip.BranchingFactor{
|
||||
Validators: vm.config.PushRegossipNumValidators,
|
||||
@@ -701,6 +702,7 @@ func (vm *VM) initBlockBuilding() error {
|
||||
ethTxPushGossiper, err = gossip.NewPushGossiper[*GossipEthTx](
|
||||
ethTxGossipMarshaller,
|
||||
ethTxPool,
|
||||
vm.validators,
|
||||
ethTxGossipClient,
|
||||
ethTxGossipMetrics,
|
||||
pushGossipParams,
|
||||
|
||||
@@ -208,7 +208,7 @@ func GenesisVM(t *testing.T,
|
||||
ctx, dbManager, genesisBytes, issuer, _ := setupGenesis(t, genesisJSON)
|
||||
appSender := &commonEng.SenderTest{T: t}
|
||||
appSender.CantSendAppGossip = true
|
||||
appSender.SendAppGossipF = func(context.Context, []byte, int, int, int) error { return nil }
|
||||
appSender.SendAppGossipF = func(context.Context, commonEng.SendConfig, []byte) error { return nil }
|
||||
err := vm.Initialize(
|
||||
context.Background(),
|
||||
ctx,
|
||||
@@ -1994,7 +1994,7 @@ func TestConfigureLogLevel(t *testing.T) {
|
||||
ctx, dbManager, genesisBytes, issuer, _ := setupGenesis(t, test.genesisJSON)
|
||||
appSender := &commonEng.SenderTest{T: t}
|
||||
appSender.CantSendAppGossip = true
|
||||
appSender.SendAppGossipF = func(context.Context, []byte, int, int, int) error { return nil }
|
||||
appSender.SendAppGossipF = func(context.Context, commonEng.SendConfig, []byte) error { return nil }
|
||||
err := vm.Initialize(
|
||||
context.Background(),
|
||||
ctx,
|
||||
|
||||
@@ -179,7 +179,7 @@ func TestNetworkUpgradesOverriden(t *testing.T) {
|
||||
ctx, dbManager, genesisBytes, issuer, _ := setupGenesis(t, string(genesisBytes))
|
||||
appSender := &commonEng.SenderTest{T: t}
|
||||
appSender.CantSendAppGossip = true
|
||||
appSender.SendAppGossipF = func(context.Context, []byte, int, int, int) error { return nil }
|
||||
appSender.SendAppGossipF = func(context.Context, commonEng.SendConfig, []byte) error { return nil }
|
||||
err = vm.Initialize(
|
||||
context.Background(),
|
||||
ctx,
|
||||
|
||||
@@ -6,7 +6,6 @@ package predicate
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/ava-labs/avalanchego/codec"
|
||||
"github.com/ava-labs/avalanchego/codec/linearcodec"
|
||||
@@ -25,7 +24,7 @@ var Codec codec.Manager
|
||||
func init() {
|
||||
Codec = codec.NewManager(MaxResultsSize)
|
||||
|
||||
c := linearcodec.NewDefault(time.Time{})
|
||||
c := linearcodec.NewDefault()
|
||||
errs := wrappers.Errs{}
|
||||
errs.Add(
|
||||
c.RegisterType(Results{}),
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
# Don't export them as they're used in the context of other calls
|
||||
AVALANCHE_VERSION=${AVALANCHE_VERSION:-'v1.11.2'}
|
||||
AVALANCHE_VERSION=${AVALANCHE_VERSION:-'v1.11.3'}
|
||||
GINKGO_VERSION=${GINKGO_VERSION:-'v2.2.0'}
|
||||
|
||||
# This won't be used, but it's here to make code syncs easier
|
||||
|
||||
+11
-9
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/ava-labs/avalanchego/api/metrics"
|
||||
"github.com/ava-labs/avalanchego/ids"
|
||||
"github.com/ava-labs/avalanchego/snow"
|
||||
"github.com/ava-labs/avalanchego/snow/validators"
|
||||
"github.com/ava-labs/avalanchego/utils/crypto/bls"
|
||||
"github.com/ava-labs/avalanchego/utils/logging"
|
||||
)
|
||||
@@ -18,14 +19,15 @@ func TestSnowContext() *snow.Context {
|
||||
}
|
||||
pk := bls.PublicFromSecretKey(sk)
|
||||
return &snow.Context{
|
||||
NetworkID: 0,
|
||||
SubnetID: ids.Empty,
|
||||
ChainID: ids.Empty,
|
||||
NodeID: ids.EmptyNodeID,
|
||||
PublicKey: pk,
|
||||
Log: logging.NoLog{},
|
||||
BCLookup: ids.NewAliaser(),
|
||||
Metrics: metrics.NewOptionalGatherer(),
|
||||
ChainDataDir: "",
|
||||
NetworkID: 0,
|
||||
SubnetID: ids.Empty,
|
||||
ChainID: ids.Empty,
|
||||
NodeID: ids.EmptyNodeID,
|
||||
PublicKey: pk,
|
||||
Log: logging.NoLog{},
|
||||
BCLookup: ids.NewAliaser(),
|
||||
Metrics: metrics.NewOptionalGatherer(),
|
||||
ChainDataDir: "",
|
||||
ValidatorState: &validators.TestState{},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ func newValidator(t testing.TB, weight uint64) (*bls.SecretKey, *avalancheWarp.V
|
||||
pk := bls.PublicFromSecretKey(sk)
|
||||
return sk, &avalancheWarp.Validator{
|
||||
PublicKey: pk,
|
||||
PublicKeyBytes: bls.PublicKeyToBytes(pk),
|
||||
PublicKeyBytes: bls.PublicKeyToCompressedBytes(pk),
|
||||
Weight: weight,
|
||||
NodeIDs: []ids.NodeID{ids.GenerateTestNodeID()},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user