Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 1-dotrain-in-10-minutes.svelte.md #58

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
# Learn DotRain in 10 minutes

@todo
DotRain (.rain) is a portable, extensible and composable format for describing Rainlang fragments. .rain files serve as a wrapper/container/medium for Rainlang to be shared and audited simply in a permissionless and adversarial environment such as a public blockchain.

## Key Objectives

1. **Facilitating Audits**:
- `.rain` files enable **"overlay style" audits**, which allow metadata composition to be shared and audited at a social layer.
- This helps create a layered **audit trail**, critical for building incremental **trust models**.
- Participants can gain or lose trust based on the **on-chain artifacts** they produce, which justify their reputation.

2. **Supporting Iterative Development**:
- The `.rain` file format supports iterative development, allowing for changes like **"this is exactly that with only these changes"**.

3. **1:1 with CBOR-Seq Metadata**:
- A `.rain` file is 1:1 with a **CBOR sequence** of metadata, as defined in the Rainlang metadata spec.
- Given a compatible CBOR-seq, an equivalent `.rain` file can be recovered, ensuring **metadata integrity** and minimizing formatting concerns.

## Properties

1. **Immutable Data Imports**:
- `.rain` files must support **unambiguous, immutable imports** to ensure auditability.
- Mutable or ambiguous imports lead to unreliable behavior, such as **"works on my machine"** issues, which tooling cannot mitigate easily.

2. **Tooling Support**:
- `.rain` files have **extension points** for tools to provide comprehensive **code analysis**.
- This ensures readers can detect malicious behavior from both bytecode and metadata authors.

3. **Location-Independent Imports**:
- Imports are **location-independent**, ensuring content integrity via hashing, similar to blocks in a blockchain or data in IPFS.
- This allows content to be handled **peer-to-peer (p2p)**, decoupled from client, storage, or transmission specifics.

4. **Namespace Support**:
- `.rain` files support **namespacing** to resolve ambiguities when different entities share the same human-readable name.

5. **Minimal Document Structure**:
- The `.rain` document structure should be **minimal** to ensure **stability, extensibility**, and simplicity in tooling implementations.
- The format should avoid hardcoding meanings into syntax that might change or become deprecated in the future.


## Key Takeaways

`.rain` files are a robust, audit-friendly format for describing Rainlang fragments, designed with transparency, auditability, and iterative development in mind. By supporting immutable imports, tooling integration, location-independent data, and a minimal structure, `.rain` files ensure long-term extensibility and future-proofing in decentralized environments.