Skip to content

Commit

Permalink
test: add tests for batch tx with acks and timeouts (#208)
Browse files Browse the repository at this point in the history
Co-authored-by: srdtrk <[email protected]>
  • Loading branch information
gjermundgaraba and srdtrk authored Jan 10, 2025
1 parent f8ed823 commit c828096
Show file tree
Hide file tree
Showing 14 changed files with 363 additions and 30 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ jobs:
- TestWithRelayerTestSuite/Test_5_TimeoutPacketFromEth_Plonk
- TestWithRelayerTestSuite/TestRecvPacketToCosmos
- TestWithRelayerTestSuite/Test_10_RecvPacketToCosmos
- TestWithRelayerTestSuite/TestBatchedAckPacketToCosmos
- TestWithRelayerTestSuite/Test_10_BatchedAckPacketToCosmos
- TestWithRelayerTestSuite/TestTimeoutPacketFromCosmos
- TestWithRelayerTestSuite/Test_10_TimeoutPacketFromCosmos
- TestWithCosmosRelayerTestSuite/TestRelayerInfo
- TestWithCosmosRelayerTestSuite/TestICS20RecvAndAckPacket
- TestWithCosmosRelayerTestSuite/Test_10_ICS20RecvAndAckPacket
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This is a work-in-progress IBC Eureka implementation in Solidity. IBC Eureka is

### Project Structure

This project is structered as a [foundry](https://getfoundry.sh/) project with the following directories:
This project is structured as a [foundry](https://getfoundry.sh/) project with the following directories:

- `contracts/`: Contains the Solidity contracts.
- `test/`: Contains the Solidity tests.
Expand Down Expand Up @@ -240,4 +240,4 @@ This project is licensed under MIT.
## Acknowledgements
This project was bootstrapped with this [template](https://github.com/PaulRBerg/foundry-template). Implementations of IBC specifications in [solidity](https://github.com/hyperledger-labs/yui-ibc-solidity/), [CosmWasm](https://github.com/srdtrk/cw-ibc-lite), [golang](https://github.com/cosmos/ibc-go), and [rust](https://github.com/cosmos/ibc-rs) were used as references. We are also grateful to [unionlabs](https://github.com/unionlabs/union/) for their `08-wasm` ethereum light client implementation for ibc-go which our own implementation is based on.
This project was bootstrapped with this [template](https://github.com/PaulRBerg/foundry-template). Implementations of IBC specifications in [solidity](https://github.com/hyperledger-labs/yui-ibc-solidity/), [CosmWasm](https://github.com/srdtrk/cw-ibc-lite), [golang](https://github.com/cosmos/ibc-go), and [rust](https://github.com/cosmos/ibc-rs) were used as references. We are also grateful to [unionlabs](https://github.com/unionlabs/union/) for their `08-wasm` Ethereum light client implementation for ibc-go which our own implementation is based on.
4 changes: 2 additions & 2 deletions e2e/interchaintestv8/e2esuite/light_clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func (s *TestSuite) createEthereumLightClient(
s.Require().Fail(fmt.Sprintf("creating client: expected exec height %d, to equal boostrap slot %d", executionHeight, bootstrap.Data.Header.Beacon.Slot))
}

timestamp := bootstrap.Data.Header.Execution.Timestamp * 1_000_000_000
unixTimestamp := bootstrap.Data.Header.Execution.Timestamp

currentPeriod := executionHeight / spec.Period()
clientUpdates, err := eth.BeaconAPIClient.GetLightClientUpdates(currentPeriod, 1)
Expand All @@ -289,7 +289,7 @@ func (s *TestSuite) createEthereumLightClient(
Slot: bootstrap.Data.Header.Beacon.Slot,
StateRoot: bootstrap.Data.Header.Execution.StateRoot,
StorageRoot: proofOfIBCContract.StorageHash,
Timestamp: timestamp,
Timestamp: unixTimestamp,
CurrentSyncCommittee: bootstrap.Data.CurrentSyncCommittee.AggregatePubkey,
NextSyncCommittee: clientUpdates[0].Data.NextSyncCommittee.AggregatePubkey,
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/interchaintestv8/ibc_eureka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ func (s *IbcEurekaTestSuite) ICS20TransferNativeCosmosCoinsToEthereumAndBackTest
cosmosUserWallet := s.CosmosUsers[0]
cosmosUserAddress := cosmosUserWallet.FormattedAddress()
simdRelayerUser := s.CreateAndFundCosmosUser(ctx, simd)
sendMemo := "nonnativesend"
sendMemo := "nativesend"

var sendPacket channeltypesv2.Packet
var transferCoin sdk.Coin
Expand Down
Loading

0 comments on commit c828096

Please sign in to comment.