dymensionxyz/e2e-tests

[E2E Test] Genesis transfers: bridge blocking

Closed this issue · 1 comments

Test Case Type

New

DRS

EVM

Target Milestone

3D

Test Case Issue link

No response

Epic

genesis-bridge

Test Case Description

When I create a new rollapp, I will specify genesis accounts in the genesis file.
After registering the rollapp and sequencer on the hub, then I can open a relayer Hub->RA.
There is a short window of time when the Hub will BLOCK any ibc transfers

  • Hub->RA: rejected immediately in ante handler
  • RA->Hub: rejected immediately in middleware

After some time, the genesis transfers will arrive on the Hub
An event will be emitted https://github.com/dymensionxyz/dymension/blob/6a54cf642d61f894231b1f5a7294ec4abc688154/x/rollapp/types/events.go#L23
The bridge will be open for transfers To/From

Preconditions

Hub and rollapp are up and running, and registered sequencer and rollapp on Hub
Rollapp contains correct genesis data

Test Steps

Create Hub
Create RA with genesis accounts in genesis
Start relayer(s) connection Hub->RA
Immediately send transfers Hub->RA and RA->Hub, they should be rejected
Await event https://github.com/dymensionxyz/dymension/blob/6a54cf642d61f894231b1f5a7294ec4abc688154/x/rollapp/types/events.go#L23
Transfers will no longer be rejected

Expected Results

Before Hub event, transfers are blocked/refunded

Live Test

  • Yes

Comments

There are three relevant PRs which need to land before this test can be done
dymensionxyz/dymension#933
dymensionxyz/dymension-rdk#449
dymensionxyz/rollapp-evm#279
The tests must be run with the new Hub
New functionality should be tested with the new rollapp evm
Existing functionality (may) be backwards-compat tested with the new hub and the old rollapp evm
Ask Dan at Dymension for any questions
IMPORTANT: you SHOULD read the protocol overview here https://github.com/dymensionxyz/dymension/blob/67a424ea0886dc99a9d890f4308c65347bc9daa0/x/rollapp/transfergenesis/doc.go#L1-L11
Additionally, see here for an example rollapp genesis file https://pastebin.com/ji0PiTKW,
and this PR diff for an understanding of changes to the rollapp setup steps https://github.com/dymensionxyz/rollapp-evm/pull/279/files#diff-2238c8f2eb7e6ce10c76e9d98719c4d2c2913c70d6a19c40b2487ef5019c6eb7
I have not ticked 'live test', but it would be good. Would require Hub upgrade.

Note, I've just changed the description of the test

- RA->Hub: rejected on the Hub, resulting in refund on the RA
RA->Hub: rejected immediately in middleware