Skip to content
Merged
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
2 changes: 1 addition & 1 deletion e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This repository-level surface hosts one black-box acceptance package. Its tests

The root package covers ICS20 transfer, ICS27 GMP, IFT (burn/mint on top of GMP) relay behavior, timeout refunds, error acknowledgements, pending-packet status, Relayer and node recovery, attestor quorum loss and recovery, cross-route handling, and relaying through an attached RPC that `Environment` does not own. These are all acceptance criteria and run together by default.

Besu light clients are covered through a two-chain Besu mesh, which requires the Besu provider and therefore skips in fast mode. `TestTransferBesuQBFT_AutoRelay` exercises client updates from sealed headers, membership proofs and acknowledgement; `TestTransferBesuQBFT_TimeoutRefund` exercises the non-membership proof of a timeout, letting the packet expire in real time; `TestTransferBesuIBFT2_AutoRelay` repeats the transfer on IBFT 2.0 chains. `TestDeployBesuQBFTIBFT2Connection` deploys a besu connection between a QBFT and an IBFT 2.0 chain with `ibc deploy client besu` alone, so each client detects a different consensus, and relays an IFT transfer over it; `TestDeployMixedBesuQBFTAttestationConnection` does the same for the production shape, a besu client on one end and an attestation client on the other, relaying a round trip so each client type proves both a receive and an acknowledgement. Client expiry is not exercised end-to-end: it would need the Besu clock moved past the trusting period.
Besu light clients are covered through a two-chain Besu mesh, which requires the Besu provider and therefore skips in fast mode. `TestTransferBesuQBFT_AutoRelay` exercises client updates from sealed headers, membership proofs and acknowledgement; `TestTransferBesuQBFT_TimeoutRefund` exercises the non-membership proof of a timeout, letting the packet expire in real time; `TestTransferBesuIBFT2_AutoRelay` repeats the transfer on IBFT 2.0 chains. `TestDeployBesuQBFTIBFT2Connection` deploys a besu connection between a QBFT and an IBFT 2.0 chain with `ibc deploy client besu` alone, so each client detects a different consensus, and relays an IFT transfer over it; `TestDeployMixedBesuQBFTAttestationConnection` does the same for the production shape, a besu client on one end and an attestation client on the other, relaying a round trip so each client type proves both a receive and an acknowledgement. `TestTransferBesuQBFT_ValidatorTurnover` and `TestTransferBesuIBFT2_ValidatorTurnover` run the source chain on two nodes and, before any packet is relayed, vote the second node in as a validator and the first out, so the relayer must step the destination's client across both set changes to relay a transfer. Their clients are deployed at a trust level of one half through `NewBesuClient.TrustLevel`, since at the default two thirds the client cannot follow the removal. `ManagedBesu.Nodes` adds the follower nodes and `Chain.Validators` votes through them. Client expiry is not exercised end-to-end: it would need the Besu clock moved past the trusting period.

## Running the acceptance tests

Expand Down
6 changes: 5 additions & 1 deletion e2e/internal/e2etest/matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ func summarizeSpec(spec environment.Spec) MatrixSpec {
case environment.ManagedAnvil:
counts["Anvil"]++
case environment.ManagedBesu:
counts["Besu "+strings.ToUpper(string(chain.Consensus))]++
typ := "Besu " + strings.ToUpper(string(chain.Consensus))
if chain.Nodes > 1 {
typ += fmt.Sprintf(" (%d nodes)", chain.Nodes)
}
counts[typ]++
case environment.AttachedEVM:
counts["Attached EVM"]++
default:
Expand Down
8 changes: 6 additions & 2 deletions e2e/internal/e2etest/matrix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ func TestMatrixCollectorJoinsSelectionsAndSpec(t *testing.T) {

// new and existing Besu clients count alike, and never as attestors
besuSummary := summarizeSpec(environment.Spec{
Chains: []environment.ChainSpec{environment.ManagedBesu{Consensus: besu.IBFT2}},
Chains: []environment.ChainSpec{
environment.ManagedBesu{Consensus: besu.IBFT2},
environment.ManagedBesu{Consensus: besu.IBFT2, Nodes: 2},
},
Connections: []environment.ConnectionSpec{{
A: environment.NewBesuClient{},
B: environment.ExistingClient{Kind: clientkind.Besu},
Expand All @@ -65,7 +68,8 @@ func TestMatrixCollectorJoinsSelectionsAndSpec(t *testing.T) {
if besuSummary.BesuClients != 2 || besuSummary.Attestors != 0 {
t.Fatalf("besu summary = %#v", besuSummary)
}
if got := besuSummary.Chains; len(got) != 1 || got[0].Type != "Besu IBFT2" {
got := besuSummary.Chains
if len(got) != 2 || got[0].Type != "Besu IBFT2" || got[1].Type != "Besu IBFT2 (2 nodes)" {
t.Fatalf("besu ibft2 chain summary = %#v", got)
}
}
Expand Down
8 changes: 8 additions & 0 deletions e2e/internal/harness/chain/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,11 @@ type FaultInjector interface {
type EOAFunder interface {
EnsureEOABalance(ctx context.Context, address common.Address, minimum *big.Int) error
}

// ValidatorVoter changes a BFT chain's validator set through header voting,
// across nodes the managed Chain runs.
type ValidatorVoter interface {
Nodes() []common.Address
Validators(ctx context.Context) ([]common.Address, error)
VoteValidator(ctx context.Context, validator common.Address, add bool) error
}
Loading
Loading