omni/poa-bridge

Account invalid error when using single validator

kpulkit29 opened this issue · 18 comments

env RUST_LOG=info ./poa-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: Home rpc host https://sokol.poa.network
INFO:bridge: Foreign rpc host https://kovan.infura.io/mew
INFO:bridge: Establishing connection:
INFO:bridge: using RPC connection
WARN:bridge: Can't establish an RPC connection: Error(AccountError(InvalidAccount), State { next_error: None, backtrace: None })
account error InvalidAccount

I am using a single validator config.toml and password.txt are in same folder

Could you share your config.toml? Please make sure that keystore file exists and can be accessible by the user who runs bridge process.

keys directory contains one keystore file, right? But you are trying to use two accounts 0xe53AdA4fE62C8972890d75cbc4C4d2fe6317e84D and 0xD6463bFEAe7b1fE3Ed85467Fd239FeD596F3AD8a. That's why you are getting error when trying to decode the private key for one of these accounts - there are no corresponding file.
You need to use one account - the same which is used in validators list during bridge contracts deployment.

BTW, which version of bridge process are you using?

Bridge version??

I made the db.toml file just as given in the readme
Deployed block number comes 0 in my db.toml.Is it wrong

The home bridge deployment block number is null.But everything went fine while deployment.

I made the db.toml file just as given in the readme

You need to use another format for the database described in https://github.com/poanetwork/poa-bridge#database-file-format. It also described in the step 9 in https://github.com/poanetwork/bridge-ui/blob/master/README.md.

In your case the database file should be as following:

home_contract_address = "0xE04d6A4a971d242aC246637843431E32269DBeC4"
foreign_contract_address = "0x74c2d89A4E15061c6C24a7f8cb11BE43e24464e0"
checked_deposit_relay = 3907634
checked_withdraw_relay = 8238408
checked_withdraw_confirm = 8238408

deployedBlockNumber was null in the database generated by the deployment script that's why I just used the latest block number in Sokol-testnet

Bridge version??

Did you build it from source code? Or downloaded from https://github.com/poanetwork/poa-bridge/releases? It is important since a specific version of bridge process is able to work with a specific version of bridge contracts. Please refer to release notes of particular release.

So I should just replace the home and foriegn contract address here right??

I already replaced the contract addresses by using addresses from the deployment database you provided above. Please check my example one more time.

So now the only step left is the UI part right?

right

Closing the issue since the inital error disappears.