Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Allow off-chain indetermisim #12063

Closed

Description

@athei

The Vision

Some users want to use contracts for number crunching (floats are banned cause of in-determinism) in off-chain situations. In these cases determinism is not required because the results are not subject to consensus.

In this case the requirement comes from the phala team who runs the contract in a secure enclave (off-chain) and wants allow users to to computation there.

The Plan

We allow for the upload of in-deterministic code blobs but prevent users from using them on-chain. Only when called off-chain (through bare_call with a specific flag) we allow the execution. Please note that those code blobs can never be instantiated into a contract cause that would require on-chain execution. The only way to use them is from another contract using seal_delegate_call. A code will be flagged in-deterministic on upload by adding a new dispatchable exactly for this reason. We don't change the existing upload_code for backwards compatibility reasons.

Original discussion: #11367

Open Questions

Activity

  1. added
    J0-enhancementAn additional feature request.
    Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
    on Aug 18, 2022
  2. moved this to Draft in Parity Roadmapon Aug 18, 2022
  3. moved this from Draft to Open in Parity Roadmapon Aug 18, 2022
  4. self-assigned this
    on Aug 18, 2022
  5. Repository owner moved this from Open to Closed in Parity Roadmapon Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

J0-enhancementAn additional feature request.Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions