Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.85 KB

00001.md

File metadata and controls

58 lines (36 loc) · 1.85 KB

EIP-00001: ECALL in Solidity and AVM

Author ieigen-max, weber
Status Developing
Type Private Smart Contract
Category Core
Created 2021-05-20

[toc]

Simple Summary

To provide external call from Solidity and AVM

Abstract

By adding a new built-in function in Solidity and AVM to support different privacy computing protocol on Layer2

Motivation

Enhance the privacy of smart contract by EigenCC or EigenFL.

Specification

API spec

  1. Function signature

    function eigenCall(bytes calldata) external pure returns (bytes memory);
  2. Input

    • rlp_bytes: The RLP encoded of a list which contains 4 string elements just like [operator, arg1, arg2, arg3]. operator, arg1, arg2, arg3 are all strings.
      • operator can be "add_cipher_cipher", "add_cipher_plain", "sub_cipher_cipher", "sub_cipher_plian", "encrypt", and "descrypt"
      • arg1, arg2, arg3 should be operand. According to the kind of operator, they represent different meanings, e.g., if operator is "add_cipher_cipher", arg1 and arg2 should be ciphers which are base64 encoding ECIES cipher; if operator is "add_cipher_plian", arg1 should be ciphers which is base64 encoding ECIES cipher, but arg2 should be plain number
      • The list must contain 4 elements, so if argn is not used, it should be set to empty sting (that is "")
  3. Returns

    • results: The RLP encoded of a string

Dispute Assertion

The eigenCall is executed off the chain as a kind of secure out-soured computing. While outsouring, the computing power provider, namely prover, will generate a signature in TEE or a ZKP in Non-TEE, as the OneStepProof.

Rationale

Backwards Compatibility

TestCases

Implementation

Tests

Copyright