Start / tail-lab
Tail lab example
Bounded dynamic fields, TailStr, TailBytes, init helpers, and account wrappers.
This reference covers Hopper 0.5.0, published on crates.io. See the release status for package verification, dated benchmarks, and remaining audit work.
Devnet-ready example for Hopper's bounded dynamic fields plus Hopper's explicit bare final tails.
This program exists to prove the public story in one place:
Declare bounded fields. Validate the account contract before typed access.
What It Exercises
#[hopper::account]with pretty bounded dynamic fields:String<'a, 32>andVec<'a, Address, 4>.- Bare final tails:
TailStr<'a>for UTF-8 note bodies andTailBytes<'a>for binary payloads. #[derive(Accounts)],Ctx<T>,Account<'info, T>,InitAccount<'info, T>,Signer<'info>, andProgram<'info, System>.- Generated init helpers,
has_onevalidation, dynamic-tail editors, raw-tail commits, layout fingerprints, and role metadata. - SBF-compatible crate shape:
[lib] crate-type = ["cdylib", "lib"].
Instructions
| Tag | Handler | Purpose |
|---|---|---|
0 |
init_note |
Create a note with bounded label/reviewers and final UTF-8 body. |
1 |
rewrite_note |
Update the label/body through the generated raw-tail editor. |
2 |
add_reviewer |
Preserve the raw body while editing the bounded reviewers list. |
3 |
init_blob |
Create a binary blob backed by TailBytes<'a>. |
4 |
write_blob |
Replace binary bytes while incrementing revision. |
Local Checks
cargo check -p hopper-tail-lab
cargo test -p hopper-tail-lab
cargo run -q -p hopper-cli -- solana-check --manifest-path examples/hopper-tail-lab/Cargo.toml
The repository SBF workflow also runs hopper solana-check --all --build-sbf, so this example stays deployable on devnet.
