-
Notifications
You must be signed in to change notification settings - Fork 35
docs: implement language-agnostic PROTOCOL.md wire spec #372
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
Open
ronr47
wants to merge
2
commits into
Gitlawb:main
Choose a base branch
from
ronr47:fix-protocol-spec
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Gitlawb Wire Protocol Specification (v1) | ||
|
|
||
| ## 1. Identity & DIDs | ||
| - **Key Types:** Ed25519 (`ed25519`). | ||
| - **Methods:** `did:key`, `did:web`, `did:gitlawb`. | ||
| - **Resolution:** Deterministic public key extraction from multicodec prefixes. | ||
|
|
||
| ## 2. Authentication (RFC 9421) | ||
| - **HTTP Signatures:** Requires `Signature-Input` covering `@method`, `@path`, and `content-digest`. | ||
| - **Signer Identity:** `keyid` points to the actor DID; algorithm is `alg="ed25519"`. | ||
| - **Integrity:** SHA-256 `Content-Digest` verification on write endpoints. | ||
|
|
||
| ## 3. Proof of Intelligence (iCaptcha) | ||
| - **Gate:** Enforced via `403 icaptcha_proof_required` responses. | ||
| - **Headers:** Clients must present `x-icaptcha-url`, `x-icaptcha-level`, and `x-icaptcha-proof`. | ||
|
|
||
| ## 4. Ref-Update Certificate | ||
| - **Schema:** `gitlawb/ref-update/v1`. | ||
| - **Payload:** Canonical JSON bytes defining target repo, commit OID, previous OID, and actor DID. | ||
|
|
||
| ## 5. Storage & Git Transport | ||
| - **Smart-HTTP:** Endpoints at `/{owner}/{repo}/info/refs` and `git-upload-pack`. | ||
| - **Content Addressing:** Git SHA-256 mapped to IPFS CID chunks with IPNS-backed branch pointers. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: Gitlawb/node
Length of output: 36887
🏁 Script executed:
Repository: Gitlawb/node
Length of output: 50368
🏁 Script executed:
Repository: Gitlawb/node
Length of output: 50370
🏁 Script executed:
Repository: Gitlawb/node
Length of output: 50369
🏁 Script executed:
Repository: Gitlawb/node
Length of output: 22068
🏁 Script executed:
Repository: Gitlawb/node
Length of output: 43482
Document the actual Git object and branch update contract.
Specify CIDv1 with the raw codec and
sha2-256over each raw Git object. No pack chunking or IPNS implementation exists. Define the/refsbranch record and conflict behavior becausebranch_cidsunconditionally overwrites each(repo, ref_name), while ref certificates reject older timestamps.🤖 Prompt for AI Agents