omni / poa-bridge

POA <-> Ethereum bridge for self transfers of POA native token to POA20 (ERC20 representation). Not supported. Use TokenBridge instead
https://github.com/poanetwork/token-bridge
GNU General Public License v3.0
79 stars 38 forks source link

Account invalid error when using single validator #117

Closed kpulkit29 closed 5 years ago

kpulkit29 commented 5 years ago

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

akolotov commented 5 years ago

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

kpulkit29 commented 5 years ago

The keystore file is in the keys folder.Do i have to name it to keystore.json or default name would work

By the way here is the config.toml file

keystore = "keys"

[home] account = "0xe53AdA4fE62C8972890d75cbc4C4d2fe6317e84D" required_confirmations = 0 rpc_host = "https://sokol.poa.network" rpc_port = 443 password = "password.txt"

[foreign] account = "0xD6463bFEAe7b1fE3Ed85467Fd239FeD596F3AD8a" required_confirmations = 0 rpc_host = "https://kovan.infura.io/mew" rpc_port = 443 password = "password.txt"

[authorities] accounts = [ "0xD6463bFEAe7b1fE3Ed85467Fd239FeD596F3AD8a" ] required_signatures = 1

[transactions] deposit_relay = { gas = 3000000, gas_price = 1000000000 } withdraw_relay = { gas = 3000000, gas_price = 1000000000 } withdraw_confirm = { gas = 3000000, gas_price = 1000000000 }

On Tue, Aug 7, 2018 at 1:35 PM, Alexander Kolotov notifications@github.com wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/poanetwork/poa-bridge/issues/117#issuecomment-410970909, or mute the thread https://github.com/notifications/unsubscribe-auth/ATN85rNw5a_qAqd2slvzGyqm_sz4Oh0uks5uOUpIgaJpZM4VxqQS .

akolotov commented 5 years ago

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?

kpulkit29 commented 5 years ago

Thanks I changed it to the same address but now I get this error 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 https://rb.tc/3K01Z#https://sokol.poa.network INFO:bridge: Foreign rpc host https://kovan.infura.io/mew https://rb.tc/3K01-#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

check/sokol-kovan-bridge/poa2 ➜ env RUSTLOG=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 <https://rb.tc/3K01#https://sokol.poa.network> INFO:bridge: Foreign rpc host https://kovan.infura.io/mew INFO:bridge: Establishing connection: INFO:bridge: using RPC connection INFO:bridge: Acquiring home & foreign chain ids INFO:bridge: Home chain ID: 77 Foreign chain ID: 42 INFO:bridge: Reading the database Cannot parse database

On Tue, Aug 7, 2018 at 1:46 PM, Alexander Kolotov notifications@github.com wrote:

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?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/poanetwork/poa-bridge/issues/117#issuecomment-410973948, or mute the thread https://github.com/notifications/unsubscribe-auth/ATN85powql3siLwnanXVUditluke4yfZks5uOUzbgaJpZM4VxqQS .

kpulkit29 commented 5 years ago

Here is the db.toml file { "homeBridge": { "address": "0xE04d6A4a971d242aC246637843431E32269DBeC4", "deployedBlockNumber": null }, "foreignBridge": { "address": "0x74c2d89A4E15061c6C24a7f8cb11BE43e24464e0", "deployedBlockNumber": 8238408 }, "erc677": { "address": "0x5D27eE11662e2E2056DF25D7FB1FC4C20729997e" } }

On Tue, Aug 7, 2018 at 1:50 PM, pulkit k kpulkit291@gmail.com wrote:

Thanks I changed it to the same address but now I get this error 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 https://rb.tc/3K01Z#https://sokol.poa.network INFO:bridge: Foreign rpc host https://kovan.infura.io/mew https://rb.tc/3K01-#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

check/sokol-kovan-bridge/poa2 ➜ env RUSTLOG=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 <https://rb.tc/3K01#https://sokol.poa.network> INFO:bridge: Foreign rpc host https://kovan.infura.io/mew INFO:bridge: Establishing connection: INFO:bridge: using RPC connection INFO:bridge: Acquiring home & foreign chain ids INFO:bridge: Home chain ID: 77 Foreign chain ID: 42 INFO:bridge: Reading the database Cannot parse database

On Tue, Aug 7, 2018 at 1:46 PM, Alexander Kolotov < notifications@github.com> wrote:

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?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/poanetwork/poa-bridge/issues/117#issuecomment-410973948, or mute the thread https://github.com/notifications/unsubscribe-auth/ATN85powql3siLwnanXVUditluke4yfZks5uOUzbgaJpZM4VxqQS .

kpulkit29 commented 5 years ago

Bridge version??

kpulkit29 commented 5 years ago

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

kpulkit29 commented 5 years ago

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

akolotov commented 5 years ago

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

kpulkit29 commented 5 years ago

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

On Tue, Aug 7, 2018 at 1:58 PM, Alexander Kolotov notifications@github.com wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/poanetwork/poa-bridge/issues/117#issuecomment-410977332, or mute the thread https://github.com/notifications/unsubscribe-auth/ATN85p4q4yscOTV1xfhkNiGMjTnPduVXks5uOU_KgaJpZM4VxqQS .

akolotov commented 5 years ago

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.

akolotov commented 5 years ago

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.

kpulkit29 commented 5 years ago

I followed the steps mentioned in poa-bridge UI github repo

On Tue, Aug 7, 2018 at 2:01 PM, Alexander Kolotov notifications@github.com wrote:

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/poanetwork/poa-bridge/issues/117#issuecomment-410978202, or mute the thread https://github.com/notifications/unsubscribe-auth/ATN85slrEk3-TqnY2m-Ad1Yka8CK7r4Iks5uOVB9gaJpZM4VxqQS .

kpulkit29 commented 5 years ago

Thanks the rust thing is working on terminal now and says waiting for new withdraws that should get signed

On Tue, Aug 7, 2018 at 2:03 PM, pulkit k kpulkit291@gmail.com wrote:

I followed the steps mentioned in poa-bridge UI github repo

On Tue, Aug 7, 2018 at 2:01 PM, Alexander Kolotov < notifications@github.com> wrote:

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/poanetwork/poa-bridge/issues/117#issuecomment-410978202, or mute the thread https://github.com/notifications/unsubscribe-auth/ATN85slrEk3-TqnY2m-Ad1Yka8CK7r4Iks5uOVB9gaJpZM4VxqQS .

kpulkit29 commented 5 years ago

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

On Tue, Aug 7, 2018 at 2:04 PM, pulkit k kpulkit291@gmail.com wrote:

Thanks the rust thing is working on terminal now and says waiting for new withdraws that should get signed

On Tue, Aug 7, 2018 at 2:03 PM, pulkit k kpulkit291@gmail.com wrote:

I followed the steps mentioned in poa-bridge UI github repo

On Tue, Aug 7, 2018 at 2:01 PM, Alexander Kolotov < notifications@github.com> wrote:

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/poanetwork/poa-bridge/issues/117#issuecomment-410978202, or mute the thread https://github.com/notifications/unsubscribe-auth/ATN85slrEk3-TqnY2m-Ad1Yka8CK7r4Iks5uOVB9gaJpZM4VxqQS .

akolotov commented 5 years ago

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

right

akolotov commented 5 years ago

Closing the issue since the inital error disappears.

kpulkit29 commented 5 years ago

Sir thanks a lot for all the help.Me and my CEO have certain questions about replacing the sokol sidechain with the our sidechain &using our ERC20 instead of POA20. If its fine with you can we have a skype call to discuss.

Thanks, Pulkit

On Tue, Aug 7, 2018 at 2:14 PM, Alexander Kolotov notifications@github.com wrote:

Closed #117 https://github.com/poanetwork/poa-bridge/issues/117.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/poanetwork/poa-bridge/issues/117#event-1774706255, or mute the thread https://github.com/notifications/unsubscribe-auth/ATN85tKha0qbKp68rUIJLCpxEMZ52Gp6ks5uOVNhgaJpZM4VxqQS .