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

Deployment hangs when following the README instructions #17

Closed
peterjoel opened this issue Apr 5, 2018 · 12 comments
Closed

Deployment hangs when following the README instructions #17

peterjoel opened this issue Apr 5, 2018 · 12 comments

Comments

@peterjoel
Copy link

peterjoel commented Apr 5, 2018

It may be that I have used some incorrect information, as there is some ambiguity in the instructions. In particular, I have used the same account throughout, for 0xETH_ACCOUNT_VALIDATOR_SOKOL and the VALIDATORS and PROXY_OWNER parameters for running the deployment.

Another change I made, was to include this same account as the from field in each network configuration:

module.exports = {
  networks: {
    development: {
      host: "localhost",
      port: 7545,
      network_id: "*", // Match any network id
      from: "0xMY_ACCOUNT"
    },
    home: {
      host: "localhost",
      port: "8545", // check your sokol.toml [rpc] port section
      network_id: "*",
      from: "0xMY_ACCOUNT",
      gas: 4700000,
      gasPrice: 1000000000
    }
  }
}

This was because I was getting an error saying that the from parameter was missing.

With this setup, I have tried followed the instructions up to the bridge contract deployment:

$ VALIDATORS="0xMY_ACCOUNT" REQUIRED_NUMBER_OF_VALIDATORS=1 HOME_LIMIT=1000000000000000000 MAX_AMOUNT_PER_TX=100000000000000000 PROXY_OWNER="0xMY_ACCOUNT" NETWORK=home npm run deploy

But the process just hangs here:

> poa-parity-bridge-contracts@1.0.0 deploy /Users/peter/dev/poa/sokol-kovan-bridge/poa-parity-bridge-contracts
> truffle migrate --reset --network $NETWORK

Using network 'home'.

Running migration: 1_initial_migration.js
  Deploying Migrations...

With Parity UI connected to Kovan, I do get a request for a signature, but this is on the wrong network. I believe this needs to be signed on the Sokol chain instead. However, I cannot get Parity UI to connect to me Sokol chain.

@patitonar
Copy link

I followed the instructions and worked correctly for me. I also used the same address for 0xETH_ACCOUNT_VALIDATOR_SOKOL, VALIDATORS and PROXY_OWNER but didn't have to add the from parameter on the truffle configuration.

Some considerations from instructions before running the deploy:

  • Make sure your parity Home(sokol) node is fully synced by this step. You can start parity from console on the folder sokol-node with the following command parity --config sokol.toml --nat=none --no-ui
  • Get free Sokol Coins from the sokol-faucet

@peterjoel
Copy link
Author

@patitonar I believe it's fully synchronised. And I requested the Sokol tokens from the faucet.

The command you suggested, parity --config sokol.toml --nat=none --no-ui is exactly what is given in the README file.

My main uncertainties at this point are:

  • Is it correct to use the same account for everything? I.e. Validator and the bridge contract admin/owner?
  • What does it mean for the account to be "unlocked"? I was assuming this meant I would just sign the transaction in Parity UI, but...
  • Given that Sokol is running with --no-ui, how to sign a transaction? And how to verify that the Sokol faucet tokens are actually sent?

@peterjoel
Copy link
Author

@patitonar Are you signing the deployment transaction in a gui, or is it done by the deployment script, using the password file?

@patitonar
Copy link

Hi @peterjoel sorry on the delay. The signing is done by the deployment script using the password file and the JSON keystore file for my account provided in the folder sokol-datadir/keys/Sokol

@peterjoel
Copy link
Author

Thanks @patitonar, that's what I thought should happen. I'm going to start from scratch this afternoon, or maybe try on a different system.

Can you confirm the versions of Parity and Rust that you have got this working with? I'm using Parity v1.10.0-beta and Rust 1.23.0.

@patitonar
Copy link

@peterjoel I got this working with rustc 1.25 and Parity v1.9.5-stable

@peterjoel
Copy link
Author

peterjoel commented Apr 11, 2018

@patitonar I have that part working now. I upgraded my OS, Xcode, npm and node. And one of them was the reason.

@peterjoel
Copy link
Author

peterjoel commented Apr 11, 2018

Couple more questions though on the remainder.

  • At steps 7 and 8, the commands, (e.g. cat sokol-kovan-bridge/../HomeBridge.json | jq '.bytecode' -r | cut -c 3- > HomeBridge_bytecode.bin) only make sense if run from outside the sokol-kovan-bridge directory. But then the files are created one level too high. I changed the path so they are created in the main directory. I assume this is just a mistake in the readme, and should be ok.
  • In step 10, am I supposed to edit db.toml to include the correct block numbers for the contract deployments? If so, I'm not sure where to find those after the fact.

In any case (and I'm guessing this is about the deployment block numbers) step 12 fails with:

peter$ env RUST_LOG=info ./parity-bridge/target/release/bridge --config config.toml --database db.toml
INFO:bridge: Parsing cli arguments
INFO:bridge: Loading config
INFO:bridge: Starting event loop
INFO:bridge: Establishing ipc connection
WARN:bridge: Can't establish an IPC connection: Error(Msg("Cannot connect to home node ipc"), State { next_error: Some(Error(Web3(Error(Io(Error { repr: Os { code: 2, message: "No such file or directory" } }), State { next_error: None, backtrace: None })), State { next_error: None, backtrace: None })), backtrace: None })
Cannot connect to home node ipc

Caused by:
  Error(Io(Error { repr: Os { code: 2, message: "No such file or directory" } }), State { next_error: None, backtrace: None })
vermilion:sokol-kovan-bridge

@rstormsf
Copy link
Contributor

@peterjoel I have updated instructions. Sorry about it

@rstormsf
Copy link
Contributor

rstormsf commented Apr 11, 2018

WARN:bridge: Can't establish an IPC connection: Error(Msg("Cannot connect to home node ipc"), State { next_error: Some(Error(Web3(Error(Io(Error { repr: Os { code: 2, message: "No such file or directory" } }), State { next_error: None, backtrace: None })), State { next_error: None, backtrace: None })), backtrace: None })
Cannot connect to home node ipc

Caused by:
  Error(Io(Error { repr: Os { code: 2, message: "No such file or directory" } }), State { next_error: None, backtrace: None })
vermilion:sokol-kovan-bridge

seems like you haven't provided correct path to your IPC file.
Check your config.toml for IPC paths
and make sure you run the bridge when both parity sokol and kovan nodes are up and running

@peterjoel
Copy link
Author

@rstormsf Thanks, that was the problem. It was at the end of a long day!

@peterjoel
Copy link
Author

@rstormsf @patitonar @sergeevii123 The changes that you've made to the README since I came to this have helped enormously. It's much easier to follow. And all worked first time, when I started from scratch just now. So thanks for that.

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

3 participants