gnosisguild / enclave

Enclave is an open-source protocol for Encrypted Execution Environments (E3).
GNU General Public License v3.0
6 stars 3 forks source link

Test scripts for launching evm against ciphernode #76

Open ryardley opened 1 week ago

ryardley commented 1 week ago
    • [ ] Launch 3 ciphernodes passing in random eth addresses as well as the hardhat node url eg. ./ciphernode --addr 0xfffff...fff --evm ws://127.0.0.1:8545
    • [x] Register each eth address to the ciphernode registry eg yarn ciphernode:add --network hardhat
    • [x] Request a committee on the contract yarn requestCommittee --e3Id 1234 --filter 0x123...abc --threshold-quorum 3 --threshold-total 5
    • [ ] Receive the publickey in the output of the ciphernode (this may involve publishing from rust to evm)
    • [ ] Receive the decryption in the ciphernodes
samepant commented 1 week ago

running local hardhat network: yarn hardhat node — will deploy enclave and mock contracts

then you can run this to add a ciphernode yarn run hardhat ciphernode:add --network localhost --ciphernode-address [0xaddress]

then you can run this to request a committee using the mock contracts yarn run hardhat committee:new --network localhost

if you want to run it agains a specific E3, all the args can be set:

Usage: hardhat [GLOBAL OPTIONS] committee:new [--compute-params <STRING>] [--duration <INT>] [--e3-address <STRING>] [--e3-params <STRING>] [--filter <STRING>] [--threshold-quorum <INT>] [--threshold-total <INT>] [--window-end <INT>] [--window-start <INT>]

OPTIONS:

  --compute-params      parameters for the compute provider (default: "0x000000000000000000000000404af1c0780a9269e4d3308a0812fb87bf5fc490")
  --duration            duration in seconds of the E3 (default: 1 day) (default: 86400)
  --e3-address          address of the E3 program
  --e3-params           parameters for the E3 program (default: "0x0000000000000000000000009f3ebc4f6be495901a29bba2ae5a45fb870cdc14")
  --filter              address of filter contract to use
  --threshold-quorum    threshold quorum for committee (default: 2)
  --threshold-total     threshold total for committee (default: 2)
  --window-end          timestamp end of window for the E3 (default: now + 1 day) (default: 1726676828)
  --window-start        timestamp start of window for the E3 (default: now) (default: 1726590428)