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

List of Integration Tests #2

Open
lacabra opened this issue Apr 8, 2019 · 4 comments
Open

List of Integration Tests #2

lacabra opened this issue Apr 8, 2019 · 4 comments

Comments

@lacabra
Copy link
Contributor

lacabra commented Apr 8, 2019

Sunny Days ☀️

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

Rainy Days 🌧

    • Test: Failed contract deployment: wrong bytecode
    • Test Failed contract deployment: wrong encryption key
    • Test: Failed contract deployment: wrong worker
    • Test: Failed contract deployment: out of gas
    • Test: Failed execution: out of gas
    • Test Failed execution: wrong encryption key
    • Test Failed execution: wrong worker
    • Failed execution: wrong Ethereum payload
    • Failed execution: wrong Ethereum address
@AvishaiW
Copy link
Contributor

AvishaiW commented May 2, 2019

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

  • 1 contract deployment
    - 1 worker, 1 user, 1 epoch. (covered by tests: 4-14- only even numbers)
    - 1 worker, 1 user, change of an epoch.

  • 1 contract deployment + 1 computation
    - 1 worker, 1 user, 1 epoch. (covered by tests: 4-15)
    - 1 worker, 1 user, change of an epoch.

  • 2 contract deployments, 3 computations, change of epochs.
    - 1 worker, 1 user.
    - 3 workers, 1 user (covered by test 16?).
    - 3 workers, 2 users.
    - 1 worker, 1 user, 1 no state change, 1 state change. (covered by tests: 17-18)

@lacabra
Copy link
Contributor Author

lacabra commented May 2, 2019

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
Copy link
Contributor

lenak25 commented Jul 30, 2019

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:

  • The CI of each of the repositories, thanks to @lacabra's hard work, includes now most (all?) of the test cases 1-33 run with 1 worker + 1 user. Epoch changes happen automatically in the duration of the run as a result of the short epoch period (?)

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
Copy link

moriaab commented Oct 15, 2019

@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):

  • enigma contract upgrade
  • worker upgrade
  • worker added/removed (important to know how to kill the worker executing the computation)
  • worker up/down; kinds of down:
    • does not succeed to compute and/or publish
    • does not succeed to get updates from outside
  • upgrade of KM node
  • KM node down/up (redundancy)
  • bootstrup nodes up/down

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

No branches or pull requests

4 participants