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

[RFC] Extending scope of the RFC to include proving system and curve #1072

Merged
merged 5 commits into from
Jul 2, 2021
Merged
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
25 changes: 15 additions & 10 deletions docs/rfc/003-imports-stabilization.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,33 @@ DRAFT
# Summary

This proposal aims to improve the import management system in Leo programs to
make program environment more reproducible and predictable. To achieve that
make program environment more reproducible, predictable and compatible. To achieve that
we suggest few changes to Leo CLI and Manifest:

- add a "dependencies" section to Leo Manifest and add a command to pull those dependencies;
- allow custom names for imports to manually resolve name conflicts;
- store imports as they are called in Leo Manifest;
- add "curve" and "proving system" sections to the Manifest;
- add "inlcude" and "exclude" parameters for "proving system" and "curve";

Later this solution can be improved by adding a lock-file which would lock
imported packages based on both their contents and version.

# Motivation

What problems does it solve? What is the background?
The current design of imports does not provide any guarantees on what's stored
in program imports and published with the program to Aleo Package Manager.
When dependency is "added", it is stored inside imports folder, and it is possible
damirka marked this conversation as resolved.
Show resolved Hide resolved
to manually edit and/or add packages in this folder.

Current state:
- imports are published with a program to Aleo PM;
- we treat programs as files with no verification of imports (they can be changed locally and published in that state);
- name collisions cannot be resolved; a new import overwrites existing;
Also, imports are stored under package name which makes it impossible to import
damirka marked this conversation as resolved.
Show resolved Hide resolved
two different packages with the same name.

TBD
Another important detail in the scope of this proposal is that in future Leo
programs will have the ability to be run with different proving systems
and curves, possibly creating incompatibility between programs written
for different proving systems or curves. To make a foundation for these features
damirka marked this conversation as resolved.
Show resolved Hide resolved
imports need to be managed with include/exclude lists for allowed (compatible)
proving systems and curves.

# Design

Expand All @@ -55,8 +62,6 @@ package = "package"
version = "1.0"
```

TBD

## Leo CLI

To support updated Manifest new command should be added to Leo CLI.
Expand Down