Skip to content

docs: tidy per-crate READMEs onto a common structure#759

Merged
scarmuega merged 3 commits into
mainfrom
docs/tidy-per-crate-readmes
May 8, 2026
Merged

docs: tidy per-crate READMEs onto a common structure#759
scarmuega merged 3 commits into
mainfrom
docs/tidy-per-crate-readmes

Conversation

@scarmuega
Copy link
Copy Markdown
Member

@scarmuega scarmuega commented May 8, 2026

Summary

  • Brings every per-crate README onto a shared Scope → Usage → Overview → (optional Status / Feature flags / Testing / Further reading) skeleton.
  • Replaces six stub READMEs (pallas-addresses, pallas-bech32, pallas-hardano, pallas-primitives, pallas-traverse, pallas-txbuilder) with real content.
  • Rewrites the partially-populated ones (pallas-codec, pallas-crypto, pallas-math, pallas-network, pallas-network2, pallas-validate); fixes the malformed [] checklist in pallas-math.
  • Reshapes the two reference READMEs (pallas-utxorpc, pallas-configs) onto the same skeleton with minimal content change.
  • Each Usage snippet was grounded against the crate's current public API (verified accessor names like ShelleyAddress::network(), MultiEraOutput::lovelace_amount(), Input::new, BuiltTransaction::tx_bytes, etc.).

Out of scope

  • Root README.md — deferred follow-up.
  • Umbrella pallas/ crate — its Cargo.toml sets readme = "../README.md", so it ships the root README; touching it belongs with the root-README pass.
  • Nested READMEs (pallas-crypto/src/kes/README.md, pallas-validate/tests/README.md) — referenced from the new crate READMEs, not rewritten.

Test plan

  • cargo doc --workspace --no-deps succeeds.
  • Eyeball each README rendered on GitHub — pay attention to lists / tables in pallas-network2 and pallas-validate, which carry the most varied sections.
  • Optional hardening: paste the Usage snippets into a scratch crate and cargo check (they aren't committed as doctests in this pass).

Summary by CodeRabbit

  • Documentation
    • Added and updated README files across 14+ Pallas crates with clear descriptions of their purposes, Rust usage examples, module overviews, and feature flag documentation. Covered areas include address parsing, encoding, codecs, configuration, cryptography, storage, mathematics, networking, transaction building, validation, and utilities.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Review Change Stack

Warning

Rate limit exceeded

@scarmuega has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 47 minutes and 20 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 89ce2c82-10ad-4096-b527-1e834b8cc5d2

📥 Commits

Reviewing files that changed from the base of the PR and between 7e8596a and 1d14259.

📒 Files selected for processing (1)
  • pallas-network2/README.md
📝 Walkthrough

Walkthrough

This pull request adds comprehensive README.md documentation across 14 Pallas workspace crates. Each README introduces the crate's purpose, includes Rust usage examples, and lists key APIs and modules. Documentation establishes both foundational layers (codec, crypto, math) and higher-level APIs (transaction building, validation, networking).

Changes

Pallas Workspace Documentation

Layer / File(s) Summary
Foundational Libraries
pallas-codec/README.md, pallas-crypto/README.md, pallas-math/README.md
Codec foundation covers minicbor and flat serialization; crypto documents hashing, Ed25519, VRF, and KES support; math establishes fixed-precision FixedDecimal for protocol operations.
Data Types & Encoding
pallas-addresses/README.md, pallas-bech32/README.md, pallas-primitives/README.md
Addresses document Byron/Shelley/Stake parsing and re-serialization; bech32 covers CIP-5 HRPs and CIP-14 asset fingerprints; primitives establish era-aware ledger types with CBOR codecs.
Era-Agnostic Traversal
pallas-traverse/README.md
Read-only, multi-era block/transaction view layer providing uniform access to chain data across all eras.
Configuration & Storage
pallas-configs/README.md, pallas-hardano/README.md
Configs provide strongly typed parsers for genesis/protocol settings across Byron, Shelley, Alonzo, and Conway eras; hardano enables iteration of Cardano node immutable on-disk chunks.
Networking Stack
pallas-network/README.md, pallas-network2/README.md
Network documents Ouroboros multiplexer with mini-protocol state machines (tokio/async); network2 introduces the new Interface/Behavior/Manager architecture for peer-to-peer replacement.
Transaction Building & Validation
pallas-txbuilder/README.md, pallas-validate/README.md
TxBuilder provides fluent ergonomic construction via StagingTransaction (Conway era only); validate implements phase-1 (optionally phase-2) local transaction validation against live ledger rules.
Protocol Integration
pallas-utxorpc/README.md
UTxORPC mapper documentation clarifies that both v1alpha and v1beta spec versions compile side-by-side, allowing per-call-site version selection without feature management.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~8 minutes

🐰 A warren of docs, now clear and bright,
Each crate now shines with usage light,
From codec down to validation's art,
The Pallas workspace plays its part!
✨ README magic, here to stay~ 🏰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: standardizing per-crate READMEs to a common structure, which is the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/tidy-per-crate-readmes

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
pallas-crypto/README.md (1)

3-7: ⚡ Quick win

Add an explicit ## Scope heading for skeleton consistency.

Line 3 currently acts as scope text, but adding a ## Scope header before it would align this README with the PR’s shared structure and keep crate docs uniformly scannable.

Suggested diff
 # Pallas Crypto
 
+## Scope
+
 Cryptographic primitives required to participate in the Cardano protocol:
 Blake2b hashing, Ed25519 signing (regular and BIP32-extended), VRF, KES
 forward-secure signatures, and nonce evolution.
 
 ## Usage
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pallas-crypto/README.md` around lines 3 - 7, Add an explicit "## Scope"
heading above the existing scope text in README.md so the file matches the
project's README skeleton; locate the top-level description starting with
"Cryptographic primitives required to participate in the Cardano protocol..."
and insert a new "## Scope" heading immediately before that paragraph to
maintain uniform crate docs structure.
pallas-network/README.md (1)

18-21: ⚡ Quick win

Avoid hardcoding a live relay endpoint in the usage example.

Using a concrete host in docs can age poorly and break quick-start attempts. Prefer a placeholder (for example, "<relay-host>:3001") plus a short note that the user must provide a reachable relay.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pallas-network/README.md` around lines 18 - 21, The README usage example
currently hardcodes a live relay host in the PeerClient::connect call; replace
the literal "relays-new.cardano-mainnet.iohk.io:3001" with a placeholder like
"<relay-host>:3001" and add a short note telling users to provide a reachable
relay endpoint (and optionally set MAINNET_MAGIC) so examples stay valid and
non-breaking.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pallas-network2/README.md`:
- Around line 14-25: The README example uses Manager::new, manager.poll_next(),
handle, and manager.execute(...) but references undeclared symbols (interface,
behavior, handle, my_external_command); either make the snippet self-contained
by adding minimal placeholders/types/closures for interface and behavior and a
stub handle function and my_external_command, or explicitly mark the block as
pseudocode/illustrative-only with a short comment so readers know to replace
those symbols before running; update the example around Manager, poll_next, and
execute accordingly.

---

Nitpick comments:
In `@pallas-crypto/README.md`:
- Around line 3-7: Add an explicit "## Scope" heading above the existing scope
text in README.md so the file matches the project's README skeleton; locate the
top-level description starting with "Cryptographic primitives required to
participate in the Cardano protocol..." and insert a new "## Scope" heading
immediately before that paragraph to maintain uniform crate docs structure.

In `@pallas-network/README.md`:
- Around line 18-21: The README usage example currently hardcodes a live relay
host in the PeerClient::connect call; replace the literal
"relays-new.cardano-mainnet.iohk.io:3001" with a placeholder like
"<relay-host>:3001" and add a short note telling users to provide a reachable
relay endpoint (and optionally set MAINNET_MAGIC) so examples stay valid and
non-breaking.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: afbc624e-4fbe-4eff-afdf-a9ab40ea09d5

📥 Commits

Reviewing files that changed from the base of the PR and between a7b5a86 and 7e8596a.

📒 Files selected for processing (14)
  • pallas-addresses/README.md
  • pallas-bech32/README.md
  • pallas-codec/README.md
  • pallas-configs/README.md
  • pallas-crypto/README.md
  • pallas-hardano/README.md
  • pallas-math/README.md
  • pallas-network/README.md
  • pallas-network2/README.md
  • pallas-primitives/README.md
  • pallas-traverse/README.md
  • pallas-txbuilder/README.md
  • pallas-utxorpc/README.md
  • pallas-validate/README.md

Comment thread pallas-network2/README.md Outdated
@scarmuega scarmuega merged commit a3a29f2 into main May 8, 2026
15 checks passed
@scarmuega scarmuega deleted the docs/tidy-per-crate-readmes branch May 8, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant