Skip to content

Commit

Permalink
fix validator for subnetC
Browse files Browse the repository at this point in the history
  • Loading branch information
gwen917 committed Nov 20, 2023
1 parent 460f295 commit 06c42ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ var _ = ginkgo.BeforeSuite(func() {
var _ = ginkgo.AfterSuite(localUtils.TearDownNetwork)

var _ = ginkgo.Describe("[Teleporter integration tests]", func() {
// Cross-chain application tests
ginkgo.It("Example cross chain messenger", ExampleMessengerGinkgo)
ginkgo.It("ERC20 bridge multihop", ERC20BridgeMultihopGinkgo)

// Teleporter tests
ginkgo.It("Send a message from Subnet A to Subnet B", BasicOneWaySendGinkgo)
ginkgo.It("Deliver to the wrong chain", DeliverToWrongChainGinkgo)
Expand All @@ -68,4 +64,8 @@ var _ = ginkgo.Describe("[Teleporter integration tests]", func() {
ginkgo.It("Resubmit altered message", ResubmitAlteredMessageGinkgo)
ginkgo.It("Relayer modifies message", RelayerModifiesMessageGinkgo)
ginkgo.It("Validator churn", ValidatorChurnGinkgo)

// Cross-chain application tests
ginkgo.It("Example cross chain messenger", ExampleMessengerGinkgo)
ginkgo.It("ERC20 bridge multihop", ERC20BridgeMultihopGinkgo)
})
8 changes: 7 additions & 1 deletion tests/validator_churn.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func ValidatorChurnGinkgo() {
subnets := network.GetSubnetsInfo()
subnetAInfo := subnets[0]
subnetBInfo := subnets[1]
subnetCInfo := subnets[2]
teleporterContractAddress := network.GetTeleporterContractAddress()
fundedAddress, fundedKey := network.GetFundedAccountInfo()

Expand Down Expand Up @@ -82,7 +83,7 @@ func ValidatorChurnGinkgo() {
// Add new nodes to the validator set
log.Info("Adding nodes to the validator set")
var nodesToAdd []string
for i := 15; i <= 19; i++ {
for i := 16; i <= 20; i++ {
n := fmt.Sprintf("node%d-bls", i)
nodesToAdd = append(nodesToAdd, n)
}
Expand All @@ -92,6 +93,7 @@ func ValidatorChurnGinkgo() {
subnets = network.GetSubnetsInfo()
subnetAInfo = subnets[0]
subnetBInfo = subnets[1]
subnetCInfo = subnets[2]

// Trigger the proposer VM to update its height so that the inner VM can see the new validator set
err = subnetEvmUtils.IssueTxsToActivateProposerVMFork(
Expand All @@ -102,6 +104,10 @@ func ValidatorChurnGinkgo() {
ctx, subnetBInfo.ChainIDInt, fundedKey, subnetBInfo.ChainWSClient,
)
Expect(err).Should(BeNil())
err = subnetEvmUtils.IssueTxsToActivateProposerVMFork(
ctx, subnetCInfo.ChainIDInt, fundedKey, subnetCInfo.ChainWSClient,
)
Expect(err).Should(BeNil())

//
// Attempt to deliver the warp message signed by the old validator set. This should fail.
Expand Down

0 comments on commit 06c42ed

Please sign in to comment.