quip-protocol-rs
```markdown
What this skill does
```markdown
---
name: quip-protocol-rs
description: Rust implementation of the Quip Protocol blockchain node, forked from Substrate/Polkadot SDK solochain template
triggers:
- build a substrate node in rust
- quip protocol blockchain
- substrate solochain template
- create a custom pallet in substrate
- run a substrate development chain
- substrate FRAME runtime development
- polkadot sdk rust blockchain
- substrate node template setup
---
# Quip Protocol RS
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
A Rust implementation of the Quip Protocol blockchain node, forked from the [Substrate](https://substrate.io/) / Polkadot SDK solochain template. It provides a ready-to-hack blockchain node with FRAME pallets, AURA block authoring, GRANDPA finality, and a JSON-RPC server.
---
## What This Project Does
- Runs a standalone Substrate-based blockchain node (solochain)
- Uses FRAME to compose a runtime from pallets (modules)
- Exposes an RPC server (default `ws://localhost:9944`)
- Ships with a template pallet for custom business logic
- Supports single-node dev chains and multi-node testnets
---
## Project Structure
```
quip-protocol-rs/
├── node/
│ └── src/
│ ├── chain_spec.rs # Genesis state configuration
│ ├── service.rs # Node implementation (consensus, networking)
│ └── main.rs
├── runtime/
│ └── src/
│ └── lib.rs # FRAME runtime, pallet composition
├── pallets/
│ └── template/
│ └── src/
│ └── lib.rs # Example custom pallet
└── Cargo.toml
```
---
## Installation & Prerequisites
### System Dependencies
```bash
# Ubuntu/Debian
sudo apt update && sudo apt install -y \
build-essential clang curl git libssl-dev \
llvm libudev-dev make protobuf-compiler
# macOS
brew install cmake protobuf
```
### Rust Toolchain
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
rustup default stable
rustup update
rustup target add wasm32-unknown-unknown
rustup component add rust-src
```
### Clone & Build
```bash
git clone https://github.com/QuipNetwork/quip-protocol-rs.git
cd quip-protocol-rs
# Full release build
cargo build --release
# Dev build (faster, for iteration)
cargo build
```
---
## Key CLI Commands
```bash
# Start single-node dev chain (no state persistence)
./target/release/solochain-template-node --dev
# Start dev chain with persistent state
mkdir -p ./my-chain-state
./target/release/solochain-template-node --dev --base-path ./my-chain-state/
# Purge dev chain state
./target/release/solochain-template-node purge-chain --dev
# Detailed logging
RUST_BACKTRACE=1 ./target/release/solochain-template-node -ldebug --dev
# Custom log targets
RUST_LOG=runtime=debug,txpool=trace ./target/release/solochain-template-node --dev
# Show all CLI options
./target/release/solochain-template-node --help
# Generate and open Rust docs
cargo +nightly doc --open
```
---
## Writing a Custom Pallet
Pallets live in `pallets/<name>/src/lib.rs`. The template pallet is the canonical starting point.
### Minimal Pallet Example
```rust
// pallets/my_pallet/src/lib.rs
#![cfg_attr(not(feature = "std"), no_std)]
pub use pallet::*;
#[frame_support::pallet]
pub mod pallet {
use frame_support::{
pallet_prelude::*,
traits::Currency,
};
use frame_system::pallet_prelude::*;
type BalanceOf<T> = <<T as Config>::Currency as Currency<
<T as frame_system::Config>::AccountId,
>>::Balance;
#[pallet::config]
pub trait Config: frame_system::Config {
/// The runtime event type.
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
/// Currency used for staking.
type Currency: Currency<Self::AccountId>;
/// Max length of a stored value.
#[pallet::constant]
type MaxValueLength: Get<u32>;
}
#[pallet::pallet]
pub struct Pallet<T>(_);
// Storage: map AccountId -> BoundedVec<u8>
#[pallet::storage]
#[pallet::getter(fn stored_value)]
pub type StoredValue<T: Config> = StorageMap<
_,
Blake2_128Concat,
T::AccountId,
BoundedVec<u8, T::MaxValueLength>,
OptionQuery,
>;
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
/// A value was stored. [who, value]
ValueStored { who: T::AccountId, value: BoundedVec<u8, T::MaxValueLength> },
/// A value was cleared. [who]
ValueCleared { who: T::AccountId },
}
#[pallet::error]
pub enum Error<T> {
/// Value exceeds maximum allowed length.
ValueTooLong,
/// No value found for this account.
NothingStored,
}
#[pallet::call]
impl<T: Config> Pallet<T> {
/// Store a value for the caller.
#[pallet::call_index(0)]
#[pallet::weight(T::DbWeight::get().writes(1))]
pub fn store_value(
origin: OriginFor<T>,
value: Vec<u8>,
) -> DispatchResult {
let who = ensure_signed(origin)?;
let bounded: BoundedVec<u8, T::MaxValueLength> =
value.try_into().map_err(|_| Error::<T>::ValueTooLong)?;
StoredValue::<T>::insert(&who, &bounded);
Self::deposit_event(Event::ValueStored { who, value: bounded });
Ok(())
}
/// Clear the caller's stored value.
#[pallet::call_index(1)]
#[pallet::weight(T::DbWeight::get().writes(1))]
pub fn clear_value(origin: OriginFor<T>) -> DispatchResult {
let who = ensure_signed(origin)?;
ensure!(StoredValue::<T>::contains_key(&who), Error::<T>::NothingStored);
StoredValue::<T>::remove(&who);
Self::deposit_event(Event::ValueCleared { who });
Ok(())
}
}
}
```
### Adding the Pallet to `Cargo.toml`
```toml
# pallets/my_pallet/Cargo.toml
[package]
name = "pallet-my-pallet"
version = "0.1.0"
edition = "2021"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive"] }
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", optional = true, default-features = false }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false }
[features]
default = ["std"]
std = [
"codec/std",
"frame-support/std",
"frame-system/std",
"scale-info/std",
]
runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
try-runtime = ["frame-support/try-runtime"]
```
### Wiring the Pallet into the Runtime
```rust
// runtime/src/lib.rs
// 1. Declare the pallet parameter types
parameter_types! {
pub const MaxValueLength: u32 = 256;
}
// 2. Implement Config for your pallet
impl pallet_my_pallet::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type MaxValueLength = MaxValueLength;
}
// 3. Add to the #[runtime] macro construct_runtime! block
#[runtime]
mod runtime {
// ... existing pallets ...
#[runtime::pallet_index(42)]
pub type MyPallet = pallet_my_pallet::Pallet<Runtime>;
}
```
---
## Chain Specification (Genesis Config)
```rust
// node/src/chain_spec.rs
use sc_service::ChainType;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_consensus_grandpa::AuthorityId as GrandpaId;
use sp_keyring::AccountKeyring;
pub fn development_config() -> Result<ChainSpec, String> {
Ok(ChainSpec::builder(
WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?,
None,
)
.with_name("Development")
.with_id("dev")
.with_chain_type(ChainType::Development)
.with_genesis_config_patch(testneRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.