Last active
June 12, 2019 13:55
-
-
Save semuelle/242df092691808261e05fed676b4f227 to your computer and use it in GitHub Desktop.
Showing that Status Embark testing fails with ganache-cli forks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Init Embark demo ####################### | |
$ embark demo | |
Initializing Embark template... | |
Installing packages... | |
Init complete | |
App ready at embark_demo | |
------------------- | |
Next steps: | |
-> cd embark_demo | |
-> embark run | |
For more info go to http://embark.status.im | |
$ cd embark_demo/ | |
# Show that tests work ####################### | |
$ embark test | |
Compiling contracts | |
SimpleStorage | |
✓ should set constructor value (13ms) - [0 gas] | |
✓ set storage value (35ms) - [26661 gas] | |
✓ should have account with balance (2ms) - [0 gas] | |
3 passing (4s) - [Total: 2376564 gas] | |
> All tests passed | |
# Show that test work on a regular separate ganache-cli instance ####################### | |
# (In a separate console) | |
$ ganache-cli -p 8777 | |
# then | |
$ embark test --node ws://localhost:8777 | |
Compiling contracts | |
Connected to a blockchain node on network 1560346837194 while your config specifies 1337 | |
Make sure you started the right blockchain node | |
SimpleStorage | |
✓ should set constructor value (8ms) - [0 gas] | |
✓ set storage value (56ms) - [26661 gas] | |
✓ should have account with balance (4ms) - [0 gas] | |
3 passing (4s) - [Total: 2376564 gas] | |
> All tests passed | |
# Start a fork with ganache-cli ####################### | |
# Stop first ganache instance, then: | |
$ ganache-cli --fork http://localhost:8545 -p 8777 | |
# where localhost:8545 is a geth instance (in my case Rinkeby) | |
# Show tests get stuck on pre-deploy tasks ####################### | |
$ embark test --node ws://localhost:8777 --loglevel "trace" | |
IPFS node not found, attempting to start own node | |
Storage module: Launching ipfs process... | |
Starting ipfs process | |
Compiling contracts | |
loading solc compiler... | |
Connected to a blockchain node on network 4 while your config specifies 1337 | |
Make sure you started the right blockchain node | |
IPFS: Initializing daemon... | |
go-ipfs version: 0.4.18- | |
Repo version: 7 | |
System version: amd64/linux | |
Golang version: go1.11.1 | |
compiling solidity contracts... | |
IPFS: Swarm listening on /ip4/127.0.0.1/tcp/4001 | |
Swarm listening on /ip4/192.168.178.43/tcp/4001 | |
Swarm listening on /ip4/192.168.178.46/tcp/4001 | |
Swarm listening on /ip6/2003:c6:f06:b400:1dcf:fdb8:5109:ba7a/tcp/4001 | |
Swarm listening on /ip6/2003:c6:f06:b400:4a8b:be70:460d:d279/tcp/4001 | |
Swarm listening on /ip6/2003:c6:f06:b400:ad8c:736c:bd1:c8c1/tcp/4001 | |
Swarm listening on /ip6/2003:c6:f06:b400:c05d:409c:dd09:8667/tcp/4001 | |
Swarm listening on /ip6/::1/tcp/4001 | |
Swarm listening on /p2p-circuit | |
IPFS: Swarm announcing /ip4/127.0.0.1/tcp/4001 | |
Swarm announcing /ip4/192.168.178.43/tcp/4001 | |
Swarm announcing /ip4/192.168.178.46/tcp/4001 | |
Swarm announcing /ip6/2003:c6:f06:b400:1dcf:fdb8:5109:ba7a/tcp/4001 | |
Swarm announcing /ip6/2003:c6:f06:b400:4a8b:be70:460d:d279/tcp/4001 | |
Swarm announcing /ip6/2003:c6:f06:b400:ad8c:736c:bd1:c8c1/tcp/4001 | |
Swarm announcing /ip6/2003:c6:f06:b400:c05d:409c:dd09:8667/tcp/4001 | |
IPFS: Swarm announcing /ip6/::1/tcp/4001 | |
API server listening on /ip4/127.0.0.1/tcp/5001 | |
IPFS: Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080 | |
Daemon is ready | |
ipfs process started | |
{ SimpleStorage: | |
{ fromIndex: 0, | |
args: [ 100 ], | |
className: 'SimpleStorage', | |
code: | |
'608060405234801561001057600080fd5b506040516020806101358339810180604052602081101561003057600080fd5b505160005560f2806100436000396000f3fe60806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c1460a3575b600080fd5b348015606257600080fd5b50606960b5565b60408051918252519081900360200190f35b348015608657600080fd5b5060a160048036036020811015609b57600080fd5b503560bb565b005b34801560ae57600080fd5b50606960c0565b60005481565b600055565b6000549056fea165627a7a72305820dbfd0840f257a95030a39ee4776c5200be065b3772015db043653df1971a44a90029', | |
runtimeBytecode: | |
'60806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c1460a3575b600080fd5b348015606257600080fd5b50606960b5565b60408051918252519081900360200190f35b348015608657600080fd5b5060a160048036036020811015609b57600080fd5b503560bb565b005b34801560ae57600080fd5b50606960c0565b60005481565b600055565b6000549056fea165627a7a72305820dbfd0840f257a95030a39ee4776c5200be065b3772015db043653df1971a44a90029', | |
realRuntimeBytecode: | |
'60806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c1460a3575b600080fd5b348015606257600080fd5b50606960b5565b60408051918252519081900360200190f35b348015608657600080fd5b5060a160048036036020811015609b57600080fd5b503560bb565b005b34801560ae57600080fd5b50606960c0565b60005481565b600055565b6000549056fea165627a7a72305820', | |
linkReferences: {}, | |
swarmHash: | |
'dbfd0840f257a95030a39ee4776c5200be065b3772015db043653df1971a44a9', | |
gasEstimates: { creation: [Object], external: [Object] }, | |
functionHashes: | |
{ 'get()': '6d4ce63c', | |
'set(uint256)': '60fe47b1', | |
'storedData()': '2a1afcd9' }, | |
abiDefinition: [ [Object], [Object], [Object], [Object] ], | |
filename: | |
'/home/seb/projs/eth/embark_demo/.embark/contracts/simple_storage.sol', | |
originalFilename: 'contracts/simple_storage.sol', | |
path: | |
'/home/seb/projs/eth/embark_demo/contracts/simple_storage.sol', | |
gas: 'auto', | |
gasPrice: undefined, | |
type: 'file', | |
deploy: true } } | |
finished | |
{ SimpleStorage: | |
{ args: [ 100 ], | |
className: 'SimpleStorage', | |
code: | |
'608060405234801561001057600080fd5b506040516020806101358339810180604052602081101561003057600080fd5b505160005560f2806100436000396000f3fe60806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c1460a3575b600080fd5b348015606257600080fd5b50606960b5565b60408051918252519081900360200190f35b348015608657600080fd5b5060a160048036036020811015609b57600080fd5b503560bb565b005b34801560ae57600080fd5b50606960c0565b60005481565b600055565b6000549056fea165627a7a72305820dbfd0840f257a95030a39ee4776c5200be065b3772015db043653df1971a44a90029', | |
runtimeBytecode: | |
'60806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c1460a3575b600080fd5b348015606257600080fd5b50606960b5565b60408051918252519081900360200190f35b348015608657600080fd5b5060a160048036036020811015609b57600080fd5b503560bb565b005b34801560ae57600080fd5b50606960c0565b60005481565b600055565b6000549056fea165627a7a72305820dbfd0840f257a95030a39ee4776c5200be065b3772015db043653df1971a44a90029', | |
realRuntimeBytecode: | |
'60806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c1460a3575b600080fd5b348015606257600080fd5b50606960b5565b60408051918252519081900360200190f35b348015608657600080fd5b5060a160048036036020811015609b57600080fd5b503560bb565b005b34801560ae57600080fd5b50606960c0565b60005481565b600055565b6000549056fea165627a7a72305820', | |
linkReferences: {}, | |
swarmHash: | |
'dbfd0840f257a95030a39ee4776c5200be065b3772015db043653df1971a44a9', | |
gasEstimates: { creation: [Object], external: [Object] }, | |
functionHashes: | |
{ 'get()': '6d4ce63c', | |
'set(uint256)': '60fe47b1', | |
'storedData()': '2a1afcd9' }, | |
abiDefinition: [ [Object], [Object], [Object], [Object] ], | |
filename: | |
'/home/seb/projs/eth/embark_demo/.embark/contracts/simple_storage.sol', | |
originalFilename: 'contracts/simple_storage.sol', | |
path: | |
'/home/seb/projs/eth/embark_demo/contracts/simple_storage.sol', | |
gas: 'auto', | |
gasPrice: undefined, | |
type: 'file', | |
deploy: true } } | |
finished | |
deploying contracts | |
Executing pre-deploy actions... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment