Skip to content

fix: add Owner field to IP transaction metadata in aip-3.md#12

Merged
ja7ad merged 1 commit into
mainfrom
fix/aip-3
Oct 15, 2025
Merged

fix: add Owner field to IP transaction metadata in aip-3.md#12
ja7ad merged 1 commit into
mainfrom
fix/aip-3

Conversation

@ja7ad

@ja7ad ja7ad commented Oct 15, 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

  • Documentation
    • Updated AIP-3 to add a required Owner field to applicable payload definitions.
    • Extended the IP Burn payload to include Owner before Version.
    • Clarified validation rules: burn and related payloads must specify the current owner, with ownership checked against state prior to burn.
    • Refreshed examples and tables to reflect explicit ownership in payloads.

@ja7ad ja7ad merged commit d0f20fb into main Oct 15, 2025
5 checks passed
@ja7ad ja7ad deleted the fix/aip-3 branch October 15, 2025 06:02
@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 enhances the specification for IP transaction metadata by formally adding an 'Owner' field within the aip-3.md document. This change ensures that the current owner's address is explicitly included and required in all IP transactions, thereby improving the clarity and completeness of the transaction data structure.

Highlights

  • New Field Added: Introduced an 'Owner' field to the IP transaction metadata table in aip-3.md.
  • Field Details: The new 'Owner' field is of type Address, has a size of 21 Bytes, describes the 'Current owner address', and is marked as a required field.
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 15, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

Adds an Owner field to AIP-3 payload definitions and inserts it into relevant payload structures, notably extending IP Burn Payload (type 10) to include Owner before Version. Updates validation rules so burn operations verify the Owner against current on-chain state.

Changes

Cohort / File(s) Summary
Spec update: ownership field and burn validation
AIPs/aip-3.md
- Introduces Owner field (Address, 21 bytes) in top-level field definitions
- Inserts Owner as required in affected payload structures
- Extends IP Burn Payload (type 10) with Owner preceding Version
- Clarifies validation: burn must be initiated by current owner

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client as Client
  participant Node as Node
  participant Validator as Validator
  participant State as State Store

  Client->>Node: Submit IP Burn Payload { Owner, Version, ... }
  Node->>Validator: Validate Burn Request
  Validator->>State: Get current owner for Asset/IP
  State-->>Validator: currentOwner
  alt Owner matches currentOwner
    Validator-->>Node: Validation OK
    Node->>State: Apply Burn
    State-->>Node: Burn committed
    Node-->>Client: Burn accepted
  else Owner mismatch
    Validator-->>Node: Validation Error (Not owner)
    Node-->>Client: Reject burn (authorization failure)
  end

  Note over Validator,State: New check: explicit Owner field must equal current state owner before burn.
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • yahya-aghdam
  • alidevjimmy

Poem

A nibble of bytes in a moonlit churn,
I stamp my paw: “Only owners burn!”
Addresses lined, 21 bytes neat—
Hop-check, state-check, then delete.
With specs updated, I thump with glee,
Carrots secured in AIP-3. 🥕🐇

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/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 4f6e072 and c5ff8ba.

📒 Files selected for processing (1)
  • AIPs/aip-3.md (1 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.

@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 correctly adds the Owner field to the IP Burn Payload structure in aip-3.md, which is necessary for validating the transaction. However, I've identified a critical security concern: the ProofHash calculation for the burn payload (and other IP payloads in the document) does not include this Owner field. To ensure cryptographic integrity and prevent potential vulnerabilities, all authenticated fields in a transaction payload should be part of the signed hash. I've left a specific comment with a recommendation to update the ProofHash formula.

Comment thread AIPs/aip-3.md
| Field | Type | Size | Description | Required |
|-------|------|------|-------------|----------|
| ContentID | `Hash` | 32 Bytes | Permanent IP identifier | ✅ |
| Owner | `Address` | 21 Bytes | Current owner address | ✅ |

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

While adding the Owner field here is correct, the corresponding ProofHash calculation for the IP Burn operation on line 330 is missing this field. For cryptographic security, all authenticated fields in the payload must be included in the hash that is signed. This prevents potential manipulation or ambiguity.

The current ProofHash calculation is:
$$ProofHash_{BURN} = H(ContentID \parallel Version \parallel PreviousHash \parallel BurnReason)$$

It should be updated to include the Owner:
$$ProofHash_{BURN} = H(ContentID \parallel Owner \parallel Version \parallel PreviousHash \parallel BurnReason)$$

Please note that a similar issue exists for the Mint, Update, and Transfer payloads, where the Owner field is also missing from their respective ProofHash calculations. This should be addressed throughout the document to ensure consistency and security.

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