Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for on-demand relays #2413

Closed
svyatonik opened this issue May 22, 2023 · 4 comments
Closed

Tests for on-demand relays #2413

svyatonik opened this issue May 22, 2023 · 4 comments
Assignees
Milestone

Comments

@svyatonik
Copy link
Contributor

Follow up for #2129 and #2135. Let's start implementing new TestingClient and add missing tests for on-demand relays (parachain and headers).

@svyatonik
Copy link
Contributor Author

svyatonik commented May 22, 2023

The prototype is in this branch: https://github.com/paritytech/parity-bridges-common/compare/test-client-prototype

The biggest problem is that at the client level we don't know what the transaction is about and can't update our testing state accordingly (this is also slightly related to the #2446). Possible solutions are:

  • to be able to decode contents of every encoded transaction, parse it and e.g. update best-finalized-bridged-chain-header. This isn't a perfect solution, because we'll need such code for every chain we want to use in tests;
  • to use some mocked call builders, which will generate unified calls for all chains. The test client would need to decode this call and get what he needs. This is also not perfect, because we may want to test actual wire transactions contents.

So I'm still exploring

UPD: concept is here: https://github.com/paritytech/parity-bridges-common/compare/relay-level-runtime-calls. It is the (start of) impl of second option from above. Can't open PR, because new client is currently reverted

@svyatonik svyatonik self-assigned this May 30, 2023
@svyatonik
Copy link
Contributor Author

So the solution for previous comment is definitely introducing some relay-level calls and not only calls - we also want to read storage values with meaningful keys. So at client level instead of fn raw_storage_value(key: Vec<u8>), we'll need to have something like fn raw_storage_value(key: enum { WithTestChainA.GrandpaBridge.IsPalletOperational, WithTestChainB.GrandpaBridge.BestFinalized, ... }). Otherwise e.g. test client implementation will be very complex.

So some intermediate "results" of working on this issue (I'll probably take a break here and switch on some other task):

svyatonik referenced this issue Jul 17, 2023
Bumps [clap](https://github.com/clap-rs/clap) from 4.1.1 to 4.1.4.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](clap-rs/clap@clap_complete-v4.1.1...v4.1.4)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@EmmanuellNorbertTulbure EmmanuellNorbertTulbure transferred this issue from paritytech/parity-bridges-common Aug 25, 2023
@the-right-joyce the-right-joyce transferred this issue from paritytech/polkadot-sdk Aug 25, 2023
@EmmanuellNorbertTulbure
Copy link

@svyatonik to re-check and continue if needed

@svyatonik
Copy link
Contributor Author

superseded by #3002

@svyatonik svyatonik closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
@svyatonik svyatonik mentioned this issue Jun 6, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants