Update serai-runtime to compile a minimum subset of itself for non-WASM targets

We only really care about it as a WASM blob, given `serai-abi`, so there's no
need to compile it twice when it's an expensive blob and we don't care about it
at all.
This commit is contained in:
Luke Parker
2025-11-12 21:49:59 -05:00
parent c52f7634de
commit 264bdd46ca
7 changed files with 935 additions and 811 deletions

View File

@@ -10,7 +10,6 @@ use sp_api::ProvideRuntimeApi;
use sc_client_api::BlockBackend;
use serai_abi::{primitives::prelude::*, SubstrateBlock as Block};
use serai_runtime::*;
use jsonrpsee::RpcModule;

View File

@@ -8,7 +8,6 @@ use sp_block_builder::BlockBuilder;
use sp_api::ProvideRuntimeApi;
use serai_abi::{primitives::prelude::*, SubstrateBlock as Block};
use serai_runtime::*;
use tokio::sync::RwLock;

View File

@@ -7,18 +7,14 @@ use sp_blockchain::{Error as BlockchainError, HeaderBackend};
use sp_api::ProvideRuntimeApi;
use serai_abi::{primitives::prelude::*, SubstrateBlock as Block};
use serai_runtime::*;
use serai_runtime::SeraiApi;
use tokio::sync::RwLock;
use jsonrpsee::RpcModule;
pub(crate) fn module<
C: 'static
+ Send
+ Sync
+ HeaderBackend<Block>
+ ProvideRuntimeApi<Block, Api: serai_runtime::SeraiApi<Block>>,
C: 'static + Send + Sync + HeaderBackend<Block> + ProvideRuntimeApi<Block, Api: SeraiApi<Block>>,
>(
id: String,
client: Arc<C>,
@@ -62,7 +58,7 @@ pub(crate) fn module<
let mut returned_addresses = authority_discovery
.write()
.await
.get_addresses_by_authority_id(validator.into())
.get_addresses_by_authority_id(sp_core::sr25519::Public::from(validator).into())
.await
.unwrap_or_else(HashSet::new)
.into_iter()