Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.8
require (
github.com/VictoriaMetrics/fastcache v1.12.1
github.com/antithesishq/antithesis-sdk-go v0.3.8
github.com/ava-labs/avalanchego v1.11.13-0.20241113171850-4c199890fadb
github.com/ava-labs/avalanchego v1.11.13-rc.1
github.com/cespare/cp v0.1.0
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233
github.com/davecgh/go-spew v1.1.1
Expand Down Expand Up @@ -54,7 +54,7 @@ require (
require (
github.com/DataDog/zstd v1.5.2 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/ava-labs/coreth v0.13.8 // indirect
github.com/ava-labs/coreth v0.13.9-rc.1 // 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 Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/ava-labs/avalanchego v1.11.13-0.20241113171850-4c199890fadb h1:ujIv6zAKQpZtlalLGSt9cx2AREJmYcv0wMmXGRAH6/g=
github.com/ava-labs/avalanchego v1.11.13-0.20241113171850-4c199890fadb/go.mod h1:86tO6F1FT8emclUwdQ2WCwAtAerqjm5A4IbV6XxNUyM=
github.com/ava-labs/coreth v0.13.8 h1:f14X3KgwHl9LwzfxlN6S4bbn5VA2rhEsNnHaRLSTo/8=
github.com/ava-labs/coreth v0.13.8/go.mod h1:t3BSv/eQv0AlDPMfEDCMMoD/jq1RkUsbFzQAFg5qBcE=
github.com/ava-labs/avalanchego v1.11.13-rc.1 h1:lHAkvMo98y/4xvsRKZ4GUTEj0yPnRbGC4U68rC06/rs=
github.com/ava-labs/avalanchego v1.11.13-rc.1/go.mod h1:yhD5dpZyStIVbxQ550EDi5w5SL7DQ/xGE6TIxosb7U0=
github.com/ava-labs/coreth v0.13.9-rc.1 h1:qIICpC/OZGYUP37QnLgIqqwGmxnLwLpZaUlqJNI85vU=
github.com/ava-labs/coreth v0.13.9-rc.1/go.mod h1:7aMsRIo/3GBE44qWZMjnfqdqfcfZ5yShTTm2LObLaYo=
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=
Expand Down
4 changes: 2 additions & 2 deletions plugin/evm/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type CurrentValidator struct {
Weight uint64 `json:"weight"`
StartTimestamp uint64 `json:"startTimestamp"`
IsActive bool `json:"isActive"`
IsSoV bool `json:"isSoV"`
IsL1Validator bool `json:"isL1Validator"`
IsConnected bool `json:"isConnected"`
Uptime time.Duration `json:"uptime"`
}
Expand Down Expand Up @@ -56,7 +56,7 @@ func (api *ValidatorsAPI) GetCurrentValidators(_ *http.Request, _ *struct{}, rep
StartTimestamp: validator.StartTimestamp,
Weight: validator.Weight,
IsActive: validator.IsActive,
IsSoV: validator.IsSoV,
IsL1Validator: validator.IsL1Validator,
IsConnected: isConnected,
Uptime: time.Duration(uptime.Seconds()),
})
Expand Down
2 changes: 1 addition & 1 deletion plugin/evm/validators/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func loadValidators(validatorState stateinterfaces.State, newValidators map[ids.
Weight: newVdr.Weight,
StartTimestamp: newVdr.StartTime,
IsActive: newVdr.IsActive,
IsSoV: newVdr.IsSoV,
IsL1Validator: newVdr.IsL1Validator,
}
if currentValidationIDs.Contains(newVID) {
if err := validatorState.UpdateValidator(currentVdr); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions plugin/evm/validators/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func TestLoadNewValidators(t *testing.T) {
Weight: validator.Weight,
StartTimestamp: validator.StartTime,
IsActive: validator.IsActive,
IsSoV: validator.IsSoV,
IsL1Validator: validator.IsL1Validator,
})
require.NoError(err)
}
Expand All @@ -214,7 +214,7 @@ func TestLoadNewValidators(t *testing.T) {
require.Equal(validator.Weight, v.Weight)
require.Equal(validator.StartTime, v.StartTimestamp)
require.Equal(validator.IsActive, v.IsActive)
require.Equal(validator.IsSoV, v.IsSoV)
require.Equal(validator.IsL1Validator, v.IsL1Validator)
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion plugin/evm/validators/state/interfaces/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ type Validator struct {
Weight uint64 `json:"weight"`
StartTimestamp uint64 `json:"startTimestamp"`
IsActive bool `json:"isActive"`
IsSoV bool `json:"isSoV"`
IsL1Validator bool `json:"isL1Validator"`
}
34 changes: 17 additions & 17 deletions plugin/evm/validators/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ const (
)

type validatorData struct {
UpDuration time.Duration `serialize:"true"`
LastUpdated uint64 `serialize:"true"`
NodeID ids.NodeID `serialize:"true"`
Weight uint64 `serialize:"true"`
StartTime uint64 `serialize:"true"`
IsActive bool `serialize:"true"`
IsSoV bool `serialize:"true"`
UpDuration time.Duration `serialize:"true"`
LastUpdated uint64 `serialize:"true"`
NodeID ids.NodeID `serialize:"true"`
Weight uint64 `serialize:"true"`
StartTime uint64 `serialize:"true"`
IsActive bool `serialize:"true"`
IsL1Validator bool `serialize:"true"`

validationID ids.ID // database key
}
Expand Down Expand Up @@ -105,14 +105,14 @@ func (s *state) GetStartTime(nodeID ids.NodeID) (time.Time, error) {
// the new validator is marked as updated and will be written to the disk when WriteState is called
func (s *state) AddValidator(vdr interfaces.Validator) error {
data := &validatorData{
NodeID: vdr.NodeID,
validationID: vdr.ValidationID,
IsActive: vdr.IsActive,
StartTime: vdr.StartTimestamp,
UpDuration: 0,
LastUpdated: vdr.StartTimestamp,
IsSoV: vdr.IsSoV,
Weight: vdr.Weight,
NodeID: vdr.NodeID,
validationID: vdr.ValidationID,
IsActive: vdr.IsActive,
StartTime: vdr.StartTimestamp,
UpDuration: 0,
LastUpdated: vdr.StartTimestamp,
IsL1Validator: vdr.IsL1Validator,
Weight: vdr.Weight,
}
if err := s.addData(vdr.ValidationID, data); err != nil {
return err
Expand Down Expand Up @@ -251,7 +251,7 @@ func (s *state) GetValidator(vID ids.ID) (interfaces.Validator, error) {
StartTimestamp: data.StartTime,
IsActive: data.IsActive,
Weight: data.Weight,
IsSoV: data.IsSoV,
IsL1Validator: data.IsL1Validator,
}, nil
}

Expand Down Expand Up @@ -345,6 +345,6 @@ func (v *validatorData) getStartTime() time.Time {
func (v *validatorData) constantsAreUnmodified(u interfaces.Validator) bool {
return v.validationID == u.ValidationID &&
v.NodeID == u.NodeID &&
v.IsSoV == u.IsSoV &&
v.IsL1Validator == u.IsL1Validator &&
v.StartTime == u.StartTimestamp
}
56 changes: 28 additions & 28 deletions plugin/evm/validators/state/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestState(t *testing.T) {
Weight: 1,
StartTimestamp: uint64(startTime.Unix()),
IsActive: true,
IsSoV: true,
IsL1Validator: true,
}
state.AddValidator(vdr)

Expand Down Expand Up @@ -98,7 +98,7 @@ func TestState(t *testing.T) {
require.ErrorIs(state.UpdateValidator(vdr), ErrImmutableField)

// set SoV should fail
vdr.IsSoV = false
vdr.IsL1Validator = false
require.ErrorIs(state.UpdateValidator(vdr), ErrImmutableField)

// set validation ID should result in not found
Expand Down Expand Up @@ -131,7 +131,7 @@ func TestWriteValidator(t *testing.T) {
Weight: 1,
StartTimestamp: uint64(startTime.Unix()),
IsActive: true,
IsSoV: true,
IsL1Validator: true,
}))

// write state, should reflect to DB
Expand Down Expand Up @@ -176,29 +176,29 @@ func TestParseValidator(t *testing.T) {
name: "nil",
bytes: nil,
expected: &validatorData{
LastUpdated: 0,
StartTime: 0,
validationID: ids.Empty,
NodeID: ids.EmptyNodeID,
UpDuration: 0,
Weight: 0,
IsActive: false,
IsSoV: false,
LastUpdated: 0,
StartTime: 0,
validationID: ids.Empty,
NodeID: ids.EmptyNodeID,
UpDuration: 0,
Weight: 0,
IsActive: false,
IsL1Validator: false,
},
expectedErr: nil,
},
{
name: "empty",
bytes: []byte{},
expected: &validatorData{
LastUpdated: 0,
StartTime: 0,
validationID: ids.Empty,
NodeID: ids.EmptyNodeID,
UpDuration: 0,
Weight: 0,
IsActive: false,
IsSoV: false,
LastUpdated: 0,
StartTime: 0,
validationID: ids.Empty,
NodeID: ids.EmptyNodeID,
UpDuration: 0,
Weight: 0,
IsActive: false,
IsL1Validator: false,
},
expectedErr: nil,
},
Expand All @@ -225,13 +225,13 @@ func TestParseValidator(t *testing.T) {
0x01,
},
expected: &validatorData{
UpDuration: time.Duration(6000000),
LastUpdated: 900000,
NodeID: testNodeID,
StartTime: 6000000,
IsActive: true,
Weight: 1,
IsSoV: true,
UpDuration: time.Duration(6000000),
LastUpdated: 900000,
NodeID: testNodeID,
StartTime: 6000000,
IsActive: true,
Weight: 1,
IsL1Validator: true,
},
},
{
Expand Down Expand Up @@ -299,7 +299,7 @@ func TestStateListener(t *testing.T) {
Weight: 1,
StartTimestamp: uint64(initialStartTime.Unix()),
IsActive: true,
IsSoV: true,
IsL1Validator: true,
}))

// register listener
Expand All @@ -314,7 +314,7 @@ func TestStateListener(t *testing.T) {
Weight: 1,
StartTimestamp: uint64(expectedStartTime.Unix()),
IsActive: true,
IsSoV: true,
IsL1Validator: true,
}
require.NoError(state.AddValidator(vdr))

Expand Down
2 changes: 1 addition & 1 deletion plugin/evm/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var (
// GitCommit is set by the build script
GitCommit string
// Version is the version of Subnet EVM
Version string = "v0.6.11"
Version string = "v0.6.12"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion scripts/versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:-'4c199890'}
AVALANCHE_VERSION=${AVALANCHE_VERSION:-'v1.11.13-rc.1'}
GINKGO_VERSION=${GINKGO_VERSION:-'v2.2.0'}

# This won't be used, but it's here to make code syncs easier
Expand Down
5 changes: 3 additions & 2 deletions tests/warp/warp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"github.com/ava-labs/avalanchego/tests/fixture/tmpnet"
"github.com/ava-labs/avalanchego/utils/constants"
"github.com/ava-labs/avalanchego/vms/platformvm"
"github.com/ava-labs/avalanchego/vms/platformvm/api"
avalancheWarp "github.com/ava-labs/avalanchego/vms/platformvm/warp"
"github.com/ava-labs/avalanchego/vms/platformvm/warp/payload"

Expand Down Expand Up @@ -402,9 +403,9 @@ func (w *warpTest) aggregateSignaturesViaAPI() {
// If the destination turns out to be the Primary Network as well, then this is a no-op.
var validators map[ids.NodeID]*validators.GetValidatorOutput
if w.sendingSubnet.SubnetID == constants.PrimaryNetworkID {
validators, err = pChainClient.GetValidatorsAt(ctx, w.receivingSubnet.SubnetID, pChainHeight)
validators, err = pChainClient.GetValidatorsAt(ctx, w.receivingSubnet.SubnetID, api.Height(pChainHeight))
} else {
validators, err = pChainClient.GetValidatorsAt(ctx, w.sendingSubnet.SubnetID, pChainHeight)
validators, err = pChainClient.GetValidatorsAt(ctx, w.sendingSubnet.SubnetID, api.Height(pChainHeight))
}
require.NoError(err)
require.NotZero(len(validators))
Expand Down
2 changes: 1 addition & 1 deletion warp/verifier_backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ func TestUptimeSignatures(t *testing.T) {
Weight: 1,
StartTimestamp: clk.Unix(),
IsActive: true,
IsSoV: true,
IsL1Validator: true,
}))
protoBytes, _ = getUptimeMessageBytes([]byte{}, validationID, 80)
_, appErr = handler.AppRequest(context.Background(), nodeID, time.Time{}, protoBytes)
Expand Down