Skip to content

aip-3: add content id and burn ip#6

Merged
ja7ad merged 1 commit into
mainfrom
aip-3
Oct 14, 2025
Merged

aip-3: add content id and burn ip#6
ja7ad merged 1 commit into
mainfrom
aip-3

Conversation

@ja7ad

@ja7ad ja7ad commented Oct 14, 2025

Copy link
Copy Markdown
Member

Pull Request

We have a GitHub bot that automatically merges certain PRs. Your PR will be merged immediately if it meets the following criteria:

  • The PR modifies only existing draft PRs.
  • The build passes successfully.
  • Your GitHub username or email address is listed in the Author header of all affected PRs, inside <triangular brackets>.
  • If matching by email address, it must be the one publicly listed on your GitHub profile.

PR Checklist

Please confirm that your PR meets the following requirements:

  • If submitting a new AIP, I used the suggested template: aip-template.md.
  • I have read and followed the proposal guidelines in AIP-1.

Thank you for contributing to Aerium Improvement Proposals! 🚀

Summary by CodeRabbit

  • New Features
    • Introduced a permanent Content ID used across Mint, Update, Transfer, and Burn operations.
    • Expanded and standardized IP operations: Mint, Update, Transfer, Burn (renaming “Register” to “Mint”).
  • Documentation
    • Clarified versioning rules (Mint starts at 1; Update increments; Transfer preserves; Burn increments).
    • Updated validation requirements to center on Content ID consistency and ownership.
    • Revised proof descriptions to include Content ID.
    • Refreshed on-chain metadata layout and field names.
    • Clarified Transfer and Burn semantics and status restrictions.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @ja7ad, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the intellectual property management capabilities within AIP-3 by introducing a robust Content ID system, ensuring stable and permanent identification for IP assets throughout their lifecycle. It also adds a critical "IP Burn" payload type, providing a mechanism for the permanent destruction of IP ownership. These additions are complemented by comprehensive updates to existing IP operations, such as Mint, Update, and Transfer, which now incorporate the Content ID and adhere to refined version control semantics, thereby establishing a clearer and more secure framework for managing digital intellectual property.

Highlights

  • Content ID System: Introduced a Content ID system for permanent and deterministic identification of intellectual property assets, including its generation formula and properties.
  • IP Burn Payload: Added a new "IP Burn Payload" (PayloadType: 10) to allow for the permanent destruction of IP ownership, complete with its structure, validation rules, and effects.
  • Payload Refinements: Refined existing IP operations (Mint, Update, Transfer) to integrate the new Content ID, updated version control semantics, and revised ProofHash calculations.
  • Versioning Semantics: Defined clear version control semantics for MINT, UPDATE, TRANSFER, and BURN operations, specifying how versions increment or remain unchanged.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai

coderabbitai Bot commented Oct 14, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

The AIP-3 document reorganizes IP payloads to center around a new ContentID, renames “Register” to “Mint,” updates versioning semantics per operation, revises ProofHash formulas to include ContentID, clarifies validation rules for Mint/Update/Transfer/Burn, and aligns on-chain metadata structure and terminology.

Changes

Cohort / File(s) Summary
Payload renaming and types
AIPs/aip-3.md
Renamed “IP Register Payload” to “IP Mint Payload” (PayloadType: 7). Clarified four payload types: Mint, Update, Transfer, Burn. Updated public naming (ProofHash_REGISTER → ProofHash_MINT).
ContentID introduction
AIPs/aip-3.md
Added ContentID (32-byte hash) as a permanent identifier across Mint/Update/Transfer/Burn. Defined generation, uniqueness, and determinism based on initial content, owner, and mint block number.
Payload structures
AIPs/aip-3.md
Added ContentID field to all payload structures; retained/realigned fields like ContentHash, MetadataHash, Owner, Version. Optional metadata handling updated to match new schema.
Versioning semantics
AIPs/aip-3.md
Defined per-operation version rules: Mint=1; Update increments; Transfer preserves; Burn increments.
ProofHash formulas
AIPs/aip-3.md
Revised ProofHash calculations (MINT/UPDATE/TRANSFER/BURN) to include ContentID and updated field ordering.
Validation rules
AIPs/aip-3.md
Updated validation: ContentID uniqueness and correctness on Mint; ContentID-state matching for Update/Transfer/Burn; version expectations; ownership and non-burned restrictions.
On-chain metadata layout
AIPs/aip-3.md
Renamed/flattened optional metadata fields (Title, Size, ContentType, PublicLink). Updated size analysis to reflect mandatory/optional fields.
Terminology and formatting
AIPs/aip-3.md
Headings/descriptions updated to ContentID-centric model; security/crypto sections aligned with new proofs and identifiers.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor C as Client
  participant N as Network / Validators
  participant S as IP State Registry

  rect rgba(200,230,255,0.25)
    note over C,S: Mint flow (introduces ContentID)
    C->>C: Compute ContentID = f(initial content, owner, mint block no.)
    C->>N: Submit Mint{ContentID, ContentHash, MetadataHash, Version=1, ProofHash_MINT}
    N->>N: Validate ContentID uniqueness, proofs, fields
    N->>S: Commit new IP state (version=1)
    S-->>C: Ack Mint
  end

  rect rgba(220,255,220,0.25)
    note over C,S: Update flow (version++ with same ContentID)
    C->>N: Submit Update{ContentID, new hashes, Version=prev+1, ProofHash_UPDATE}
    N->>S: Check ContentID exists, version increment, ownership
    N->>S: Commit updated state
    S-->>C: Ack Update
  end

  rect rgba(255,245,200,0.25)
    note over C,S: Transfer flow (version unchanged)
    C->>N: Submit Transfer{ContentID, toOwner, Version=prev, ProofHash_TRANSFER}
    N->>S: Validate ownership, version same, ContentID match
    N->>S: Update owner only
    S-->>C: Ack Transfer
  end

  rect rgba(255,220,220,0.25)
    note over C,S: Burn flow (version++)
    C->>N: Submit Burn{ContentID, Version=prev+1, BurnReason, ProofHash_BURN}
    N->>S: Validate ownership, not already burned
    N->>S: Mark burned state
    S-->>C: Ack Burn
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • yahya-aghdam
  • alidevjimmy

Poem

I minted a moon with a steady ID,
Hopped through versions—one, then three.
Proofs in my paws, I sign and go,
Transfer my carrot to friend or foe.
If burned, I sigh, but logs persist—
A ContentID no bunny could miss. 🥕✨

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch aip-3

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 803fe7c and 66d898f.

⛔ Files ignored due to path filters (2)
  • assets/aip-3/chain.jpg is excluded by !**/*.jpg
  • assets/aip-3/chain.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • AIPs/aip-3.md (5 hunks)

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.

@ja7ad ja7ad merged commit fae2360 into main Oct 14, 2025
5 of 6 checks passed
@ja7ad ja7ad deleted the aip-3 branch October 14, 2025 16:03

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request significantly enhances AIP-3 by introducing a ContentID system for permanent IP identification and an IP Burn payload for asset destruction. The changes are comprehensive, renaming IP Register to IP Mint and updating versioning semantics. My review focuses on several critical and high-severity inconsistencies in the specification that need to be addressed for clarity, correctness, and security. These include a contradiction in the initial version number for minted IPs, a missing Owner field in the IP Burn payload which is essential for authorization, an incorrect payload size calculation for the burn operation, and missing validation rules for content and metadata hashes in the transfer payload.

Comment thread AIPs/aip-3.md
Comment on lines +299 to +305
| Field | Type | Size | Description | Required |
|-------|------|------|-------------|----------|
| ContentID | `Hash` | 32 Bytes | Permanent IP identifier | ✅ |
| Version | `uint32` | 4 Bytes | Sequential version number (previous + 1) | ✅ |
| PreviousHash | `Hash` | 32 Bytes | Hash of previous IP transaction | ✅ |
| BurnReason | `string` | 100 Bytes | Optional reason for destruction (UTF-8) | *3 |
| Signature | `Bytes` | 64 Bytes | Ed25519/ECDSA signature of computed ProofHash | ✅ |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The IP Burn Payload structure is missing the Owner field. However, the validation rules on line 315 state that the Owner MUST equal the current owner in the state. This is a critical omission, as it's unclear how the owner is identified for authorization. For consistency with IP Update and IP Transfer payloads, and to ensure clarity and security, the Owner field should be included in this payload.

Adding this field would also impact the Payload Size Analysis table on line 156.

Suggested change
| Field | Type | Size | Description | Required |
|-------|------|------|-------------|----------|
| ContentID | `Hash` | 32 Bytes | Permanent IP identifier ||
| Version | `uint32` | 4 Bytes | Sequential version number (previous + 1) ||
| PreviousHash | `Hash` | 32 Bytes | Hash of previous IP transaction ||
| BurnReason | `string` | 100 Bytes | Optional reason for destruction (UTF-8) | *3 |
| Signature | `Bytes` | 64 Bytes | Ed25519/ECDSA signature of computed ProofHash ||
| Field | Type | Size | Description | Required |
|-------|------|------|-------------|----------|
| ContentID | `Hash` | 32 Bytes | Permanent IP identifier ||
| Owner | `Address` | 21 Bytes | Current owner address ||
| Version | `uint32` | 4 Bytes | Sequential version number (previous + 1) ||
| PreviousHash | `Hash` | 32 Bytes | Hash of previous IP transaction ||
| BurnReason | `string` | 100 Bytes | Optional reason for destruction (UTF-8) | *3 |
| Signature | `Bytes` | 64 Bytes | Ed25519/ECDSA signature of computed ProofHash ||

Comment thread AIPs/aip-3.md
| **IP Mint** | 185 bytes | 0-372 bytes | 185-557 bytes |
| **IP Update** | 217 bytes | 0-372 bytes | 217-589 bytes |
| **IP Transfer** | 250 bytes | 0-372 bytes | 250-622 bytes |
| **IP Burn** | 221 bytes | 0-100 bytes | 221-321 bytes |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The Payload Size Analysis for IP Burn appears to be incorrect. The fixed fields defined in the IP Burn Payload structure (ContentID 32B, Version 4B, PreviousHash 32B, Signature 64B) sum to 132 bytes, not 221 bytes. The optional BurnReason is 100 bytes. The row should be corrected to reflect this.

Note: If the Owner field (21 bytes) is added as suggested in another comment, the fixed size would become 153 bytes.

Suggested change
| **IP Burn** | 221 bytes | 0-100 bytes | 221-321 bytes |
| **IP Burn** | 132 bytes | 0-100 bytes | 132-232 bytes |

Comment thread AIPs/aip-3.md
| Owner | `Address` | 21 Bytes | Initial owner address | ✅ |
| ContentHash | `Hash` | 32 Bytes | BLAKE2b-256 hash of file content | ✅ |
| MetadataHash | `Hash` | 32 Bytes | BLAKE2b-256 hash of serialized metadata | ✅ |
| Version | `uint32` | 4 Bytes | Sequential version number (must be 1) | ✅ |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

There's a contradiction regarding the initial version number. The Version Control Semantics section on line 139 specifies that MINT is always version 0, but this line states it must be 1. For consistency, it should be 0.

Suggested change
| Version | `uint32` | 4 Bytes | Sequential version number (must be 1) ||
| Version | `uint32` | 4 Bytes | Sequential version number (must be 0) ||

Comment thread AIPs/aip-3.md

**Validation Rules:**

- `Version` MUST equal `1`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

This validation rule contradicts the Version Control Semantics on line 139, which states that MINT is always version 0. To align with the semantics, this rule should enforce version 0.

Suggested change
- `Version` MUST equal `1`
- `Version` MUST equal `0`

Comment thread AIPs/aip-3.md
Comment on lines 276 to +280
- `Owner` MUST equal current owner in state
- `PreviousHash` MUST equal `CurrentState.LastTransactionHash`
- `NewOwnerKey` MUST be valid compressed public key (33 bytes)
- New owner address derived from `NewOwnerKey`
- IP MUST NOT be in BURNED status

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The validation rules for IP Transfer Payload are missing checks for ContentHash and MetadataHash. The Version Control Semantics on line 141 and the purpose on line 256 state that a transfer is for "ownership transfer only" and the version is unchanged. This implies that content and metadata should not change. To enforce this, validation rules should be added to ensure ContentHash and MetadataHash match the current state.

Suggested change
- `Owner` MUST equal current owner in state
- `PreviousHash` MUST equal `CurrentState.LastTransactionHash`
- `NewOwnerKey` MUST be valid compressed public key (33 bytes)
- New owner address derived from `NewOwnerKey`
- IP MUST NOT be in BURNED status
- `ContentHash` MUST equal `CurrentState.ContentHash`
- `MetadataHash` MUST equal `CurrentState.MetadataHash`
- `Owner` MUST equal current owner in state
- `PreviousHash` MUST equal `CurrentState.LastTransactionHash`
- `NewOwnerKey` MUST be valid compressed public key (33 bytes)
- New owner address derived from `NewOwnerKey`
- IP MUST NOT be in BURNED status

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