Code Monkey home page Code Monkey logo

e2e-tests's People

Contributors

armaniferrante avatar eauge avatar matevz avatar nhynes avatar peterjgilbert avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

oasisunofficial

e2e-tests's Issues

Break tests into groups that can be run separately in parrallel

As more and more tests are added to this repo, it will become the bottleneck for CI. To address this, we should break up the tests into groups that can be run individually.

Some ideas.

  • Create a workspace of truffle projects, each of which can be run by a separate build step in CI. This is clunky from an organization perspective.
  • Run tests conditionally based upon environment variables defined in CI. Still clunky, but maintains a single truffle project. This is my preferred solution at the moment.
  • Run each test file individually (lowest build time but waste of resources and other parts of CI will be bottleneck)
  • Modify truffle or not use it to so that we can do whatever alternative workflow we want.

Deploy header assertions are failing


1) Contract: Deploy Header
--
  | confidential: calls a contract that has expired with failure:
  | Error: Transaction execution error with cause Error { message: "Requested gas greater than block gas limit." }
  | at ProviderError.ExtendableError (node_modules/truffle-oasis/build/webpack:/packages/truffle-error/index.js:10:1)
  | at new ProviderError (node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/error.js:17:1)
  | at node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/wrapper.js:75:1
  | at node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/wrapper.js:107:1
  | at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:157:9
  | at node_modules/async/internal/once.js:12:16
  | at replenish (node_modules/async/internal/eachOfLimit.js:61:25)
  | at node_modules/async/internal/eachOfLimit.js:71:9
  | at eachLimit (node_modules/async/eachLimit.js:43:36)
  | at node_modules/async/internal/doLimit.js:9:16
  | at end (node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:134:5)
  | at node_modules/async/internal/once.js:12:16
  | at next (node_modules/async/waterfall.js:21:29)
  | at node_modules/async/internal/onlyOnce.js:12:16
  | at node_modules/async/internal/once.js:12:16
  | at next (node_modules/async/waterfall.js:21:29)
  | at node_modules/async/internal/onlyOnce.js:12:16
  | at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/hooked-wallet.js:460:23
  | at node_modules/async/internal/once.js:12:16
  | at next (node_modules/async/waterfall.js:21:29)
  | at node_modules/async/internal/onlyOnce.js:12:16
  | at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/hooked-wallet.js:488:21
  | at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:157:9
  | at node_modules/async/internal/once.js:12:16
  | at replenish (node_modules/async/internal/eachOfLimit.js:61:25)
  | at node_modules/async/internal/eachOfLimit.js:71:9
  | at eachLimit (node_modules/async/eachLimit.js:43:36)
  | at node_modules/async/internal/doLimit.js:9:16
  | at end (node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:134:5)
  | at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/provider.js:18:32
  | at XMLHttpRequest.request.onreadystatechange (node_modules/web3-providers-http/src/index.js:77:13)
  | at XMLHttpRequestEventTarget.dispatchEvent (node_modules/xhr2/lib/xhr2.js:64:18)
  | at XMLHttpRequest._setReadyState (node_modules/xhr2/lib/xhr2.js:354:12)
  | at XMLHttpRequest._onHttpResponseEnd (node_modules/xhr2/lib/xhr2.js:509:12)
  | at IncomingMessage.<anonymous> (node_modules/xhr2/lib/xhr2.js:469:24)
  | at endReadableNT (_stream_readable.js:1064:12)
  | at _combinedTickCallback (internal/process/next_tick.js:139:11)
  | at process._tickCallback (internal/process/next_tick.js:181:9)
  |  
  | 2) Contract: Deploy Header
  | eth: calls a contract that has expired with failure:
  | Error: Transaction execution error with cause Error { message: "Transaction execution error (Contract Expired)." }
  | at ProviderError.ExtendableError (node_modules/truffle-oasis/build/webpack:/packages/truffle-error/index.js:10:1)
  | at new ProviderError (node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/error.js:17:1)
  | at node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/wrapper.js:75:1
  | at node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/wrapper.js:107:1
  | at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:157:9
  | at node_modules/async/internal/once.js:12:16
  | at replenish (node_modules/async/internal/eachOfLimit.js:61:25)
  | at node_modules/async/internal/eachOfLimit.js:71:9
  | at eachLimit (node_modules/async/eachLimit.js:43:36)
  | at node_modules/async/internal/doLimit.js:9:16
  | at end (node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:134:5)
  | at node_modules/async/internal/once.js:12:16
  | at next (node_modules/async/waterfall.js:21:29)
  | at node_modules/async/internal/onlyOnce.js:12:16
  | at node_modules/async/internal/once.js:12:16
  | at next (node_modules/async/waterfall.js:21:29)
  | at node_modules/async/internal/onlyOnce.js:12:16
  | at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/hooked-wallet.js:460:23
  | at node_modules/async/internal/once.js:12:16
  | at next (node_modules/async/waterfall.js:21:29)
  | at node_modules/async/internal/onlyOnce.js:12:16
  | at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/hooked-wallet.js:516:21
  | at node_modules/async/internal/parallel.js:39:9
  | at node_modules/async/internal/once.js:12:16
  | at iterateeCallback (node_modules/async/internal/eachOfLimit.js:45:17)
  | at node_modules/async/internal/onlyOnce.js:12:16
  | at node_modules/async/internal/parallel.js:36:13
  | at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/util/estimate-gas.js:22:16
  | at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:157:9
  | at node_modules/async/internal/once.js:12:16
  | at replenish (node_modules/async/internal/eachOfLimit.js:61:25)
  | at node_modules/async/internal/eachOfLimit.js:71:9
  | at eachLimit (node_modules/async/eachLimit.js:43:36)
  | at node_modules/async/internal/doLimit.js:9:16
  | at end (node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:134:5)
  | at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/provider.js:18:32
  | at XMLHttpRequest.request.onreadystatechange (node_modules/web3-providers-http/src/index.js:77:13)
  | at XMLHttpRequestEventTarget.dispatchEvent (node_modules/xhr2/lib/xhr2.js:64:18)
  | at XMLHttpRequest._setReadyState (node_modules/xhr2/lib/xhr2.js:354:12)
  | at XMLHttpRequest._onHttpResponseEnd (node_modules/xhr2/lib/xhr2.js:509:12)
  | at IncomingMessage.<anonymous> (node_modules/xhr2/lib/xhr2.js:469:24)
  | at endReadableNT (_stream_readable.js:1064:12)
  | at _combinedTickCallback (internal/process/next_tick.js:139:11)
  | at process._tickCallback (internal/process/next_tick.js:181:9)
  |  


Remove web3c.js

We need to keep web3c.js around since the new oasis-client doesn't provide an expiry api. Once/if we add it to the new oasis-client, we should remove web3c.js from the e2e-tests.

See oasislabs/oasis.js#144.

Errors in 3_test_pubsub when running the entire test set against staging

  Contract: TestEvent-PubSub
    ✓ on should subscribe to logs (9132ms)
    1) on: should subscribe to logs of a confidential contract

    Events emitted during test:
    ---------------------------

    Incremented(newCounter: 113952503072211057873592849766924795870869494254523976691319175836669587567162)

    ---------------------------
    ✓ callback should subscribe to logs (6862ms)
    2) callback: should subscribe to logs of a confidential contract

    Events emitted during test:
    ---------------------------

    Incremented(newCounter: 112290352324917328170596397521614510741897725835763773432233127459216179409466)

    ---------------------------
    ✓ should fail to subscribe to pending transactions
    3) should subscribe to completed transaction with transactionHash
    > No events were emitted
    4) should subscribe to completed transaction with fromAddress
    > No events were emitted
  1) Contract: TestEvent-PubSub
       on: should subscribe to logs of a confidential contract:
     AssertionError: AssertionError: expected '0x0000000000000000000000000000000000000000000000000000000000000003' to equal 1
      at Context.it (test/3_test_pubsub.js:47:18)
      at process._tickCallback (internal/process/next_tick.js:68:7)

  2) Contract: TestEvent-PubSub
       callback: should subscribe to logs of a confidential contract:
     AssertionError: AssertionError: expected '0x0000000000000000000000000000000000000000000000000000000000000004' to equal 2
      at Context.it (test/3_test_pubsub.js:47:18)
      at process._tickCallback (internal/process/next_tick.js:68:7)

  3) Contract: TestEvent-PubSub
       should subscribe to completed transaction with transactionHash:
     AssertionError: AssertionError: expected '0x0000000000000000000000000000000000000000000000000000000000000003' to equal '0x0000000000000000000000000000000000000000000000000000000000000005'
      at Context.it (test/3_test_pubsub.js:114:16)
      at process._tickCallback (internal/process/next_tick.js:68:7)

  4) Contract: TestEvent-PubSub
       should subscribe to completed transaction with fromAddress:
     AssertionError: AssertionError: expected '0x0000000000000000000000000000000000000000000000000000000000000004' to equal '0x0000000000000000000000000000000000000000000000000000000000000006'
      at Context.it (test/3_test_pubsub.js:124:16)
      at process._tickCallback (internal/process/next_tick.js:68:7)

Change all uses of web3c.js to use in memory storage

Right now web3c.js will default to node local storage. For the tests, we should inject in memory storage via options so that we don't have .web3c directories making subsequent runs of the test fail.

I.e., what we should do is:

let web3c = new Web3c(provider, undefined, {
  storage: new Storage()
});

class Storage {

  constructor() {
    this.db = new Map();
  }

  getItem(key) {
    return this.db.get(key);
  }

  setItem(key, val) {
    this.db.set(key, val);
  }

}

Move TVM test into its own repo

Everyone deletes the TVM contract to compile/run these tests locally since the development container doesn't have TVM installed and we don't plan to put it in there. As a result, we should move the TVM test to a different repo so that we can compile and run these tests in our normal developing environment without having to switch to another docker image.

Migrations flaky when run against staging

Full logs attached. Some highlights:

Using network 'development'.

Error: while migrating ConfidentialWasmCounter: The contract code couldn't be stored, please check your gas limit.
    at /usr/src/app/node_modules/truffle-oasis/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
    at process._tickCallback (internal/process/next_tick.js:68:7)

  1) Contract: Builtins
       "before all" hook: prepare suite:
     Error: while migrating ConfidentialCounter: The contract code couldn't be stored, please check your gas limit.
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
      at process._tickCallback (internal/process/next_tick.js:68:7)

  2) Contract: TestEvent-PubSub
       "before all" hook: prepare suite:
     Error: while migrating Migrations: The contract code couldn't be stored, please check your gas limit.
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
      at process._tickCallback (internal/process/next_tick.js:68:7)

  1) Contract: Counter Contracts
       should estimate gas for deploy transactions the same as gas used for a Rust contract with [provider=http]:
     Uncaught Error: The contract code couldn't be stored, please check your gas limit.
      at Object.callback (node_modules/web3-core-method/src/index.js:333:46)
      at sendTxCallback (node_modules/web3-core-method/src/index.js:484:29)
      at node_modules/web3-core/node_modules/web3-core-requestmanager/src/index.js:147:9
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/wrapper.js:112:1
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:159:9
      at node_modules/async/internal/once.js:12:16
      at replenish (node_modules/async/internal/eachOfLimit.js:61:25)
      at node_modules/async/internal/eachOfLimit.js:71:9
      at eachLimit (node_modules/async/eachLimit.js:43:36)
      at node_modules/async/internal/doLimit.js:9:16
      at end (node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:134:5)
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/provider.js:19:5
      at XMLHttpRequest.request.onreadystatechange (node_modules/web3-providers-http/src/index.js:77:13)
      at XMLHttpRequestEventTarget.dispatchEvent (node_modules/xhr2/lib/xhr2.js:64:18)
      at XMLHttpRequest._setReadyState (node_modules/xhr2/lib/xhr2.js:354:12)
      at XMLHttpRequest._onHttpResponseEnd (node_modules/xhr2/lib/xhr2.js:509:12)
      at IncomingMessage.<anonymous> (node_modules/xhr2/lib/xhr2.js:469:24)
      at endReadableNT (_stream_readable.js:1125:12)
      at process._tickCallback (internal/process/next_tick.js:63:19)

  2) Contract: BasicTVM
       "before all" hook: prepare suite:
     Error: while migrating Counter: The contract code couldn't be stored, please check your gas limit.
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
      at process._tickCallback (internal/process/next_tick.js:68:7)

  3) Contract: Failure Cases
       "before all" hook: prepare suite:
     Error: Transaction execution error with cause: Invalid transaction nonce: expected 53, found 52
      at ProviderError.ExtendableError (node_modules/truffle-oasis/build/webpack:/packages/truffle-error/index.js:10:1)
      at new ProviderError (node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/error.js:17:1)
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/wrapper.js:75:1
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/wrapper.js:107:1
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:157:9
      at node_modules/async/internal/once.js:12:16
      at replenish (node_modules/async/internal/eachOfLimit.js:61:25)
      at node_modules/async/internal/eachOfLimit.js:71:9
      at eachLimit (node_modules/async/eachLimit.js:43:36)
      at node_modules/async/internal/doLimit.js:9:16
      at end (node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:134:5)
      at node_modules/async/internal/once.js:12:16
      at next (node_modules/async/waterfall.js:21:29)
      at node_modules/async/internal/onlyOnce.js:12:16
      at node_modules/async/internal/once.js:12:16
      at next (node_modules/async/waterfall.js:21:29)
      at node_modules/async/internal/onlyOnce.js:12:16
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/hooked-wallet.js:460:23
      at node_modules/async/internal/once.js:12:16
      at next (node_modules/async/waterfall.js:21:29)
      at node_modules/async/internal/onlyOnce.js:12:16
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/hooked-wallet.js:488:21
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:157:9
      at node_modules/async/internal/once.js:12:16
      at replenish (node_modules/async/internal/eachOfLimit.js:61:25)
      at node_modules/async/internal/eachOfLimit.js:71:9
      at eachLimit (node_modules/async/eachLimit.js:43:36)
      at node_modules/async/internal/doLimit.js:9:16
      at end (node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:134:5)
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/provider.js:18:32
      at XMLHttpRequest.request.onreadystatechange (node_modules/web3-providers-http/src/index.js:77:13)
      at XMLHttpRequestEventTarget.dispatchEvent (node_modules/xhr2/lib/xhr2.js:64:18)
      at XMLHttpRequest._setReadyState (node_modules/xhr2/lib/xhr2.js:354:12)
      at XMLHttpRequest._onHttpResponseEnd (node_modules/xhr2/lib/xhr2.js:509:12)
      at IncomingMessage.<anonymous> (node_modules/xhr2/lib/xhr2.js:469:24)
      at endReadableNT (_stream_readable.js:1125:12)
      at process._tickCallback (internal/process/next_tick.js:63:19)

  4) Contract: Confidential Cross Contract Calls
       "before all" hook: prepare suite:
     Error: while migrating Counter: Transaction execution error with cause: Invalid transaction nonce: expected 56, found 55
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
      at process._tickCallback (internal/process/next_tick.js:68:7)

  5) Contract: Builtins
       "before all" hook: prepare suite:
     Error: while migrating Migrations: Transaction execution error with cause: Invalid transaction nonce: expected 57, found 56
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
      at process._tickCallback (internal/process/next_tick.js:68:7)

  6) Contract: BulkStorage
       "before all" hook: prepare suite:
     Error: Transaction execution error with cause: Invalid transaction nonce: expected 59, found 58
      at ProviderError.ExtendableError (node_modules/truffle-oasis/build/webpack:/packages/truffle-error/index.js:10:1)
      at new ProviderError (node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/error.js:17:1)
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/wrapper.js:75:1
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/wrapper.js:107:1
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:157:9
      at node_modules/async/internal/once.js:12:16
      at replenish (node_modules/async/internal/eachOfLimit.js:61:25)
      at node_modules/async/internal/eachOfLimit.js:71:9
      at eachLimit (node_modules/async/eachLimit.js:43:36)
      at node_modules/async/internal/doLimit.js:9:16
      at end (node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:134:5)
      at node_modules/async/internal/once.js:12:16
      at next (node_modules/async/waterfall.js:21:29)
      at node_modules/async/internal/onlyOnce.js:12:16
      at node_modules/async/internal/once.js:12:16
      at next (node_modules/async/waterfall.js:21:29)
      at node_modules/async/internal/onlyOnce.js:12:16
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/hooked-wallet.js:460:23
      at node_modules/async/internal/once.js:12:16
      at next (node_modules/async/waterfall.js:21:29)
      at node_modules/async/internal/onlyOnce.js:12:16
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/hooked-wallet.js:488:21
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:157:9
      at node_modules/async/internal/once.js:12:16
      at replenish (node_modules/async/internal/eachOfLimit.js:61:25)
      at node_modules/async/internal/eachOfLimit.js:71:9
      at eachLimit (node_modules/async/eachLimit.js:43:36)
      at node_modules/async/internal/doLimit.js:9:16
      at end (node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:134:5)
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/provider.js:18:32
      at XMLHttpRequest.request.onreadystatechange (node_modules/web3-providers-http/src/index.js:77:13)
      at XMLHttpRequestEventTarget.dispatchEvent (node_modules/xhr2/lib/xhr2.js:64:18)
      at XMLHttpRequest._setReadyState (node_modules/xhr2/lib/xhr2.js:354:12)
      at XMLHttpRequest._onHttpResponseEnd (node_modules/xhr2/lib/xhr2.js:509:12)
      at IncomingMessage.<anonymous> (node_modules/xhr2/lib/xhr2.js:469:24)
      at endReadableNT (_stream_readable.js:1125:12)
      at process._tickCallback (internal/process/next_tick.js:63:19)

  7) Contract: TestEvent-PubSub
       "before all" hook: prepare suite:
     Error: while migrating Migrations: Transaction execution error with cause: Invalid transaction nonce: expected 60, found 59
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
      at process._tickCallback (internal/process/next_tick.js:68:7)

  8) Contract: Confidential Contracts
       "before all" hook: prepare suite:
     Error: while migrating Migrations: Transaction execution error with cause: Invalid transaction nonce: expected 61, found 60
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
      at process._tickCallback (internal/process/next_tick.js:68:7)

  9) Contract: Deploy Header
       "before all" hook: prepare suite:
     Error: while migrating Counter: The contract code couldn't be stored, please check your gas limit.
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
      at process._tickCallback (internal/process/next_tick.js:68:7)

Pub/sub test hangs when run against staging

It consistently hangs at this point:

  Contract: TestEvent-PubSub
    ✓ on should subscribe to logs (6171ms)
    ✓ on: should subscribe to logs of a confidential contract (5918ms)
    ✓ callback should subscribe to logs (5727ms)
    ✓ callback: should subscribe to logs of a confidential contract (6181ms)
    ✓ should fail to subscribe to pending transactions

Dev-gateway tests occasionally fail

https://buildkite.com/oasislabs/runtime-ethereum/builds/2365#bae0b0dd-86d3-4acd-a4d4-ae94b19277de

  30 passing (4m)
  1 failing
 
  1) Contract: Oasis client
       "before each" hook: before test:
     Uncaught Error: socket hang up
      at createHangUpError (_http_client.js:342:15)
      at Socket.socketOnEnd (_http_client.js:437:23)
      at endReadableNT (_stream_readable.js:1064:12)
      at _combinedTickCallback (internal/process/next_tick.js:139:11)
      at process._tickCallback (internal/process/next_tick.js:181:9)

Don't upload the entire mantle directory as an artifact

Currently we zip the entire mantle directory and upload it to buildkite as an artifact, so that we can download it from the e2e-tests to avoid recompiling. This of course is silly. We only need to upload the *.wasm files for each mantle service.

initial_memory gas of bulk_storage contract

It costs too much to do 100 transactions on the contract in one block.

The initial memory is 4 MiB (supposedly what the max memory is configured to be); price is 4ki gas per 64kiB page, so it takes at least 256ki gas per transaction. The block gas limit is 16M, so we would only be able to do 61 transactions if we were paying for just the initial memory.

blocks oasislabs/oasis-ethwasi-runtime#588

Contract deploy header tests flaky when run against staging

Sample output:

  Contract: Deploy Header
    ✓ confidential: creates a confidential contract that expires tomorrow with success (4987ms)
    ✓ confidential: can execute transactions and calls on a contract with expiry (10588ms)
    ✓ confidential: creates a contract that expires yesterday with failure
    1) confidential: calls a contract that has expired with failure
    > No events were emitted
    ✓ eth: creates a confidential contract that expires tomorrow with success (2519ms)
    ✓ eth: can execute transactions and calls on a contract with expiry (4643ms)
    ✓ eth: creates a contract that expires yesterday with failure
    ✓ eth: calls a contract that has expired with failure (36622ms)


  7 passing (1m)
  1 failing

  1) Contract: Deploy Header
       confidential: calls a contract that has expired with failure:
     Error: The contract code couldn't be stored, please check your gas limit.
      at Object.callback (node_modules/web3-core-method/src/index.js:333:46)
      at sendTxCallback (node_modules/web3-core-method/src/index.js:484:29)
      at node_modules/web3-core/node_modules/web3-core-requestmanager/src/index.js:147:9
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-provider/wrapper.js:112:1
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:159:9
      at node_modules/async/internal/once.js:12:16
      at replenish (node_modules/async/internal/eachOfLimit.js:61:25)
      at node_modules/async/internal/eachOfLimit.js:71:9
      at eachLimit (node_modules/async/eachLimit.js:43:36)
      at node_modules/async/internal/doLimit.js:9:16
      at end (node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:134:5)
      at node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/provider.js:19:5
      at XMLHttpRequest.request.onreadystatechange (node_modules/web3-providers-http/src/index.js:77:13)
      at XMLHttpRequestEventTarget.dispatchEvent (node_modules/xhr2/lib/xhr2.js:64:18)
      at XMLHttpRequest._setReadyState (node_modules/xhr2/lib/xhr2.js:354:12)
      at XMLHttpRequest._onHttpResponseEnd (node_modules/xhr2/lib/xhr2.js:509:12)
      at IncomingMessage.<anonymous> (node_modules/xhr2/lib/xhr2.js:469:24)
      at endReadableNT (_stream_readable.js:1125:12)
      at process._tickCallback (internal/process/next_tick.js:63:19)

This is presumably due to failure to deploy a contract with a very short expiry (5 seconds in the future):

expiry: Math.floor(Date.now() / 1000 + 5),
. This period should be extended to account for lack of clock synchronization, network delays, and possible retries.

integration developer-gateway with oasis-client

  • Confidential contracts with developer-gateway failed to deploy. The web3 gateway reports a status 0 on the transaction receipt [ ]
  • Subscriptions sometimes hang. It seems that the client stops sending /event/pool requests
  • Potential errors on the deserialization of outputs for solidity contracts
/Users/estanislauauge-pujadas/Workspace/src/github.com/oasislabs/runtime-ethereum/e2e-tests/e2e-tests/node_modules/mocha/lib/runner.js:707
  err.uncaught = true;
               ^

TypeError: Cannot create property 'uncaught' on string 'Remaining bytes'
    at Runner.uncaught (/Users/estanislauauge-pujadas/Workspace/src/github.com/oasislabs/runtime-ethereum/e2e-tests/e2e-tests/node_modules/mocha/lib/runner.js:707:16)
    at process.uncaught (/Users/estanislauauge-pujadas/Workspace/src/github.com/oasislabs/runtime-ethereum/e2e-tests/e2e-tests/node_modules/mocha/lib/runner.js:821:10)
    at process.emit (events.js:182:13)
    at process.emit (/Users/estanislauauge-pujadas/Workspace/src/github.com/oasislabs/runtime-ethereum/e2e-tests/e2e-tests/node_modules/truffle-oasis/build/webpack:/~/source-map-support/source-map-support.js:461:1)
    at process._fatalException (internal/bootstrap/node.js:494:27)

Cross contract call tests fail against staging

Specifically, the delegatecall call tests are failing consistently:

  Contract: Confidential Cross Contract Calls
    ✓ bilateral: deploys a non-confidential and a non-confidential contract (4893ms)
    ✓ bilateral: non-confidential calls non-confidential (9236ms)
    ✓ bilateral: non-confidential sets non-confidential storage via call (9333ms)
    ✓ bilateral: non-confidential sets non-confidential storage via delegatecall (17624ms)
    ✓ bilateral: deploys a confidential and a confidential contract (5096ms)
    ✓ bilateral: confidential calls confidential (11550ms)
    ✓ bilateral: confidential sets confidential storage via call (10496ms)
    ✓ bilateral: confidential sets confidential storage via delegatecall (7501ms)
    ✓ bilateral: deploys a non-confidential and a confidential contract (3509ms)
    ✓ bilateral: non-confidential calls confidential
    ✓ bilateral: non-confidential sets confidential storage via call
    1) bilateral: non-confidential sets confidential storage via delegatecall
    > No events were emitted
    ✓ bilateral: deploys a confidential and a non-confidential contract (6701ms)
    ✓ bilateral: confidential calls non-confidential
    ✓ bilateral: confidential sets non-confidential storage via call
    2) bilateral: confidential sets non-confidential storage via delegatecall
    > No events were emitted
    ✓ 3-party: deploys a non-confidential, non-confidential and a non-confidential contract (10783ms)
    ✓ 3-party: non-confidential calls non-confidential through non-confidential (2706ms)
    ✓ 3-party: non-confidential sets storage of non-confidential through non-confidential (10559ms)
    ✓ 3-party: non-confidential causes non-confidential to set storage of non-confidential via delegatecall and delegatecall (6857ms)
    ✓ 3-party: non-confidential sets storage of non-confidential through undefined via delegatecall and call (8128ms)
    ✓ 3-party: deploys a confidential, confidential and a confidential contract (12736ms)
    ✓ 3-party: confidential calls confidential through confidential (3702ms)
    ✓ 3-party: confidential sets storage of confidential through confidential (13477ms)
    ✓ 3-party: confidential causes confidential to set storage of confidential via delegatecall and delegatecall (9598ms)
    ✓ 3-party: confidential sets storage of confidential through B via delegatecall and call (8891ms)
    ✓ 3-party: deploys a confidential, non-confidential and a confidential contract (6563ms)
    ✓ 3-party: confidential calls confidential through non-confidential
    ✓ 3-party: confidential sets storage of confidential through non-confidential
    3) 3-party: confidential causes non-confidential to set storage of confidential via delegatecall and delegatecall
    > No events were emitted
    ✓ 3-party: confidential sets storage of confidential through B via delegatecall and call

Retries test flaky when run against staging

  Contract: Retries
    1) "before all" hook: prepare suite
  1) Contract: Retries
       "before all" hook: prepare suite:
     Error: while migrating WasmCounter: The contract code couldn't be stored, please check your gas limit.
      at node_modules/truffle-oasis/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
      at process._tickCallback (internal/process/next_tick.js:68:7)

This test should probably be changed to not request the entire block gas limit--this requires its transactions to always be ordered first in the block. [edit: this likely not the cause of the error shown here]

Numbering in test filenames must be contiguous

For example, test/7_[...].js was recently removed. This breaks the task bucketing logic in truffleConfig.shouldRun, which assumes contiguous numbering starting at 0.

We should update truffleConfig.shouldRun to work correctly with non-contiguous numbering or return an error.

Nonce issues with both HDWalletProvider and oasis-client

Sometimes transactions fail with an error such as

Transaction execution error with cause: transaction failed: Invalid transaction nonce: expected 69, found 68

This happens with both oasis-client and web3.js + hdwalletprovider.

Errors in 4_test_confidential when running the entire test set against staging

  Contract: Confidential Contracts
    ✓ stores the long term public key in the deploy logs (5490ms)
    5) stores a key manager signature of the long term key in the deploy logs
    > No events were emitted
    ✓ retrieves a public key with a max timestamp (38ms)
    6) retrieves a public key signed by the key manager
    > No events were emitted
    ✓ retrieves a public key with a signature of the correct form
    ✓ uses an auto incrementing nonce when encrypting many logs (3479ms)
    ✓ should not retrieve contract keys from a non deployed contract address (138ms)
    ✓ should yield a larger estimate for confidential transactions than non-confidential (3506ms)
  5) Contract: Confidential Contracts
       stores a key manager signature of the long term key in the deploy logs:
     TypeError: Cannot read property 'substr' of undefined
      at validateSignature (test/4_test_confidential.js:160:76)
      at Context.it (test/4_test_confidential.js:51:7)
      at web3.eth.getBlockNumber.then.result (node_modules/truffle-oasis/build/webpack:/packages/truffle-core/lib/testing/testrunner.js:134:1)
      at process._tickCallback (internal/process/next_tick.js:68:7)

  6) Contract: Confidential Contracts
       retrieves a public key signed by the key manager:
     TypeError: Cannot read property 'substr' of undefined
      at validateSignature (test/4_test_confidential.js:160:76)
      at Context.it (test/4_test_confidential.js:70:7)
      at web3.eth.getBlockNumber.then.result (node_modules/truffle-oasis/build/webpack:/packages/truffle-core/lib/testing/testrunner.js:134:1)
      at process._tickCallback (internal/process/next_tick.js:68:7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.