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

[anitithesis] increase number of keys from 5 to 6 #3369

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
8 changes: 5 additions & 3 deletions tests/antithesis/avalanchego/gencomposeconfig/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ import (
"log"

"github.com/ava-labs/avalanchego/tests/antithesis"
"github.com/ava-labs/avalanchego/tests/fixture/tmpnet"
)

const baseImageName = "antithesis-avalanchego"
const (
baseImageName = "antithesis-avalanchego"
NumNodes = 6
)

// Creates docker-compose.yml and its associated volumes in the target path.
func main() {
network := tmpnet.LocalNetworkOrPanic()
network := antithesis.CreateNetwork(NumNodes)
if err := antithesis.GenerateComposeConfig(network, baseImageName, "" /* runtimePluginDir */); err != nil {
log.Fatalf("failed to generate compose config: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion tests/antithesis/avalanchego/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
xbuilder "github.com/ava-labs/avalanchego/wallet/chain/x/builder"
)

const NumKeys = 5
const NumKeys = 6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(No action required) Maybe this value should be defined in tests/antithesis and reused elsewhere?


func main() {
tc := tests.NewTestContext()
Expand Down
15 changes: 15 additions & 0 deletions tests/antithesis/network.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package antithesis

import (
"github.com/ava-labs/avalanchego/tests/fixture/tmpnet"
)

// Creates a network with the given number of nodes.
func CreateNetwork(nodesCount int) *tmpnet.Network {
network := tmpnet.NewDefaultNetwork("antithesis-network")
network.Nodes = tmpnet.NewNodesOrPanic(nodesCount)
return network
}
7 changes: 5 additions & 2 deletions tests/antithesis/xsvm/gencomposeconfig/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ import (
"github.com/ava-labs/avalanchego/tests/fixture/tmpnet"
)

const baseImageName = "antithesis-xsvm"
const (
baseImageName = "antithesis-xsvm"
NumNodes = 6
)

// Creates docker-compose.yml and its associated volumes in the target path.
func main() {
network := tmpnet.LocalNetworkOrPanic()
network := antithesis.CreateNetwork(NumNodes)
network.Subnets = []*tmpnet.Subnet{
subnet.NewXSVMOrPanic("xsvm", genesis.VMRQKey, network.Nodes...),
}
Expand Down
2 changes: 1 addition & 1 deletion tests/antithesis/xsvm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
)

const (
NumKeys = 5
NumKeys = 6
PollingInterval = 50 * time.Millisecond
)

Expand Down
Loading