-
Notifications
You must be signed in to change notification settings - Fork 2
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
Pointer for programs #536
Pointer for programs #536
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I didn't make it to meet and discuss this yesterday so putting my thoughts here. This looks like exactly what we want. If i've understood right, the new flow for registering with a new program would be to first submit the program, and then submit registration giving the hash pointer. I'm not sure about 'removing a program' - i don't understand how this works but obviously we don't want to allow removing a program someone else is using. In order to make this useful i guess we would need to maintain somewhere a list of program hashes and descriptions of what they do. And for security we would probably want a way of proving the source code associated with a publicly available program. Being able to compile a program deterministically would solve this. I think we already talked about this at some point so i wont blabber on about it here. Another issue (for later) would be that with, for example, access-control lists, there's currently no way of separating the boilerplate program code from the user-defined part (the list of allowed/blocked addresses). |
yes or even not have to submit the program
ya we had a heated discussion about it, just gonna keep it as it and solve it in SD, a lot of ways to handle it, right now if someone is paying the deposit they should be able to pull it, also having chain controlled ones that don't require a deposit, but still ya kicking this to the retreat
Ya we had the programs store concept which I like but that is for another day
Had this convo @jakehemmerle made the program compilation deterministic which is fire ask him if you want more details
ya in the programs roadmap |
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
@@ -54,6 +54,7 @@ impl system::Config for Test { | |||
parameter_types! { | |||
pub const MaxBytecodeLength: u32 = 3; | |||
pub const ProgramDepositPerByte: u32 = 5; | |||
pub const MaxOwnedPrograms: u32 = 1; |
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.
I want to avoid the case where a dev six months down the line spends times trying to figure out why their test of multiple uploaded programs fails for some "mysterious reason"
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
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.
LGTM, thanks for this!
@@ -58,44 +56,22 @@ fn it_tests_get_validator_rotation() { | |||
fn it_registers_a_user() { | |||
new_test_ext().execute_with(|| { | |||
let empty_program = vec![]; | |||
let program_hash = <Test as frame_system::Config>::Hashing::hash(&empty_program); |
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.
Ya, this is nicer than before, thanks!
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
except for a few outlying questions this accomplishes the basics of #531
Done
Future
Discussion