-
Notifications
You must be signed in to change notification settings - Fork 399
feat: new canister settings minimum_msg_cycles_available #10398
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
base: master
Are you sure you want to change the base?
Changes from all commits
02c1bc3
6de54f4
d18ae7f
57e68dd
634bbaf
0fc337c
948ff22
5455458
eb5a1b6
c3ebc38
d865f07
37fb2ab
ef30644
dc54e81
a8ff433
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -161,6 +161,14 @@ pub struct CanisterSettings { | |
| /// | ||
| /// Default value: `null` (i.e., no environment variables provided). | ||
| pub environment_variables: Option<Vec<EnvironmentVariable>>, | ||
| /// Indicates the minimum number of cycles required for an incoming message | ||
| /// from another canister. Messages with fewer cycles are rejected with a | ||
| /// `CanisterError`. Ingress messages are not affected. | ||
| /// | ||
| /// Must be a number between 0 and 2<sup>128</sup>-1, inclusively. | ||
| /// | ||
| /// Default value: `0` (i.e., no minimum enforced). | ||
| pub minimum_msg_cycles_available: Option<Nat>, | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I first read the name I thought this was some sort of freezing threshold for cycles reserved for outgoing calls. Maybe we should call it something like "minimum [call] payment"? Or, if you think "pauyment" is only used in the implementation, not the spec, and is thus potentially confusing, then "attached cycles"? "Available" sounds too much like "balance" or "reservation".
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The motivation for this name was the system API But I see your confusion: how does
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I understand now where it comes from, but I suppose |
||
|
|
||
| /// # Definite Canister Settings | ||
|
|
@@ -194,6 +202,8 @@ pub struct DefiniteCanisterSettings { | |
| pub wasm_memory_threshold: Nat, | ||
| /// A list of environment variables. | ||
| pub environment_variables: Vec<EnvironmentVariable>, | ||
| /// Minimum number of cycles required for an incoming canister-to-canister message. | ||
| pub minimum_msg_cycles_available: Nat, | ||
| } | ||
|
|
||
| /// # Create Canister Args | ||
|
|
||
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 was thinking this kind of defeats the purpose. Took me a while to realize that there's [whatever the single-replica ingress message filtering mechanism is called]. Maybe mention that, just in case someone is looking at the implementation, trying to figure out how to deal with call spam.