oasislabs / e2e-tests Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED.
License: Apache License 2.0
DEPRECATED.
License: Apache License 2.0
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.
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)
|
We should change test-new-accounts.js
to test-transfer.js
and test transfers to both existing and non-existing accounts.
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.
The developer-gateway is currently commented out in tests due to a change/regression in it. See https://github.com/oasislabs/e2e-tests/blob/beta/test/13_test_oasis_client.js#L34.
We should uncomment it.
Example output:
4) should have a starting count of 0 for a confidential Rust contract with [provider=ws]
> No events were emitted
connection not open on send()
This is due to Cloudflare's 100 second inactivity timeout for WebSocket connections.
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)
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);
}
}
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.
We should add a test for each syscall_id here: https://github.com/oasislabs/parity/pull/79/files
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)
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
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)
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.
We should ensure the proper serialization/deserialization is done.
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.
https://github.com/oasislabs/oasis-rs/tree/master/examples
Any "official" public examples we have should be run in CI.
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):
e2e-tests/test/9_test_deploy_header.js
Line 77 in 9241610
We currently have rust <--> rust and solidity <--> solidity tests. We should add a test between rust and solidity.
Currently we cargo install in CI. It'd be faster to just grab the artifacts from s3.
Now that we have oasis.workspace
we should replace all hardcoded paths with it, e.g., https://github.com/oasislabs/e2e-tests/blob/master/test/7_test_failures.js#L10.
/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)
Client has a breaking change. See https://github.com/oasislabs/oasis.js/pull/258/files#diff-2797b0df81b0673f6ae486adf46486dfR54
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
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]
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.
This functionality might be necessary to properly implement transactions with return values, because, when a provider is injected into web3.js, it's not necessarily the case that the transaction hash is sent back to the client before it is sent to the gateway.
Specifically, the following web3 APIs will no longer be available:
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.
Currently we only run oasis-chain
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.