scrtlabs / discovery-docker-network

Docker Network for the Discovery release of the Enigma Protocol
https://enigma.co
GNU Affero General Public License v3.0
21 stars 2 forks source link

List of Integration Tests #2

Open lacabra opened 5 years ago

lacabra commented 5 years ago

Sunny Days ☀️

    • [x] Test: Network Initialization
    • [x] Test: userWorkerKey exchange
    • [x] Automatic epoch transitions (aka Pass The Torch -> PTT)
    • [x] Test: Successful deployment of contract_1: calculator
    • [x] Test: Successful compute of contract_1: calculator
    • [x] Test: Successful deployment of contract_2: flipcoin
    • [x] Test: Successful compute of contract_2: flipcoin
    • [x] Test: Successful deployment of contract_3: erc20
    • [x] Test: Successful compute of contract_3: erc20
    • [x] Test: Successful deployment of contract_4: millionaires
    • [x] Test: Successful compute of contract_4: millionaires
    • [x] Test Successful deployment of contract_5: Voting
    • [x] Test Successful compute of contract_5: Voting with Ethereum call
    • [x] Successful simultaneous deployments of contracts 1, 2, 3, 4 & 5
    • [x] Test: Successful successive computations with no state change (contract_1: simple_calculator)
    • [x] Successful successive computations that change the state across epochs
    • [x] Successful multiple computations across multiple workers and epochs

    Rainy Days 🌧

    • [x] Test: Failed contract deployment: wrong bytecode
    • [x] Test Failed contract deployment: wrong encryption key
    • [x] Test: Failed contract deployment: wrong worker
    • [ ] Test: Failed contract deployment: wrong constructor function (enigmampc/enigma-core#111)
    • [x] Test: Failed contract deployment: wrong constructor arguments (enigmampc/enigma-core#128)
    • [x] Test: Failed contract deployment: out of gas
    • [x] Test: Failed execution: wrong parameters (enigmampc/enigma-core#128)
    • [x] Test: Failed execution: out of gas
    • [ ] Test: Failed execution: non-existent secret contract address (#10)
    • [x] Test Failed execution: wrong encryption key
    • [x] Test Failed execution: wrong worker
    • [ ] Failed execution: runtime exception (similar to enigmampc/enigma-core#128)
    • [x] Failed execution: wrong Ethereum payload
    • [x] Failed execution: wrong Ethereum address
AvishaiW commented 5 years ago

@lacabra We propose the following test categories for sunny day scenarios (the tests which are covered, we tried to mark):

lacabra commented 5 years ago

That's fine. For the ones that require a change of epoch, we can combine some of the ones we already have with the advance_epoch, so I don't think they require any additional work, but rather concatenating existing tests.

For those that involve more workers, again we can reuse existing tests and launch the network with NODES=3, so again it doesn't sound like we need new tests, but rather combining the existing tests with the right parameters.

lenak25 commented 5 years ago

In our effort of expanding the integration test suite until we have a full functional system test environment, here is an initial suggestion for the next steps.

Current status:

Proposed next steps:

  1. Run the current test suite with more workers (3, 5, 9) and users (1, 3, 5) periodically (by attaching to a CI framework / simple cron job running once a day).

  2. Add more test cases/combine the existing tests to test the following:

    • Deployment of (5, 10) contracts + (15, 20) computations, one after the other
    • Triggered by (1, 2) user, (1, 5) workers in the network
    • Triggered by 5 user, 10 workers in the network
      • All workers are online during the entire scenario run
      • 5 of the workers come online in the middle of the scenario (others always online)
      • 5 of the workers go offline in the middle of the scenario (others always online)
    • Simultaneous task creations
    • Deployment of 5 contracts + 15 computations, triggered by (3, 5) users, (5, 10) workers

Will love to hear your feedback @lacabra @AvishaiW @moriaab

moriaab commented 5 years ago

@lenak25 @mdemri @Cashmaney @AvishaiW (cc @lacabra) This is an initial set of the network events to test in system tests that we agreed upon (maybe some of the events may be tested in integration tests as well):