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

Refresh lifecycle CAP #1373

Merged
merged 3 commits into from
Jul 31, 2023
Merged

Refresh lifecycle CAP #1373

merged 3 commits into from
Jul 31, 2023

Conversation

sisuresh
Copy link
Contributor

This is an initial pass of refreshing the lifecycle CAP.

@sisuresh sisuresh requested a review from dmkozh July 27, 2023 00:21

Every preimage must also include a `networkID` (a hash of the network
passphrase) which ensures that every network has unique set of contract
identifiers.

### Installing WASM sources using `InvokeHostFunctionOp`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Uploading for consistency with op name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Installed contracts are stored in `ContractCodeEntry` ledger entries. These
entries are keyed by the hash of `InstallContractCodeArgs` used to install
Uploaded contracts are stored in `ContractCodeEntry` ledger entries. These
entries are keyed by the hash of the WASM used to upload
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could you please replace 'WASM' with 'Wasm' everywhere in the doc? WASM is not an official spelling, see https://webassembly.org/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

core/cap-0046-02.md Show resolved Hide resolved
core/cap-0046-02.md Show resolved Hide resolved
@@ -199,29 +157,34 @@ functionality to support them.
The following host functions are provided to instantiate contracts:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...to instantiate contracts and upload Wasm:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

core/cap-0046-02.md Show resolved Hide resolved
- Allow specifying a contract ID as the contract's source reference, so that the
contract would be guaranteed to have exactly the same implementation as the
referred contract without any additional code.
control over contracts on the network. The only mechanism they have is disabling
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are more mechanisms now, as it's possible to limit resources on multiple dimensions (e.g. disable large writes or constrain CPU etc.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this section since it no longer applies and probably belongs in a different CAP.

@sisuresh sisuresh merged commit dbc9457 into stellar:master Jul 31, 2023
2 checks passed
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.

2 participants