Closed pmensik closed 9 months ago
Hi @pmensik, some of those errors is just because Joystream uses different types from the ones in Kusama/Polkadot.
As a suggestion you can try to get all runtime types just by running:
subxt metadata --url wss://rpc.joystream.org:443 -f bytes > joystream_metadata.scale
subxt codegen -f joystream_metadata.scale | rustfmt --edition=2018 --emit=stdout > joystream_runtime.rs
And than adjust the file src/runtimes/joystream.rs
accordingly.
As an example the type for events::Rewarded
in Joystream is a tuple while in Kusama is a struct, you can adjust the code from ev.stash == validator.stash
to ev.0 == validator.stash
to override the following error:
error[E0609]: no field `stash` on type `joystream::node_runtime::staking::events::Rewarded`
--> src/runtimes/joystream.rs:333:39
|
333 | ... if ev.stash == validator.stash {
| ^^^^^ unknown field
|
= note: available fields are: `0`, `1`
Nice to know that you are trying crunch
in other substrate networks.
@paulormart Thanks for suggestios! The thing is that I am a very poor Rust/Substrate developer but this seems doable so I'll try myself first!
Ok, so after some playing around I was able to get rid of all the compilation errors. However, now I am experiencing some runtime errors and this is where I got stuck. Here is the log. Thanks for any help with debugging the issue!
Yeah the Subxt error: Rpc error: RPC error
error is not very explicit.. a few things to check for:
subxt metadata --url wss://rpc.joystream.org:443 -f bytes > joystream_metadata.scale
Does Joystream network have a test environment like Westend?
Hi @pmensik I'm closing this issue as - no longer needed - , feel free to open a new one if you need help with this.
This is the first attempt for adding Joystream to the list of Substate-based projects for automated payouts. It's not ready for merge yet because there are still some compilation errors thanks to the missing fields in the
node-runtime
- and hopefully this can get resolved by the Joystream team.Workarounds so far applied are
pallet_identity
(Joystream doesn't implement it)node_runtime::storage().staking().history_depth()
removed as wellCurrent compilation errors are listed on pastebin.