Skip to content

Commit

Permalink
Sequencer Rotation happy flow with one sequencer coming and syncing o…
Browse files Browse the repository at this point in the history
…ver P2P (#397)

Co-authored-by: anhductn2001 <[email protected]>
Co-authored-by: ducnt131 <[email protected]>
  • Loading branch information
3 people committed Sep 27, 2024
1 parent 5bb3e2b commit 93db30c
Show file tree
Hide file tree
Showing 10 changed files with 486 additions and 40 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ e2e-test: clean-e2e
e2e-test-ibc-success-evm: clean-e2e
cd tests && go test -timeout=45m -race -v -run TestIBCTransferSuccess_EVM .

e2e-test-one-sqc-rotation-success-evm: clean-e2e
cd tests && go test -timeout=45m -race -v -run Test_SqcRotation_OneSqc_Success_EVM .

e2e-test-light-client-same-chain-id-transfer: clean-e2e
cd tests && go test -timeout=45m -race -v -run TestIBCTransferRA_3rdSameChainID_EVM .

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ replace (

require (
github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869
github.com/decentrio/rollup-e2e-testing v0.0.0-20240924090607-6658e898c353
github.com/decentrio/rollup-e2e-testing v0.0.0-20240925065439-bea0cdea5436
github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240911123104-4782bc4e587f
github.com/dymensionxyz/dymint v1.2.0-rc01.0.20240919105350-66f9b353655d
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,8 @@ github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U=
github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869 h1:qWpUYGOsrSC+1Vmd2TjhbsSpntvvx9PsX3AoeMunFxc=
github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869/go.mod h1:HZNYnPwmSxkwTPjSD5yolauc1Vx1ZzKL4FFMxTq4H5Y=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240924090607-6658e898c353 h1:uA+obWLk1tbZDN1SgewNQLvmDbEIqoxcsD8+/wxenSo=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240924090607-6658e898c353/go.mod h1:QmBrZgZplhtgHRWC0Z7LC7TDsKuC8sDyQvZyXXaqw/c=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240925065439-bea0cdea5436 h1:6RhXRXX88ADn3xlL1FS6ybzZQuX4TOIA1JOdSWxyGuU=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240925065439-bea0cdea5436/go.mod h1:QmBrZgZplhtgHRWC0Z7LC7TDsKuC8sDyQvZyXXaqw/c=
github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4=
github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=
github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI=
Expand Down
2 changes: 1 addition & 1 deletion tests/data/metadata_sequencer1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"moniker": "sequencer",
"moniker": "sequencer1111",
"details": "This is a description of the Rollapp.",
"p2p_seeds": ["seed1"],
"rpcs": ["https://rpc.wpd.evm.rollapp.noisnemyd.xyz:443", "https://rpc.wpd.wasm.rollapp.noisnemyd.xyz:443"],
Expand Down
2 changes: 1 addition & 1 deletion tests/disconnection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func TestDisconnection_Wasm(t *testing.T) {
dymintTomlOverrides["settlement_gas_prices"] = "0adym"
dymintTomlOverrides["max_idle_time"] = "3s"
dymintTomlOverrides["max_proof_time"] = "500ms"
dymintTomlOverrides["batch_submit_time"] = "5s"
dymintTomlOverrides["batch_submit_time"] = "50s"
dymintTomlOverrides["batch_submit_bytes"] = "1000"
dymintTomlOverrides["block_batch_max_size_bytes"] = "1000"
dymintTomlOverrides["max_batch_skew"] = "1"
Expand Down
3 changes: 3 additions & 0 deletions tests/eibc_ack_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,9 @@ func TestEIBC_AckError_Dym_Wasm(t *testing.T) {
require.True(t, balance.Equal(zeroBal), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBal, balance))

// catch ACK errors
err = testutil.WaitForBlocks(ctx, 10, dymension)
require.NoError(t, err)

rollappHeight, err = rollapp1.Height(ctx)
require.NoError(t, err)

Expand Down
6 changes: 3 additions & 3 deletions tests/eibc_fulfillment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1684,14 +1684,14 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) {
rollappHeight, err := rollapp1.GetNode().Height(ctx)
require.NoError(t, err)

rollapp2Height, err := rollapp2.GetNode().Height(ctx)
require.NoError(t, err)

// wait until the packet is finalized
isFinalized, err := dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300)
require.NoError(t, err)
require.True(t, isFinalized)

rollapp2Height, err := rollapp2.GetNode().Height(ctx)
require.NoError(t, err)

isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp2.GetChainID(), rollapp2Height, 300)
require.NoError(t, err)
require.True(t, isFinalized)
Expand Down
4 changes: 2 additions & 2 deletions tests/fullnode_sync_block_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func TestSync_BlockSync_EVM(t *testing.T) {
require.NoError(t, err)
// require.Error(t, err)

containerID = fmt.Sprintf("rollappevm_1234-1-val-0-%s", t.Name())
containerID = fmt.Sprintf("ra-rollappevm_1234-1-val-0-%s", t.Name())

// Get the container details
containerJSON, err := client.ContainerInspect(context.Background(), containerID)
Expand Down Expand Up @@ -618,7 +618,7 @@ func TestSync_BlockSync_fn_disconnect_EVM(t *testing.T) {
}, nil, "", nil, true, 780)
require.NoError(t, err)

containerID = fmt.Sprintf("rollappevm_1234-1-val-0-%s", t.Name())
containerID = fmt.Sprintf("ra-rollappevm_1234-1-val-0-%s", t.Name())

// Get the container details
containerJSON, err := client.ContainerInspect(context.Background(), containerID)
Expand Down
12 changes: 6 additions & 6 deletions tests/fullnode_sync_gossip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func TestSync_Celes_Rt_Gossip_EVM(t *testing.T) {
}, nil, "", nil, true, 780)
require.NoError(t, err)

containerID = fmt.Sprintf("rollappevm_1234-1-val-0-%s", t.Name())
containerID = fmt.Sprintf("ra-rollappevm_1234-1-val-0-%s", t.Name())

// Get the container details
containerJSON, err := client.ContainerInspect(context.Background(), containerID)
Expand Down Expand Up @@ -604,7 +604,7 @@ func TestSync_Celes_Rt_Gossip_Wasm(t *testing.T) {
}, nil, "", nil, true, 780)
require.NoError(t, err)

containerID = fmt.Sprintf("rollappwasm_1234-1-val-0-%s", t.Name())
containerID = fmt.Sprintf("ra-rollappwasm_1234-1-val-0-%s", t.Name())

// Get the container details
containerJSON, err := client.ContainerInspect(context.Background(), containerID)
Expand Down Expand Up @@ -928,7 +928,7 @@ func TestSync_Sqc_Disconnect_Gossip_EVM(t *testing.T) {
}, nil, "", nil, true, 780)
require.NoError(t, err)

containerID = fmt.Sprintf("rollappevm_1234-1-val-0-%s", t.Name())
containerID = fmt.Sprintf("ra-rollappevm_1234-1-val-0-%s", t.Name())

// Get the container details
containerJSON, err := client.ContainerInspect(context.Background(), containerID)
Expand Down Expand Up @@ -1279,7 +1279,7 @@ func TestSync_Sqc_Disconnect_Gossip_Wasm(t *testing.T) {
}, nil, "", nil, true, 780)
require.NoError(t, err)

containerID = fmt.Sprintf("rollappwasm_1234-1-val-0-%s", t.Name())
containerID = fmt.Sprintf("ra-rollappwasm_1234-1-val-0-%s", t.Name())

// Get the container details
containerJSON, err := client.ContainerInspect(context.Background(), containerID)
Expand Down Expand Up @@ -1630,7 +1630,7 @@ func TestSync_Fullnode_Disconnect_Gossip_EVM(t *testing.T) {
}, nil, "", nil, true, 780)
require.NoError(t, err)

containerID = fmt.Sprintf("rollappevm_1234-1-val-0-%s", t.Name())
containerID = fmt.Sprintf("ra-rollappevm_1234-1-val-0-%s", t.Name())

// Get the container details
containerJSON, err := client.ContainerInspect(context.Background(), containerID)
Expand Down Expand Up @@ -1982,7 +1982,7 @@ func TestSync_Fullnode_Disconnect_Gossip_Wasm(t *testing.T) {
}, nil, "", nil, true, 780)
require.NoError(t, err)

containerID = fmt.Sprintf("rollappwasm_1234-1-val-0-%s", t.Name())
containerID = fmt.Sprintf("ra-rollappwasm_1234-1-val-0-%s", t.Name())

// Get the container details
containerJSON, err := client.ContainerInspect(context.Background(), containerID)
Expand Down
Loading

0 comments on commit 93db30c

Please sign in to comment.