Repository navigation
ARC-0080: Explicitly Reject Program Address as Record Owner #56
randomsleep
started this conversation in
ARCs
Replies: 4 comments 1 reply
|
privacy core value of aleo |
0 replies
|
I think this is either adding identifier in Address type or using different prefix for program address |
1 reply
|
Also some mainnet programs did both record transfer and mapping value change in the same |
0 replies
|
There's an important warning to be made about this ARC: reverting transactions that output program owned records would be a major breaking change. In particular it's incompatible with:
In my opinion, it should the wallet responsability to identify assets (NFT and fungible tokens as opposed to records) private receiver addresses to ensure they are not programs. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
arc: 0080
title: Explicitly Reject Program Address as Record Owner
authors: randomsleep
discussion: #56
topic: Application
status: Draft
created: 2023-12-29
Abstract
The current Aleo system permits the assignment of a
Recordto any address, including program addresses. However, programs cannot spend aRecord. Consequently, anyRecordassigned to a program becomes irretrievable, leading to unintended asset loss in Aleo, which can include credits, tokens, NFTs, and more. With the introduction of arc-0030, which enables Aleo users to transfer assets to a program, the frequency of such incidents is likely to increase.This proposal seeks to explicitly prohibit the creation of a
Recordwith a program as the owner, significantly reducing the potential for asset loss.Specification
The proposed solution involves modifying the
Recordcreation process to reject any attempt to assign aRecordto a program address. This can be achieved by adding a validation step in theRecordcreation process to check the type of the address. If the address belongs to a program, the process should throw an error and abort theRecordcreation.For example, if a user tries to create a
Recordwith a program address likealeo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqquzlzl, the system should return an error message like "Invalid owner address: A program cannot own a Record."Test Cases
The following test cases should be considered:
Recordwith a program address - This should fail with an appropriate error message.Recordwith a non-program address - This should succeed.Recordto a program address - This should fail with an appropriate error message.Considering the following program.
Run
mint_publicshould succeed.Run
mint_public_then_transfershould succeed.Run
mint_privatemust fail.Run
mint_private_then_transfermust fail.Dependencies
This proposal directly affects the Aleo and snarkVM repositories as they contain the logic for
Recordcreation and validation.Backwards Compatibility
This proposal does not introduce any backwards incompatibility as it adds a new validation step in the
Recordcreation process.Security & Compliance
This proposal enhances the security of the Aleo platform by preventing unintended asset loss. It does not introduce any new regulatory concerns.
All reactions