-
Notifications
You must be signed in to change notification settings - Fork 129
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
Make relayer loops generic #2491
Comments
A potentially useful pointer: https://github.com/scs/substrate-api-client/blob/master/src/extrinsic/mod.rs#L41 |
Partially done via recent CLI refactoring (#849), we might keep this around to make the relayer based on metadata only (scale-info stuff). |
@svyatonik is this done? Is still something needed to be done? |
Yes - it needs to be done |
I couldn't find a way to implement this. I hope I didn't miss anything. The problem is that the function parameters/return types are different depending on the chain and in order to handle this we need some way of specifying generic params. I tried 2 options:
This doesn't work because
But
Still thinking if there are other solutions. |
Looking on subxt-codegen and subxt to see how the generated code based on metadata would look like and if there's anything that would help us. |
Building calls based on metadata done in #1812 |
Currently for each combination of chains we need to prepare a separate headers & messages sync loop.
There are two main reasons for that:
Call
to a specific runtime when creating the transaction and add the rightSignedExtensions
data.RuntimeApi
s exposed by the pallets are specific to chains.For (1) the solution would be to create transactions based on
Metadata
somehow or via RPC. (1) has also a very unwanted consequence of being dependent on the entire runtime code - that could be alleviated by extracting some of the runtime code which allows transaction creation.For (2) we should probably just add some identifier to the pallet instances and have them share the
RuntimeApi
, but add an extra parameter with instance id.The text was updated successfully, but these errors were encountered: