Imported from gencau/test-practices-agent-configurations (
dataset/repos/sora-xor§sora2-parachain/AGENTS.md). Install upstream withnpx skills add gencau/test-practices-agent-configurations --skill sora-xor§sora2-parachain. Copyright stays with the author.
SORA Parachain Guide
- Networks: This repository builds the SORA parachain for multiple relay chains via cargo features and chain-specs.
- SORA Kusama:
para_id2011,ss58Format420,tokenSymbolXOR,tokenDecimals18. Chain spec:node/res/kusama.json. - SORA Polkadot:
para_id2025,ss58Format81,tokenSymbolXOR,tokenDecimals18. Chain spec:node/res/polkadot.json. - Other specs:
node/res/rococo.json,node/res/alphanet.jsonfor testing.
- SORA Kusama:
Chain Specs
- Files:
node/src/chain_spec.rsloads JSON specs and providescoded_config(...)for generated configs. - Relay selection:
RelayChain::{Kusama,Polkadot,...}determines name, id, root key, session keys, andbridge_network_id. - Genesis:
testnet_genesis(...)sets WASM code, endowed balances, collator session keys, safe XCM version, BEEFY light client, council/technical committee/democracy, and parachain id. - CLI presets:
parachain-collator --chain kusama|polkadot|rococo|alphaor provide a path to a JSON spec. Seenode/src/command.rsload_spec.
Runtime Overview
- Pallet set: Collation (Aura, Session, CollatorSelection), Balances/TransactionPayment, XCM (
pallet_xcm,cumulus_pallet_xcmp_queue,cumulus_pallet_dmp_queue,orml_xtokens), Governance (Council,TechnicalCommittee,ElectionsPhragmen,Democracy,Preimage,Scheduler,Utility). - Sudo: Included only under
rococo/alphanetfeatures. Kusama/Polkadot builds exclude sudo. - Versioning:
runtime/src/lib.rssetsspec_name/spec_versionandSS58Prefixbased on feature flags. - XCM config:
runtime/src/xcm_config.rsdefinesXcmRouter(Parent UMP + XCMP),IsReserveviaMultiNativeAsset<AbsoluteReserveProvider>,LocalAssetTransactorusing theXCMApppallet, andSAFE_XCM_VERSIONfromnode/src/chain_spec.rs.
Bridges to SORA Mainnet
- Light client:
BeefyLightClientpallet configured withbridge_types::SubNetworkIdfor the running network; provides sidechain randomness and verification plumbing. - Channels:
substrate_bridge_channel::{inbound,outbound}pallets are included.XCMAppusesSubstrateBridgeOutboundChannelas its outbound. - Dispatch: Bridge calls are funneled through
dispatchpallet withMultisigVerifierandbridge_data_signerfor authorization paths. - XCM App:
pallets/xcm-appintegrates asset transfers and message routing;XCMSenderWrapperforwards toPolkadotXcm.
Governance
- Collectives:
CouncilandTechnicalCommitteeare included and initialized from the chain-spec. Elections viaElectionsPhragmen. - Democracy: Enabled for proposals and referenda;
PreimageandSchedulersupport governance execution. - Root: On Kusama/Polkadot, privileged actions flow through governance origins rather than
sudo.
XCM and Channels
- Routing: Upward messages via UMP to the relay chain; lateral via XCMP (
XcmpQueue). - Reserve handling: The runtime trusts native assets via
IsReserve = MultiNativeAsset<AbsoluteReserveProvider>. Adjust this when migrating KSM/DOT reserve to Asset Hub. - HRMP: Channels to system parachains (e.g., Asset Hub) are opened by sending an XCM to the relay chain requesting an HRMP open; system parachains auto-accept under current policies.
Developer Notes
- Build:
cargo build --release --features kusamaor--features polkadotto target each network. - Launch locally: See
polkadot-launch/config.jsonandbridge-docker/for local/devnet topologies and spec generation scripts. - Common paths: Runtime (
runtime/src/*.rs), XCM config (runtime/src/xcm_config.rs), chain-spec (node/src/chain_spec.rs), specs (node/res/*.json).